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ACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IAId,IAEA07N,EAAG17N,OAAO,oBAAoB,CAC5B,aACC,SAAUk+N,GACX,SAASgK,EAAapsT,EAAUrC,GAC9ByuT,EAAYtJ,UAAUzlT,YAAYkG,KAAK/J,KACzC,CAiCA,OA/BA4oT,EAAMK,OAAO2J,EAAahK,EAAMuB,YAEhCyI,EA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ttS,UAAU,EACV4sC,QAAS,OACTrkD,WAAW,EACXusD,OAAO,EACPT,YAAY,GAEhBzqE,GAAE,WACEA,EAAE,SAAS4C,MAAK,WACZ,IAAI3B,EAAUjB,EAAEjD,MAChB,IAAQkE,EAAQ,GAAI,GAAS,WAA2B,GAC5D,GACJ","sources":["webpack:///./node_modules/moment/locale/fa.js","webpack:///./node_modules/moment/locale/ur.js","webpack:///./node_modules/videojs-vtt.js/lib/vttcue.js","webpack:///./node_modules/moment/locale/gd.js","webpack:///./node_modules/moment/locale/zh-tw.js","webpack:///./node_modules/moment/locale/mk.js","webpack:///./node_modules/jquery-ajax-unobtrusive/dist/jquery.unobtrusive-ajax.js","webpack:///./node_modules/moment/locale/fi.js","webpack:///./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack:///./node_modules/moment/locale/hu.js","webpack:///./node_modules/moment/locale/dv.js","webpack:///./node_modules/moment/locale/sw.js","webpack:///./node_modules/moment/locale/es-do.js","webpack:///./node_modules/moment/locale/sv.js","webpack:///./node_modules/moment/locale/ta.js","webpack:///./node_modules/@videojs/xhr/lib/index.js","webpack:///./node_modules/moment/locale/tlh.js","webpack:///./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack:///./node_modules/moment/locale/vi.js","webpack:///./node_modules/moment/locale/sd.js","webpack:///./node_modules/moment/locale/bn.js","webpack:///./node_modules/moment/locale/br.js","webpack:///./node_modules/moment/locale/ar-dz.js","webpack:///./node_modules/moment/locale/ar.js","webpack:///./node_modules/moment/locale/zh-mo.js","webpack:///./node_modules/moment/locale/bo.js","webpack:///./node_modules/moment/locale/zh-hk.js","webpack:///./node_modules/video.js/dist/video.js","webpack:///./node_modules/moment/locale/he.js","webpack:///./node_modules/moment/locale/ga.js","webpack:///./node_modules/moment/locale/tzm.js","webpack:///./node_modules/knockout/build/output/knockout-latest.js","webpack:///./node_modules/moment/locale/ka.js","webpack:///./node_modules/moment/locale/it-ch.js","webpack:///./node_modules/moment/locale/mi.js","webpack:///./node_modules/moment/locale/te.js","webpack:///./node_modules/moment/moment-exposed.js","webpack:///./node_modules/moment/locale/gom-deva.js","webpack:///./node_modules/moment/locale/yo.js","webpack:///./node_modules/moment/locale/my.js","webpack:///./node_modules/moment/locale/ru.js","webpack:///./node_modules/moment/locale/nb.js","webpack:///./node_modules/moment/locale/ms-my.js","webpack:///./node_modules/moment/locale/ar-ly.js","webpack:///./node_modules/moment/locale/uz-latn.js","webpack:///./node_modules/moment/locale/fo.js","webpack:///./node_modules/moment/locale/nl.js","webpack:///./node_modules/moment/locale/zh-cn.js","webpack:///./node_modules/moment/locale/ar-sa.js","webpack:///./node_modules/moment/locale/eo.js","webpack:///./node_modules/moment/locale/en-sg.js","webpack:///./node_modules/moment/locale/et.js","webpack:///./node_modules/moment/locale/ko.js","webpack:///./node_modules/moment/locale/sr-cyrl.js","webpack:///./node_modules/moment/locale/gom-latn.js","webpack:///./node_modules/moment/locale/ms.js","webpack:///./node_modules/moment/locale/se.js","webpack:///./node_modules/moment/locale/eu.js","webpack:///./node_modules/moment/locale/da.js","webpack:///./node_modules/mux.js/lib/utils/numbers.js","webpack:///./node_modules/moment/locale/cv.js","webpack:///./node_modules/moment/locale/ml.js","webpack:///./node_modules/moment/locale/nl-be.js","webpack:///./node_modules/moment/locale/ja.js","webpack:///./node_modules/moment/locale/hi.js","webpack:///./node_modules/moment/locale/en-au.js","webpack:///./node_modules/jquery/dist/jquery-exposed.js","webpack:///./node_modules/moment/locale/x-pseudo.js","webpack:///./node_modules/moment/locale/id.js","webpack:///./PimShop.Cms/Assets/frontend/datatables.ts","webpack:///./node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack:///./node_modules/moment/locale/cy.js","webpack:///./node_modules/moment/locale/pl.js","webpack:///./node_modules/moment/locale/bs.js","webpack:///./node_modules/moment/locale/kn.js","webpack:///./node_modules/moment/locale/ro.js","webpack:///./node_modules/@xmldom/xmldom/lib/sax.js","webpack:///./node_modules/moment/locale/ar-ma.js","webpack:///./node_modules/moment/locale/nn.js","webpack:///./node_modules/@xmldom/xmldom/lib/conventions.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/moment/locale/el.js","webpack:///./node_modules/jquery/dist/jquery.js","webpack:///./node_modules/moment/locale/de-ch.js","webpack:///./node_modules/@xmldom/xmldom/lib/dom.js","webpack:///./node_modules/videojs-vtt.js/lib/browser-index.js","webpack:///./node_modules/moment/locale/bm.js","webpack:///./node_modules/moment/locale/gu.js","webpack:///./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///./node_modules/moment/moment.js","webpack:///./node_modules/moment/locale/tr.js","webpack:///./node_modules/moment/locale/af.js","webpack:///./node_modules/moment/locale/ sync ^\\.\\/.*$","webpack:///./node_modules/select2/dist/js/select2.js","webpack:///./node_modules/moment/locale/fr.js","webpack:///./node_modules/moment/locale/az.js","webpack:///./node_modules/moment/locale/en-il.js","webpack:///./node_modules/moment/locale/sr.js","webpack:///./node_modules/@xmldom/xmldom/lib/dom-parser.js","webpack:///./node_modules/moment/locale/lt.js","webpack:///./node_modules/moment/locale/sk.js","webpack:///./node_modules/moment/locale/th.js","webpack:///./node_modules/moment/locale/lo.js","webpack:///./node_modules/videojs-vtt.js/lib/vttregion.js","webpack:///./node_modules/moment/locale/fil.js","webpack:///./node_modules/moment/locale/ss.js","webpack:///./node_modules/moment/locale/de-at.js","webpack:///./node_modules/@videojs/xhr/lib/interceptors.js","webpack:///./node_modules/moment/locale/mr.js","webpack:///./node_modules/moment/locale/ku-kmr.js","webpack:///./node_modules/moment/locale/en-gb.js","webpack:///./node_modules/moment/locale/hr.js","webpack:///./node_modules/videojs-vtt.js/lib/vtt.js","webpack:///./node_modules/moment/locale/fr-ca.js","webpack:///./node_modules/moment/locale/cs.js","webpack:///./node_modules/@xmldom/xmldom/lib/entities.js","webpack:///./node_modules/moment/locale/tg.js","webpack:///./node_modules/moment/locale/es-us.js","webpack:///./node_modules/moment/locale/en-ie.js","webpack:///./node_modules/moment/locale/uk.js","webpack:///./node_modules/moment/locale/sl.js","webpack:///./node_modules/videojs-youtube/dist/Youtube.js","webpack:///./node_modules/moment/locale/sq.js","webpack:///./node_modules/moment/locale/km.js","webpack:///./node_modules/moment/locale/ar-ps.js","webpack:///./node_modules/is-function/index.js","webpack:///./node_modules/moment/locale/fy.js","webpack:///./node_modules/moment/locale/mt.js","webpack:///./node_modules/moment/locale/kk.js","webpack:///./node_modules/moment/locale/hy-am.js","webpack:///./node_modules/moment/locale/ca.js","webpack:///./node_modules/moment/locale/gl.js","webpack:///./node_modules/moment/locale/bn-bd.js","webpack:///./node_modules/knockout/build/output/knockout-latest-exposed.js","webpack:///./node_modules/@videojs/xhr/lib/http-handler.js","webpack:///./node_modules/moment/locale/si.js","webpack:///./node_modules/moment/locale/uz.js","webpack:///./node_modules/moment/locale/es.js","webpack:///./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack:///./node_modules/moment/locale/tzm-latn.js","webpack:///./node_modules/moment/locale/es-mx.js","webpack:///./node_modules/moment/locale/bg.js","webpack:///./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack:///./node_modules/moment/locale/de.js","webpack:///./node_modules/moment/locale/fr-ch.js","webpack:///./node_modules/moment/locale/me.js","webpack:///./node_modules/moment/locale/ku.js","webpack:///./node_modules/moment/locale/ne.js","webpack:///./node_modules/moment/locale/en-ca.js","webpack:///./node_modules/moment/locale/pt-br.js","webpack:///./node_modules/moment/locale/it.js","webpack:///./node_modules/moment/locale/ug-cn.js","webpack:///./node_modules/moment/locale/ky.js","webpack:///./node_modules/@videojs/xhr/lib/retry.js","webpack:///./node_modules/moment/locale/ar-kw.js","webpack:///./node_modules/moment/locale/tet.js","webpack:///./node_modules/moment/locale/be.js","webpack:///./node_modules/mux.js/lib/tools/parse-sidx.js","webpack:///./node_modules/@xmldom/xmldom/lib/index.js","webpack:///./node_modules/moment/locale/en-in.js","webpack:///./node_modules/moment/locale/mn.js","webpack:///./node_modules/moment/locale/tl-ph.js","webpack:///./node_modules/moment/locale/oc-lnc.js","webpack:///./node_modules/moment/locale/is.js","webpack:///./node_modules/moment/locale/en-nz.js","webpack:///./node_modules/moment/locale/tk.js","webpack:///./node_modules/moment/locale/lv.js","webpack:///./node_modules/mux.js/lib/utils/clock.js","webpack:///./node_modules/moment/locale/lb.js","webpack:///./node_modules/global/document.js","webpack:///./node_modules/moment/locale/jv.js","webpack:///./node_modules/moment/locale/ar-tn.js","webpack:///./node_modules/moment/locale/pt.js","webpack:///./node_modules/global/window.js","webpack:///./node_modules/moment/locale/tzl.js","webpack:///./node_modules/moment/locale/pa-in.js","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/@videojs/vhs-utils/es/resolve-url.js","webpack:///./node_modules/@videojs/vhs-utils/es/stream.js","webpack:///./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","webpack:///./node_modules/m3u8-parser/dist/m3u8-parser.es.js","webpack:///./node_modules/@videojs/vhs-utils/es/codecs.js","webpack:///./node_modules/@videojs/vhs-utils/es/byte-helpers.js","webpack:///./node_modules/@videojs/vhs-utils/es/media-types.js","webpack:///./node_modules/mpd-parser/dist/mpd-parser.es.js","webpack:///./node_modules/@videojs/vhs-utils/es/media-groups.js","webpack:///./node_modules/@videojs/vhs-utils/es/mp4-helpers.js","webpack:///./node_modules/@videojs/vhs-utils/es/id3-helpers.js","webpack:///./node_modules/@videojs/vhs-utils/es/opus-helpers.js","webpack:///./node_modules/@videojs/vhs-utils/es/ebml-helpers.js","webpack:///./node_modules/@videojs/vhs-utils/es/nal-helpers.js","webpack:///./node_modules/@videojs/vhs-utils/es/containers.js","webpack:///./node_modules/video.js/dist/video.es.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/nonce","webpack:///./PimShop/wwwroot/css/new/pagination.css?3227","webpack:///./node_modules/video.js/dist/video-js.css?6099","webpack:///./PimShop.Cms/Assets/frontend/videojs.ts"],"sourcesContent":["//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '۱',\n            2: '۲',\n            3: '۳',\n            4: '۴',\n            5: '۵',\n            6: '۶',\n            7: '۷',\n            8: '۸',\n            9: '۹',\n            0: '۰',\n        },\n        numberMap = {\n            '۱': '1',\n            '۲': '2',\n            '۳': '3',\n            '۴': '4',\n            '۵': '5',\n            '۶': '6',\n            '۷': '7',\n            '۸': '8',\n            '۹': '9',\n            '۰': '0',\n        };\n\n    var fa = moment.defineLocale('fa', {\n        months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n                '_'\n            ),\n        weekdays:\n            'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n                '_'\n            ),\n        weekdaysShort:\n            'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n                '_'\n            ),\n        weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /قبل از ظهر|بعد از ظهر/,\n        isPM: function (input) {\n            return /بعد از ظهر/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'قبل از ظهر';\n            } else {\n                return 'بعد از ظهر';\n            }\n        },\n        calendar: {\n            sameDay: '[امروز ساعت] LT',\n            nextDay: '[فردا ساعت] LT',\n            nextWeek: 'dddd [ساعت] LT',\n            lastDay: '[دیروز ساعت] LT',\n            lastWeek: 'dddd [پیش] [ساعت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'در %s',\n            past: '%s پیش',\n            s: 'چند ثانیه',\n            ss: '%d ثانیه',\n            m: 'یک دقیقه',\n            mm: '%d دقیقه',\n            h: 'یک ساعت',\n            hh: '%d ساعت',\n            d: 'یک روز',\n            dd: '%d روز',\n            M: 'یک ماه',\n            MM: '%d ماه',\n            y: 'یک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[۰-۹]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}م/,\n        ordinal: '%dم',\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return fa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'جنوری',\n            'فروری',\n            'مارچ',\n            'اپریل',\n            'مئی',\n            'جون',\n            'جولائی',\n            'اگست',\n            'ستمبر',\n            'اکتوبر',\n            'نومبر',\n            'دسمبر',\n        ],\n        days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n    var ur = moment.defineLocale('ur', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd، D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /صبح|شام/,\n        isPM: function (input) {\n            return 'شام' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'صبح';\n            }\n            return 'شام';\n        },\n        calendar: {\n            sameDay: '[آج بوقت] LT',\n            nextDay: '[کل بوقت] LT',\n            nextWeek: 'dddd [بوقت] LT',\n            lastDay: '[گذشتہ روز بوقت] LT',\n            lastWeek: '[گذشتہ] dddd [بوقت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s بعد',\n            past: '%s قبل',\n            s: 'چند سیکنڈ',\n            ss: '%d سیکنڈ',\n            m: 'ایک منٹ',\n            mm: '%d منٹ',\n            h: 'ایک گھنٹہ',\n            hh: '%d گھنٹے',\n            d: 'ایک دن',\n            dd: '%d دن',\n            M: 'ایک ماہ',\n            MM: '%d ماہ',\n            y: 'ایک سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ur;\n\n})));\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n  \"\": 1,\n  \"lr\": 1,\n  \"rl\": 1\n};\nvar alignSetting = {\n  \"start\": 1,\n  \"center\": 1,\n  \"end\": 1,\n  \"left\": 1,\n  \"right\": 1,\n  \"auto\": 1,\n  \"line-left\": 1,\n  \"line-right\": 1\n};\n\nfunction findDirectionSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var dir = directionSetting[value.toLowerCase()];\n  return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var align = alignSetting[value.toLowerCase()];\n  return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n  /**\n   * Shim implementation specific properties. These properties are not in\n   * the spec.\n   */\n\n  // Lets us know when the VTTCue's data has changed in such a way that we need\n  // to recompute its display state. This lets us compute its display state\n  // lazily.\n  this.hasBeenReset = false;\n\n  /**\n   * VTTCue and TextTrackCue properties\n   * http://dev.w3.org/html5/webvtt/#vttcue-interface\n   */\n\n  var _id = \"\";\n  var _pauseOnExit = false;\n  var _startTime = startTime;\n  var _endTime = endTime;\n  var _text = text;\n  var _region = null;\n  var _vertical = \"\";\n  var _snapToLines = true;\n  var _line = \"auto\";\n  var _lineAlign = \"start\";\n  var _position = \"auto\";\n  var _positionAlign = \"auto\";\n  var _size = 100;\n  var _align = \"center\";\n\n  Object.defineProperties(this, {\n    \"id\": {\n      enumerable: true,\n      get: function() {\n        return _id;\n      },\n      set: function(value) {\n        _id = \"\" + value;\n      }\n    },\n\n    \"pauseOnExit\": {\n      enumerable: true,\n      get: function() {\n        return _pauseOnExit;\n      },\n      set: function(value) {\n        _pauseOnExit = !!value;\n      }\n    },\n\n    \"startTime\": {\n      enumerable: true,\n      get: function() {\n        return _startTime;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"Start time must be set to a number.\");\n        }\n        _startTime = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"endTime\": {\n      enumerable: true,\n      get: function() {\n        return _endTime;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"End time must be set to a number.\");\n        }\n        _endTime = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"text\": {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = \"\" + value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"region\": {\n      enumerable: true,\n      get: function() {\n        return _region;\n      },\n      set: function(value) {\n        _region = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"vertical\": {\n      enumerable: true,\n      get: function() {\n        return _vertical;\n      },\n      set: function(value) {\n        var setting = findDirectionSetting(value);\n        // Have to check for false because the setting an be an empty string.\n        if (setting === false) {\n          throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n        }\n        _vertical = setting;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"snapToLines\": {\n      enumerable: true,\n      get: function() {\n        return _snapToLines;\n      },\n      set: function(value) {\n        _snapToLines = !!value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"line\": {\n      enumerable: true,\n      get: function() {\n        return _line;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\" && value !== autoKeyword) {\n          throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n        }\n        _line = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"lineAlign\": {\n      enumerable: true,\n      get: function() {\n        return _lineAlign;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n        } else {\n          _lineAlign = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    },\n\n    \"position\": {\n      enumerable: true,\n      get: function() {\n        return _position;\n      },\n      set: function(value) {\n        if (value < 0 || value > 100) {\n          throw new Error(\"Position must be between 0 and 100.\");\n        }\n        _position = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"positionAlign\": {\n      enumerable: true,\n      get: function() {\n        return _positionAlign;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n        } else {\n          _positionAlign = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    },\n\n    \"size\": {\n      enumerable: true,\n      get: function() {\n        return _size;\n      },\n      set: function(value) {\n        if (value < 0 || value > 100) {\n          throw new Error(\"Size must be between 0 and 100.\");\n        }\n        _size = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"align\": {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n        }\n        _align = setting;\n        this.hasBeenReset = true;\n      }\n    }\n  });\n\n  /**\n   * Other <track> spec defined properties\n   */\n\n  // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n  this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function() {\n  // Assume WebVTT.convertCueToDOMTree is on the global.\n  return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;\n","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'Am Faoilleach',\n            'An Gearran',\n            'Am Màrt',\n            'An Giblean',\n            'An Cèitean',\n            'An t-Ògmhios',\n            'An t-Iuchar',\n            'An Lùnastal',\n            'An t-Sultain',\n            'An Dàmhair',\n            'An t-Samhain',\n            'An Dùbhlachd',\n        ],\n        monthsShort = [\n            'Faoi',\n            'Gear',\n            'Màrt',\n            'Gibl',\n            'Cèit',\n            'Ògmh',\n            'Iuch',\n            'Lùn',\n            'Sult',\n            'Dàmh',\n            'Samh',\n            'Dùbh',\n        ],\n        weekdays = [\n            'Didòmhnaich',\n            'Diluain',\n            'Dimàirt',\n            'Diciadain',\n            'Diardaoin',\n            'Dihaoine',\n            'Disathairne',\n        ],\n        weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n        weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n    var gd = moment.defineLocale('gd', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[An-diugh aig] LT',\n            nextDay: '[A-màireach aig] LT',\n            nextWeek: 'dddd [aig] LT',\n            lastDay: '[An-dè aig] LT',\n            lastWeek: 'dddd [seo chaidh] [aig] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ann an %s',\n            past: 'bho chionn %s',\n            s: 'beagan diogan',\n            ss: '%d diogan',\n            m: 'mionaid',\n            mm: '%d mionaidean',\n            h: 'uair',\n            hh: '%d uairean',\n            d: 'latha',\n            dd: '%d latha',\n            M: 'mìos',\n            MM: '%d mìosan',\n            y: 'bliadhna',\n            yy: '%d bliadhna',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhTw = moment.defineLocale('zh-tw', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天] LT',\n            nextDay: '[明天] LT',\n            nextWeek: '[下]dddd LT',\n            lastDay: '[昨天] LT',\n            lastWeek: '[上]dddd LT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhTw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mk = moment.defineLocale('mk', {\n        months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n        weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Денес во] LT',\n            nextDay: '[Утре во] LT',\n            nextWeek: '[Во] dddd [во] LT',\n            lastDay: '[Вчера во] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Изминатата] dddd [во] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Изминатиот] dddd [во] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пред %s',\n            s: 'неколку секунди',\n            ss: '%d секунди',\n            m: 'една минута',\n            mm: '%d минути',\n            h: 'еден час',\n            hh: '%d часа',\n            d: 'еден ден',\n            dd: '%d дена',\n            M: 'еден месец',\n            MM: '%d месеци',\n            y: 'една година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return mk;\n\n})));\n","// Unobtrusive Ajax support library for jQuery\n// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n// @version v3.2.6\n// \n// Microsoft grants you the right to use these script files for the sole\n// purpose of either: (i) interacting through your browser with the Microsoft\n// website or online service, subject to the applicable licensing or use\n// terms; or (ii) using the files as included with a Microsoft product subject\n// to that product's license terms. Microsoft reserves all other rights to the\n// files not expressly granted by Microsoft, whether by implication, estoppel\n// or otherwise. Insofar as a script file is dual licensed under GPL,\n// Microsoft neither took the code under GPL nor distributes it thereunder but\n// under the terms set out in this paragraph. All notices and licenses\n// below are for informational purposes only.\n\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\n/*global window: false, jQuery: false */\n\n(function ($) {\n    var data_click = \"unobtrusiveAjaxClick\",\n        data_target = \"unobtrusiveAjaxClickTarget\",\n        data_validation = \"unobtrusiveValidation\";\n\n    function getFunction(code, argNames) {\n        var fn = window, parts = (code || \"\").split(\".\");\n        while (fn && parts.length) {\n            fn = fn[parts.shift()];\n        }\n        if (typeof (fn) === \"function\") {\n            return fn;\n        }\n        argNames.push(code);\n        return Function.constructor.apply(null, argNames);\n    }\n\n    function isMethodProxySafe(method) {\n        return method === \"GET\" || method === \"POST\";\n    }\n\n    function asyncOnBeforeSend(xhr, method) {\n        if (!isMethodProxySafe(method)) {\n            xhr.setRequestHeader(\"X-HTTP-Method-Override\", method);\n        }\n    }\n\n    function asyncOnSuccess(element, data, contentType) {\n        var mode;\n\n        if (contentType.indexOf(\"application/x-javascript\") !== -1) {  // jQuery already executes JavaScript for us\n            return;\n        }\n\n        mode = (element.getAttribute(\"data-ajax-mode\") || \"\").toUpperCase();\n        $(element.getAttribute(\"data-ajax-update\")).each(function (i, update) {\n            var top;\n\n            switch (mode) {\n                case \"BEFORE\":\n                    $(update).prepend(data);\n                    break;\n                case \"AFTER\":\n                    $(update).append(data);\n                    break;\n                case \"REPLACE-WITH\":\n                    $(update).replaceWith(data);\n                    break;\n                default:\n                    $(update).html(data);\n                    break;\n            }\n        });\n    }\n\n    function asyncRequest(element, options) {\n        var confirm, loading, method, duration;\n\n        confirm = element.getAttribute(\"data-ajax-confirm\");\n        if (confirm && !window.confirm(confirm)) {\n            return;\n        }\n\n        loading = $(element.getAttribute(\"data-ajax-loading\"));\n        duration = parseInt(element.getAttribute(\"data-ajax-loading-duration\"), 10) || 0;\n\n        $.extend(options, {\n            type: element.getAttribute(\"data-ajax-method\") || undefined,\n            url: element.getAttribute(\"data-ajax-url\") || undefined,\n            cache: (element.getAttribute(\"data-ajax-cache\") || \"\").toLowerCase() === \"true\",\n            beforeSend: function (xhr) {\n                var result;\n                asyncOnBeforeSend(xhr, method);\n                result = getFunction(element.getAttribute(\"data-ajax-begin\"), [\"xhr\"]).apply(element, arguments);\n                if (result !== false) {\n                    loading.show(duration);\n                }\n                return result;\n            },\n            complete: function () {\n                loading.hide(duration);\n                getFunction(element.getAttribute(\"data-ajax-complete\"), [\"xhr\", \"status\"]).apply(element, arguments);\n            },\n            success: function (data, status, xhr) {\n                asyncOnSuccess(element, data, xhr.getResponseHeader(\"Content-Type\") || \"text/html\");\n                getFunction(element.getAttribute(\"data-ajax-success\"), [\"data\", \"status\", \"xhr\"]).apply(element, arguments);\n            },\n            error: function () {\n                getFunction(element.getAttribute(\"data-ajax-failure\"), [\"xhr\", \"status\", \"error\"]).apply(element, arguments);\n            }\n        });\n\n        options.data.push({ name: \"X-Requested-With\", value: \"XMLHttpRequest\" });\n\n        method = options.type.toUpperCase();\n        if (!isMethodProxySafe(method)) {\n            options.type = \"POST\";\n            options.data.push({ name: \"X-HTTP-Method-Override\", value: method });\n        }\n\n        // change here:\n        // Check for a Form POST with enctype=multipart/form-data\n        // add the input file that were not previously included in the serializeArray()\n        // set processData and contentType to false\n        var $element = $(element);\n        if ($element.is(\"form\") && $element.attr(\"enctype\") == \"multipart/form-data\") {\n            var formdata = new FormData();\n            $.each(options.data, function (i, v) {\n                formdata.append(v.name, v.value);\n            });\n            $(\"input[type=file]\", $element).each(function () {\n                var file = this;\n                $.each(file.files, function (n, v) {\n                    formdata.append(file.name, v);\n                });\n            });\n            $.extend(options, {\n                processData: false,\n                contentType: false,\n                data: formdata\n            });\n        }\n        // end change\n\n        $.ajax(options);\n    }\n\n    function validate(form) {\n        var validationInfo = $(form).data(data_validation);\n        return !validationInfo || !validationInfo.validate || validationInfo.validate();\n    }\n\n    $(document).on(\"click\", \"a[data-ajax=true]\", function (evt) {\n        evt.preventDefault();\n        asyncRequest(this, {\n            url: this.href,\n            type: \"GET\",\n            data: []\n        });\n    });\n\n    $(document).on(\"click\", \"form[data-ajax=true] input[type=image]\", function (evt) {\n        var name = evt.target.name,\n            target = $(evt.target),\n            form = $(target.parents(\"form\")[0]),\n            offset = target.offset();\n\n        form.data(data_click, [\n            { name: name + \".x\", value: Math.round(evt.pageX - offset.left) },\n            { name: name + \".y\", value: Math.round(evt.pageY - offset.top) }\n        ]);\n\n        setTimeout(function () {\n            form.removeData(data_click);\n        }, 0);\n    });\n\n    $(document).on(\"click\", \"form[data-ajax=true] :submit\", function (evt) {\n        var name = evt.currentTarget.name,\n            target = $(evt.target),\n            form = $(target.parents(\"form\")[0]);\n\n        form.data(data_click, name ? [{ name: name, value: evt.currentTarget.value }] : []);\n        form.data(data_target, target);\n\n        setTimeout(function () {\n            form.removeData(data_click);\n            form.removeData(data_target);\n        }, 0);\n    });\n\n    $(document).on(\"submit\", \"form[data-ajax=true]\", function (evt) {\n        var clickInfo = $(this).data(data_click) || [],\n            clickTarget = $(this).data(data_target),\n            isCancel = clickTarget && (clickTarget.hasClass(\"cancel\") || clickTarget.attr('formnovalidate') !== undefined);\n        evt.preventDefault();\n        if (!isCancel && !validate(this)) {\n            return;\n        }\n        asyncRequest(this, {\n            url: this.action,\n            type: this.method || \"GET\",\n            data: clickInfo.concat($(this).serializeArray())\n        });\n    });\n}(jQuery));\n","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var numbersPast =\n            'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n                ' '\n            ),\n        numbersFuture = [\n            'nolla',\n            'yhden',\n            'kahden',\n            'kolmen',\n            'neljän',\n            'viiden',\n            'kuuden',\n            numbersPast[7],\n            numbersPast[8],\n            numbersPast[9],\n        ];\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = '';\n        switch (key) {\n            case 's':\n                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n            case 'ss':\n                result = isFuture ? 'sekunnin' : 'sekuntia';\n                break;\n            case 'm':\n                return isFuture ? 'minuutin' : 'minuutti';\n            case 'mm':\n                result = isFuture ? 'minuutin' : 'minuuttia';\n                break;\n            case 'h':\n                return isFuture ? 'tunnin' : 'tunti';\n            case 'hh':\n                result = isFuture ? 'tunnin' : 'tuntia';\n                break;\n            case 'd':\n                return isFuture ? 'päivän' : 'päivä';\n            case 'dd':\n                result = isFuture ? 'päivän' : 'päivää';\n                break;\n            case 'M':\n                return isFuture ? 'kuukauden' : 'kuukausi';\n            case 'MM':\n                result = isFuture ? 'kuukauden' : 'kuukautta';\n                break;\n            case 'y':\n                return isFuture ? 'vuoden' : 'vuosi';\n            case 'yy':\n                result = isFuture ? 'vuoden' : 'vuotta';\n                break;\n        }\n        result = verbalNumber(number, isFuture) + ' ' + result;\n        return result;\n    }\n    function verbalNumber(number, isFuture) {\n        return number < 10\n            ? isFuture\n                ? numbersFuture[number]\n                : numbersPast[number]\n            : number;\n    }\n\n    var fi = moment.defineLocale('fi', {\n        months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n            '_'\n        ),\n        monthsShort:\n            'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n                '_'\n            ),\n        weekdays:\n            'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n                '_'\n            ),\n        weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM[ta] YYYY',\n            LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n            LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n            l: 'D.M.YYYY',\n            ll: 'Do MMM YYYY',\n            lll: 'Do MMM YYYY, [klo] HH.mm',\n            llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n        },\n        calendar: {\n            sameDay: '[tänään] [klo] LT',\n            nextDay: '[huomenna] [klo] LT',\n            nextWeek: 'dddd [klo] LT',\n            lastDay: '[eilen] [klo] LT',\n            lastWeek: '[viime] dddd[na] [klo] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s päästä',\n            past: '%s sitten',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fi;\n\n})));\n","\"use strict\";\n\n/* istanbul ignore next  */\nfunction insertStyleElement(options) {\n  var element = document.createElement(\"style\");\n  options.setAttributes(element, options.attributes);\n  options.insert(element, options.options);\n  return element;\n}\nmodule.exports = insertStyleElement;","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt  : https://github.com/passatgt\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var weekEndings =\n        'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n    function translate(number, withoutSuffix, key, isFuture) {\n        var num = number;\n        switch (key) {\n            case 's':\n                return isFuture || withoutSuffix\n                    ? 'néhány másodperc'\n                    : 'néhány másodperce';\n            case 'ss':\n                return num + (isFuture || withoutSuffix)\n                    ? ' másodperc'\n                    : ' másodperce';\n            case 'm':\n                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'mm':\n                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'h':\n                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'hh':\n                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'd':\n                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'dd':\n                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'M':\n                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'MM':\n                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'y':\n                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n            case 'yy':\n                return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n        }\n        return '';\n    }\n    function week(isFuture) {\n        return (\n            (isFuture ? '' : '[múlt] ') +\n            '[' +\n            weekEndings[this.day()] +\n            '] LT[-kor]'\n        );\n    }\n\n    var hu = moment.defineLocale('hu', {\n        months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n        weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n        weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY. MMMM D.',\n            LLL: 'YYYY. MMMM D. H:mm',\n            LLLL: 'YYYY. MMMM D., dddd H:mm',\n        },\n        meridiemParse: /de|du/i,\n        isPM: function (input) {\n            return input.charAt(1).toLowerCase() === 'u';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower === true ? 'de' : 'DE';\n            } else {\n                return isLower === true ? 'du' : 'DU';\n            }\n        },\n        calendar: {\n            sameDay: '[ma] LT[-kor]',\n            nextDay: '[holnap] LT[-kor]',\n            nextWeek: function () {\n                return week.call(this, true);\n            },\n            lastDay: '[tegnap] LT[-kor]',\n            lastWeek: function () {\n                return week.call(this, false);\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s múlva',\n            past: '%s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return hu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'ޖެނުއަރީ',\n            'ފެބްރުއަރީ',\n            'މާރިޗު',\n            'އޭޕްރީލު',\n            'މޭ',\n            'ޖޫން',\n            'ޖުލައި',\n            'އޯގަސްޓު',\n            'ސެޕްޓެމްބަރު',\n            'އޮކްޓޯބަރު',\n            'ނޮވެމްބަރު',\n            'ޑިސެމްބަރު',\n        ],\n        weekdays = [\n            'އާދިއްތަ',\n            'ހޯމަ',\n            'އަންގާރަ',\n            'ބުދަ',\n            'ބުރާސްފަތި',\n            'ހުކުރު',\n            'ހޮނިހިރު',\n        ];\n\n    var dv = moment.defineLocale('dv', {\n        months: months,\n        monthsShort: months,\n        weekdays: weekdays,\n        weekdaysShort: weekdays,\n        weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/M/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /މކ|މފ/,\n        isPM: function (input) {\n            return 'މފ' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'މކ';\n            } else {\n                return 'މފ';\n            }\n        },\n        calendar: {\n            sameDay: '[މިއަދު] LT',\n            nextDay: '[މާދަމާ] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[އިއްޔެ] LT',\n            lastWeek: '[ފާއިތުވި] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ތެރޭގައި %s',\n            past: 'ކުރިން %s',\n            s: 'ސިކުންތުކޮޅެއް',\n            ss: 'd% ސިކުންތު',\n            m: 'މިނިޓެއް',\n            mm: 'މިނިޓު %d',\n            h: 'ގަޑިއިރެއް',\n            hh: 'ގަޑިއިރު %d',\n            d: 'ދުވަހެއް',\n            dd: 'ދުވަސް %d',\n            M: 'މަހެއް',\n            MM: 'މަސް %d',\n            y: 'އަހަރެއް',\n            yy: 'އަހަރު %d',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 7, // Sunday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return dv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sw = moment.defineLocale('sw', {\n        months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n        weekdays:\n            'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n                '_'\n            ),\n        weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n        weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'hh:mm A',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[leo saa] LT',\n            nextDay: '[kesho saa] LT',\n            nextWeek: '[wiki ijayo] dddd [saat] LT',\n            lastDay: '[jana] LT',\n            lastWeek: '[wiki iliyopita] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s baadaye',\n            past: 'tokea %s',\n            s: 'hivi punde',\n            ss: 'sekunde %d',\n            m: 'dakika moja',\n            mm: 'dakika %d',\n            h: 'saa limoja',\n            hh: 'masaa %d',\n            d: 'siku moja',\n            dd: 'siku %d',\n            M: 'mwezi mmoja',\n            MM: 'miezi %d',\n            y: 'mwaka mmoja',\n            yy: 'miaka %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esDo = moment.defineLocale('es-do', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return esDo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sv = moment.defineLocale('sv', {\n        months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n        weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n        weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Idag] LT',\n            nextDay: '[Imorgon] LT',\n            lastDay: '[Igår] LT',\n            nextWeek: '[På] dddd LT',\n            lastWeek: '[I] dddd[s] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: 'för %s sedan',\n            s: 'några sekunder',\n            ss: '%d sekunder',\n            m: 'en minut',\n            mm: '%d minuter',\n            h: 'en timme',\n            hh: '%d timmar',\n            d: 'en dag',\n            dd: '%d dagar',\n            M: 'en månad',\n            MM: '%d månader',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? ':e'\n                        : b === 1\n                          ? ':a'\n                          : b === 2\n                            ? ':a'\n                            : b === 3\n                              ? ':e'\n                              : ':e';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '௧',\n            2: '௨',\n            3: '௩',\n            4: '௪',\n            5: '௫',\n            6: '௬',\n            7: '௭',\n            8: '௮',\n            9: '௯',\n            0: '௦',\n        },\n        numberMap = {\n            '௧': '1',\n            '௨': '2',\n            '௩': '3',\n            '௪': '4',\n            '௫': '5',\n            '௬': '6',\n            '௭': '7',\n            '௮': '8',\n            '௯': '9',\n            '௦': '0',\n        };\n\n    var ta = moment.defineLocale('ta', {\n        months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n            '_'\n        ),\n        monthsShort:\n            'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n                '_'\n            ),\n        weekdays:\n            'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n                '_'\n            ),\n        weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n            '_'\n        ),\n        weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, HH:mm',\n            LLLL: 'dddd, D MMMM YYYY, HH:mm',\n        },\n        calendar: {\n            sameDay: '[இன்று] LT',\n            nextDay: '[நாளை] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[நேற்று] LT',\n            lastWeek: '[கடந்த வாரம்] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s இல்',\n            past: '%s முன்',\n            s: 'ஒரு சில விநாடிகள்',\n            ss: '%d விநாடிகள்',\n            m: 'ஒரு நிமிடம்',\n            mm: '%d நிமிடங்கள்',\n            h: 'ஒரு மணி நேரம்',\n            hh: '%d மணி நேரம்',\n            d: 'ஒரு நாள்',\n            dd: '%d நாட்கள்',\n            M: 'ஒரு மாதம்',\n            MM: '%d மாதங்கள்',\n            y: 'ஒரு வருடம்',\n            yy: '%d ஆண்டுகள்',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n        ordinal: function (number) {\n            return number + 'வது';\n        },\n        preparse: function (string) {\n            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // refer http://ta.wikipedia.org/s/1er1\n        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 2) {\n                return ' யாமம்';\n            } else if (hour < 6) {\n                return ' வைகறை'; // வைகறை\n            } else if (hour < 10) {\n                return ' காலை'; // காலை\n            } else if (hour < 14) {\n                return ' நண்பகல்'; // நண்பகல்\n            } else if (hour < 18) {\n                return ' எற்பாடு'; // எற்பாடு\n            } else if (hour < 22) {\n                return ' மாலை'; // மாலை\n            } else {\n                return ' யாமம்';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'யாமம்') {\n                return hour < 2 ? hour : hour + 12;\n            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n                return hour;\n            } else if (meridiem === 'நண்பகல்') {\n                return hour >= 10 ? hour : hour + 12;\n            } else {\n                return hour + 12;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return ta;\n\n})));\n","\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\nvar InterceptorsStorage = require('./interceptors.js');\n\nvar RetryManager = require(\"./retry.js\");\n\ncreateXHR.httpHandler = require('./http-handler.js');\ncreateXHR.requestInterceptorsStorage = new InterceptorsStorage();\ncreateXHR.responseInterceptorsStorage = new InterceptorsStorage();\ncreateXHR.retryManager = new RetryManager();\n/**\n * @license\n * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\n */\n\nvar parseHeaders = function parseHeaders(headers) {\n  var result = {};\n\n  if (!headers) {\n    return result;\n  }\n\n  headers.trim().split('\\n').forEach(function (row) {\n    var index = row.indexOf(':');\n    var key = row.slice(0, index).trim().toLowerCase();\n    var value = row.slice(index + 1).trim();\n\n    if (typeof result[key] === 'undefined') {\n      result[key] = value;\n    } else if (Array.isArray(result[key])) {\n      result[key].push(value);\n    } else {\n      result[key] = [result[key], value];\n    }\n  });\n  return result;\n};\n\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n  createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n    options = initParams(uri, options, callback);\n    options.method = method.toUpperCase();\n    return _createXHR(options);\n  };\n});\n\nfunction forEachArray(array, iterator) {\n  for (var i = 0; i < array.length; i++) {\n    iterator(array[i]);\n  }\n}\n\nfunction isEmpty(obj) {\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) return false;\n  }\n\n  return true;\n}\n\nfunction initParams(uri, options, callback) {\n  var params = uri;\n\n  if (isFunction(options)) {\n    callback = options;\n\n    if (typeof uri === \"string\") {\n      params = {\n        uri: uri\n      };\n    }\n  } else {\n    params = _extends({}, options, {\n      uri: uri\n    });\n  }\n\n  params.callback = callback;\n  return params;\n}\n\nfunction createXHR(uri, options, callback) {\n  options = initParams(uri, options, callback);\n  return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n  if (typeof options.callback === \"undefined\") {\n    throw new Error(\"callback argument missing\");\n  } // call all registered request interceptors for a given request type:\n\n\n  if (options.requestType && createXHR.requestInterceptorsStorage.getIsEnabled()) {\n    var requestInterceptorPayload = {\n      uri: options.uri || options.url,\n      headers: options.headers || {},\n      body: options.body,\n      metadata: options.metadata || {},\n      retry: options.retry,\n      timeout: options.timeout\n    };\n    var updatedPayload = createXHR.requestInterceptorsStorage.execute(options.requestType, requestInterceptorPayload);\n    options.uri = updatedPayload.uri;\n    options.headers = updatedPayload.headers;\n    options.body = updatedPayload.body;\n    options.metadata = updatedPayload.metadata;\n    options.retry = updatedPayload.retry;\n    options.timeout = updatedPayload.timeout;\n  }\n\n  var called = false;\n\n  var callback = function cbOnce(err, response, body) {\n    if (!called) {\n      called = true;\n      options.callback(err, response, body);\n    }\n  };\n\n  function readystatechange() {\n    // do not call load 2 times when response interceptors are enabled\n    // why do we even need this 2nd load?\n    if (xhr.readyState === 4 && !createXHR.responseInterceptorsStorage.getIsEnabled()) {\n      setTimeout(loadFunc, 0);\n    }\n  }\n\n  function getBody() {\n    // Chrome with requestType=blob throws errors arround when even testing access to responseText\n    var body = undefined;\n\n    if (xhr.response) {\n      body = xhr.response;\n    } else {\n      body = xhr.responseText || getXml(xhr);\n    }\n\n    if (isJson) {\n      try {\n        body = JSON.parse(body);\n      } catch (e) {}\n    }\n\n    return body;\n  }\n\n  function errorFunc(evt) {\n    clearTimeout(timeoutTimer);\n    clearTimeout(options.retryTimeout);\n\n    if (!(evt instanceof Error)) {\n      evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n    }\n\n    evt.statusCode = 0; // we would like to retry on error:\n\n    if (!aborted && createXHR.retryManager.getIsEnabled() && options.retry && options.retry.shouldRetry()) {\n      options.retryTimeout = setTimeout(function () {\n        options.retry.moveToNextAttempt(); // we want to re-use the same options and the same xhr object:\n\n        options.xhr = xhr;\n\n        _createXHR(options);\n      }, options.retry.getCurrentFuzzedDelay());\n      return;\n    } // call all registered response interceptors for a given request type:\n\n\n    if (options.requestType && createXHR.responseInterceptorsStorage.getIsEnabled()) {\n      var responseInterceptorPayload = {\n        headers: failureResponse.headers || {},\n        body: failureResponse.body,\n        responseUrl: xhr.responseURL,\n        responseType: xhr.responseType\n      };\n\n      var _updatedPayload = createXHR.responseInterceptorsStorage.execute(options.requestType, responseInterceptorPayload);\n\n      failureResponse.body = _updatedPayload.body;\n      failureResponse.headers = _updatedPayload.headers;\n    }\n\n    return callback(evt, failureResponse);\n  } // will load the data & process the response in a special response object\n\n\n  function loadFunc() {\n    if (aborted) return;\n    var status;\n    clearTimeout(timeoutTimer);\n    clearTimeout(options.retryTimeout);\n\n    if (options.useXDR && xhr.status === undefined) {\n      //IE8 CORS GET successful response doesn't have a status field, but body is fine\n      status = 200;\n    } else {\n      status = xhr.status === 1223 ? 204 : xhr.status;\n    }\n\n    var response = failureResponse;\n    var err = null;\n\n    if (status !== 0) {\n      response = {\n        body: getBody(),\n        statusCode: status,\n        method: method,\n        headers: {},\n        url: uri,\n        rawRequest: xhr\n      };\n\n      if (xhr.getAllResponseHeaders) {\n        //remember xhr can in fact be XDR for CORS in IE\n        response.headers = parseHeaders(xhr.getAllResponseHeaders());\n      }\n    } else {\n      err = new Error(\"Internal XMLHttpRequest Error\");\n    } // call all registered response interceptors for a given request type:\n\n\n    if (options.requestType && createXHR.responseInterceptorsStorage.getIsEnabled()) {\n      var responseInterceptorPayload = {\n        headers: response.headers || {},\n        body: response.body,\n        responseUrl: xhr.responseURL,\n        responseType: xhr.responseType\n      };\n\n      var _updatedPayload2 = createXHR.responseInterceptorsStorage.execute(options.requestType, responseInterceptorPayload);\n\n      response.body = _updatedPayload2.body;\n      response.headers = _updatedPayload2.headers;\n    }\n\n    return callback(err, response, response.body);\n  }\n\n  var xhr = options.xhr || null;\n\n  if (!xhr) {\n    if (options.cors || options.useXDR) {\n      xhr = new createXHR.XDomainRequest();\n    } else {\n      xhr = new createXHR.XMLHttpRequest();\n    }\n  }\n\n  var key;\n  var aborted;\n  var uri = xhr.url = options.uri || options.url;\n  var method = xhr.method = options.method || \"GET\";\n  var body = options.body || options.data;\n  var headers = xhr.headers = options.headers || {};\n  var sync = !!options.sync;\n  var isJson = false;\n  var timeoutTimer;\n  var failureResponse = {\n    body: undefined,\n    headers: {},\n    statusCode: 0,\n    method: method,\n    url: uri,\n    rawRequest: xhr\n  };\n\n  if (\"json\" in options && options.json !== false) {\n    isJson = true;\n    headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n    if (method !== \"GET\" && method !== \"HEAD\") {\n      headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n      body = JSON.stringify(options.json === true ? body : options.json);\n    }\n  }\n\n  xhr.onreadystatechange = readystatechange;\n  xhr.onload = loadFunc;\n  xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n  xhr.onprogress = function () {// IE must die\n  };\n\n  xhr.onabort = function () {\n    aborted = true;\n    clearTimeout(options.retryTimeout);\n  };\n\n  xhr.ontimeout = errorFunc;\n  xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n  if (!sync) {\n    xhr.withCredentials = !!options.withCredentials;\n  } // Cannot set timeout with sync request\n  // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n  // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n  if (!sync && options.timeout > 0) {\n    timeoutTimer = setTimeout(function () {\n      if (aborted) return;\n      aborted = true; //IE9 may still call readystatechange\n\n      xhr.abort(\"timeout\");\n      var e = new Error(\"XMLHttpRequest timeout\");\n      e.code = \"ETIMEDOUT\";\n      errorFunc(e);\n    }, options.timeout);\n  }\n\n  if (xhr.setRequestHeader) {\n    for (key in headers) {\n      if (headers.hasOwnProperty(key)) {\n        xhr.setRequestHeader(key, headers[key]);\n      }\n    }\n  } else if (options.headers && !isEmpty(options.headers)) {\n    throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n  }\n\n  if (\"responseType\" in options) {\n    xhr.responseType = options.responseType;\n  }\n\n  if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n    options.beforeSend(xhr);\n  } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n  // XMLHttpRequest spec says to pass null as body to indicate no body\n  // See https://github.com/naugtur/xhr/issues/100.\n\n\n  xhr.send(body || null);\n  return xhr;\n}\n\nfunction getXml(xhr) {\n  // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n  // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n  try {\n    if (xhr.responseType === \"document\") {\n      return xhr.responseXML;\n    }\n\n    var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n    if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n      return xhr.responseXML;\n    }\n  } catch (e) {}\n\n  return null;\n}\n\nfunction noop() {}","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n    function translateFuture(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'leS'\n                : output.indexOf('jar') !== -1\n                  ? time.slice(0, -3) + 'waQ'\n                  : output.indexOf('DIS') !== -1\n                    ? time.slice(0, -3) + 'nem'\n                    : time + ' pIq';\n        return time;\n    }\n\n    function translatePast(output) {\n        var time = output;\n        time =\n            output.indexOf('jaj') !== -1\n                ? time.slice(0, -3) + 'Hu’'\n                : output.indexOf('jar') !== -1\n                  ? time.slice(0, -3) + 'wen'\n                  : output.indexOf('DIS') !== -1\n                    ? time.slice(0, -3) + 'ben'\n                    : time + ' ret';\n        return time;\n    }\n\n    function translate(number, withoutSuffix, string, isFuture) {\n        var numberNoun = numberAsNoun(number);\n        switch (string) {\n            case 'ss':\n                return numberNoun + ' lup';\n            case 'mm':\n                return numberNoun + ' tup';\n            case 'hh':\n                return numberNoun + ' rep';\n            case 'dd':\n                return numberNoun + ' jaj';\n            case 'MM':\n                return numberNoun + ' jar';\n            case 'yy':\n                return numberNoun + ' DIS';\n        }\n    }\n\n    function numberAsNoun(number) {\n        var hundred = Math.floor((number % 1000) / 100),\n            ten = Math.floor((number % 100) / 10),\n            one = number % 10,\n            word = '';\n        if (hundred > 0) {\n            word += numbersNouns[hundred] + 'vatlh';\n        }\n        if (ten > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n        }\n        if (one > 0) {\n            word += (word !== '' ? ' ' : '') + numbersNouns[one];\n        }\n        return word === '' ? 'pagh' : word;\n    }\n\n    var tlh = moment.defineLocale('tlh', {\n        months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n            '_'\n        ),\n        monthsShort:\n            'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n            '_'\n        ),\n        weekdaysShort:\n            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        weekdaysMin:\n            'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[DaHjaj] LT',\n            nextDay: '[wa’leS] LT',\n            nextWeek: 'LLL',\n            lastDay: '[wa’Hu’] LT',\n            lastWeek: 'LLL',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: translateFuture,\n            past: translatePast,\n            s: 'puS lup',\n            ss: translate,\n            m: 'wa’ tup',\n            mm: translate,\n            h: 'wa’ rep',\n            hh: translate,\n            d: 'wa’ jaj',\n            dd: translate,\n            M: 'wa’ jar',\n            MM: translate,\n            y: 'wa’ DIS',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlh;\n\n})));\n","\"use strict\";\n\n/* istanbul ignore next  */\nfunction styleTagTransform(css, styleElement) {\n  if (styleElement.styleSheet) {\n    styleElement.styleSheet.cssText = css;\n  } else {\n    while (styleElement.firstChild) {\n      styleElement.removeChild(styleElement.firstChild);\n    }\n    styleElement.appendChild(document.createTextNode(css));\n  }\n}\nmodule.exports = styleTagTransform;","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var vi = moment.defineLocale('vi', {\n        months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n            '_'\n        ),\n        monthsShort:\n            'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n            '_'\n        ),\n        weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /sa|ch/i,\n        isPM: function (input) {\n            return /^ch$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'sa' : 'SA';\n            } else {\n                return isLower ? 'ch' : 'CH';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [năm] YYYY',\n            LLL: 'D MMMM [năm] YYYY HH:mm',\n            LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n            l: 'DD/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hôm nay lúc] LT',\n            nextDay: '[Ngày mai lúc] LT',\n            nextWeek: 'dddd [tuần tới lúc] LT',\n            lastDay: '[Hôm qua lúc] LT',\n            lastWeek: 'dddd [tuần trước lúc] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s tới',\n            past: '%s trước',\n            s: 'vài giây',\n            ss: '%d giây',\n            m: 'một phút',\n            mm: '%d phút',\n            h: 'một giờ',\n            hh: '%d giờ',\n            d: 'một ngày',\n            dd: '%d ngày',\n            w: 'một tuần',\n            ww: '%d tuần',\n            M: 'một tháng',\n            MM: '%d tháng',\n            y: 'một năm',\n            yy: '%d năm',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return vi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'جنوري',\n            'فيبروري',\n            'مارچ',\n            'اپريل',\n            'مئي',\n            'جون',\n            'جولاءِ',\n            'آگسٽ',\n            'سيپٽمبر',\n            'آڪٽوبر',\n            'نومبر',\n            'ڊسمبر',\n        ],\n        days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n    var sd = moment.defineLocale('sd', {\n        months: months,\n        monthsShort: months,\n        weekdays: days,\n        weekdaysShort: days,\n        weekdaysMin: days,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd، D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /صبح|شام/,\n        isPM: function (input) {\n            return 'شام' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'صبح';\n            }\n            return 'شام';\n        },\n        calendar: {\n            sameDay: '[اڄ] LT',\n            nextDay: '[سڀاڻي] LT',\n            nextWeek: 'dddd [اڳين هفتي تي] LT',\n            lastDay: '[ڪالهه] LT',\n            lastWeek: '[گزريل هفتي] dddd [تي] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s پوء',\n            past: '%s اڳ',\n            s: 'چند سيڪنڊ',\n            ss: '%d سيڪنڊ',\n            m: 'هڪ منٽ',\n            mm: '%d منٽ',\n            h: 'هڪ ڪلاڪ',\n            hh: '%d ڪلاڪ',\n            d: 'هڪ ڏينهن',\n            dd: '%d ڏينهن',\n            M: 'هڪ مهينو',\n            MM: '%d مهينا',\n            y: 'هڪ سال',\n            yy: '%d سال',\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '১',\n            2: '২',\n            3: '৩',\n            4: '৪',\n            5: '৫',\n            6: '৬',\n            7: '৭',\n            8: '৮',\n            9: '৯',\n            0: '০',\n        },\n        numberMap = {\n            '১': '1',\n            '২': '2',\n            '৩': '3',\n            '৪': '4',\n            '৫': '5',\n            '৬': '6',\n            '৭': '7',\n            '৮': '8',\n            '৯': '9',\n            '০': '0',\n        };\n\n    var bn = moment.defineLocale('bn', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort:\n            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n                '_'\n            ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n        },\n        calendar: {\n            sameDay: '[আজ] LT',\n            nextDay: '[আগামীকাল] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[গতকাল] LT',\n            lastWeek: '[গত] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s পরে',\n            past: '%s আগে',\n            s: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'রাত' && hour >= 4) ||\n                (meridiem === 'দুপুর' && hour < 5) ||\n                meridiem === 'বিকাল'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 10) {\n                return 'সকাল';\n            } else if (hour < 17) {\n                return 'দুপুর';\n            } else if (hour < 20) {\n                return 'বিকাল';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function relativeTimeWithMutation(number, withoutSuffix, key) {\n        var format = {\n            mm: 'munutenn',\n            MM: 'miz',\n            dd: 'devezh',\n        };\n        return number + ' ' + mutation(format[key], number);\n    }\n    function specialMutationForYears(number) {\n        switch (lastNumber(number)) {\n            case 1:\n            case 3:\n            case 4:\n            case 5:\n            case 9:\n                return number + ' bloaz';\n            default:\n                return number + ' vloaz';\n        }\n    }\n    function lastNumber(number) {\n        if (number > 9) {\n            return lastNumber(number % 10);\n        }\n        return number;\n    }\n    function mutation(text, number) {\n        if (number === 2) {\n            return softMutation(text);\n        }\n        return text;\n    }\n    function softMutation(text) {\n        var mutationTable = {\n            m: 'v',\n            b: 'v',\n            d: 'z',\n        };\n        if (mutationTable[text.charAt(0)] === undefined) {\n            return text;\n        }\n        return mutationTable[text.charAt(0)] + text.substring(1);\n    }\n\n    var monthsParse = [\n            /^gen/i,\n            /^c[ʼ\\']hwe/i,\n            /^meu/i,\n            /^ebr/i,\n            /^mae/i,\n            /^(mez|eve)/i,\n            /^gou/i,\n            /^eos/i,\n            /^gwe/i,\n            /^her/i,\n            /^du/i,\n            /^ker/i,\n        ],\n        monthsRegex =\n            /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        monthsStrictRegex =\n            /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n        monthsShortStrictRegex =\n            /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n        fullWeekdaysParse = [\n            /^sul/i,\n            /^lun/i,\n            /^meurzh/i,\n            /^merc[ʼ\\']her/i,\n            /^yaou/i,\n            /^gwener/i,\n            /^sadorn/i,\n        ],\n        shortWeekdaysParse = [\n            /^Sul/i,\n            /^Lun/i,\n            /^Meu/i,\n            /^Mer/i,\n            /^Yao/i,\n            /^Gwe/i,\n            /^Sad/i,\n        ],\n        minWeekdaysParse = [\n            /^Su/i,\n            /^Lu/i,\n            /^Me([^r]|$)/i,\n            /^Mer/i,\n            /^Ya/i,\n            /^Gw/i,\n            /^Sa/i,\n        ];\n\n    var br = moment.defineLocale('br', {\n        months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n            '_'\n        ),\n        monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n        weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n        weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n        weekdaysParse: minWeekdaysParse,\n        fullWeekdaysParse: fullWeekdaysParse,\n        shortWeekdaysParse: shortWeekdaysParse,\n        minWeekdaysParse: minWeekdaysParse,\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [a viz] MMMM YYYY',\n            LLL: 'D [a viz] MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hiziv da] LT',\n            nextDay: '[Warcʼhoazh da] LT',\n            nextWeek: 'dddd [da] LT',\n            lastDay: '[Decʼh da] LT',\n            lastWeek: 'dddd [paset da] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'a-benn %s',\n            past: '%s ʼzo',\n            s: 'un nebeud segondennoù',\n            ss: '%d eilenn',\n            m: 'ur vunutenn',\n            mm: relativeTimeWithMutation,\n            h: 'un eur',\n            hh: '%d eur',\n            d: 'un devezh',\n            dd: relativeTimeWithMutation,\n            M: 'ur miz',\n            MM: relativeTimeWithMutation,\n            y: 'ur bloaz',\n            yy: specialMutationForYears,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'añ' : 'vet';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n        isPM: function (token) {\n            return token === 'g.m.';\n        },\n        meridiem: function (hour, minute, isLower) {\n            return hour < 12 ? 'a.m.' : 'g.m.';\n        },\n    });\n\n    return br;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                  ? 1\n                  : n === 2\n                    ? 2\n                    : n % 100 >= 3 && n % 100 <= 10\n                      ? 3\n                      : n % 100 >= 11\n                        ? 4\n                        : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'جانفي',\n            'فيفري',\n            'مارس',\n            'أفريل',\n            'ماي',\n            'جوان',\n            'جويلية',\n            'أوت',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var arDz = moment.defineLocale('ar-dz', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arDz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                  ? 1\n                  : n === 2\n                    ? 2\n                    : n % 100 >= 3 && n % 100 <= 10\n                      ? 3\n                      : n % 100 >= 11\n                        ? 4\n                        : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var ar = moment.defineLocale('ar', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ar;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhMo = moment.defineLocale('zh-mo', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天] LT',\n            nextDay: '[明天] LT',\n            nextWeek: '[下]dddd LT',\n            lastDay: '[昨天] LT',\n            lastWeek: '[上]dddd LT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s內',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhMo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '༡',\n            2: '༢',\n            3: '༣',\n            4: '༤',\n            5: '༥',\n            6: '༦',\n            7: '༧',\n            8: '༨',\n            9: '༩',\n            0: '༠',\n        },\n        numberMap = {\n            '༡': '1',\n            '༢': '2',\n            '༣': '3',\n            '༤': '4',\n            '༥': '5',\n            '༦': '6',\n            '༧': '7',\n            '༨': '8',\n            '༩': '9',\n            '༠': '0',\n        };\n\n    var bo = moment.defineLocale('bo', {\n        months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n                '_'\n            ),\n        monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n        monthsParseExact: true,\n        weekdays:\n            'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n                '_'\n            ),\n        weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n            '_'\n        ),\n        weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[དི་རིང] LT',\n            nextDay: '[སང་ཉིན] LT',\n            nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n            lastDay: '[ཁ་སང] LT',\n            lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ལ་',\n            past: '%s སྔན་ལ',\n            s: 'ལམ་སང',\n            ss: '%d སྐར་ཆ།',\n            m: 'སྐར་མ་གཅིག',\n            mm: '%d སྐར་མ',\n            h: 'ཆུ་ཚོད་གཅིག',\n            hh: '%d ཆུ་ཚོད',\n            d: 'ཉིན་གཅིག',\n            dd: '%d ཉིན་',\n            M: 'ཟླ་བ་གཅིག',\n            MM: '%d ཟླ་བ',\n            y: 'ལོ་གཅིག',\n            yy: '%d ལོ',\n        },\n        preparse: function (string) {\n            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'མཚན་མོ' && hour >= 4) ||\n                (meridiem === 'ཉིན་གུང' && hour < 5) ||\n                meridiem === 'དགོང་དག'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'མཚན་མོ';\n            } else if (hour < 10) {\n                return 'ཞོགས་ཀས';\n            } else if (hour < 17) {\n                return 'ཉིན་གུང';\n            } else if (hour < 20) {\n                return 'དགོང་དག';\n            } else {\n                return 'མཚན་མོ';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhHk = moment.defineLocale('zh-hk', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日dddd HH:mm',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1200) {\n                return '上午';\n            } else if (hm === 1200) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: '[下]ddddLT',\n            lastDay: '[昨天]LT',\n            lastWeek: '[上]ddddLT',\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '週';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '幾秒',\n            ss: '%d 秒',\n            m: '1 分鐘',\n            mm: '%d 分鐘',\n            h: '1 小時',\n            hh: '%d 小時',\n            d: '1 天',\n            dd: '%d 天',\n            M: '1 個月',\n            MM: '%d 個月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n    });\n\n    return zhHk;\n\n})));\n","/**\n * @license\n * Video.js 8.22.0 <http://videojs.com/>\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\n * Available under Apache License Version 2.0\n * <https://github.com/videojs/video.js/blob/main/LICENSE>\n *\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\n * Available under Apache License Version 2.0\n * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>\n */\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.videojs = factory());\n})(this, (function () { 'use strict';\n\n  var version$5 = \"8.22.0\";\n\n  /**\n   * An Object that contains lifecycle hooks as keys which point to an array\n   * of functions that are run when a lifecycle is triggered\n   *\n   * @private\n   */\n  const hooks_ = {};\n\n  /**\n   * Get a list of hooks for a specific lifecycle\n   *\n   * @param  {string} type\n   *         the lifecycle to get hooks from\n   *\n   * @param  {Function|Function[]} [fn]\n   *         Optionally add a hook (or hooks) to the lifecycle that your are getting.\n   *\n   * @return {Array}\n   *         an array of hooks, or an empty array if there are none.\n   */\n  const hooks = function (type, fn) {\n    hooks_[type] = hooks_[type] || [];\n    if (fn) {\n      hooks_[type] = hooks_[type].concat(fn);\n    }\n    return hooks_[type];\n  };\n\n  /**\n   * Add a function hook to a specific videojs lifecycle.\n   *\n   * @param {string} type\n   *        the lifecycle to hook the function to.\n   *\n   * @param {Function|Function[]}\n   *        The function or array of functions to attach.\n   */\n  const hook = function (type, fn) {\n    hooks(type, fn);\n  };\n\n  /**\n   * Remove a hook from a specific videojs lifecycle.\n   *\n   * @param  {string} type\n   *         the lifecycle that the function hooked to\n   *\n   * @param  {Function} fn\n   *         The hooked function to remove\n   *\n   * @return {boolean}\n   *         The function that was removed or undef\n   */\n  const removeHook = function (type, fn) {\n    const index = hooks(type).indexOf(fn);\n    if (index <= -1) {\n      return false;\n    }\n    hooks_[type] = hooks_[type].slice();\n    hooks_[type].splice(index, 1);\n    return true;\n  };\n\n  /**\n   * Add a function hook that will only run once to a specific videojs lifecycle.\n   *\n   * @param {string} type\n   *        the lifecycle to hook the function to.\n   *\n   * @param {Function|Function[]}\n   *        The function or array of functions to attach.\n   */\n  const hookOnce = function (type, fn) {\n    hooks(type, [].concat(fn).map(original => {\n      const wrapper = (...args) => {\n        removeHook(type, wrapper);\n        return original(...args);\n      };\n      return wrapper;\n    }));\n  };\n\n  /**\n   * @file fullscreen-api.js\n   * @module fullscreen-api\n   */\n\n  /**\n   * Store the browser-specific methods for the fullscreen API.\n   *\n   * @type {Object}\n   * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\n   * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\n   */\n  const FullscreenApi = {\n    prefixed: true\n  };\n\n  // browser API methods\n  const apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'],\n  // WebKit\n  ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen']];\n  const specApi = apiMap[0];\n  let browserApi;\n\n  // determine the supported set of functions\n  for (let i = 0; i < apiMap.length; i++) {\n    // check for exitFullscreen function\n    if (apiMap[i][1] in document) {\n      browserApi = apiMap[i];\n      break;\n    }\n  }\n\n  // map the browser API names to the spec API names\n  if (browserApi) {\n    for (let i = 0; i < browserApi.length; i++) {\n      FullscreenApi[specApi[i]] = browserApi[i];\n    }\n    FullscreenApi.prefixed = browserApi[0] !== specApi[0];\n  }\n\n  /**\n   * @file create-logger.js\n   * @module create-logger\n   */\n\n  // This is the private tracking variable for the logging history.\n  let history = [];\n\n  /**\n   * Log messages to the console and history based on the type of message\n   *\n   * @private\n   * @param  {string} name\n   *         The name of the console method to use.\n   *\n   * @param  {Object} log\n   *         The arguments to be passed to the matching console method.\n   *\n   * @param {string} [styles]\n   *        styles for name\n   */\n  const LogByTypeFactory = (name, log, styles) => (type, level, args) => {\n    const lvl = log.levels[level];\n    const lvlRegExp = new RegExp(`^(${lvl})$`);\n    let resultName = name;\n    if (type !== 'log') {\n      // Add the type to the front of the message when it's not \"log\".\n      args.unshift(type.toUpperCase() + ':');\n    }\n    if (styles) {\n      resultName = `%c${name}`;\n      args.unshift(styles);\n    }\n\n    // Add console prefix after adding to history.\n    args.unshift(resultName + ':');\n\n    // Add a clone of the args at this point to history.\n    if (history) {\n      history.push([].concat(args));\n\n      // only store 1000 history entries\n      const splice = history.length - 1000;\n      history.splice(0, splice > 0 ? splice : 0);\n    }\n\n    // If there's no console then don't try to output messages, but they will\n    // still be stored in history.\n    if (!window.console) {\n      return;\n    }\n\n    // Was setting these once outside of this function, but containing them\n    // in the function makes it easier to test cases where console doesn't exist\n    // when the module is executed.\n    let fn = window.console[type];\n    if (!fn && type === 'debug') {\n      // Certain browsers don't have support for console.debug. For those, we\n      // should default to the closest comparable log.\n      fn = window.console.info || window.console.log;\n    }\n\n    // Bail out if there's no console or if this type is not allowed by the\n    // current logging level.\n    if (!fn || !lvl || !lvlRegExp.test(type)) {\n      return;\n    }\n    fn[Array.isArray(args) ? 'apply' : 'call'](window.console, args);\n  };\n  function createLogger$1(name, delimiter = ':', styles = '') {\n    // This is the private tracking variable for logging level.\n    let level = 'info';\n\n    // the curried logByType bound to the specific log and history\n    let logByType;\n\n    /**\n     * Logs plain debug messages. Similar to `console.log`.\n     *\n     * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n     * of our JSDoc template, we cannot properly document this as both a function\n     * and a namespace, so its function signature is documented here.\n     *\n     * #### Arguments\n     * ##### *args\n     * *[]\n     *\n     * Any combination of values that could be passed to `console.log()`.\n     *\n     * #### Return Value\n     *\n     * `undefined`\n     *\n     * @namespace\n     * @param    {...*} args\n     *           One or more messages or objects that should be logged.\n     */\n    function log(...args) {\n      logByType('log', level, args);\n    }\n\n    // This is the logByType helper that the logging methods below use\n    logByType = LogByTypeFactory(name, log, styles);\n\n    /**\n     * Create a new subLogger which chains the old name to the new name.\n     *\n     * For example, doing `mylogger = videojs.log.createLogger('player')` and then using that logger will log the following:\n     * ```js\n     *  mylogger('foo');\n     *  // > VIDEOJS: player: foo\n     * ```\n     *\n     * @param {string} subName\n     *        The name to add call the new logger\n     * @param {string} [subDelimiter]\n     *        Optional delimiter\n     * @param {string} [subStyles]\n     *        Optional styles\n     * @return {Object}\n     */\n    log.createLogger = (subName, subDelimiter, subStyles) => {\n      const resultDelimiter = subDelimiter !== undefined ? subDelimiter : delimiter;\n      const resultStyles = subStyles !== undefined ? subStyles : styles;\n      const resultName = `${name} ${resultDelimiter} ${subName}`;\n      return createLogger$1(resultName, resultDelimiter, resultStyles);\n    };\n\n    /**\n     * Create a new logger.\n     *\n     * @param {string} newName\n     *        The name for the new logger\n     * @param {string} [newDelimiter]\n     *        Optional delimiter\n     * @param {string} [newStyles]\n     *        Optional styles\n     * @return {Object}\n     */\n    log.createNewLogger = (newName, newDelimiter, newStyles) => {\n      return createLogger$1(newName, newDelimiter, newStyles);\n    };\n\n    /**\n     * Enumeration of available logging levels, where the keys are the level names\n     * and the values are `|`-separated strings containing logging methods allowed\n     * in that logging level. These strings are used to create a regular expression\n     * matching the function name being called.\n     *\n     * Levels provided by Video.js are:\n     *\n     * - `off`: Matches no calls. Any value that can be cast to `false` will have\n     *   this effect. The most restrictive.\n     * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\n     *   `log.warn`, and `log.error`).\n     * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\n     * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\n     * - `warn`: Matches `log.warn` and `log.error` calls.\n     * - `error`: Matches only `log.error` calls.\n     *\n     * @type {Object}\n     */\n    log.levels = {\n      all: 'debug|log|warn|error',\n      off: '',\n      debug: 'debug|log|warn|error',\n      info: 'log|warn|error',\n      warn: 'warn|error',\n      error: 'error',\n      DEFAULT: level\n    };\n\n    /**\n     * Get or set the current logging level.\n     *\n     * If a string matching a key from {@link module:log.levels} is provided, acts\n     * as a setter.\n     *\n     * @param  {'all'|'debug'|'info'|'warn'|'error'|'off'} [lvl]\n     *         Pass a valid level to set a new logging level.\n     *\n     * @return {string}\n     *         The current logging level.\n     */\n    log.level = lvl => {\n      if (typeof lvl === 'string') {\n        if (!log.levels.hasOwnProperty(lvl)) {\n          throw new Error(`\"${lvl}\" in not a valid log level`);\n        }\n        level = lvl;\n      }\n      return level;\n    };\n\n    /**\n     * Returns an array containing everything that has been logged to the history.\n     *\n     * This array is a shallow clone of the internal history record. However, its\n     * contents are _not_ cloned; so, mutating objects inside this array will\n     * mutate them in history.\n     *\n     * @return {Array}\n     */\n    log.history = () => history ? [].concat(history) : [];\n\n    /**\n     * Allows you to filter the history by the given logger name\n     *\n     * @param {string} fname\n     *        The name to filter by\n     *\n     * @return {Array}\n     *         The filtered list to return\n     */\n    log.history.filter = fname => {\n      return (history || []).filter(historyItem => {\n        // if the first item in each historyItem includes `fname`, then it's a match\n        return new RegExp(`.*${fname}.*`).test(historyItem[0]);\n      });\n    };\n\n    /**\n     * Clears the internal history tracking, but does not prevent further history\n     * tracking.\n     */\n    log.history.clear = () => {\n      if (history) {\n        history.length = 0;\n      }\n    };\n\n    /**\n     * Disable history tracking if it is currently enabled.\n     */\n    log.history.disable = () => {\n      if (history !== null) {\n        history.length = 0;\n        history = null;\n      }\n    };\n\n    /**\n     * Enable history tracking if it is currently disabled.\n     */\n    log.history.enable = () => {\n      if (history === null) {\n        history = [];\n      }\n    };\n\n    /**\n     * Logs error messages. Similar to `console.error`.\n     *\n     * @param {...*} args\n     *        One or more messages or objects that should be logged as an error\n     */\n    log.error = (...args) => logByType('error', level, args);\n\n    /**\n     * Logs warning messages. Similar to `console.warn`.\n     *\n     * @param {...*} args\n     *        One or more messages or objects that should be logged as a warning.\n     */\n    log.warn = (...args) => logByType('warn', level, args);\n\n    /**\n     * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\n     * log if `console.debug` is not available\n     *\n     * @param {...*} args\n     *        One or more messages or objects that should be logged as debug.\n     */\n    log.debug = (...args) => logByType('debug', level, args);\n    return log;\n  }\n\n  /**\n   * @file log.js\n   * @module log\n   */\n  const log$1 = createLogger$1('VIDEOJS');\n  const createLogger = log$1.createLogger;\n\n  /**\n   * @file obj.js\n   * @module obj\n   */\n\n  /**\n   * @callback obj:EachCallback\n   *\n   * @param {*} value\n   *        The current key for the object that is being iterated over.\n   *\n   * @param {string} key\n   *        The current key-value for object that is being iterated over\n   */\n\n  /**\n   * @callback obj:ReduceCallback\n   *\n   * @param {*} accum\n   *        The value that is accumulating over the reduce loop.\n   *\n   * @param {*} value\n   *        The current key for the object that is being iterated over.\n   *\n   * @param {string} key\n   *        The current key-value for object that is being iterated over\n   *\n   * @return {*}\n   *         The new accumulated value.\n   */\n  const toString$1 = Object.prototype.toString;\n\n  /**\n   * Get the keys of an Object\n   *\n   * @param {Object}\n   *        The Object to get the keys from\n   *\n   * @return {string[]}\n   *         An array of the keys from the object. Returns an empty array if the\n   *         object passed in was invalid or had no keys.\n   *\n   * @private\n   */\n  const keys = function (object) {\n    return isObject$1(object) ? Object.keys(object) : [];\n  };\n\n  /**\n   * Array-like iteration for objects.\n   *\n   * @param {Object} object\n   *        The object to iterate over\n   *\n   * @param {obj:EachCallback} fn\n   *        The callback function which is called for each key in the object.\n   */\n  function each(object, fn) {\n    keys(object).forEach(key => fn(object[key], key));\n  }\n\n  /**\n   * Array-like reduce for objects.\n   *\n   * @param {Object} object\n   *        The Object that you want to reduce.\n   *\n   * @param {Function} fn\n   *         A callback function which is called for each key in the object. It\n   *         receives the accumulated value and the per-iteration value and key\n   *         as arguments.\n   *\n   * @param {*} [initial = 0]\n   *        Starting value\n   *\n   * @return {*}\n   *         The final accumulated value.\n   */\n  function reduce(object, fn, initial = 0) {\n    return keys(object).reduce((accum, key) => fn(accum, object[key], key), initial);\n  }\n\n  /**\n   * Returns whether a value is an object of any kind - including DOM nodes,\n   * arrays, regular expressions, etc. Not functions, though.\n   *\n   * This avoids the gotcha where using `typeof` on a `null` value\n   * results in `'object'`.\n   *\n   * @param  {Object} value\n   * @return {boolean}\n   */\n  function isObject$1(value) {\n    return !!value && typeof value === 'object';\n  }\n\n  /**\n   * Returns whether an object appears to be a \"plain\" object - that is, a\n   * direct instance of `Object`.\n   *\n   * @param  {Object} value\n   * @return {boolean}\n   */\n  function isPlain(value) {\n    return isObject$1(value) && toString$1.call(value) === '[object Object]' && value.constructor === Object;\n  }\n\n  /**\n   * Merge two objects recursively.\n   *\n   * Performs a deep merge like\n   * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\n   * plain objects (not arrays, elements, or anything else).\n   *\n   * Non-plain object values will be copied directly from the right-most\n   * argument.\n   *\n   * @param   {Object[]} sources\n   *          One or more objects to merge into a new object.\n   *\n   * @return {Object}\n   *          A new object that is the merged result of all sources.\n   */\n  function merge$2(...sources) {\n    const result = {};\n    sources.forEach(source => {\n      if (!source) {\n        return;\n      }\n      each(source, (value, key) => {\n        if (!isPlain(value)) {\n          result[key] = value;\n          return;\n        }\n        if (!isPlain(result[key])) {\n          result[key] = {};\n        }\n        result[key] = merge$2(result[key], value);\n      });\n    });\n    return result;\n  }\n\n  /**\n   * Returns an array of values for a given object\n   *\n   * @param  {Object} source - target object\n   * @return {Array<unknown>} - object values\n   */\n  function values$1(source = {}) {\n    const result = [];\n    for (const key in source) {\n      if (source.hasOwnProperty(key)) {\n        const value = source[key];\n        result.push(value);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Object.defineProperty but \"lazy\", which means that the value is only set after\n   * it is retrieved the first time, rather than being set right away.\n   *\n   * @param {Object} obj the object to set the property on\n   * @param {string} key the key for the property to set\n   * @param {Function} getValue the function used to get the value when it is needed.\n   * @param {boolean} setter whether a setter should be allowed or not\n   */\n  function defineLazyProperty(obj, key, getValue, setter = true) {\n    const set = value => Object.defineProperty(obj, key, {\n      value,\n      enumerable: true,\n      writable: true\n    });\n    const options = {\n      configurable: true,\n      enumerable: true,\n      get() {\n        const value = getValue();\n        set(value);\n        return value;\n      }\n    };\n    if (setter) {\n      options.set = set;\n    }\n    return Object.defineProperty(obj, key, options);\n  }\n\n  var Obj = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    each: each,\n    reduce: reduce,\n    isObject: isObject$1,\n    isPlain: isPlain,\n    merge: merge$2,\n    values: values$1,\n    defineLazyProperty: defineLazyProperty\n  });\n\n  /**\n   * @file browser.js\n   * @module browser\n   */\n\n  /**\n   * Whether or not this device is an iPod.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_IPOD = false;\n\n  /**\n   * The detected iOS version - or `null`.\n   *\n   * @static\n   * @type {string|null}\n   */\n  let IOS_VERSION = null;\n\n  /**\n   * Whether or not this is an Android device.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_ANDROID = false;\n\n  /**\n   * The detected Android version - or `null` if not Android or indeterminable.\n   *\n   * @static\n   * @type {number|string|null}\n   */\n  let ANDROID_VERSION;\n\n  /**\n   * Whether or not this is Mozilla Firefox.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_FIREFOX = false;\n\n  /**\n   * Whether or not this is Microsoft Edge.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_EDGE = false;\n\n  /**\n   * Whether or not this is any Chromium Browser\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_CHROMIUM = false;\n\n  /**\n   * Whether or not this is any Chromium browser that is not Edge.\n   *\n   * This will also be `true` for Chrome on iOS, which will have different support\n   * as it is actually Safari under the hood.\n   *\n   * Deprecated, as the behaviour to not match Edge was to prevent Legacy Edge's UA matching.\n   * IS_CHROMIUM should be used instead.\n   * \"Chromium but not Edge\" could be explicitly tested with IS_CHROMIUM && !IS_EDGE\n   *\n   * @static\n   * @deprecated\n   * @type {Boolean}\n   */\n  let IS_CHROME = false;\n\n  /**\n   * The detected Chromium version - or `null`.\n   *\n   * @static\n   * @type {number|null}\n   */\n  let CHROMIUM_VERSION = null;\n\n  /**\n   * The detected Google Chrome version - or `null`.\n   * This has always been the _Chromium_ version, i.e. would return on Chromium Edge.\n   * Deprecated, use CHROMIUM_VERSION instead.\n   *\n   * @static\n   * @deprecated\n   * @type {number|null}\n   */\n  let CHROME_VERSION = null;\n\n  /**\n   * Whether or not this is a Chromecast receiver application.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  const IS_CHROMECAST_RECEIVER = Boolean(window.cast && window.cast.framework && window.cast.framework.CastReceiverContext);\n\n  /**\n   * The detected Internet Explorer version - or `null`.\n   *\n   * @static\n   * @deprecated\n   * @type {number|null}\n   */\n  let IE_VERSION = null;\n\n  /**\n   * Whether or not this is desktop Safari.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_SAFARI = false;\n\n  /**\n   * Whether or not this is a Windows machine.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_WINDOWS = false;\n\n  /**\n   * Whether or not this device is an iPad.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_IPAD = false;\n\n  /**\n   * Whether or not this device is an iPhone.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  // The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n  // to identify iPhones, we need to exclude iPads.\n  // http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\n  let IS_IPHONE = false;\n\n  /**\n   * Whether or not this is a Tizen device.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_TIZEN = false;\n\n  /**\n   * Whether or not this is a WebOS device.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_WEBOS = false;\n\n  /**\n   * Whether or not this is a Smart TV (Tizen or WebOS) device.\n   *\n   * @static\n   * @type {Boolean}\n   */\n  let IS_SMART_TV = false;\n\n  /**\n   * Whether or not this device is touch-enabled.\n   *\n   * @static\n   * @const\n   * @type {Boolean}\n   */\n  const TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window || window.navigator.maxTouchPoints || window.DocumentTouch && window.document instanceof window.DocumentTouch));\n  const UAD = window.navigator && window.navigator.userAgentData;\n  if (UAD && UAD.platform && UAD.brands) {\n    // If userAgentData is present, use it instead of userAgent to avoid warnings\n    // Currently only implemented on Chromium\n    // userAgentData does not expose Android version, so ANDROID_VERSION remains `null`\n\n    IS_ANDROID = UAD.platform === 'Android';\n    IS_EDGE = Boolean(UAD.brands.find(b => b.brand === 'Microsoft Edge'));\n    IS_CHROMIUM = Boolean(UAD.brands.find(b => b.brand === 'Chromium'));\n    IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n    CHROMIUM_VERSION = CHROME_VERSION = (UAD.brands.find(b => b.brand === 'Chromium') || {}).version || null;\n    IS_WINDOWS = UAD.platform === 'Windows';\n  }\n\n  // If the browser is not Chromium, either userAgentData is not present which could be an old Chromium browser,\n  //  or it's a browser that has added userAgentData since that we don't have tests for yet. In either case,\n  // the checks need to be made agiainst the regular userAgent string.\n  if (!IS_CHROMIUM) {\n    const USER_AGENT = window.navigator && window.navigator.userAgent || '';\n    IS_IPOD = /iPod/i.test(USER_AGENT);\n    IOS_VERSION = function () {\n      const match = USER_AGENT.match(/OS (\\d+)_/i);\n      if (match && match[1]) {\n        return match[1];\n      }\n      return null;\n    }();\n    IS_ANDROID = /Android/i.test(USER_AGENT);\n    ANDROID_VERSION = function () {\n      // This matches Android Major.Minor.Patch versions\n      // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n      const match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n      if (!match) {\n        return null;\n      }\n      const major = match[1] && parseFloat(match[1]);\n      const minor = match[2] && parseFloat(match[2]);\n      if (major && minor) {\n        return parseFloat(match[1] + '.' + match[2]);\n      } else if (major) {\n        return major;\n      }\n      return null;\n    }();\n    IS_FIREFOX = /Firefox/i.test(USER_AGENT);\n    IS_EDGE = /Edg/i.test(USER_AGENT);\n    IS_CHROMIUM = /Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT);\n    IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n    CHROMIUM_VERSION = CHROME_VERSION = function () {\n      const match = USER_AGENT.match(/(Chrome|CriOS)\\/(\\d+)/);\n      if (match && match[2]) {\n        return parseFloat(match[2]);\n      }\n      return null;\n    }();\n    IE_VERSION = function () {\n      const result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n      let version = result && parseFloat(result[1]);\n      if (!version && /Trident\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\n        // IE 11 has a different user agent string than other IE versions\n        version = 11.0;\n      }\n      return version;\n    }();\n    IS_TIZEN = /Tizen/i.test(USER_AGENT);\n    IS_WEBOS = /Web0S/i.test(USER_AGENT);\n    IS_SMART_TV = IS_TIZEN || IS_WEBOS;\n    IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE && !IS_SMART_TV;\n    IS_WINDOWS = /Windows/i.test(USER_AGENT);\n    IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT);\n    IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\n  }\n\n  /**\n   * Whether or not this is an iOS device.\n   *\n   * @static\n   * @const\n   * @type {Boolean}\n   */\n  const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\n  /**\n   * Whether or not this is any flavor of Safari - including iOS.\n   *\n   * @static\n   * @const\n   * @type {Boolean}\n   */\n  const IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\n\n  var browser = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    get IS_IPOD () { return IS_IPOD; },\n    get IOS_VERSION () { return IOS_VERSION; },\n    get IS_ANDROID () { return IS_ANDROID; },\n    get ANDROID_VERSION () { return ANDROID_VERSION; },\n    get IS_FIREFOX () { return IS_FIREFOX; },\n    get IS_EDGE () { return IS_EDGE; },\n    get IS_CHROMIUM () { return IS_CHROMIUM; },\n    get IS_CHROME () { return IS_CHROME; },\n    get CHROMIUM_VERSION () { return CHROMIUM_VERSION; },\n    get CHROME_VERSION () { return CHROME_VERSION; },\n    IS_CHROMECAST_RECEIVER: IS_CHROMECAST_RECEIVER,\n    get IE_VERSION () { return IE_VERSION; },\n    get IS_SAFARI () { return IS_SAFARI; },\n    get IS_WINDOWS () { return IS_WINDOWS; },\n    get IS_IPAD () { return IS_IPAD; },\n    get IS_IPHONE () { return IS_IPHONE; },\n    get IS_TIZEN () { return IS_TIZEN; },\n    get IS_WEBOS () { return IS_WEBOS; },\n    get IS_SMART_TV () { return IS_SMART_TV; },\n    TOUCH_ENABLED: TOUCH_ENABLED,\n    IS_IOS: IS_IOS,\n    IS_ANY_SAFARI: IS_ANY_SAFARI\n  });\n\n  /**\n   * @file dom.js\n   * @module dom\n   */\n\n  /**\n   * Detect if a value is a string with any non-whitespace characters.\n   *\n   * @private\n   * @param  {string} str\n   *         The string to check\n   *\n   * @return {boolean}\n   *         Will be `true` if the string is non-blank, `false` otherwise.\n   *\n   */\n  function isNonBlankString(str) {\n    // we use str.trim as it will trim any whitespace characters\n    // from the front or back of non-whitespace characters. aka\n    // Any string that contains non-whitespace characters will\n    // still contain them after `trim` but whitespace only strings\n    // will have a length of 0, failing this check.\n    return typeof str === 'string' && Boolean(str.trim());\n  }\n\n  /**\n   * Throws an error if the passed string has whitespace. This is used by\n   * class methods to be relatively consistent with the classList API.\n   *\n   * @private\n   * @param  {string} str\n   *         The string to check for whitespace.\n   *\n   * @throws {Error}\n   *         Throws an error if there is whitespace in the string.\n   */\n  function throwIfWhitespace(str) {\n    // str.indexOf instead of regex because str.indexOf is faster performance wise.\n    if (str.indexOf(' ') >= 0) {\n      throw new Error('class has illegal whitespace characters');\n    }\n  }\n\n  /**\n   * Whether the current DOM interface appears to be real (i.e. not simulated).\n   *\n   * @return {boolean}\n   *         Will be `true` if the DOM appears to be real, `false` otherwise.\n   */\n  function isReal() {\n    // Both document and window will never be undefined thanks to `global`.\n    return document === window.document;\n  }\n\n  /**\n   * Determines, via duck typing, whether or not a value is a DOM element.\n   *\n   * @param  {*} value\n   *         The value to check.\n   *\n   * @return {boolean}\n   *         Will be `true` if the value is a DOM element, `false` otherwise.\n   */\n  function isEl(value) {\n    return isObject$1(value) && value.nodeType === 1;\n  }\n\n  /**\n   * Determines if the current DOM is embedded in an iframe.\n   *\n   * @return {boolean}\n   *         Will be `true` if the DOM is embedded in an iframe, `false`\n   *         otherwise.\n   */\n  function isInFrame() {\n    // We need a try/catch here because Safari will throw errors when attempting\n    // to get either `parent` or `self`\n    try {\n      return window.parent !== window.self;\n    } catch (x) {\n      return true;\n    }\n  }\n\n  /**\n   * Creates functions to query the DOM using a given method.\n   *\n   * @private\n   * @param   {string} method\n   *          The method to create the query with.\n   *\n   * @return  {Function}\n   *          The query method\n   */\n  function createQuerier(method) {\n    return function (selector, context) {\n      if (!isNonBlankString(selector)) {\n        return document[method](null);\n      }\n      if (isNonBlankString(context)) {\n        context = document.querySelector(context);\n      }\n      const ctx = isEl(context) ? context : document;\n      return ctx[method] && ctx[method](selector);\n    };\n  }\n\n  /**\n   * Creates an element and applies properties, attributes, and inserts content.\n   *\n   * @param  {string} [tagName='div']\n   *         Name of tag to be created.\n   *\n   * @param  {Object} [properties={}]\n   *         Element properties to be applied.\n   *\n   * @param  {Object} [attributes={}]\n   *         Element attributes to be applied.\n   *\n   * @param {ContentDescriptor} [content]\n   *        A content descriptor object.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  function createEl(tagName = 'div', properties = {}, attributes = {}, content) {\n    const el = document.createElement(tagName);\n    Object.getOwnPropertyNames(properties).forEach(function (propName) {\n      const val = properties[propName];\n\n      // Handle textContent since it's not supported everywhere and we have a\n      // method for it.\n      if (propName === 'textContent') {\n        textContent(el, val);\n      } else if (el[propName] !== val || propName === 'tabIndex') {\n        el[propName] = val;\n      }\n    });\n    Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n      el.setAttribute(attrName, attributes[attrName]);\n    });\n    if (content) {\n      appendContent(el, content);\n    }\n    return el;\n  }\n\n  /**\n   * Injects text into an element, replacing any existing contents entirely.\n   *\n   * @param  {HTMLElement} el\n   *         The element to add text content into\n   *\n   * @param  {string} text\n   *         The text content to add.\n   *\n   * @return {Element}\n   *         The element with added text content.\n   */\n  function textContent(el, text) {\n    if (typeof el.textContent === 'undefined') {\n      el.innerText = text;\n    } else {\n      el.textContent = text;\n    }\n    return el;\n  }\n\n  /**\n   * Insert an element as the first child node of another\n   *\n   * @param {Element} child\n   *        Element to insert\n   *\n   * @param {Element} parent\n   *        Element to insert child into\n   */\n  function prependTo(child, parent) {\n    if (parent.firstChild) {\n      parent.insertBefore(child, parent.firstChild);\n    } else {\n      parent.appendChild(child);\n    }\n  }\n\n  /**\n   * Check if an element has a class name.\n   *\n   * @param  {Element} element\n   *         Element to check\n   *\n   * @param  {string} classToCheck\n   *         Class name to check for\n   *\n   * @return {boolean}\n   *         Will be `true` if the element has a class, `false` otherwise.\n   *\n   * @throws {Error}\n   *         Throws an error if `classToCheck` has white space.\n   */\n  function hasClass(element, classToCheck) {\n    throwIfWhitespace(classToCheck);\n    return element.classList.contains(classToCheck);\n  }\n\n  /**\n   * Add a class name to an element.\n   *\n   * @param  {Element} element\n   *         Element to add class name to.\n   *\n   * @param  {...string} classesToAdd\n   *         One or more class name to add.\n   *\n   * @return {Element}\n   *         The DOM element with the added class name.\n   */\n  function addClass(element, ...classesToAdd) {\n    element.classList.add(...classesToAdd.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\n    return element;\n  }\n\n  /**\n   * Remove a class name from an element.\n   *\n   * @param  {Element} element\n   *         Element to remove a class name from.\n   *\n   * @param  {...string} classesToRemove\n   *         One or more class name to remove.\n   *\n   * @return {Element}\n   *         The DOM element with class name removed.\n   */\n  function removeClass(element, ...classesToRemove) {\n    // Protect in case the player gets disposed\n    if (!element) {\n      log$1.warn(\"removeClass was called with an element that doesn't exist\");\n      return null;\n    }\n    element.classList.remove(...classesToRemove.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\n    return element;\n  }\n\n  /**\n   * The callback definition for toggleClass.\n   *\n   * @callback PredicateCallback\n   * @param    {Element} element\n   *           The DOM element of the Component.\n   *\n   * @param    {string} classToToggle\n   *           The `className` that wants to be toggled\n   *\n   * @return   {boolean|undefined}\n   *           If `true` is returned, the `classToToggle` will be added to the\n   *           `element`, but not removed. If `false`, the `classToToggle` will be removed from\n   *           the `element`, but not added. If `undefined`, the callback will be ignored.\n   *\n   */\n\n  /**\n   * Adds or removes a class name to/from an element depending on an optional\n   * condition or the presence/absence of the class name.\n   *\n   * @param  {Element} element\n   *         The element to toggle a class name on.\n   *\n   * @param  {string} classToToggle\n   *         The class that should be toggled.\n   *\n   * @param  {boolean|PredicateCallback} [predicate]\n   *         See the return value for {@link module:dom~PredicateCallback}\n   *\n   * @return {Element}\n   *         The element with a class that has been toggled.\n   */\n  function toggleClass(element, classToToggle, predicate) {\n    if (typeof predicate === 'function') {\n      predicate = predicate(element, classToToggle);\n    }\n    if (typeof predicate !== 'boolean') {\n      predicate = undefined;\n    }\n    classToToggle.split(/\\s+/).forEach(className => element.classList.toggle(className, predicate));\n    return element;\n  }\n\n  /**\n   * Apply attributes to an HTML element.\n   *\n   * @param {Element} el\n   *        Element to add attributes to.\n   *\n   * @param {Object} [attributes]\n   *        Attributes to be applied.\n   */\n  function setAttributes(el, attributes) {\n    Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n      const attrValue = attributes[attrName];\n      if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n        el.removeAttribute(attrName);\n      } else {\n        el.setAttribute(attrName, attrValue === true ? '' : attrValue);\n      }\n    });\n  }\n\n  /**\n   * Get an element's attribute values, as defined on the HTML tag.\n   *\n   * Attributes are not the same as properties. They're defined on the tag\n   * or with setAttribute.\n   *\n   * @param  {Element} tag\n   *         Element from which to get tag attributes.\n   *\n   * @return {Object}\n   *         All attributes of the element. Boolean attributes will be `true` or\n   *         `false`, others will be strings.\n   */\n  function getAttributes(tag) {\n    const obj = {};\n\n    // known boolean attributes\n    // we can check for matching boolean properties, but not all browsers\n    // and not all tags know about these attributes, so, we still want to check them manually\n    const knownBooleans = ['autoplay', 'controls', 'playsinline', 'loop', 'muted', 'default', 'defaultMuted'];\n    if (tag && tag.attributes && tag.attributes.length > 0) {\n      const attrs = tag.attributes;\n      for (let i = attrs.length - 1; i >= 0; i--) {\n        const attrName = attrs[i].name;\n        /** @type {boolean|string} */\n        let attrVal = attrs[i].value;\n\n        // check for known booleans\n        // the matching element property will return a value for typeof\n        if (knownBooleans.includes(attrName)) {\n          // the value of an included boolean attribute is typically an empty\n          // string ('') which would equal false if we just check for a false value.\n          // we also don't want support bad code like autoplay='false'\n          attrVal = attrVal !== null ? true : false;\n        }\n        obj[attrName] = attrVal;\n      }\n    }\n    return obj;\n  }\n\n  /**\n   * Get the value of an element's attribute.\n   *\n   * @param {Element} el\n   *        A DOM element.\n   *\n   * @param {string} attribute\n   *        Attribute to get the value of.\n   *\n   * @return {string}\n   *         The value of the attribute.\n   */\n  function getAttribute(el, attribute) {\n    return el.getAttribute(attribute);\n  }\n\n  /**\n   * Set the value of an element's attribute.\n   *\n   * @param {Element} el\n   *        A DOM element.\n   *\n   * @param {string} attribute\n   *        Attribute to set.\n   *\n   * @param {string} value\n   *        Value to set the attribute to.\n   */\n  function setAttribute(el, attribute, value) {\n    el.setAttribute(attribute, value);\n  }\n\n  /**\n   * Remove an element's attribute.\n   *\n   * @param {Element} el\n   *        A DOM element.\n   *\n   * @param {string} attribute\n   *        Attribute to remove.\n   */\n  function removeAttribute(el, attribute) {\n    el.removeAttribute(attribute);\n  }\n\n  /**\n   * Attempt to block the ability to select text.\n   */\n  function blockTextSelection() {\n    document.body.focus();\n    document.onselectstart = function () {\n      return false;\n    };\n  }\n\n  /**\n   * Turn off text selection blocking.\n   */\n  function unblockTextSelection() {\n    document.onselectstart = function () {\n      return true;\n    };\n  }\n\n  /**\n   * Identical to the native `getBoundingClientRect` function, but ensures that\n   * the method is supported at all (it is in all browsers we claim to support)\n   * and that the element is in the DOM before continuing.\n   *\n   * This wrapper function also shims properties which are not provided by some\n   * older browsers (namely, IE8).\n   *\n   * Additionally, some browsers do not support adding properties to a\n   * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\n   * properties (except `x` and `y` which are not widely supported). This helps\n   * avoid implementations where keys are non-enumerable.\n   *\n   * @param  {Element} el\n   *         Element whose `ClientRect` we want to calculate.\n   *\n   * @return {Object|undefined}\n   *         Always returns a plain object - or `undefined` if it cannot.\n   */\n  function getBoundingClientRect(el) {\n    if (el && el.getBoundingClientRect && el.parentNode) {\n      const rect = el.getBoundingClientRect();\n      const result = {};\n      ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(k => {\n        if (rect[k] !== undefined) {\n          result[k] = rect[k];\n        }\n      });\n      if (!result.height) {\n        result.height = parseFloat(computedStyle(el, 'height'));\n      }\n      if (!result.width) {\n        result.width = parseFloat(computedStyle(el, 'width'));\n      }\n      return result;\n    }\n  }\n\n  /**\n   * Represents the position of a DOM element on the page.\n   *\n   * @typedef  {Object} module:dom~Position\n   *\n   * @property {number} left\n   *           Pixels to the left.\n   *\n   * @property {number} top\n   *           Pixels from the top.\n   */\n\n  /**\n   * Get the position of an element in the DOM.\n   *\n   * Uses `getBoundingClientRect` technique from John Resig.\n   *\n   * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\n   *\n   * @param  {Element} el\n   *         Element from which to get offset.\n   *\n   * @return {module:dom~Position}\n   *         The position of the element that was passed in.\n   */\n  function findPosition(el) {\n    if (!el || el && !el.offsetParent) {\n      return {\n        left: 0,\n        top: 0,\n        width: 0,\n        height: 0\n      };\n    }\n    const width = el.offsetWidth;\n    const height = el.offsetHeight;\n    let left = 0;\n    let top = 0;\n    while (el.offsetParent && el !== document[FullscreenApi.fullscreenElement]) {\n      left += el.offsetLeft;\n      top += el.offsetTop;\n      el = el.offsetParent;\n    }\n    return {\n      left,\n      top,\n      width,\n      height\n    };\n  }\n\n  /**\n   * Represents x and y coordinates for a DOM element or mouse pointer.\n   *\n   * @typedef  {Object} module:dom~Coordinates\n   *\n   * @property {number} x\n   *           x coordinate in pixels\n   *\n   * @property {number} y\n   *           y coordinate in pixels\n   */\n\n  /**\n   * Get the pointer position within an element.\n   *\n   * The base on the coordinates are the bottom left of the element.\n   *\n   * @param  {Element} el\n   *         Element on which to get the pointer position on.\n   *\n   * @param  {Event} event\n   *         Event object.\n   *\n   * @return {module:dom~Coordinates}\n   *         A coordinates object corresponding to the mouse position.\n   *\n   */\n  function getPointerPosition(el, event) {\n    const translated = {\n      x: 0,\n      y: 0\n    };\n    if (IS_IOS) {\n      let item = el;\n      while (item && item.nodeName.toLowerCase() !== 'html') {\n        const transform = computedStyle(item, 'transform');\n        if (/^matrix/.test(transform)) {\n          const values = transform.slice(7, -1).split(/,\\s/).map(Number);\n          translated.x += values[4];\n          translated.y += values[5];\n        } else if (/^matrix3d/.test(transform)) {\n          const values = transform.slice(9, -1).split(/,\\s/).map(Number);\n          translated.x += values[12];\n          translated.y += values[13];\n        }\n        if (item.assignedSlot && item.assignedSlot.parentElement && window.WebKitCSSMatrix) {\n          const transformValue = window.getComputedStyle(item.assignedSlot.parentElement).transform;\n          const matrix = new window.WebKitCSSMatrix(transformValue);\n          translated.x += matrix.m41;\n          translated.y += matrix.m42;\n        }\n        item = item.parentNode || item.host;\n      }\n    }\n    const position = {};\n    const boxTarget = findPosition(event.target);\n    const box = findPosition(el);\n    const boxW = box.width;\n    const boxH = box.height;\n    let offsetY = event.offsetY - (box.top - boxTarget.top);\n    let offsetX = event.offsetX - (box.left - boxTarget.left);\n    if (event.changedTouches) {\n      offsetX = event.changedTouches[0].pageX - box.left;\n      offsetY = event.changedTouches[0].pageY + box.top;\n      if (IS_IOS) {\n        offsetX -= translated.x;\n        offsetY -= translated.y;\n      }\n    }\n    position.y = 1 - Math.max(0, Math.min(1, offsetY / boxH));\n    position.x = Math.max(0, Math.min(1, offsetX / boxW));\n    return position;\n  }\n\n  /**\n   * Determines, via duck typing, whether or not a value is a text node.\n   *\n   * @param  {*} value\n   *         Check if this value is a text node.\n   *\n   * @return {boolean}\n   *         Will be `true` if the value is a text node, `false` otherwise.\n   */\n  function isTextNode$1(value) {\n    return isObject$1(value) && value.nodeType === 3;\n  }\n\n  /**\n   * Empties the contents of an element.\n   *\n   * @param  {Element} el\n   *         The element to empty children from\n   *\n   * @return {Element}\n   *         The element with no children\n   */\n  function emptyEl(el) {\n    while (el.firstChild) {\n      el.removeChild(el.firstChild);\n    }\n    return el;\n  }\n\n  /**\n   * This is a mixed value that describes content to be injected into the DOM\n   * via some method. It can be of the following types:\n   *\n   * Type       | Description\n   * -----------|-------------\n   * `string`   | The value will be normalized into a text node.\n   * `Element`  | The value will be accepted as-is.\n   * `Text`     | A TextNode. The value will be accepted as-is.\n   * `Array`    | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\n   * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\n   *\n   * @typedef {string|Element|Text|Array|Function} ContentDescriptor\n   */\n\n  /**\n   * Normalizes content for eventual insertion into the DOM.\n   *\n   * This allows a wide range of content definition methods, but helps protect\n   * from falling into the trap of simply writing to `innerHTML`, which could\n   * be an XSS concern.\n   *\n   * The content for an element can be passed in multiple types and\n   * combinations, whose behavior is as follows:\n   *\n   * @param {ContentDescriptor} content\n   *        A content descriptor value.\n   *\n   * @return {Array}\n   *         All of the content that was passed in, normalized to an array of\n   *         elements or text nodes.\n   */\n  function normalizeContent(content) {\n    // First, invoke content if it is a function. If it produces an array,\n    // that needs to happen before normalization.\n    if (typeof content === 'function') {\n      content = content();\n    }\n\n    // Next up, normalize to an array, so one or many items can be normalized,\n    // filtered, and returned.\n    return (Array.isArray(content) ? content : [content]).map(value => {\n      // First, invoke value if it is a function to produce a new value,\n      // which will be subsequently normalized to a Node of some kind.\n      if (typeof value === 'function') {\n        value = value();\n      }\n      if (isEl(value) || isTextNode$1(value)) {\n        return value;\n      }\n      if (typeof value === 'string' && /\\S/.test(value)) {\n        return document.createTextNode(value);\n      }\n    }).filter(value => value);\n  }\n\n  /**\n   * Normalizes and appends content to an element.\n   *\n   * @param  {Element} el\n   *         Element to append normalized content to.\n   *\n   * @param {ContentDescriptor} content\n   *        A content descriptor value.\n   *\n   * @return {Element}\n   *         The element with appended normalized content.\n   */\n  function appendContent(el, content) {\n    normalizeContent(content).forEach(node => el.appendChild(node));\n    return el;\n  }\n\n  /**\n   * Normalizes and inserts content into an element; this is identical to\n   * `appendContent()`, except it empties the element first.\n   *\n   * @param {Element} el\n   *        Element to insert normalized content into.\n   *\n   * @param {ContentDescriptor} content\n   *        A content descriptor value.\n   *\n   * @return {Element}\n   *         The element with inserted normalized content.\n   */\n  function insertContent(el, content) {\n    return appendContent(emptyEl(el), content);\n  }\n\n  /**\n   * Check if an event was a single left click.\n   *\n   * @param  {MouseEvent} event\n   *         Event object.\n   *\n   * @return {boolean}\n   *         Will be `true` if a single left click, `false` otherwise.\n   */\n  function isSingleLeftClick(event) {\n    // Note: if you create something draggable, be sure to\n    // call it on both `mousedown` and `mousemove` event,\n    // otherwise `mousedown` should be enough for a button\n\n    if (event.button === undefined && event.buttons === undefined) {\n      // Why do we need `buttons` ?\n      // Because, middle mouse sometimes have this:\n      // e.button === 0 and e.buttons === 4\n      // Furthermore, we want to prevent combination click, something like\n      // HOLD middlemouse then left click, that would be\n      // e.button === 0, e.buttons === 5\n      // just `button` is not gonna work\n\n      // Alright, then what this block does ?\n      // this is for chrome `simulate mobile devices`\n      // I want to support this as well\n\n      return true;\n    }\n    if (event.button === 0 && event.buttons === undefined) {\n      // Touch screen, sometimes on some specific device, `buttons`\n      // doesn't have anything (safari on ios, blackberry...)\n\n      return true;\n    }\n\n    // `mouseup` event on a single left click has\n    // `button` and `buttons` equal to 0\n    if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\n      return true;\n    }\n\n    // MacOS Sonoma trackpad when \"tap to click enabled\"\n    if (event.type === 'mousedown' && event.button === 0 && event.buttons === 0) {\n      return true;\n    }\n    if (event.button !== 0 || event.buttons !== 1) {\n      // This is the reason we have those if else block above\n      // if any special case we can catch and let it slide\n      // we do it above, when get to here, this definitely\n      // is-not-left-click\n\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * Finds a single DOM element matching `selector` within the optional\n   * `context` of another DOM element (defaulting to `document`).\n   *\n   * @param  {string} selector\n   *         A valid CSS selector, which will be passed to `querySelector`.\n   *\n   * @param  {Element|String} [context=document]\n   *         A DOM element within which to query. Can also be a selector\n   *         string in which case the first matching element will be used\n   *         as context. If missing (or no element matches selector), falls\n   *         back to `document`.\n   *\n   * @return {Element|null}\n   *         The element that was found or null.\n   */\n  const $ = createQuerier('querySelector');\n\n  /**\n   * Finds a all DOM elements matching `selector` within the optional\n   * `context` of another DOM element (defaulting to `document`).\n   *\n   * @param  {string} selector\n   *         A valid CSS selector, which will be passed to `querySelectorAll`.\n   *\n   * @param  {Element|String} [context=document]\n   *         A DOM element within which to query. Can also be a selector\n   *         string in which case the first matching element will be used\n   *         as context. If missing (or no element matches selector), falls\n   *         back to `document`.\n   *\n   * @return {NodeList}\n   *         A element list of elements that were found. Will be empty if none\n   *         were found.\n   *\n   */\n  const $$ = createQuerier('querySelectorAll');\n\n  /**\n   * A safe getComputedStyle.\n   *\n   * This is needed because in Firefox, if the player is loaded in an iframe with\n   * `display:none`, then `getComputedStyle` returns `null`, so, we do a\n   * null-check to make sure that the player doesn't break in these cases.\n   *\n   * @param    {Element} el\n   *           The element you want the computed style of\n   *\n   * @param    {string} prop\n   *           The property name you want\n   *\n   * @see      https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n   */\n  function computedStyle(el, prop) {\n    if (!el || !prop) {\n      return '';\n    }\n    if (typeof window.getComputedStyle === 'function') {\n      let computedStyleValue;\n      try {\n        computedStyleValue = window.getComputedStyle(el);\n      } catch (e) {\n        return '';\n      }\n      return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\n    }\n    return '';\n  }\n\n  /**\n   * Copy document style sheets to another window.\n   *\n   * @param    {Window} win\n   *           The window element you want to copy the document style sheets to.\n   *\n   */\n  function copyStyleSheetsToWindow(win) {\n    [...document.styleSheets].forEach(styleSheet => {\n      try {\n        const cssRules = [...styleSheet.cssRules].map(rule => rule.cssText).join('');\n        const style = document.createElement('style');\n        style.textContent = cssRules;\n        win.document.head.appendChild(style);\n      } catch (e) {\n        const link = document.createElement('link');\n        link.rel = 'stylesheet';\n        link.type = styleSheet.type;\n        // For older Safari this has to be the string; on other browsers setting the MediaList works\n        link.media = styleSheet.media.mediaText;\n        link.href = styleSheet.href;\n        win.document.head.appendChild(link);\n      }\n    });\n  }\n\n  var Dom = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    isReal: isReal,\n    isEl: isEl,\n    isInFrame: isInFrame,\n    createEl: createEl,\n    textContent: textContent,\n    prependTo: prependTo,\n    hasClass: hasClass,\n    addClass: addClass,\n    removeClass: removeClass,\n    toggleClass: toggleClass,\n    setAttributes: setAttributes,\n    getAttributes: getAttributes,\n    getAttribute: getAttribute,\n    setAttribute: setAttribute,\n    removeAttribute: removeAttribute,\n    blockTextSelection: blockTextSelection,\n    unblockTextSelection: unblockTextSelection,\n    getBoundingClientRect: getBoundingClientRect,\n    findPosition: findPosition,\n    getPointerPosition: getPointerPosition,\n    isTextNode: isTextNode$1,\n    emptyEl: emptyEl,\n    normalizeContent: normalizeContent,\n    appendContent: appendContent,\n    insertContent: insertContent,\n    isSingleLeftClick: isSingleLeftClick,\n    $: $,\n    $$: $$,\n    computedStyle: computedStyle,\n    copyStyleSheetsToWindow: copyStyleSheetsToWindow\n  });\n\n  /**\n   * @file setup.js - Functions for setting up a player without\n   * user interaction based on the data-setup `attribute` of the video tag.\n   *\n   * @module setup\n   */\n  let _windowLoaded = false;\n  let videojs$1;\n\n  /**\n   * Set up any tags that have a data-setup `attribute` when the player is started.\n   */\n  const autoSetup = function () {\n    if (videojs$1.options.autoSetup === false) {\n      return;\n    }\n    const vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n    const audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n    const divs = Array.prototype.slice.call(document.getElementsByTagName('video-js'));\n    const mediaEls = vids.concat(audios, divs);\n\n    // Check if any media elements exist\n    if (mediaEls && mediaEls.length > 0) {\n      for (let i = 0, e = mediaEls.length; i < e; i++) {\n        const mediaEl = mediaEls[i];\n\n        // Check if element exists, has getAttribute func.\n        if (mediaEl && mediaEl.getAttribute) {\n          // Make sure this player hasn't already been set up.\n          if (mediaEl.player === undefined) {\n            const options = mediaEl.getAttribute('data-setup');\n\n            // Check if data-setup attr exists.\n            // We only auto-setup if they've added the data-setup attr.\n            if (options !== null) {\n              // Create new video.js instance.\n              videojs$1(mediaEl);\n            }\n          }\n\n          // If getAttribute isn't defined, we need to wait for the DOM.\n        } else {\n          autoSetupTimeout(1);\n          break;\n        }\n      }\n\n      // No videos were found, so keep looping unless page is finished loading.\n    } else if (!_windowLoaded) {\n      autoSetupTimeout(1);\n    }\n  };\n\n  /**\n   * Wait until the page is loaded before running autoSetup. This will be called in\n   * autoSetup if `hasLoaded` returns false.\n   *\n   * @param {number} wait\n   *        How long to wait in ms\n   *\n   * @param {module:videojs} [vjs]\n   *        The videojs library function\n   */\n  function autoSetupTimeout(wait, vjs) {\n    // Protect against breakage in non-browser environments\n    if (!isReal()) {\n      return;\n    }\n    if (vjs) {\n      videojs$1 = vjs;\n    }\n    window.setTimeout(autoSetup, wait);\n  }\n\n  /**\n   * Used to set the internal tracking of window loaded state to true.\n   *\n   * @private\n   */\n  function setWindowLoaded() {\n    _windowLoaded = true;\n    window.removeEventListener('load', setWindowLoaded);\n  }\n  if (isReal()) {\n    if (document.readyState === 'complete') {\n      setWindowLoaded();\n    } else {\n      /**\n       * Listen for the load event on window, and set _windowLoaded to true.\n       *\n       * We use a standard event listener here to avoid incrementing the GUID\n       * before any players are created.\n       *\n       * @listens load\n       */\n      window.addEventListener('load', setWindowLoaded);\n    }\n  }\n\n  /**\n   * @file stylesheet.js\n   * @module stylesheet\n   */\n\n  /**\n   * Create a DOM style element given a className for it.\n   *\n   * @param {string} className\n   *        The className to add to the created style element.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  const createStyleElement = function (className) {\n    const style = document.createElement('style');\n    style.className = className;\n    return style;\n  };\n\n  /**\n   * Add text to a DOM element.\n   *\n   * @param {Element} el\n   *        The Element to add text content to.\n   *\n   * @param {string} content\n   *        The text to add to the element.\n   */\n  const setTextContent = function (el, content) {\n    if (el.styleSheet) {\n      el.styleSheet.cssText = content;\n    } else {\n      el.textContent = content;\n    }\n  };\n\n  /**\n   * @file dom-data.js\n   * @module dom-data\n   */\n\n  /**\n   * Element Data Store.\n   *\n   * Allows for binding data to an element without putting it directly on the\n   * element. Ex. Event listeners are stored here.\n   * (also from jsninja.com, slightly modified and updated for closure compiler)\n   *\n   * @type {Object}\n   * @private\n   */\n  var DomData = new WeakMap();\n\n  /**\n   * @file guid.js\n   * @module guid\n   */\n\n  // Default value for GUIDs. This allows us to reset the GUID counter in tests.\n  //\n  // The initial GUID is 3 because some users have come to rely on the first\n  // default player ID ending up as `vjs_video_3`.\n  //\n  // See: https://github.com/videojs/video.js/pull/6216\n  const _initialGuid = 3;\n\n  /**\n   * Unique ID for an element or function\n   *\n   * @type {Number}\n   */\n  let _guid = _initialGuid;\n\n  /**\n   * Get a unique auto-incrementing ID by number that has not been returned before.\n   *\n   * @return {number}\n   *         A new unique ID.\n   */\n  function newGUID() {\n    return _guid++;\n  }\n\n  /**\n   * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n   * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n   * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n   * robust as jquery's, so there's probably some differences.\n   *\n   * @file events.js\n   * @module events\n   */\n\n  /**\n   * Clean up the listener cache and dispatchers\n   *\n   * @param {Element|Object} elem\n   *        Element to clean up\n   *\n   * @param {string} type\n   *        Type of event to clean up\n   */\n  function _cleanUpEvents(elem, type) {\n    if (!DomData.has(elem)) {\n      return;\n    }\n    const data = DomData.get(elem);\n\n    // Remove the events of a particular type if there are none left\n    if (data.handlers[type].length === 0) {\n      delete data.handlers[type];\n      // data.handlers[type] = null;\n      // Setting to null was causing an error with data.handlers\n\n      // Remove the meta-handler from the element\n      if (elem.removeEventListener) {\n        elem.removeEventListener(type, data.dispatcher, false);\n      } else if (elem.detachEvent) {\n        elem.detachEvent('on' + type, data.dispatcher);\n      }\n    }\n\n    // Remove the events object if there are no types left\n    if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n      delete data.handlers;\n      delete data.dispatcher;\n      delete data.disabled;\n    }\n\n    // Finally remove the element data if there is no data left\n    if (Object.getOwnPropertyNames(data).length === 0) {\n      DomData.delete(elem);\n    }\n  }\n\n  /**\n   * Loops through an array of event types and calls the requested method for each type.\n   *\n   * @param {Function} fn\n   *        The event method we want to use.\n   *\n   * @param {Element|Object} elem\n   *        Element or object to bind listeners to\n   *\n   * @param {string[]} types\n   *        Type of event to bind to.\n   *\n   * @param {Function} callback\n   *        Event listener.\n   */\n  function _handleMultipleEvents(fn, elem, types, callback) {\n    types.forEach(function (type) {\n      // Call the event method for each one of the types\n      fn(elem, type, callback);\n    });\n  }\n\n  /**\n   * Fix a native event to have standard property values\n   *\n   * @param {Object} event\n   *        Event object to fix.\n   *\n   * @return {Object}\n   *         Fixed event object.\n   */\n  function fixEvent(event) {\n    if (event.fixed_) {\n      return event;\n    }\n    function returnTrue() {\n      return true;\n    }\n    function returnFalse() {\n      return false;\n    }\n\n    // Test if fixing up is needed\n    // Used to check if !event.stopPropagation instead of isPropagationStopped\n    // But native events return true for stopPropagation, but don't have\n    // other expected methods like isPropagationStopped. Seems to be a problem\n    // with the Javascript Ninja code. So we're just overriding all events now.\n    if (!event || !event.isPropagationStopped || !event.isImmediatePropagationStopped) {\n      const old = event || window.event;\n      event = {};\n      // Clone the old object so that we can modify the values event = {};\n      // IE8 Doesn't like when you mess with native event properties\n      // Firefox returns false for event.hasOwnProperty('type') and other props\n      //  which makes copying more difficult.\n\n      // TODO: Probably best to create an allowlist of event props\n      const deprecatedProps = ['layerX', 'layerY', 'keyLocation', 'path', 'webkitMovementX', 'webkitMovementY', 'mozPressure', 'mozInputSource'];\n      for (const key in old) {\n        // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n        // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n        // and webkitMovementX/Y\n        // Lighthouse complains if Event.path is copied\n        if (!deprecatedProps.includes(key)) {\n          // Chrome 32+ warns if you try to copy deprecated returnValue, but\n          // we still want to if preventDefault isn't supported (IE8).\n          if (!(key === 'returnValue' && old.preventDefault)) {\n            event[key] = old[key];\n          }\n        }\n      }\n\n      // The event occurred on this element\n      if (!event.target) {\n        event.target = event.srcElement || document;\n      }\n\n      // Handle which other element the event is related to\n      if (!event.relatedTarget) {\n        event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n      }\n\n      // Stop the default browser action\n      event.preventDefault = function () {\n        if (old.preventDefault) {\n          old.preventDefault();\n        }\n        event.returnValue = false;\n        old.returnValue = false;\n        event.defaultPrevented = true;\n      };\n      event.defaultPrevented = false;\n\n      // Stop the event from bubbling\n      event.stopPropagation = function () {\n        if (old.stopPropagation) {\n          old.stopPropagation();\n        }\n        event.cancelBubble = true;\n        old.cancelBubble = true;\n        event.isPropagationStopped = returnTrue;\n      };\n      event.isPropagationStopped = returnFalse;\n\n      // Stop the event from bubbling and executing other handlers\n      event.stopImmediatePropagation = function () {\n        if (old.stopImmediatePropagation) {\n          old.stopImmediatePropagation();\n        }\n        event.isImmediatePropagationStopped = returnTrue;\n        event.stopPropagation();\n      };\n      event.isImmediatePropagationStopped = returnFalse;\n\n      // Handle mouse position\n      if (event.clientX !== null && event.clientX !== undefined) {\n        const doc = document.documentElement;\n        const body = document.body;\n        event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n        event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n      }\n\n      // Handle key presses\n      event.which = event.charCode || event.keyCode;\n\n      // Fix button for mouse clicks:\n      // 0 == left; 1 == middle; 2 == right\n      if (event.button !== null && event.button !== undefined) {\n        // The following is disabled because it does not pass videojs-standard\n        // and... yikes.\n        /* eslint-disable */\n        event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\n        /* eslint-enable */\n      }\n    }\n    event.fixed_ = true;\n    // Returns fixed-up instance\n    return event;\n  }\n\n  /**\n   * Whether passive event listeners are supported\n   */\n  let _supportsPassive;\n  const supportsPassive = function () {\n    if (typeof _supportsPassive !== 'boolean') {\n      _supportsPassive = false;\n      try {\n        const opts = Object.defineProperty({}, 'passive', {\n          get() {\n            _supportsPassive = true;\n          }\n        });\n        window.addEventListener('test', null, opts);\n        window.removeEventListener('test', null, opts);\n      } catch (e) {\n        // disregard\n      }\n    }\n    return _supportsPassive;\n  };\n\n  /**\n   * Touch events Chrome expects to be passive\n   */\n  const passiveEvents = ['touchstart', 'touchmove'];\n\n  /**\n   * Add an event listener to element\n   * It stores the handler function in a separate cache object\n   * and adds a generic handler to the element's event,\n   * along with a unique id (guid) to the element.\n   *\n   * @param {Element|Object} elem\n   *        Element or object to bind listeners to\n   *\n   * @param {string|string[]} type\n   *        Type of event to bind to.\n   *\n   * @param {Function} fn\n   *        Event listener.\n   */\n  function on(elem, type, fn) {\n    if (Array.isArray(type)) {\n      return _handleMultipleEvents(on, elem, type, fn);\n    }\n    if (!DomData.has(elem)) {\n      DomData.set(elem, {});\n    }\n    const data = DomData.get(elem);\n\n    // We need a place to store all our handler data\n    if (!data.handlers) {\n      data.handlers = {};\n    }\n    if (!data.handlers[type]) {\n      data.handlers[type] = [];\n    }\n    if (!fn.guid) {\n      fn.guid = newGUID();\n    }\n    data.handlers[type].push(fn);\n    if (!data.dispatcher) {\n      data.disabled = false;\n      data.dispatcher = function (event, hash) {\n        if (data.disabled) {\n          return;\n        }\n        event = fixEvent(event);\n        const handlers = data.handlers[event.type];\n        if (handlers) {\n          // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n          const handlersCopy = handlers.slice(0);\n          for (let m = 0, n = handlersCopy.length; m < n; m++) {\n            if (event.isImmediatePropagationStopped()) {\n              break;\n            } else {\n              try {\n                handlersCopy[m].call(elem, event, hash);\n              } catch (e) {\n                log$1.error(e);\n              }\n            }\n          }\n        }\n      };\n    }\n    if (data.handlers[type].length === 1) {\n      if (elem.addEventListener) {\n        let options = false;\n        if (supportsPassive() && passiveEvents.indexOf(type) > -1) {\n          options = {\n            passive: true\n          };\n        }\n        elem.addEventListener(type, data.dispatcher, options);\n      } else if (elem.attachEvent) {\n        elem.attachEvent('on' + type, data.dispatcher);\n      }\n    }\n  }\n\n  /**\n   * Removes event listeners from an element\n   *\n   * @param {Element|Object} elem\n   *        Object to remove listeners from.\n   *\n   * @param {string|string[]} [type]\n   *        Type of listener to remove. Don't include to remove all events from element.\n   *\n   * @param {Function} [fn]\n   *        Specific listener to remove. Don't include to remove listeners for an event\n   *        type.\n   */\n  function off(elem, type, fn) {\n    // Don't want to add a cache object through getElData if not needed\n    if (!DomData.has(elem)) {\n      return;\n    }\n    const data = DomData.get(elem);\n\n    // If no events exist, nothing to unbind\n    if (!data.handlers) {\n      return;\n    }\n    if (Array.isArray(type)) {\n      return _handleMultipleEvents(off, elem, type, fn);\n    }\n\n    // Utility function\n    const removeType = function (el, t) {\n      data.handlers[t] = [];\n      _cleanUpEvents(el, t);\n    };\n\n    // Are we removing all bound events?\n    if (type === undefined) {\n      for (const t in data.handlers) {\n        if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n          removeType(elem, t);\n        }\n      }\n      return;\n    }\n    const handlers = data.handlers[type];\n\n    // If no handlers exist, nothing to unbind\n    if (!handlers) {\n      return;\n    }\n\n    // If no listener was provided, remove all listeners for type\n    if (!fn) {\n      removeType(elem, type);\n      return;\n    }\n\n    // We're only removing a single handler\n    if (fn.guid) {\n      for (let n = 0; n < handlers.length; n++) {\n        if (handlers[n].guid === fn.guid) {\n          handlers.splice(n--, 1);\n        }\n      }\n    }\n    _cleanUpEvents(elem, type);\n  }\n\n  /**\n   * Trigger an event for an element\n   *\n   * @param {Element|Object} elem\n   *        Element to trigger an event on\n   *\n   * @param {EventTarget~Event|string} event\n   *        A string (the type) or an event object with a type attribute\n   *\n   * @param {Object} [hash]\n   *        data hash to pass along with the event\n   *\n   * @return {boolean|undefined}\n   *         Returns the opposite of `defaultPrevented` if default was\n   *         prevented. Otherwise, returns `undefined`\n   */\n  function trigger(elem, event, hash) {\n    // Fetches element data and a reference to the parent (for bubbling).\n    // Don't want to add a data object to cache for every parent,\n    // so checking hasElData first.\n    const elemData = DomData.has(elem) ? DomData.get(elem) : {};\n    const parent = elem.parentNode || elem.ownerDocument;\n    // type = event.type || event,\n    // handler;\n\n    // If an event name was passed as a string, creates an event out of it\n    if (typeof event === 'string') {\n      event = {\n        type: event,\n        target: elem\n      };\n    } else if (!event.target) {\n      event.target = elem;\n    }\n\n    // Normalizes the event properties.\n    event = fixEvent(event);\n\n    // If the passed element has a dispatcher, executes the established handlers.\n    if (elemData.dispatcher) {\n      elemData.dispatcher.call(elem, event, hash);\n    }\n\n    // Unless explicitly stopped or the event does not bubble (e.g. media events)\n    // recursively calls this function to bubble the event up the DOM.\n    if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n      trigger.call(null, parent, event, hash);\n\n      // If at the top of the DOM, triggers the default action unless disabled.\n    } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\n      if (!DomData.has(event.target)) {\n        DomData.set(event.target, {});\n      }\n      const targetData = DomData.get(event.target);\n\n      // Checks if the target has a default action for this event.\n      if (event.target[event.type]) {\n        // Temporarily disables event dispatching on the target as we have already executed the handler.\n        targetData.disabled = true;\n        // Executes the default action.\n        if (typeof event.target[event.type] === 'function') {\n          event.target[event.type]();\n        }\n        // Re-enables event dispatching.\n        targetData.disabled = false;\n      }\n    }\n\n    // Inform the triggerer if the default was prevented by returning false\n    return !event.defaultPrevented;\n  }\n\n  /**\n   * Trigger a listener only once for an event.\n   *\n   * @param {Element|Object} elem\n   *        Element or object to bind to.\n   *\n   * @param {string|string[]} type\n   *        Name/type of event\n   *\n   * @param {Event~EventListener} fn\n   *        Event listener function\n   */\n  function one(elem, type, fn) {\n    if (Array.isArray(type)) {\n      return _handleMultipleEvents(one, elem, type, fn);\n    }\n    const func = function () {\n      off(elem, type, func);\n      fn.apply(this, arguments);\n    };\n\n    // copy the guid to the new function so it can removed using the original function's ID\n    func.guid = fn.guid = fn.guid || newGUID();\n    on(elem, type, func);\n  }\n\n  /**\n   * Trigger a listener only once and then turn if off for all\n   * configured events\n   *\n   * @param {Element|Object} elem\n   *        Element or object to bind to.\n   *\n   * @param {string|string[]} type\n   *        Name/type of event\n   *\n   * @param {Event~EventListener} fn\n   *        Event listener function\n   */\n  function any(elem, type, fn) {\n    const func = function () {\n      off(elem, type, func);\n      fn.apply(this, arguments);\n    };\n\n    // copy the guid to the new function so it can removed using the original function's ID\n    func.guid = fn.guid = fn.guid || newGUID();\n\n    // multiple ons, but one off for everything\n    on(elem, type, func);\n  }\n\n  var Events = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    fixEvent: fixEvent,\n    on: on,\n    off: off,\n    trigger: trigger,\n    one: one,\n    any: any\n  });\n\n  /**\n   * @file fn.js\n   * @module fn\n   */\n  const UPDATE_REFRESH_INTERVAL = 30;\n\n  /**\n   * A private, internal-only function for changing the context of a function.\n   *\n   * It also stores a unique id on the function so it can be easily removed from\n   * events.\n   *\n   * @private\n   * @function\n   * @param    {*} context\n   *           The object to bind as scope.\n   *\n   * @param    {Function} fn\n   *           The function to be bound to a scope.\n   *\n   * @param    {number} [uid]\n   *           An optional unique ID for the function to be set\n   *\n   * @return   {Function}\n   *           The new function that will be bound into the context given\n   */\n  const bind_ = function (context, fn, uid) {\n    // Make sure the function has a unique ID\n    if (!fn.guid) {\n      fn.guid = newGUID();\n    }\n\n    // Create the new function that changes the context\n    const bound = fn.bind(context);\n\n    // Allow for the ability to individualize this function\n    // Needed in the case where multiple objects might share the same prototype\n    // IF both items add an event listener with the same function, then you try to remove just one\n    // it will remove both because they both have the same guid.\n    // when using this, you need to use the bind method when you remove the listener as well.\n    // currently used in text tracks\n    bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\n    return bound;\n  };\n\n  /**\n   * Wraps the given function, `fn`, with a new function that only invokes `fn`\n   * at most once per every `wait` milliseconds.\n   *\n   * @function\n   * @param    {Function} fn\n   *           The function to be throttled.\n   *\n   * @param    {number}   wait\n   *           The number of milliseconds by which to throttle.\n   *\n   * @return   {Function}\n   */\n  const throttle = function (fn, wait) {\n    let last = window.performance.now();\n    const throttled = function (...args) {\n      const now = window.performance.now();\n      if (now - last >= wait) {\n        fn(...args);\n        last = now;\n      }\n    };\n    return throttled;\n  };\n\n  /**\n   * Creates a debounced function that delays invoking `func` until after `wait`\n   * milliseconds have elapsed since the last time the debounced function was\n   * invoked.\n   *\n   * Inspired by lodash and underscore implementations.\n   *\n   * @function\n   * @param    {Function} func\n   *           The function to wrap with debounce behavior.\n   *\n   * @param    {number} wait\n   *           The number of milliseconds to wait after the last invocation.\n   *\n   * @param    {boolean} [immediate]\n   *           Whether or not to invoke the function immediately upon creation.\n   *\n   * @param    {Object} [context=window]\n   *           The \"context\" in which the debounced function should debounce. For\n   *           example, if this function should be tied to a Video.js player,\n   *           the player can be passed here. Alternatively, defaults to the\n   *           global `window` object.\n   *\n   * @return   {Function}\n   *           A debounced function.\n   */\n  const debounce$1 = function (func, wait, immediate, context = window) {\n    let timeout;\n    const cancel = () => {\n      context.clearTimeout(timeout);\n      timeout = null;\n    };\n\n    /* eslint-disable consistent-this */\n    const debounced = function () {\n      const self = this;\n      const args = arguments;\n      let later = function () {\n        timeout = null;\n        later = null;\n        if (!immediate) {\n          func.apply(self, args);\n        }\n      };\n      if (!timeout && immediate) {\n        func.apply(self, args);\n      }\n      context.clearTimeout(timeout);\n      timeout = context.setTimeout(later, wait);\n    };\n    /* eslint-enable consistent-this */\n\n    debounced.cancel = cancel;\n    return debounced;\n  };\n\n  var Fn = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    UPDATE_REFRESH_INTERVAL: UPDATE_REFRESH_INTERVAL,\n    bind_: bind_,\n    throttle: throttle,\n    debounce: debounce$1\n  });\n\n  /**\n   * @file src/js/event-target.js\n   */\n  let EVENT_MAP;\n\n  /**\n   * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\n   * adds shorthand functions that wrap around lengthy functions. For example:\n   * the `on` function is a wrapper around `addEventListener`.\n   *\n   * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\n   * @class EventTarget\n   */\n  class EventTarget$2 {\n    /**\n     * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n     * function that will get called when an event with a certain name gets triggered.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to call with `EventTarget`s\n     */\n    on(type, fn) {\n      // Remove the addEventListener alias before calling Events.on\n      // so we don't get into an infinite type loop\n      const ael = this.addEventListener;\n      this.addEventListener = () => {};\n      on(this, type, fn);\n      this.addEventListener = ael;\n    }\n    /**\n     * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n     * This makes it so that the `event listener` will no longer get called when the\n     * named event happens.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to remove.\n     */\n    off(type, fn) {\n      off(this, type, fn);\n    }\n    /**\n     * This function will add an `event listener` that gets triggered only once. After the\n     * first trigger it will get removed. This is like adding an `event listener`\n     * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to be called once for each event name.\n     */\n    one(type, fn) {\n      // Remove the addEventListener aliasing Events.on\n      // so we don't get into an infinite type loop\n      const ael = this.addEventListener;\n      this.addEventListener = () => {};\n      one(this, type, fn);\n      this.addEventListener = ael;\n    }\n    /**\n     * This function will add an `event listener` that gets triggered only once and is\n     * removed from all events. This is like adding an array of `event listener`s\n     * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the\n     * first time it is triggered.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to be called once for each event name.\n     */\n    any(type, fn) {\n      // Remove the addEventListener aliasing Events.on\n      // so we don't get into an infinite type loop\n      const ael = this.addEventListener;\n      this.addEventListener = () => {};\n      any(this, type, fn);\n      this.addEventListener = ael;\n    }\n    /**\n     * This function causes an event to happen. This will then cause any `event listeners`\n     * that are waiting for that event, to get called. If there are no `event listeners`\n     * for an event then nothing will happen.\n     *\n     * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n     * Trigger will also call the `on` + `uppercaseEventName` function.\n     *\n     * Example:\n     * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n     * `onClick` if it exists.\n     *\n     * @param {string|EventTarget~Event|Object} event\n     *        The name of the event, an `Event`, or an object with a key of type set to\n     *        an event name.\n     */\n    trigger(event) {\n      const type = event.type || event;\n\n      // deprecation\n      // In a future version we should default target to `this`\n      // similar to how we default the target to `elem` in\n      // `Events.trigger`. Right now the default `target` will be\n      // `document` due to the `Event.fixEvent` call.\n      if (typeof event === 'string') {\n        event = {\n          type\n        };\n      }\n      event = fixEvent(event);\n      if (this.allowedEvents_[type] && this['on' + type]) {\n        this['on' + type](event);\n      }\n      trigger(this, event);\n    }\n    queueTrigger(event) {\n      // only set up EVENT_MAP if it'll be used\n      if (!EVENT_MAP) {\n        EVENT_MAP = new Map();\n      }\n      const type = event.type || event;\n      let map = EVENT_MAP.get(this);\n      if (!map) {\n        map = new Map();\n        EVENT_MAP.set(this, map);\n      }\n      const oldTimeout = map.get(type);\n      map.delete(type);\n      window.clearTimeout(oldTimeout);\n      const timeout = window.setTimeout(() => {\n        map.delete(type);\n        // if we cleared out all timeouts for the current target, delete its map\n        if (map.size === 0) {\n          map = null;\n          EVENT_MAP.delete(this);\n        }\n        this.trigger(event);\n      }, 0);\n      map.set(type, timeout);\n    }\n  }\n\n  /**\n   * A Custom DOM event.\n   *\n   * @typedef {CustomEvent} Event\n   * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\n   */\n\n  /**\n   * All event listeners should follow the following format.\n   *\n   * @callback EventListener\n   * @this {EventTarget}\n   *\n   * @param {Event} event\n   *        the event that triggered this function\n   *\n   * @param {Object} [hash]\n   *        hash of data sent during the event\n   */\n\n  /**\n   * An object containing event names as keys and booleans as values.\n   *\n   * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\n   *         will have extra functionality. See that function for more information.\n   *\n   * @property EventTarget.prototype.allowedEvents_\n   * @protected\n   */\n  EventTarget$2.prototype.allowedEvents_ = {};\n\n  /**\n   * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\n   * the standard DOM API.\n   *\n   * @function\n   * @see {@link EventTarget#on}\n   */\n  EventTarget$2.prototype.addEventListener = EventTarget$2.prototype.on;\n\n  /**\n   * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\n   * the standard DOM API.\n   *\n   * @function\n   * @see {@link EventTarget#off}\n   */\n  EventTarget$2.prototype.removeEventListener = EventTarget$2.prototype.off;\n\n  /**\n   * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\n   * the standard DOM API.\n   *\n   * @function\n   * @see {@link EventTarget#trigger}\n   */\n  EventTarget$2.prototype.dispatchEvent = EventTarget$2.prototype.trigger;\n\n  /**\n   * @file mixins/evented.js\n   * @module evented\n   */\n  const objName = obj => {\n    if (typeof obj.name === 'function') {\n      return obj.name();\n    }\n    if (typeof obj.name === 'string') {\n      return obj.name;\n    }\n    if (obj.name_) {\n      return obj.name_;\n    }\n    if (obj.constructor && obj.constructor.name) {\n      return obj.constructor.name;\n    }\n    return typeof obj;\n  };\n\n  /**\n   * Returns whether or not an object has had the evented mixin applied.\n   *\n   * @param  {Object} object\n   *         An object to test.\n   *\n   * @return {boolean}\n   *         Whether or not the object appears to be evented.\n   */\n  const isEvented = object => object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(k => typeof object[k] === 'function');\n\n  /**\n   * Adds a callback to run after the evented mixin applied.\n   *\n   * @param  {Object} target\n   *         An object to Add\n   * @param  {Function} callback\n   *         The callback to run.\n   */\n  const addEventedCallback = (target, callback) => {\n    if (isEvented(target)) {\n      callback();\n    } else {\n      if (!target.eventedCallbacks) {\n        target.eventedCallbacks = [];\n      }\n      target.eventedCallbacks.push(callback);\n    }\n  };\n\n  /**\n   * Whether a value is a valid event type - non-empty string or array.\n   *\n   * @private\n   * @param  {string|Array} type\n   *         The type value to test.\n   *\n   * @return {boolean}\n   *         Whether or not the type is a valid event type.\n   */\n  const isValidEventType = type =>\n  // The regex here verifies that the `type` contains at least one non-\n  // whitespace character.\n  typeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length;\n\n  /**\n   * Validates a value to determine if it is a valid event target. Throws if not.\n   *\n   * @private\n   * @throws {Error}\n   *         If the target does not appear to be a valid event target.\n   *\n   * @param  {Object} target\n   *         The object to test.\n   *\n   * @param  {Object} obj\n   *         The evented object we are validating for\n   *\n   * @param  {string} fnName\n   *         The name of the evented mixin function that called this.\n   */\n  const validateTarget = (target, obj, fnName) => {\n    if (!target || !target.nodeName && !isEvented(target)) {\n      throw new Error(`Invalid target for ${objName(obj)}#${fnName}; must be a DOM node or evented object.`);\n    }\n  };\n\n  /**\n   * Validates a value to determine if it is a valid event target. Throws if not.\n   *\n   * @private\n   * @throws {Error}\n   *         If the type does not appear to be a valid event type.\n   *\n   * @param  {string|Array} type\n   *         The type to test.\n   *\n   * @param  {Object} obj\n  *         The evented object we are validating for\n   *\n   * @param  {string} fnName\n   *         The name of the evented mixin function that called this.\n   */\n  const validateEventType = (type, obj, fnName) => {\n    if (!isValidEventType(type)) {\n      throw new Error(`Invalid event type for ${objName(obj)}#${fnName}; must be a non-empty string or array.`);\n    }\n  };\n\n  /**\n   * Validates a value to determine if it is a valid listener. Throws if not.\n   *\n   * @private\n   * @throws {Error}\n   *         If the listener is not a function.\n   *\n   * @param  {Function} listener\n   *         The listener to test.\n   *\n   * @param  {Object} obj\n   *         The evented object we are validating for\n   *\n   * @param  {string} fnName\n   *         The name of the evented mixin function that called this.\n   */\n  const validateListener = (listener, obj, fnName) => {\n    if (typeof listener !== 'function') {\n      throw new Error(`Invalid listener for ${objName(obj)}#${fnName}; must be a function.`);\n    }\n  };\n\n  /**\n   * Takes an array of arguments given to `on()` or `one()`, validates them, and\n   * normalizes them into an object.\n   *\n   * @private\n   * @param  {Object} self\n   *         The evented object on which `on()` or `one()` was called. This\n   *         object will be bound as the `this` value for the listener.\n   *\n   * @param  {Array} args\n   *         An array of arguments passed to `on()` or `one()`.\n   *\n   * @param  {string} fnName\n   *         The name of the evented mixin function that called this.\n   *\n   * @return {Object}\n   *         An object containing useful values for `on()` or `one()` calls.\n   */\n  const normalizeListenArgs = (self, args, fnName) => {\n    // If the number of arguments is less than 3, the target is always the\n    // evented object itself.\n    const isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n    let target;\n    let type;\n    let listener;\n    if (isTargetingSelf) {\n      target = self.eventBusEl_;\n\n      // Deal with cases where we got 3 arguments, but we are still listening to\n      // the evented object itself.\n      if (args.length >= 3) {\n        args.shift();\n      }\n      [type, listener] = args;\n    } else {\n      // This was `[target, type, listener] = args;` but this block needs more than\n      // one statement to produce minified output compatible with Chrome 53.\n      // See https://github.com/videojs/video.js/pull/8810\n      target = args[0];\n      type = args[1];\n      listener = args[2];\n    }\n    validateTarget(target, self, fnName);\n    validateEventType(type, self, fnName);\n    validateListener(listener, self, fnName);\n    listener = bind_(self, listener);\n    return {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    };\n  };\n\n  /**\n   * Adds the listener to the event type(s) on the target, normalizing for\n   * the type of target.\n   *\n   * @private\n   * @param  {Element|Object} target\n   *         A DOM node or evented object.\n   *\n   * @param  {string} method\n   *         The event binding method to use (\"on\" or \"one\").\n   *\n   * @param  {string|Array} type\n   *         One or more event type(s).\n   *\n   * @param  {Function} listener\n   *         A listener function.\n   */\n  const listen = (target, method, type, listener) => {\n    validateTarget(target, target, method);\n    if (target.nodeName) {\n      Events[method](target, type, listener);\n    } else {\n      target[method](type, listener);\n    }\n  };\n\n  /**\n   * Contains methods that provide event capabilities to an object which is passed\n   * to {@link module:evented|evented}.\n   *\n   * @mixin EventedMixin\n   */\n  const EventedMixin = {\n    /**\n     * Add a listener to an event (or events) on this object or another evented\n     * object.\n     *\n     * @param  {string|Array|Element|Object} targetOrType\n     *         If this is a string or array, it represents the event type(s)\n     *         that will trigger the listener.\n     *\n     *         Another evented object can be passed here instead, which will\n     *         cause the listener to listen for events on _that_ object.\n     *\n     *         In either case, the listener's `this` value will be bound to\n     *         this object.\n     *\n     * @param  {string|Array|Function} typeOrListener\n     *         If the first argument was a string or array, this should be the\n     *         listener function. Otherwise, this is a string or array of event\n     *         type(s).\n     *\n     * @param  {Function} [listener]\n     *         If the first argument was another evented object, this will be\n     *         the listener function.\n     */\n    on(...args) {\n      const {\n        isTargetingSelf,\n        target,\n        type,\n        listener\n      } = normalizeListenArgs(this, args, 'on');\n      listen(target, 'on', type, listener);\n\n      // If this object is listening to another evented object.\n      if (!isTargetingSelf) {\n        // If this object is disposed, remove the listener.\n        const removeListenerOnDispose = () => this.off(target, type, listener);\n\n        // Use the same function ID as the listener so we can remove it later it\n        // using the ID of the original listener.\n        removeListenerOnDispose.guid = listener.guid;\n\n        // Add a listener to the target's dispose event as well. This ensures\n        // that if the target is disposed BEFORE this object, we remove the\n        // removal listener that was just added. Otherwise, we create a memory leak.\n        const removeRemoverOnTargetDispose = () => this.off('dispose', removeListenerOnDispose);\n\n        // Use the same function ID as the listener so we can remove it later\n        // it using the ID of the original listener.\n        removeRemoverOnTargetDispose.guid = listener.guid;\n        listen(this, 'on', 'dispose', removeListenerOnDispose);\n        listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\n      }\n    },\n    /**\n     * Add a listener to an event (or events) on this object or another evented\n     * object. The listener will be called once per event and then removed.\n     *\n     * @param  {string|Array|Element|Object} targetOrType\n     *         If this is a string or array, it represents the event type(s)\n     *         that will trigger the listener.\n     *\n     *         Another evented object can be passed here instead, which will\n     *         cause the listener to listen for events on _that_ object.\n     *\n     *         In either case, the listener's `this` value will be bound to\n     *         this object.\n     *\n     * @param  {string|Array|Function} typeOrListener\n     *         If the first argument was a string or array, this should be the\n     *         listener function. Otherwise, this is a string or array of event\n     *         type(s).\n     *\n     * @param  {Function} [listener]\n     *         If the first argument was another evented object, this will be\n     *         the listener function.\n     */\n    one(...args) {\n      const {\n        isTargetingSelf,\n        target,\n        type,\n        listener\n      } = normalizeListenArgs(this, args, 'one');\n\n      // Targeting this evented object.\n      if (isTargetingSelf) {\n        listen(target, 'one', type, listener);\n\n        // Targeting another evented object.\n      } else {\n        // TODO: This wrapper is incorrect! It should only\n        //       remove the wrapper for the event type that called it.\n        //       Instead all listeners are removed on the first trigger!\n        //       see https://github.com/videojs/video.js/issues/5962\n        const wrapper = (...largs) => {\n          this.off(target, type, wrapper);\n          listener.apply(null, largs);\n        };\n\n        // Use the same function ID as the listener so we can remove it later\n        // it using the ID of the original listener.\n        wrapper.guid = listener.guid;\n        listen(target, 'one', type, wrapper);\n      }\n    },\n    /**\n     * Add a listener to an event (or events) on this object or another evented\n     * object. The listener will only be called once for the first event that is triggered\n     * then removed.\n     *\n     * @param  {string|Array|Element|Object} targetOrType\n     *         If this is a string or array, it represents the event type(s)\n     *         that will trigger the listener.\n     *\n     *         Another evented object can be passed here instead, which will\n     *         cause the listener to listen for events on _that_ object.\n     *\n     *         In either case, the listener's `this` value will be bound to\n     *         this object.\n     *\n     * @param  {string|Array|Function} typeOrListener\n     *         If the first argument was a string or array, this should be the\n     *         listener function. Otherwise, this is a string or array of event\n     *         type(s).\n     *\n     * @param  {Function} [listener]\n     *         If the first argument was another evented object, this will be\n     *         the listener function.\n     */\n    any(...args) {\n      const {\n        isTargetingSelf,\n        target,\n        type,\n        listener\n      } = normalizeListenArgs(this, args, 'any');\n\n      // Targeting this evented object.\n      if (isTargetingSelf) {\n        listen(target, 'any', type, listener);\n\n        // Targeting another evented object.\n      } else {\n        const wrapper = (...largs) => {\n          this.off(target, type, wrapper);\n          listener.apply(null, largs);\n        };\n\n        // Use the same function ID as the listener so we can remove it later\n        // it using the ID of the original listener.\n        wrapper.guid = listener.guid;\n        listen(target, 'any', type, wrapper);\n      }\n    },\n    /**\n     * Removes listener(s) from event(s) on an evented object.\n     *\n     * @param  {string|Array|Element|Object} [targetOrType]\n     *         If this is a string or array, it represents the event type(s).\n     *\n     *         Another evented object can be passed here instead, in which case\n     *         ALL 3 arguments are _required_.\n     *\n     * @param  {string|Array|Function} [typeOrListener]\n     *         If the first argument was a string or array, this may be the\n     *         listener function. Otherwise, this is a string or array of event\n     *         type(s).\n     *\n     * @param  {Function} [listener]\n     *         If the first argument was another evented object, this will be\n     *         the listener function; otherwise, _all_ listeners bound to the\n     *         event type(s) will be removed.\n     */\n    off(targetOrType, typeOrListener, listener) {\n      // Targeting this evented object.\n      if (!targetOrType || isValidEventType(targetOrType)) {\n        off(this.eventBusEl_, targetOrType, typeOrListener);\n\n        // Targeting another evented object.\n      } else {\n        const target = targetOrType;\n        const type = typeOrListener;\n\n        // Fail fast and in a meaningful way!\n        validateTarget(target, this, 'off');\n        validateEventType(type, this, 'off');\n        validateListener(listener, this, 'off');\n\n        // Ensure there's at least a guid, even if the function hasn't been used\n        listener = bind_(this, listener);\n\n        // Remove the dispose listener on this evented object, which was given\n        // the same guid as the event listener in on().\n        this.off('dispose', listener);\n        if (target.nodeName) {\n          off(target, type, listener);\n          off(target, 'dispose', listener);\n        } else if (isEvented(target)) {\n          target.off(type, listener);\n          target.off('dispose', listener);\n        }\n      }\n    },\n    /**\n     * Fire an event on this evented object, causing its listeners to be called.\n     *\n     * @param   {string|Object} event\n     *          An event type or an object with a type property.\n     *\n     * @param   {Object} [hash]\n     *          An additional object to pass along to listeners.\n     *\n     * @return {boolean}\n     *          Whether or not the default behavior was prevented.\n     */\n    trigger(event, hash) {\n      validateTarget(this.eventBusEl_, this, 'trigger');\n      const type = event && typeof event !== 'string' ? event.type : event;\n      if (!isValidEventType(type)) {\n        throw new Error(`Invalid event type for ${objName(this)}#trigger; ` + 'must be a non-empty string or object with a type key that has a non-empty value.');\n      }\n      return trigger(this.eventBusEl_, event, hash);\n    }\n  };\n\n  /**\n   * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\n   *\n   * @param  {Object} target\n   *         The object to which to add event methods.\n   *\n   * @param  {Object} [options={}]\n   *         Options for customizing the mixin behavior.\n   *\n   * @param  {string} [options.eventBusKey]\n   *         By default, adds a `eventBusEl_` DOM element to the target object,\n   *         which is used as an event bus. If the target object already has a\n   *         DOM element that should be used, pass its key here.\n   *\n   * @return {Object}\n   *         The target object.\n   */\n  function evented(target, options = {}) {\n    const {\n      eventBusKey\n    } = options;\n\n    // Set or create the eventBusEl_.\n    if (eventBusKey) {\n      if (!target[eventBusKey].nodeName) {\n        throw new Error(`The eventBusKey \"${eventBusKey}\" does not refer to an element.`);\n      }\n      target.eventBusEl_ = target[eventBusKey];\n    } else {\n      target.eventBusEl_ = createEl('span', {\n        className: 'vjs-event-bus'\n      });\n    }\n    Object.assign(target, EventedMixin);\n    if (target.eventedCallbacks) {\n      target.eventedCallbacks.forEach(callback => {\n        callback();\n      });\n    }\n\n    // When any evented object is disposed, it removes all its listeners.\n    target.on('dispose', () => {\n      target.off();\n      [target, target.el_, target.eventBusEl_].forEach(function (val) {\n        if (val && DomData.has(val)) {\n          DomData.delete(val);\n        }\n      });\n      window.setTimeout(() => {\n        target.eventBusEl_ = null;\n      }, 0);\n    });\n    return target;\n  }\n\n  /**\n   * @file mixins/stateful.js\n   * @module stateful\n   */\n\n  /**\n   * Contains methods that provide statefulness to an object which is passed\n   * to {@link module:stateful}.\n   *\n   * @mixin StatefulMixin\n   */\n  const StatefulMixin = {\n    /**\n     * A hash containing arbitrary keys and values representing the state of\n     * the object.\n     *\n     * @type {Object}\n     */\n    state: {},\n    /**\n     * Set the state of an object by mutating its\n     * {@link module:stateful~StatefulMixin.state|state} object in place.\n     *\n     * @fires   module:stateful~StatefulMixin#statechanged\n     * @param   {Object|Function} stateUpdates\n     *          A new set of properties to shallow-merge into the plugin state.\n     *          Can be a plain object or a function returning a plain object.\n     *\n     * @return {Object|undefined}\n     *          An object containing changes that occurred. If no changes\n     *          occurred, returns `undefined`.\n     */\n    setState(stateUpdates) {\n      // Support providing the `stateUpdates` state as a function.\n      if (typeof stateUpdates === 'function') {\n        stateUpdates = stateUpdates();\n      }\n      let changes;\n      each(stateUpdates, (value, key) => {\n        // Record the change if the value is different from what's in the\n        // current state.\n        if (this.state[key] !== value) {\n          changes = changes || {};\n          changes[key] = {\n            from: this.state[key],\n            to: value\n          };\n        }\n        this.state[key] = value;\n      });\n\n      // Only trigger \"statechange\" if there were changes AND we have a trigger\n      // function. This allows us to not require that the target object be an\n      // evented object.\n      if (changes && isEvented(this)) {\n        /**\n         * An event triggered on an object that is both\n         * {@link module:stateful|stateful} and {@link module:evented|evented}\n         * indicating that its state has changed.\n         *\n         * @event    module:stateful~StatefulMixin#statechanged\n         * @type     {Object}\n         * @property {Object} changes\n         *           A hash containing the properties that were changed and\n         *           the values they were changed `from` and `to`.\n         */\n        this.trigger({\n          changes,\n          type: 'statechanged'\n        });\n      }\n      return changes;\n    }\n  };\n\n  /**\n   * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\n   * object.\n   *\n   * If the target object is {@link module:evented|evented} and has a\n   * `handleStateChanged` method, that method will be automatically bound to the\n   * `statechanged` event on itself.\n   *\n   * @param   {Object} target\n   *          The object to be made stateful.\n   *\n   * @param   {Object} [defaultState]\n   *          A default set of properties to populate the newly-stateful object's\n   *          `state` property.\n   *\n   * @return {Object}\n   *          Returns the `target`.\n   */\n  function stateful(target, defaultState) {\n    Object.assign(target, StatefulMixin);\n\n    // This happens after the mixing-in because we need to replace the `state`\n    // added in that step.\n    target.state = Object.assign({}, target.state, defaultState);\n\n    // Auto-bind the `handleStateChanged` method of the target object if it exists.\n    if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\n      target.on('statechanged', target.handleStateChanged);\n    }\n    return target;\n  }\n\n  /**\n   * @file str.js\n   * @module to-lower-case\n   */\n\n  /**\n   * Lowercase the first letter of a string.\n   *\n   * @param {string} string\n   *        String to be lowercased\n   *\n   * @return {string}\n   *         The string with a lowercased first letter\n   */\n  const toLowerCase = function (string) {\n    if (typeof string !== 'string') {\n      return string;\n    }\n    return string.replace(/./, w => w.toLowerCase());\n  };\n\n  /**\n   * Uppercase the first letter of a string.\n   *\n   * @param {string} string\n   *        String to be uppercased\n   *\n   * @return {string}\n   *         The string with an uppercased first letter\n   */\n  const toTitleCase$1 = function (string) {\n    if (typeof string !== 'string') {\n      return string;\n    }\n    return string.replace(/./, w => w.toUpperCase());\n  };\n\n  /**\n   * Compares the TitleCase versions of the two strings for equality.\n   *\n   * @param {string} str1\n   *        The first string to compare\n   *\n   * @param {string} str2\n   *        The second string to compare\n   *\n   * @return {boolean}\n   *         Whether the TitleCase versions of the strings are equal\n   */\n  const titleCaseEquals = function (str1, str2) {\n    return toTitleCase$1(str1) === toTitleCase$1(str2);\n  };\n\n  var Str = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    toLowerCase: toLowerCase,\n    toTitleCase: toTitleCase$1,\n    titleCaseEquals: titleCaseEquals\n  });\n\n  /**\n   * Player Component - Base class for all UI objects\n   *\n   * @file component.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * A callback to be called if and when the component is ready.\n   * `this` will be the Component instance.\n   *\n   * @callback ReadyCallback\n   * @returns  {void}\n   */\n\n  /**\n   * Base class for all UI Components.\n   * Components are UI objects which represent both a javascript object and an element\n   * in the DOM. They can be children of other components, and can have\n   * children themselves.\n   *\n   * Components can also use methods from {@link EventTarget}\n   */\n  class Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of component options.\n     *\n     * @param {Object[]} [options.children]\n     *        An array of children objects to initialize this component with. Children objects have\n     *        a name property that will be used if more than one component of the same type needs to be\n     *        added.\n     *\n     * @param  {string} [options.className]\n     *         A class or space separated list of classes to add the component\n     *\n     * @param {ReadyCallback} [ready]\n     *        Function that gets called when the `Component` is ready.\n     */\n    constructor(player, options, ready) {\n      // The component might be the player itself and we can't pass `this` to super\n      if (!player && this.play) {\n        this.player_ = player = this; // eslint-disable-line\n      } else {\n        this.player_ = player;\n      }\n      this.isDisposed_ = false;\n\n      // Hold the reference to the parent component via `addChild` method\n      this.parentComponent_ = null;\n\n      // Make a copy of prototype.options_ to protect against overriding defaults\n      this.options_ = merge$2({}, this.options_);\n\n      // Updated options with supplied options\n      options = this.options_ = merge$2(this.options_, options);\n\n      // Get ID from options or options element if one is supplied\n      this.id_ = options.id || options.el && options.el.id;\n\n      // If there was no ID from the options, generate one\n      if (!this.id_) {\n        // Don't require the player ID function in the case of mock players\n        const id = player && player.id && player.id() || 'no_player';\n        this.id_ = `${id}_component_${newGUID()}`;\n      }\n      this.name_ = options.name || null;\n\n      // Create element if one wasn't provided in options\n      if (options.el) {\n        this.el_ = options.el;\n      } else if (options.createEl !== false) {\n        this.el_ = this.createEl();\n      }\n      if (options.className && this.el_) {\n        options.className.split(' ').forEach(c => this.addClass(c));\n      }\n\n      // Remove the placeholder event methods. If the component is evented, the\n      // real methods are added next\n      ['on', 'off', 'one', 'any', 'trigger'].forEach(fn => {\n        this[fn] = undefined;\n      });\n\n      // if evented is anything except false, we want to mixin in evented\n      if (options.evented !== false) {\n        // Make this an evented object and use `el_`, if available, as its event bus\n        evented(this, {\n          eventBusKey: this.el_ ? 'el_' : null\n        });\n        this.handleLanguagechange = this.handleLanguagechange.bind(this);\n        this.on(this.player_, 'languagechange', this.handleLanguagechange);\n      }\n      stateful(this, this.constructor.defaultState);\n      this.children_ = [];\n      this.childIndex_ = {};\n      this.childNameIndex_ = {};\n      this.setTimeoutIds_ = new Set();\n      this.setIntervalIds_ = new Set();\n      this.rafIds_ = new Set();\n      this.namedRafs_ = new Map();\n      this.clearingTimersOnDispose_ = false;\n\n      // Add any child components in options\n      if (options.initChildren !== false) {\n        this.initChildren();\n      }\n\n      // Don't want to trigger ready here or it will go before init is actually\n      // finished for all children that run this constructor\n      this.ready(ready);\n      if (options.reportTouchActivity !== false) {\n        this.enableTouchActivity();\n      }\n    }\n\n    // `on`, `off`, `one`, `any` and `trigger` are here so tsc includes them in definitions.\n    // They are replaced or removed in the constructor\n\n    /**\n     * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n     * function that will get called when an event with a certain name gets triggered.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to call with `EventTarget`s\n     */\n\n    /**\n     * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n     * This makes it so that the `event listener` will no longer get called when the\n     * named event happens.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} [fn]\n     *        The function to remove. If not specified, all listeners managed by Video.js will be removed.\n     */\n\n    /**\n     * This function will add an `event listener` that gets triggered only once. After the\n     * first trigger it will get removed. This is like adding an `event listener`\n     * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to be called once for each event name.\n     */\n\n    /**\n     * This function will add an `event listener` that gets triggered only once and is\n     * removed from all events. This is like adding an array of `event listener`s\n     * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the\n     * first time it is triggered.\n     *\n     * @param {string|string[]} type\n     *        An event name or an array of event names.\n     *\n     * @param {Function} fn\n     *        The function to be called once for each event name.\n     */\n\n    /**\n     * This function causes an event to happen. This will then cause any `event listeners`\n     * that are waiting for that event, to get called. If there are no `event listeners`\n     * for an event then nothing will happen.\n     *\n     * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n     * Trigger will also call the `on` + `uppercaseEventName` function.\n     *\n     * Example:\n     * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n     * `onClick` if it exists.\n     *\n     * @param {string|Event|Object} event\n     *        The name of the event, an `Event`, or an object with a key of type set to\n     *        an event name.\n     *\n     * @param {Object} [hash]\n     *        Optionally extra argument to pass through to an event listener\n     */\n\n    /**\n     * Dispose of the `Component` and all child components.\n     *\n     * @fires Component#dispose\n     *\n     * @param {Object} options\n     * @param {Element} options.originalEl element with which to replace player element\n     */\n    dispose(options = {}) {\n      // Bail out if the component has already been disposed.\n      if (this.isDisposed_) {\n        return;\n      }\n      if (this.readyQueue_) {\n        this.readyQueue_.length = 0;\n      }\n\n      /**\n       * Triggered when a `Component` is disposed.\n       *\n       * @event Component#dispose\n       * @type {Event}\n       *\n       * @property {boolean} [bubbles=false]\n       *           set to false so that the dispose event does not\n       *           bubble up\n       */\n      this.trigger({\n        type: 'dispose',\n        bubbles: false\n      });\n      this.isDisposed_ = true;\n\n      // Dispose all children.\n      if (this.children_) {\n        for (let i = this.children_.length - 1; i >= 0; i--) {\n          if (this.children_[i].dispose) {\n            this.children_[i].dispose();\n          }\n        }\n      }\n\n      // Delete child references\n      this.children_ = null;\n      this.childIndex_ = null;\n      this.childNameIndex_ = null;\n      this.parentComponent_ = null;\n      if (this.el_) {\n        // Remove element from DOM\n        if (this.el_.parentNode) {\n          if (options.restoreEl) {\n            this.el_.parentNode.replaceChild(options.restoreEl, this.el_);\n          } else {\n            this.el_.parentNode.removeChild(this.el_);\n          }\n        }\n        this.el_ = null;\n      }\n\n      // remove reference to the player after disposing of the element\n      this.player_ = null;\n    }\n\n    /**\n     * Determine whether or not this component has been disposed.\n     *\n     * @return {boolean}\n     *         If the component has been disposed, will be `true`. Otherwise, `false`.\n     */\n    isDisposed() {\n      return Boolean(this.isDisposed_);\n    }\n\n    /**\n     * Return the {@link Player} that the `Component` has attached to.\n     *\n     * @return {Player}\n     *         The player that this `Component` has attached to.\n     */\n    player() {\n      return this.player_;\n    }\n\n    /**\n     * Deep merge of options objects with new options.\n     * > Note: When both `obj` and `options` contain properties whose values are objects.\n     *         The two properties get merged using {@link module:obj.merge}\n     *\n     * @param {Object} obj\n     *        The object that contains new options.\n     *\n     * @return {Object}\n     *         A new object of `this.options_` and `obj` merged together.\n     */\n    options(obj) {\n      if (!obj) {\n        return this.options_;\n      }\n      this.options_ = merge$2(this.options_, obj);\n      return this.options_;\n    }\n\n    /**\n     * Get the `Component`s DOM element\n     *\n     * @return {Element}\n     *         The DOM element for this `Component`.\n     */\n    el() {\n      return this.el_;\n    }\n\n    /**\n     * Create the `Component`s DOM element.\n     *\n     * @param {string} [tagName]\n     *        Element's DOM node type. e.g. 'div'\n     *\n     * @param {Object} [properties]\n     *        An object of properties that should be set.\n     *\n     * @param {Object} [attributes]\n     *        An object of attributes that should be set.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl(tagName, properties, attributes) {\n      return createEl(tagName, properties, attributes);\n    }\n\n    /**\n     * Localize a string given the string in english.\n     *\n     * If tokens are provided, it'll try and run a simple token replacement on the provided string.\n     * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\n     *\n     * If a `defaultValue` is provided, it'll use that over `string`,\n     * if a value isn't found in provided language files.\n     * This is useful if you want to have a descriptive key for token replacement\n     * but have a succinct localized string and not require `en.json` to be included.\n     *\n     * Currently, it is used for the progress bar timing.\n     * ```js\n     * {\n     *   \"progress bar timing: currentTime={1} duration={2}\": \"{1} of {2}\"\n     * }\n     * ```\n     * It is then used like so:\n     * ```js\n     * this.localize('progress bar timing: currentTime={1} duration{2}',\n     *               [this.player_.currentTime(), this.player_.duration()],\n     *               '{1} of {2}');\n     * ```\n     *\n     * Which outputs something like: `01:23 of 24:56`.\n     *\n     *\n     * @param {string} string\n     *        The string to localize and the key to lookup in the language files.\n     * @param {string[]} [tokens]\n     *        If the current item has token replacements, provide the tokens here.\n     * @param {string} [defaultValue]\n     *        Defaults to `string`. Can be a default value to use for token replacement\n     *        if the lookup key is needed to be separate.\n     *\n     * @return {string}\n     *         The localized string or if no localization exists the english string.\n     */\n    localize(string, tokens, defaultValue = string) {\n      const code = this.player_.language && this.player_.language();\n      const languages = this.player_.languages && this.player_.languages();\n      const language = languages && languages[code];\n      const primaryCode = code && code.split('-')[0];\n      const primaryLang = languages && languages[primaryCode];\n      let localizedString = defaultValue;\n      if (language && language[string]) {\n        localizedString = language[string];\n      } else if (primaryLang && primaryLang[string]) {\n        localizedString = primaryLang[string];\n      }\n      if (tokens) {\n        localizedString = localizedString.replace(/\\{(\\d+)\\}/g, function (match, index) {\n          const value = tokens[index - 1];\n          let ret = value;\n          if (typeof value === 'undefined') {\n            ret = match;\n          }\n          return ret;\n        });\n      }\n      return localizedString;\n    }\n\n    /**\n     * Handles language change for the player in components. Should be overridden by sub-components.\n     *\n     * @abstract\n     */\n    handleLanguagechange() {}\n\n    /**\n     * Return the `Component`s DOM element. This is where children get inserted.\n     * This will usually be the the same as the element returned in {@link Component#el}.\n     *\n     * @return {Element}\n     *         The content element for this `Component`.\n     */\n    contentEl() {\n      return this.contentEl_ || this.el_;\n    }\n\n    /**\n     * Get this `Component`s ID\n     *\n     * @return {string}\n     *         The id of this `Component`\n     */\n    id() {\n      return this.id_;\n    }\n\n    /**\n     * Get the `Component`s name. The name gets used to reference the `Component`\n     * and is set during registration.\n     *\n     * @return {string}\n     *         The name of this `Component`.\n     */\n    name() {\n      return this.name_;\n    }\n\n    /**\n     * Get an array of all child components\n     *\n     * @return {Array}\n     *         The children\n     */\n    children() {\n      return this.children_;\n    }\n\n    /**\n     * Returns the child `Component` with the given `id`.\n     *\n     * @param {string} id\n     *        The id of the child `Component` to get.\n     *\n     * @return {Component|undefined}\n     *         The child `Component` with the given `id` or undefined.\n     */\n    getChildById(id) {\n      return this.childIndex_[id];\n    }\n\n    /**\n     * Returns the child `Component` with the given `name`.\n     *\n     * @param {string} name\n     *        The name of the child `Component` to get.\n     *\n     * @return {Component|undefined}\n     *         The child `Component` with the given `name` or undefined.\n     */\n    getChild(name) {\n      if (!name) {\n        return;\n      }\n      return this.childNameIndex_[name];\n    }\n\n    /**\n     * Returns the descendant `Component` following the givent\n     * descendant `names`. For instance ['foo', 'bar', 'baz'] would\n     * try to get 'foo' on the current component, 'bar' on the 'foo'\n     * component and 'baz' on the 'bar' component and return undefined\n     * if any of those don't exist.\n     *\n     * @param {...string[]|...string} names\n     *        The name of the child `Component` to get.\n     *\n     * @return {Component|undefined}\n     *         The descendant `Component` following the given descendant\n     *         `names` or undefined.\n     */\n    getDescendant(...names) {\n      // flatten array argument into the main array\n      names = names.reduce((acc, n) => acc.concat(n), []);\n      let currentChild = this;\n      for (let i = 0; i < names.length; i++) {\n        currentChild = currentChild.getChild(names[i]);\n        if (!currentChild || !currentChild.getChild) {\n          return;\n        }\n      }\n      return currentChild;\n    }\n\n    /**\n     * Adds an SVG icon element to another element or component.\n     *\n     * @param {string} iconName\n     *        The name of icon. A list of all the icon names can be found at 'sandbox/svg-icons.html'\n     *\n     * @param {Element} [el=this.el()]\n     *        Element to set the title on. Defaults to the current Component's element.\n     *\n     * @return {Element}\n     *        The newly created icon element.\n     */\n    setIcon(iconName, el = this.el()) {\n      // TODO: In v9 of video.js, we will want to remove font icons entirely.\n      // This means this check, as well as the others throughout the code, and\n      // the unecessary CSS for font icons, will need to be removed.\n      // See https://github.com/videojs/video.js/pull/8260 as to which components\n      // need updating.\n      if (!this.player_.options_.experimentalSvgIcons) {\n        return;\n      }\n      const xmlnsURL = 'http://www.w3.org/2000/svg';\n\n      // The below creates an element in the format of:\n      // <span><svg><use>....</use></svg></span>\n      const iconContainer = createEl('span', {\n        className: 'vjs-icon-placeholder vjs-svg-icon'\n      }, {\n        'aria-hidden': 'true'\n      });\n      const svgEl = document.createElementNS(xmlnsURL, 'svg');\n      svgEl.setAttributeNS(null, 'viewBox', '0 0 512 512');\n      const useEl = document.createElementNS(xmlnsURL, 'use');\n      svgEl.appendChild(useEl);\n      useEl.setAttributeNS(null, 'href', `#vjs-icon-${iconName}`);\n      iconContainer.appendChild(svgEl);\n\n      // Replace a pre-existing icon if one exists.\n      if (this.iconIsSet_) {\n        el.replaceChild(iconContainer, el.querySelector('.vjs-icon-placeholder'));\n      } else {\n        el.appendChild(iconContainer);\n      }\n      this.iconIsSet_ = true;\n      return iconContainer;\n    }\n\n    /**\n     * Add a child `Component` inside the current `Component`.\n     *\n     * @param {string|Component} child\n     *        The name or instance of a child to add.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of options that will get passed to children of\n     *        the child.\n     *\n     * @param {number} [index=this.children_.length]\n     *        The index to attempt to add a child into.\n     *\n     *\n     * @return {Component}\n     *         The `Component` that gets added as a child. When using a string the\n     *         `Component` will get created by this process.\n     */\n    addChild(child, options = {}, index = this.children_.length) {\n      let component;\n      let componentName;\n\n      // If child is a string, create component with options\n      if (typeof child === 'string') {\n        componentName = toTitleCase$1(child);\n        const componentClassName = options.componentClass || componentName;\n\n        // Set name through options\n        options.name = componentName;\n\n        // Create a new object & element for this controls set\n        // If there's no .player_, this is a player\n        const ComponentClass = Component$1.getComponent(componentClassName);\n        if (!ComponentClass) {\n          throw new Error(`Component ${componentClassName} does not exist`);\n        }\n\n        // data stored directly on the videojs object may be\n        // misidentified as a component to retain\n        // backwards-compatibility with 4.x. check to make sure the\n        // component class can be instantiated.\n        if (typeof ComponentClass !== 'function') {\n          return null;\n        }\n        component = new ComponentClass(this.player_ || this, options);\n\n        // child is a component instance\n      } else {\n        component = child;\n      }\n      if (component.parentComponent_) {\n        component.parentComponent_.removeChild(component);\n      }\n      this.children_.splice(index, 0, component);\n      component.parentComponent_ = this;\n      if (typeof component.id === 'function') {\n        this.childIndex_[component.id()] = component;\n      }\n\n      // If a name wasn't used to create the component, check if we can use the\n      // name function of the component\n      componentName = componentName || component.name && toTitleCase$1(component.name());\n      if (componentName) {\n        this.childNameIndex_[componentName] = component;\n        this.childNameIndex_[toLowerCase(componentName)] = component;\n      }\n\n      // Add the UI object's element to the container div (box)\n      // Having an element is not required\n      if (typeof component.el === 'function' && component.el()) {\n        // If inserting before a component, insert before that component's element\n        let refNode = null;\n        if (this.children_[index + 1]) {\n          // Most children are components, but the video tech is an HTML element\n          if (this.children_[index + 1].el_) {\n            refNode = this.children_[index + 1].el_;\n          } else if (isEl(this.children_[index + 1])) {\n            refNode = this.children_[index + 1];\n          }\n        }\n        this.contentEl().insertBefore(component.el(), refNode);\n      }\n\n      // Return so it can stored on parent object if desired.\n      return component;\n    }\n\n    /**\n     * Remove a child `Component` from this `Component`s list of children. Also removes\n     * the child `Component`s element from this `Component`s element.\n     *\n     * @param {Component} component\n     *        The child `Component` to remove.\n     */\n    removeChild(component) {\n      if (typeof component === 'string') {\n        component = this.getChild(component);\n      }\n      if (!component || !this.children_) {\n        return;\n      }\n      let childFound = false;\n      for (let i = this.children_.length - 1; i >= 0; i--) {\n        if (this.children_[i] === component) {\n          childFound = true;\n          this.children_.splice(i, 1);\n          break;\n        }\n      }\n      if (!childFound) {\n        return;\n      }\n      component.parentComponent_ = null;\n      this.childIndex_[component.id()] = null;\n      this.childNameIndex_[toTitleCase$1(component.name())] = null;\n      this.childNameIndex_[toLowerCase(component.name())] = null;\n      const compEl = component.el();\n      if (compEl && compEl.parentNode === this.contentEl()) {\n        this.contentEl().removeChild(component.el());\n      }\n    }\n\n    /**\n     * Add and initialize default child `Component`s based upon options.\n     */\n    initChildren() {\n      const children = this.options_.children;\n      if (children) {\n        // `this` is `parent`\n        const parentOptions = this.options_;\n        const handleAdd = child => {\n          const name = child.name;\n          let opts = child.opts;\n\n          // Allow options for children to be set at the parent options\n          // e.g. videojs(id, { controlBar: false });\n          // instead of videojs(id, { children: { controlBar: false });\n          if (parentOptions[name] !== undefined) {\n            opts = parentOptions[name];\n          }\n\n          // Allow for disabling default components\n          // e.g. options['children']['posterImage'] = false\n          if (opts === false) {\n            return;\n          }\n\n          // Allow options to be passed as a simple boolean if no configuration\n          // is necessary.\n          if (opts === true) {\n            opts = {};\n          }\n\n          // We also want to pass the original player options\n          // to each component as well so they don't need to\n          // reach back into the player for options later.\n          opts.playerOptions = this.options_.playerOptions;\n\n          // Create and add the child component.\n          // Add a direct reference to the child by name on the parent instance.\n          // If two of the same component are used, different names should be supplied\n          // for each\n          const newChild = this.addChild(name, opts);\n          if (newChild) {\n            this[name] = newChild;\n          }\n        };\n\n        // Allow for an array of children details to passed in the options\n        let workingChildren;\n        const Tech = Component$1.getComponent('Tech');\n        if (Array.isArray(children)) {\n          workingChildren = children;\n        } else {\n          workingChildren = Object.keys(children);\n        }\n        workingChildren\n        // children that are in this.options_ but also in workingChildren  would\n        // give us extra children we do not want. So, we want to filter them out.\n        .concat(Object.keys(this.options_).filter(function (child) {\n          return !workingChildren.some(function (wchild) {\n            if (typeof wchild === 'string') {\n              return child === wchild;\n            }\n            return child === wchild.name;\n          });\n        })).map(child => {\n          let name;\n          let opts;\n          if (typeof child === 'string') {\n            name = child;\n            opts = children[name] || this.options_[name] || {};\n          } else {\n            name = child.name;\n            opts = child;\n          }\n          return {\n            name,\n            opts\n          };\n        }).filter(child => {\n          // we have to make sure that child.name isn't in the techOrder since\n          // techs are registered as Components but can't aren't compatible\n          // See https://github.com/videojs/video.js/issues/2772\n          const c = Component$1.getComponent(child.opts.componentClass || toTitleCase$1(child.name));\n          return c && !Tech.isTech(c);\n        }).forEach(handleAdd);\n      }\n    }\n\n    /**\n     * Builds the default DOM class name. Should be overridden by sub-components.\n     *\n     * @return {string}\n     *         The DOM class name for this object.\n     *\n     * @abstract\n     */\n    buildCSSClass() {\n      // Child classes can include a function that does:\n      // return 'CLASS NAME' + this._super();\n      return '';\n    }\n\n    /**\n     * Bind a listener to the component's ready state.\n     * Different from event listeners in that if the ready event has already happened\n     * it will trigger the function immediately.\n     *\n     * @param {ReadyCallback} fn\n     *        Function that gets called when the `Component` is ready.\n     */\n    ready(fn, sync = false) {\n      if (!fn) {\n        return;\n      }\n      if (!this.isReady_) {\n        this.readyQueue_ = this.readyQueue_ || [];\n        this.readyQueue_.push(fn);\n        return;\n      }\n      if (sync) {\n        fn.call(this);\n      } else {\n        // Call the function asynchronously by default for consistency\n        this.setTimeout(fn, 1);\n      }\n    }\n\n    /**\n     * Trigger all the ready listeners for this `Component`.\n     *\n     * @fires Component#ready\n     */\n    triggerReady() {\n      this.isReady_ = true;\n\n      // Ensure ready is triggered asynchronously\n      this.setTimeout(function () {\n        const readyQueue = this.readyQueue_;\n\n        // Reset Ready Queue\n        this.readyQueue_ = [];\n        if (readyQueue && readyQueue.length > 0) {\n          readyQueue.forEach(function (fn) {\n            fn.call(this);\n          }, this);\n        }\n\n        // Allow for using event listeners also\n        /**\n         * Triggered when a `Component` is ready.\n         *\n         * @event Component#ready\n         * @type {Event}\n         */\n        this.trigger('ready');\n      }, 1);\n    }\n\n    /**\n     * Find a single DOM element matching a `selector`. This can be within the `Component`s\n     * `contentEl()` or another custom context.\n     *\n     * @param {string} selector\n     *        A valid CSS selector, which will be passed to `querySelector`.\n     *\n     * @param {Element|string} [context=this.contentEl()]\n     *        A DOM element within which to query. Can also be a selector string in\n     *        which case the first matching element will get used as context. If\n     *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\n     *        nothing it falls back to `document`.\n     *\n     * @return {Element|null}\n     *         the dom element that was found, or null\n     *\n     * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n     */\n    $(selector, context) {\n      return $(selector, context || this.contentEl());\n    }\n\n    /**\n     * Finds all DOM element matching a `selector`. This can be within the `Component`s\n     * `contentEl()` or another custom context.\n     *\n     * @param {string} selector\n     *        A valid CSS selector, which will be passed to `querySelectorAll`.\n     *\n     * @param {Element|string} [context=this.contentEl()]\n     *        A DOM element within which to query. Can also be a selector string in\n     *        which case the first matching element will get used as context. If\n     *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\n     *        nothing it falls back to `document`.\n     *\n     * @return {NodeList}\n     *         a list of dom elements that were found\n     *\n     * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n     */\n    $$(selector, context) {\n      return $$(selector, context || this.contentEl());\n    }\n\n    /**\n     * Check if a component's element has a CSS class name.\n     *\n     * @param {string} classToCheck\n     *        CSS class name to check.\n     *\n     * @return {boolean}\n     *         - True if the `Component` has the class.\n     *         - False if the `Component` does not have the class`\n     */\n    hasClass(classToCheck) {\n      return hasClass(this.el_, classToCheck);\n    }\n\n    /**\n     * Add a CSS class name to the `Component`s element.\n     *\n     * @param {...string} classesToAdd\n     *        One or more CSS class name to add.\n     */\n    addClass(...classesToAdd) {\n      addClass(this.el_, ...classesToAdd);\n    }\n\n    /**\n     * Remove a CSS class name from the `Component`s element.\n     *\n     * @param {...string} classesToRemove\n     *        One or more CSS class name to remove.\n     */\n    removeClass(...classesToRemove) {\n      removeClass(this.el_, ...classesToRemove);\n    }\n\n    /**\n     * Add or remove a CSS class name from the component's element.\n     * - `classToToggle` gets added when {@link Component#hasClass} would return false.\n     * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\n     *\n     * @param  {string} classToToggle\n     *         The class to add or remove. Passed to DOMTokenList's toggle()\n     *\n     * @param  {boolean|Dom.PredicateCallback} [predicate]\n     *         A boolean or function that returns a boolean. Passed to DOMTokenList's toggle().\n     */\n    toggleClass(classToToggle, predicate) {\n      toggleClass(this.el_, classToToggle, predicate);\n    }\n\n    /**\n     * Show the `Component`s element if it is hidden by removing the\n     * 'vjs-hidden' class name from it.\n     */\n    show() {\n      this.removeClass('vjs-hidden');\n    }\n\n    /**\n     * Hide the `Component`s element if it is currently showing by adding the\n     * 'vjs-hidden` class name to it.\n     */\n    hide() {\n      this.addClass('vjs-hidden');\n    }\n\n    /**\n     * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\n     * class name to it. Used during fadeIn/fadeOut.\n     *\n     * @private\n     */\n    lockShowing() {\n      this.addClass('vjs-lock-showing');\n    }\n\n    /**\n     * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\n     * class name from it. Used during fadeIn/fadeOut.\n     *\n     * @private\n     */\n    unlockShowing() {\n      this.removeClass('vjs-lock-showing');\n    }\n\n    /**\n     * Get the value of an attribute on the `Component`s element.\n     *\n     * @param {string} attribute\n     *        Name of the attribute to get the value from.\n     *\n     * @return {string|null}\n     *         - The value of the attribute that was asked for.\n     *         - Can be an empty string on some browsers if the attribute does not exist\n     *           or has no value\n     *         - Most browsers will return null if the attribute does not exist or has\n     *           no value.\n     *\n     * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\n     */\n    getAttribute(attribute) {\n      return getAttribute(this.el_, attribute);\n    }\n\n    /**\n     * Set the value of an attribute on the `Component`'s element\n     *\n     * @param {string} attribute\n     *        Name of the attribute to set.\n     *\n     * @param {string} value\n     *        Value to set the attribute to.\n     *\n     * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\n     */\n    setAttribute(attribute, value) {\n      setAttribute(this.el_, attribute, value);\n    }\n\n    /**\n     * Remove an attribute from the `Component`s element.\n     *\n     * @param {string} attribute\n     *        Name of the attribute to remove.\n     *\n     * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\n     */\n    removeAttribute(attribute) {\n      removeAttribute(this.el_, attribute);\n    }\n\n    /**\n     * Get or set the width of the component based upon the CSS styles.\n     * See {@link Component#dimension} for more detailed information.\n     *\n     * @param {number|string} [num]\n     *        The width that you want to set postfixed with '%', 'px' or nothing.\n     *\n     * @param {boolean} [skipListeners]\n     *        Skip the componentresize event trigger\n     *\n     * @return {number|undefined}\n     *         The width when getting, zero if there is no width\n     */\n    width(num, skipListeners) {\n      return this.dimension('width', num, skipListeners);\n    }\n\n    /**\n     * Get or set the height of the component based upon the CSS styles.\n     * See {@link Component#dimension} for more detailed information.\n     *\n     * @param {number|string} [num]\n     *        The height that you want to set postfixed with '%', 'px' or nothing.\n     *\n     * @param {boolean} [skipListeners]\n     *        Skip the componentresize event trigger\n     *\n     * @return {number|undefined}\n     *         The height when getting, zero if there is no height\n     */\n    height(num, skipListeners) {\n      return this.dimension('height', num, skipListeners);\n    }\n\n    /**\n     * Set both the width and height of the `Component` element at the same time.\n     *\n     * @param  {number|string} width\n     *         Width to set the `Component`s element to.\n     *\n     * @param  {number|string} height\n     *         Height to set the `Component`s element to.\n     */\n    dimensions(width, height) {\n      // Skip componentresize listeners on width for optimization\n      this.width(width, true);\n      this.height(height);\n    }\n\n    /**\n     * Get or set width or height of the `Component` element. This is the shared code\n     * for the {@link Component#width} and {@link Component#height}.\n     *\n     * Things to know:\n     * - If the width or height in an number this will return the number postfixed with 'px'.\n     * - If the width/height is a percent this will return the percent postfixed with '%'\n     * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\n     *   defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\n     *   See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\n     *   for more information\n     * - If you want the computed style of the component, use {@link Component#currentWidth}\n     *   and {@link {Component#currentHeight}\n     *\n     * @fires Component#componentresize\n     *\n     * @param {string} widthOrHeight\n     8        'width' or 'height'\n     *\n     * @param  {number|string} [num]\n     8         New dimension\n     *\n     * @param  {boolean} [skipListeners]\n     *         Skip componentresize event trigger\n     *\n     * @return {number|undefined}\n     *         The dimension when getting or 0 if unset\n     */\n    dimension(widthOrHeight, num, skipListeners) {\n      if (num !== undefined) {\n        // Set to zero if null or literally NaN (NaN !== NaN)\n        if (num === null || num !== num) {\n          num = 0;\n        }\n\n        // Check if using css width/height (% or px) and adjust\n        if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n          this.el_.style[widthOrHeight] = num;\n        } else if (num === 'auto') {\n          this.el_.style[widthOrHeight] = '';\n        } else {\n          this.el_.style[widthOrHeight] = num + 'px';\n        }\n\n        // skipListeners allows us to avoid triggering the resize event when setting both width and height\n        if (!skipListeners) {\n          /**\n           * Triggered when a component is resized.\n           *\n           * @event Component#componentresize\n           * @type {Event}\n           */\n          this.trigger('componentresize');\n        }\n        return;\n      }\n\n      // Not setting a value, so getting it\n      // Make sure element exists\n      if (!this.el_) {\n        return 0;\n      }\n\n      // Get dimension value from style\n      const val = this.el_.style[widthOrHeight];\n      const pxIndex = val.indexOf('px');\n      if (pxIndex !== -1) {\n        // Return the pixel value with no 'px'\n        return parseInt(val.slice(0, pxIndex), 10);\n      }\n\n      // No px so using % or no style was set, so falling back to offsetWidth/height\n      // If component has display:none, offset will return 0\n      // TODO: handle display:none and no dimension style using px\n      return parseInt(this.el_['offset' + toTitleCase$1(widthOrHeight)], 10);\n    }\n\n    /**\n     * Get the computed width or the height of the component's element.\n     *\n     * Uses `window.getComputedStyle`.\n     *\n     * @param {string} widthOrHeight\n     *        A string containing 'width' or 'height'. Whichever one you want to get.\n     *\n     * @return {number}\n     *         The dimension that gets asked for or 0 if nothing was set\n     *         for that dimension.\n     */\n    currentDimension(widthOrHeight) {\n      let computedWidthOrHeight = 0;\n      if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n        throw new Error('currentDimension only accepts width or height value');\n      }\n      computedWidthOrHeight = computedStyle(this.el_, widthOrHeight);\n\n      // remove 'px' from variable and parse as integer\n      computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n\n      // if the computed value is still 0, it's possible that the browser is lying\n      // and we want to check the offset values.\n      // This code also runs wherever getComputedStyle doesn't exist.\n      if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\n        const rule = `offset${toTitleCase$1(widthOrHeight)}`;\n        computedWidthOrHeight = this.el_[rule];\n      }\n      return computedWidthOrHeight;\n    }\n\n    /**\n     * An object that contains width and height values of the `Component`s\n     * computed style. Uses `window.getComputedStyle`.\n     *\n     * @typedef {Object} Component~DimensionObject\n     *\n     * @property {number} width\n     *           The width of the `Component`s computed style.\n     *\n     * @property {number} height\n     *           The height of the `Component`s computed style.\n     */\n\n    /**\n     * Get an object that contains computed width and height values of the\n     * component's element.\n     *\n     * Uses `window.getComputedStyle`.\n     *\n     * @return {Component~DimensionObject}\n     *         The computed dimensions of the component's element.\n     */\n    currentDimensions() {\n      return {\n        width: this.currentDimension('width'),\n        height: this.currentDimension('height')\n      };\n    }\n\n    /**\n     * Get the computed width of the component's element.\n     *\n     * Uses `window.getComputedStyle`.\n     *\n     * @return {number}\n     *         The computed width of the component's element.\n     */\n    currentWidth() {\n      return this.currentDimension('width');\n    }\n\n    /**\n     * Get the computed height of the component's element.\n     *\n     * Uses `window.getComputedStyle`.\n     *\n     * @return {number}\n     *         The computed height of the component's element.\n     */\n    currentHeight() {\n      return this.currentDimension('height');\n    }\n\n    /**\n     * Retrieves the position and size information of the component's element.\n     *\n     * @return {Object} An object with `boundingClientRect` and `center` properties.\n     *         - `boundingClientRect`: An object with properties `x`, `y`, `width`,\n     *           `height`, `top`, `right`, `bottom`, and `left`, representing\n     *           the bounding rectangle of the element.\n     *         - `center`: An object with properties `x` and `y`, representing\n     *           the center point of the element. `width` and `height` are set to 0.\n     */\n    getPositions() {\n      const rect = this.el_.getBoundingClientRect();\n\n      // Creating objects that mirror DOMRectReadOnly for boundingClientRect and center\n      const boundingClientRect = {\n        x: rect.x,\n        y: rect.y,\n        width: rect.width,\n        height: rect.height,\n        top: rect.top,\n        right: rect.right,\n        bottom: rect.bottom,\n        left: rect.left\n      };\n\n      // Calculating the center position\n      const center = {\n        x: rect.left + rect.width / 2,\n        y: rect.top + rect.height / 2,\n        width: 0,\n        height: 0,\n        top: rect.top + rect.height / 2,\n        right: rect.left + rect.width / 2,\n        bottom: rect.top + rect.height / 2,\n        left: rect.left + rect.width / 2\n      };\n      return {\n        boundingClientRect,\n        center\n      };\n    }\n\n    /**\n     * Set the focus to this component\n     */\n    focus() {\n      this.el_.focus();\n    }\n\n    /**\n     * Remove the focus from this component\n     */\n    blur() {\n      this.el_.blur();\n    }\n\n    /**\n     * When this Component receives a `keydown` event which it does not process,\n     *  it passes the event to the Player for handling.\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     */\n    handleKeyDown(event) {\n      if (this.player_) {\n        // We only stop propagation here because we want unhandled events to fall\n        // back to the browser. Exclude Tab for focus trapping, exclude also when spatialNavigation is enabled.\n        if (event.key !== 'Tab' && !(this.player_.options_.playerOptions.spatialNavigation && this.player_.options_.playerOptions.spatialNavigation.enabled)) {\n          event.stopPropagation();\n        }\n        this.player_.handleKeyDown(event);\n      }\n    }\n\n    /**\n     * Many components used to have a `handleKeyPress` method, which was poorly\n     * named because it listened to a `keydown` event. This method name now\n     * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\n     * will not see their method calls stop working.\n     *\n     * @param {KeyboardEvent} event\n     *        The event that caused this function to be called.\n     */\n    handleKeyPress(event) {\n      this.handleKeyDown(event);\n    }\n\n    /**\n     * Emit a 'tap' events when touch event support gets detected. This gets used to\n     * support toggling the controls through a tap on the video. They get enabled\n     * because every sub-component would have extra overhead otherwise.\n     *\n     * @protected\n     * @fires Component#tap\n     * @listens Component#touchstart\n     * @listens Component#touchmove\n     * @listens Component#touchleave\n     * @listens Component#touchcancel\n     * @listens Component#touchend\n      */\n    emitTapEvents() {\n      // Track the start time so we can determine how long the touch lasted\n      let touchStart = 0;\n      let firstTouch = null;\n\n      // Maximum movement allowed during a touch event to still be considered a tap\n      // Other popular libs use anywhere from 2 (hammer.js) to 15,\n      // so 10 seems like a nice, round number.\n      const tapMovementThreshold = 10;\n\n      // The maximum length a touch can be while still being considered a tap\n      const touchTimeThreshold = 200;\n      let couldBeTap;\n      this.on('touchstart', function (event) {\n        // If more than one finger, don't consider treating this as a click\n        if (event.touches.length === 1) {\n          // Copy pageX/pageY from the object\n          firstTouch = {\n            pageX: event.touches[0].pageX,\n            pageY: event.touches[0].pageY\n          };\n          // Record start time so we can detect a tap vs. \"touch and hold\"\n          touchStart = window.performance.now();\n          // Reset couldBeTap tracking\n          couldBeTap = true;\n        }\n      });\n      this.on('touchmove', function (event) {\n        // If more than one finger, don't consider treating this as a click\n        if (event.touches.length > 1) {\n          couldBeTap = false;\n        } else if (firstTouch) {\n          // Some devices will throw touchmoves for all but the slightest of taps.\n          // So, if we moved only a small distance, this could still be a tap\n          const xdiff = event.touches[0].pageX - firstTouch.pageX;\n          const ydiff = event.touches[0].pageY - firstTouch.pageY;\n          const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n          if (touchDistance > tapMovementThreshold) {\n            couldBeTap = false;\n          }\n        }\n      });\n      const noTap = function () {\n        couldBeTap = false;\n      };\n\n      // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n      this.on('touchleave', noTap);\n      this.on('touchcancel', noTap);\n\n      // When the touch ends, measure how long it took and trigger the appropriate\n      // event\n      this.on('touchend', function (event) {\n        firstTouch = null;\n        // Proceed only if the touchmove/leave/cancel event didn't happen\n        if (couldBeTap === true) {\n          // Measure how long the touch lasted\n          const touchTime = window.performance.now() - touchStart;\n\n          // Make sure the touch was less than the threshold to be considered a tap\n          if (touchTime < touchTimeThreshold) {\n            // Don't let browser turn this into a click\n            event.preventDefault();\n            /**\n             * Triggered when a `Component` is tapped.\n             *\n             * @event Component#tap\n             * @type {MouseEvent}\n             */\n            this.trigger('tap');\n            // It may be good to copy the touchend event object and change the\n            // type to tap, if the other event properties aren't exact after\n            // Events.fixEvent runs (e.g. event.target)\n          }\n        }\n      });\n    }\n\n    /**\n     * This function reports user activity whenever touch events happen. This can get\n     * turned off by any sub-components that wants touch events to act another way.\n     *\n     * Report user touch activity when touch events occur. User activity gets used to\n     * determine when controls should show/hide. It is simple when it comes to mouse\n     * events, because any mouse event should show the controls. So we capture mouse\n     * events that bubble up to the player and report activity when that happens.\n     * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\n     * controls. So touch events can't help us at the player level either.\n     *\n     * User activity gets checked asynchronously. So what could happen is a tap event\n     * on the video turns the controls off. Then the `touchend` event bubbles up to\n     * the player. Which, if it reported user activity, would turn the controls right\n     * back on. We also don't want to completely block touch events from bubbling up.\n     * Furthermore a `touchmove` event and anything other than a tap, should not turn\n     * controls back on.\n     *\n     * @listens Component#touchstart\n     * @listens Component#touchmove\n     * @listens Component#touchend\n     * @listens Component#touchcancel\n     */\n    enableTouchActivity() {\n      // Don't continue if the root player doesn't support reporting user activity\n      if (!this.player() || !this.player().reportUserActivity) {\n        return;\n      }\n\n      // listener for reporting that the user is active\n      const report = bind_(this.player(), this.player().reportUserActivity);\n      let touchHolding;\n      this.on('touchstart', function () {\n        report();\n        // For as long as the they are touching the device or have their mouse down,\n        // we consider them active even if they're not moving their finger or mouse.\n        // So we want to continue to update that they are active\n        this.clearInterval(touchHolding);\n        // report at the same interval as activityCheck\n        touchHolding = this.setInterval(report, 250);\n      });\n      const touchEnd = function (event) {\n        report();\n        // stop the interval that maintains activity if the touch is holding\n        this.clearInterval(touchHolding);\n      };\n      this.on('touchmove', report);\n      this.on('touchend', touchEnd);\n      this.on('touchcancel', touchEnd);\n    }\n\n    /**\n     * A callback that has no parameters and is bound into `Component`s context.\n     *\n     * @callback Component~GenericCallback\n     * @this Component\n     */\n\n    /**\n     * Creates a function that runs after an `x` millisecond timeout. This function is a\n     * wrapper around `window.setTimeout`. There are a few reasons to use this one\n     * instead though:\n     * 1. It gets cleared via  {@link Component#clearTimeout} when\n     *    {@link Component#dispose} gets called.\n     * 2. The function callback will gets turned into a {@link Component~GenericCallback}\n     *\n     * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\n     *         will cause its dispose listener not to get cleaned up! Please use\n     *         {@link Component#clearTimeout} or {@link Component#dispose} instead.\n     *\n     * @param {Component~GenericCallback} fn\n     *        The function that will be run after `timeout`.\n     *\n     * @param {number} timeout\n     *        Timeout in milliseconds to delay before executing the specified function.\n     *\n     * @return {number}\n     *         Returns a timeout ID that gets used to identify the timeout. It can also\n     *         get used in {@link Component#clearTimeout} to clear the timeout that\n     *         was set.\n     *\n     * @listens Component#dispose\n     * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\n     */\n    setTimeout(fn, timeout) {\n      // declare as variables so they are properly available in timeout function\n      // eslint-disable-next-line\n      var timeoutId;\n      fn = bind_(this, fn);\n      this.clearTimersOnDispose_();\n      timeoutId = window.setTimeout(() => {\n        if (this.setTimeoutIds_.has(timeoutId)) {\n          this.setTimeoutIds_.delete(timeoutId);\n        }\n        fn();\n      }, timeout);\n      this.setTimeoutIds_.add(timeoutId);\n      return timeoutId;\n    }\n\n    /**\n     * Clears a timeout that gets created via `window.setTimeout` or\n     * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\n     * use this function instead of `window.clearTimout`. If you don't your dispose\n     * listener will not get cleaned up until {@link Component#dispose}!\n     *\n     * @param {number} timeoutId\n     *        The id of the timeout to clear. The return value of\n     *        {@link Component#setTimeout} or `window.setTimeout`.\n     *\n     * @return {number}\n     *         Returns the timeout id that was cleared.\n     *\n     * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\n     */\n    clearTimeout(timeoutId) {\n      if (this.setTimeoutIds_.has(timeoutId)) {\n        this.setTimeoutIds_.delete(timeoutId);\n        window.clearTimeout(timeoutId);\n      }\n      return timeoutId;\n    }\n\n    /**\n     * Creates a function that gets run every `x` milliseconds. This function is a wrapper\n     * around `window.setInterval`. There are a few reasons to use this one instead though.\n     * 1. It gets cleared via  {@link Component#clearInterval} when\n     *    {@link Component#dispose} gets called.\n     * 2. The function callback will be a {@link Component~GenericCallback}\n     *\n     * @param {Component~GenericCallback} fn\n     *        The function to run every `x` seconds.\n     *\n     * @param {number} interval\n     *        Execute the specified function every `x` milliseconds.\n     *\n     * @return {number}\n     *         Returns an id that can be used to identify the interval. It can also be be used in\n     *         {@link Component#clearInterval} to clear the interval.\n     *\n     * @listens Component#dispose\n     * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\n     */\n    setInterval(fn, interval) {\n      fn = bind_(this, fn);\n      this.clearTimersOnDispose_();\n      const intervalId = window.setInterval(fn, interval);\n      this.setIntervalIds_.add(intervalId);\n      return intervalId;\n    }\n\n    /**\n     * Clears an interval that gets created via `window.setInterval` or\n     * {@link Component#setInterval}. If you set an interval via {@link Component#setInterval}\n     * use this function instead of `window.clearInterval`. If you don't your dispose\n     * listener will not get cleaned up until {@link Component#dispose}!\n     *\n     * @param {number} intervalId\n     *        The id of the interval to clear. The return value of\n     *        {@link Component#setInterval} or `window.setInterval`.\n     *\n     * @return {number}\n     *         Returns the interval id that was cleared.\n     *\n     * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\n     */\n    clearInterval(intervalId) {\n      if (this.setIntervalIds_.has(intervalId)) {\n        this.setIntervalIds_.delete(intervalId);\n        window.clearInterval(intervalId);\n      }\n      return intervalId;\n    }\n\n    /**\n     * Queues up a callback to be passed to requestAnimationFrame (rAF), but\n     * with a few extra bonuses:\n     *\n     * - Supports browsers that do not support rAF by falling back to\n     *   {@link Component#setTimeout}.\n     *\n     * - The callback is turned into a {@link Component~GenericCallback} (i.e.\n     *   bound to the component).\n     *\n     * - Automatic cancellation of the rAF callback is handled if the component\n     *   is disposed before it is called.\n     *\n     * @param  {Component~GenericCallback} fn\n     *         A function that will be bound to this component and executed just\n     *         before the browser's next repaint.\n     *\n     * @return {number}\n     *         Returns an rAF ID that gets used to identify the timeout. It can\n     *         also be used in {@link Component#cancelAnimationFrame} to cancel\n     *         the animation frame callback.\n     *\n     * @listens Component#dispose\n     * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\n     */\n    requestAnimationFrame(fn) {\n      this.clearTimersOnDispose_();\n\n      // declare as variables so they are properly available in rAF function\n      // eslint-disable-next-line\n      var id;\n      fn = bind_(this, fn);\n      id = window.requestAnimationFrame(() => {\n        if (this.rafIds_.has(id)) {\n          this.rafIds_.delete(id);\n        }\n        fn();\n      });\n      this.rafIds_.add(id);\n      return id;\n    }\n\n    /**\n     * Request an animation frame, but only one named animation\n     * frame will be queued. Another will never be added until\n     * the previous one finishes.\n     *\n     * @param {string} name\n     *        The name to give this requestAnimationFrame\n     *\n     * @param  {Component~GenericCallback} fn\n     *         A function that will be bound to this component and executed just\n     *         before the browser's next repaint.\n     */\n    requestNamedAnimationFrame(name, fn) {\n      if (this.namedRafs_.has(name)) {\n        this.cancelNamedAnimationFrame(name);\n      }\n      this.clearTimersOnDispose_();\n      fn = bind_(this, fn);\n      const id = this.requestAnimationFrame(() => {\n        fn();\n        if (this.namedRafs_.has(name)) {\n          this.namedRafs_.delete(name);\n        }\n      });\n      this.namedRafs_.set(name, id);\n      return name;\n    }\n\n    /**\n     * Cancels a current named animation frame if it exists.\n     *\n     * @param {string} name\n     *        The name of the requestAnimationFrame to cancel.\n     */\n    cancelNamedAnimationFrame(name) {\n      if (!this.namedRafs_.has(name)) {\n        return;\n      }\n      this.cancelAnimationFrame(this.namedRafs_.get(name));\n      this.namedRafs_.delete(name);\n    }\n\n    /**\n     * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\n     * (rAF).\n     *\n     * If you queue an rAF callback via {@link Component#requestAnimationFrame},\n     * use this function instead of `window.cancelAnimationFrame`. If you don't,\n     * your dispose listener will not get cleaned up until {@link Component#dispose}!\n     *\n     * @param {number} id\n     *        The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\n     *\n     * @return {number}\n     *         Returns the rAF ID that was cleared.\n     *\n     * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\n     */\n    cancelAnimationFrame(id) {\n      if (this.rafIds_.has(id)) {\n        this.rafIds_.delete(id);\n        window.cancelAnimationFrame(id);\n      }\n      return id;\n    }\n\n    /**\n     * A function to setup `requestAnimationFrame`, `setTimeout`,\n     * and `setInterval`, clearing on dispose.\n     *\n     * > Previously each timer added and removed dispose listeners on it's own.\n     * For better performance it was decided to batch them all, and use `Set`s\n     * to track outstanding timer ids.\n     *\n     * @private\n     */\n    clearTimersOnDispose_() {\n      if (this.clearingTimersOnDispose_) {\n        return;\n      }\n      this.clearingTimersOnDispose_ = true;\n      this.one('dispose', () => {\n        [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(([idName, cancelName]) => {\n          // for a `Set` key will actually be the value again\n          // so forEach((val, val) =>` but for maps we want to use\n          // the key.\n          this[idName].forEach((val, key) => this[cancelName](key));\n        });\n        this.clearingTimersOnDispose_ = false;\n      });\n    }\n\n    /**\n      * Decide whether an element is actually disabled or not.\n      *\n      * @function isActuallyDisabled\n      * @param element {Node}\n      * @return {boolean}\n      *\n      * @see {@link https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled}\n      */\n    getIsDisabled() {\n      return Boolean(this.el_.disabled);\n    }\n\n    /**\n      * Decide whether the element is expressly inert or not.\n      *\n      * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#expressly-inert}\n      * @function isExpresslyInert\n      * @param element {Node}\n      * @return {boolean}\n      */\n    getIsExpresslyInert() {\n      return this.el_.inert && !this.el_.ownerDocument.documentElement.inert;\n    }\n\n    /**\n     * Determine whether or not this component can be considered as focusable component.\n     *\n     * @param {HTMLElement} el - The HTML element representing the component.\n     * @return {boolean}\n     *         If the component can be focused, will be `true`. Otherwise, `false`.\n     */\n    getIsFocusable(el) {\n      const element = el || this.el_;\n      return element.tabIndex >= 0 && !(this.getIsDisabled() || this.getIsExpresslyInert());\n    }\n\n    /**\n     * Determine whether or not this component is currently visible/enabled/etc...\n     *\n     * @param {HTMLElement} el - The HTML element representing the component.\n     * @return {boolean}\n     *         If the component can is currently visible & enabled, will be `true`. Otherwise, `false`.\n     */\n    getIsAvailableToBeFocused(el) {\n      /**\n       * Decide the style property of this element is specified whether it's visible or not.\n       *\n       * @function isVisibleStyleProperty\n       * @param element {CSSStyleDeclaration}\n       * @return {boolean}\n       */\n      function isVisibleStyleProperty(element) {\n        const elementStyle = window.getComputedStyle(element, null);\n        const thisVisibility = elementStyle.getPropertyValue('visibility');\n        const thisDisplay = elementStyle.getPropertyValue('display');\n        const invisibleStyle = ['hidden', 'collapse'];\n        return thisDisplay !== 'none' && !invisibleStyle.includes(thisVisibility);\n      }\n\n      /**\n       * Decide whether the element is being rendered or not.\n       * 1. If an element has the style as \"visibility: hidden | collapse\" or \"display: none\", it is not being rendered.\n       * 2. If an element has the style as \"opacity: 0\", it is not being rendered.(that is, invisible).\n       * 3. If width and height of an element are explicitly set to 0, it is not being rendered.\n       * 4. If a parent element is hidden, an element itself is not being rendered.\n       * (CSS visibility property and display property are inherited.)\n       *\n       * @see {@link https://html.spec.whatwg.org/multipage/rendering.html#being-rendered}\n       * @function isBeingRendered\n       * @param element {Node}\n       * @return {boolean}\n       */\n      function isBeingRendered(element) {\n        if (!isVisibleStyleProperty(element.parentElement)) {\n          return false;\n        }\n        if (!isVisibleStyleProperty(element) || element.style.opacity === '0' || window.getComputedStyle(element).height === '0px' || window.getComputedStyle(element).width === '0px') {\n          return false;\n        }\n        return true;\n      }\n\n      /**\n       * Determine if the element is visible for the user or not.\n       * 1. If an element sum of its offsetWidth, offsetHeight, height and width is less than 1 is not visible.\n       * 2. If elementCenter.x is less than is not visible.\n       * 3. If elementCenter.x is more than the document's width is not visible.\n       * 4. If elementCenter.y is less than 0 is not visible.\n       * 5. If elementCenter.y is the document's height is not visible.\n       *\n       * @function isVisible\n       * @param element {Node}\n       * @return {boolean}\n       */\n      function isVisible(element) {\n        if (element.offsetWidth + element.offsetHeight + element.getBoundingClientRect().height + element.getBoundingClientRect().width === 0) {\n          return false;\n        }\n\n        // Define elementCenter object with props of x and y\n        // x: Left position relative to the viewport plus element's width (no margin) divided between 2.\n        // y: Top position relative to the viewport plus element's height (no margin) divided between 2.\n        const elementCenter = {\n          x: element.getBoundingClientRect().left + element.offsetWidth / 2,\n          y: element.getBoundingClientRect().top + element.offsetHeight / 2\n        };\n        if (elementCenter.x < 0) {\n          return false;\n        }\n        if (elementCenter.x > (document.documentElement.clientWidth || window.innerWidth)) {\n          return false;\n        }\n        if (elementCenter.y < 0) {\n          return false;\n        }\n        if (elementCenter.y > (document.documentElement.clientHeight || window.innerHeight)) {\n          return false;\n        }\n        let pointContainer = document.elementFromPoint(elementCenter.x, elementCenter.y);\n        while (pointContainer) {\n          if (pointContainer === element) {\n            return true;\n          }\n          if (pointContainer.parentNode) {\n            pointContainer = pointContainer.parentNode;\n          } else {\n            return false;\n          }\n        }\n      }\n\n      // If no DOM element was passed as argument use this component's element.\n      if (!el) {\n        el = this.el();\n      }\n\n      // If element is visible, is being rendered & either does not have a parent element or its tabIndex is not negative.\n      if (isVisible(el) && isBeingRendered(el) && (!el.parentElement || el.tabIndex >= 0)) {\n        return true;\n      }\n      return false;\n    }\n\n    /**\n     * Register a `Component` with `videojs` given the name and the component.\n     *\n     * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\n     *         should be registered using {@link Tech.registerTech} or\n     *         {@link videojs:videojs.registerTech}.\n     *\n     * > NOTE: This function can also be seen on videojs as\n     *         {@link videojs:videojs.registerComponent}.\n     *\n     * @param {string} name\n     *        The name of the `Component` to register.\n     *\n     * @param {Component} ComponentToRegister\n     *        The `Component` class to register.\n     *\n     * @return {Component}\n     *         The `Component` that was registered.\n     */\n    static registerComponent(name, ComponentToRegister) {\n      if (typeof name !== 'string' || !name) {\n        throw new Error(`Illegal component name, \"${name}\"; must be a non-empty string.`);\n      }\n      const Tech = Component$1.getComponent('Tech');\n\n      // We need to make sure this check is only done if Tech has been registered.\n      const isTech = Tech && Tech.isTech(ComponentToRegister);\n      const isComp = Component$1 === ComponentToRegister || Component$1.prototype.isPrototypeOf(ComponentToRegister.prototype);\n      if (isTech || !isComp) {\n        let reason;\n        if (isTech) {\n          reason = 'techs must be registered using Tech.registerTech()';\n        } else {\n          reason = 'must be a Component subclass';\n        }\n        throw new Error(`Illegal component, \"${name}\"; ${reason}.`);\n      }\n      name = toTitleCase$1(name);\n      if (!Component$1.components_) {\n        Component$1.components_ = {};\n      }\n      const Player = Component$1.getComponent('Player');\n      if (name === 'Player' && Player && Player.players) {\n        const players = Player.players;\n        const playerNames = Object.keys(players);\n\n        // If we have players that were disposed, then their name will still be\n        // in Players.players. So, we must loop through and verify that the value\n        // for each item is null. This allows registration of the Player component\n        // after all players have been disposed or before any were created.\n        if (players && playerNames.length > 0) {\n          for (let i = 0; i < playerNames.length; i++) {\n            if (players[playerNames[i]] !== null) {\n              throw new Error('Can not register Player component after player has been created.');\n            }\n          }\n        }\n      }\n      Component$1.components_[name] = ComponentToRegister;\n      Component$1.components_[toLowerCase(name)] = ComponentToRegister;\n      return ComponentToRegister;\n    }\n\n    /**\n     * Get a `Component` based on the name it was registered with.\n     *\n     * @param {string} name\n     *        The Name of the component to get.\n     *\n     * @return {typeof Component}\n     *         The `Component` that got registered under the given name.\n     */\n    static getComponent(name) {\n      if (!name || !Component$1.components_) {\n        return;\n      }\n      return Component$1.components_[name];\n    }\n  }\n  Component$1.registerComponent('Component', Component$1);\n\n  /**\n   * @file time.js\n   * @module time\n   */\n\n  /**\n   * Returns the time for the specified index at the start or end\n   * of a TimeRange object.\n   *\n   * @typedef    {Function} TimeRangeIndex\n   *\n   * @param      {number} [index=0]\n   *             The range number to return the time for.\n   *\n   * @return     {number}\n   *             The time offset at the specified index.\n   *\n   * @deprecated The index argument must be provided.\n   *             In the future, leaving it out will throw an error.\n   */\n\n  /**\n   * An object that contains ranges of time, which mimics {@link TimeRanges}.\n   *\n   * @typedef  {Object} TimeRange\n   *\n   * @property {number} length\n   *           The number of time ranges represented by this object.\n   *\n   * @property {module:time~TimeRangeIndex} start\n   *           Returns the time offset at which a specified time range begins.\n   *\n   * @property {module:time~TimeRangeIndex} end\n   *           Returns the time offset at which a specified time range ends.\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\n   */\n\n  /**\n   * Check if any of the time ranges are over the maximum index.\n   *\n   * @private\n   * @param   {string} fnName\n   *          The function name to use for logging\n   *\n   * @param   {number} index\n   *          The index to check\n   *\n   * @param   {number} maxIndex\n   *          The maximum possible index\n   *\n   * @throws  {Error} if the timeRanges provided are over the maxIndex\n   */\n  function rangeCheck(fnName, index, maxIndex) {\n    if (typeof index !== 'number' || index < 0 || index > maxIndex) {\n      throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is non-numeric or out of bounds (0-${maxIndex}).`);\n    }\n  }\n\n  /**\n   * Get the time for the specified index at the start or end\n   * of a TimeRange object.\n   *\n   * @private\n   * @param      {string} fnName\n   *             The function name to use for logging\n   *\n   * @param      {string} valueIndex\n   *             The property that should be used to get the time. should be\n   *             'start' or 'end'\n   *\n   * @param      {Array} ranges\n   *             An array of time ranges\n   *\n   * @param      {Array} [rangeIndex=0]\n   *             The index to start the search at\n   *\n   * @return     {number}\n   *             The time that offset at the specified index.\n   *\n   * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\n   * @throws     {Error} if rangeIndex is more than the length of ranges\n   */\n  function getRange(fnName, valueIndex, ranges, rangeIndex) {\n    rangeCheck(fnName, rangeIndex, ranges.length - 1);\n    return ranges[rangeIndex][valueIndex];\n  }\n\n  /**\n   * Create a time range object given ranges of time.\n   *\n   * @private\n   * @param   {Array} [ranges]\n   *          An array of time ranges.\n   *\n   * @return  {TimeRange}\n   */\n  function createTimeRangesObj(ranges) {\n    let timeRangesObj;\n    if (ranges === undefined || ranges.length === 0) {\n      timeRangesObj = {\n        length: 0,\n        start() {\n          throw new Error('This TimeRanges object is empty');\n        },\n        end() {\n          throw new Error('This TimeRanges object is empty');\n        }\n      };\n    } else {\n      timeRangesObj = {\n        length: ranges.length,\n        start: getRange.bind(null, 'start', 0, ranges),\n        end: getRange.bind(null, 'end', 1, ranges)\n      };\n    }\n    if (window.Symbol && window.Symbol.iterator) {\n      timeRangesObj[window.Symbol.iterator] = () => (ranges || []).values();\n    }\n    return timeRangesObj;\n  }\n\n  /**\n   * Create a `TimeRange` object which mimics an\n   * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\n   *\n   * @param {number|Array[]} start\n   *        The start of a single range (a number) or an array of ranges (an\n   *        array of arrays of two numbers each).\n   *\n   * @param {number} end\n   *        The end of a single range. Cannot be used with the array form of\n   *        the `start` argument.\n   *\n   * @return {TimeRange}\n   */\n  function createTimeRanges$1(start, end) {\n    if (Array.isArray(start)) {\n      return createTimeRangesObj(start);\n    } else if (start === undefined || end === undefined) {\n      return createTimeRangesObj();\n    }\n    return createTimeRangesObj([[start, end]]);\n  }\n\n  /**\n   * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\n   * seconds) will force a number of leading zeros to cover the length of the\n   * guide.\n   *\n   * @private\n   * @param  {number} seconds\n   *         Number of seconds to be turned into a string\n   *\n   * @param  {number} guide\n   *         Number (in seconds) to model the string after\n   *\n   * @return {string}\n   *         Time formatted as H:MM:SS or M:SS\n   */\n  const defaultImplementation = function (seconds, guide) {\n    seconds = seconds < 0 ? 0 : seconds;\n    let s = Math.floor(seconds % 60);\n    let m = Math.floor(seconds / 60 % 60);\n    let h = Math.floor(seconds / 3600);\n    const gm = Math.floor(guide / 60 % 60);\n    const gh = Math.floor(guide / 3600);\n\n    // handle invalid times\n    if (isNaN(seconds) || seconds === Infinity) {\n      // '-' is false for all relational operators (e.g. <, >=) so this setting\n      // will add the minimum number of fields specified by the guide\n      h = m = s = '-';\n    }\n\n    // Check if we need to show hours\n    h = h > 0 || gh > 0 ? h + ':' : '';\n\n    // If hours are showing, we may need to add a leading zero.\n    // Always show at least one digit of minutes.\n    m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':';\n\n    // Check if leading zero is need for seconds\n    s = s < 10 ? '0' + s : s;\n    return h + m + s;\n  };\n\n  // Internal pointer to the current implementation.\n  let implementation = defaultImplementation;\n\n  /**\n   * Replaces the default formatTime implementation with a custom implementation.\n   *\n   * @param {Function} customImplementation\n   *        A function which will be used in place of the default formatTime\n   *        implementation. Will receive the current time in seconds and the\n   *        guide (in seconds) as arguments.\n   */\n  function setFormatTime(customImplementation) {\n    implementation = customImplementation;\n  }\n\n  /**\n   * Resets formatTime to the default implementation.\n   */\n  function resetFormatTime() {\n    implementation = defaultImplementation;\n  }\n\n  /**\n   * Delegates to either the default time formatting function or a custom\n   * function supplied via `setFormatTime`.\n   *\n   * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\n   * guide (in seconds) will force a number of leading zeros to cover the\n   * length of the guide.\n   *\n   * @example  formatTime(125, 600) === \"02:05\"\n   * @param    {number} seconds\n   *           Number of seconds to be turned into a string\n   *\n   * @param    {number} guide\n   *           Number (in seconds) to model the string after\n   *\n   * @return   {string}\n   *           Time formatted as H:MM:SS or M:SS\n   */\n  function formatTime(seconds, guide = seconds) {\n    return implementation(seconds, guide);\n  }\n\n  var Time = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    createTimeRanges: createTimeRanges$1,\n    createTimeRange: createTimeRanges$1,\n    setFormatTime: setFormatTime,\n    resetFormatTime: resetFormatTime,\n    formatTime: formatTime\n  });\n\n  /**\n   * @file buffer.js\n   * @module buffer\n   */\n\n  /** @import { TimeRange } from './time' */\n\n  /**\n   * Compute the percentage of the media that has been buffered.\n   *\n   * @param {TimeRange} buffered\n   *        The current `TimeRanges` object representing buffered time ranges\n   *\n   * @param {number} duration\n   *        Total duration of the media\n   *\n   * @return {number}\n   *         Percent buffered of the total duration in decimal form.\n   */\n  function bufferedPercent(buffered, duration) {\n    let bufferedDuration = 0;\n    let start;\n    let end;\n    if (!duration) {\n      return 0;\n    }\n    if (!buffered || !buffered.length) {\n      buffered = createTimeRanges$1(0, 0);\n    }\n    for (let i = 0; i < buffered.length; i++) {\n      start = buffered.start(i);\n      end = buffered.end(i);\n\n      // buffered end can be bigger than duration by a very small fraction\n      if (end > duration) {\n        end = duration;\n      }\n      bufferedDuration += end - start;\n    }\n    return bufferedDuration / duration;\n  }\n\n  /**\n   * @file media-error.js\n   */\n\n  /**\n   * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\n   *\n   * @param {number|string|Object|MediaError} value\n   *        This can be of multiple types:\n   *        - number: should be a standard error code\n   *        - string: an error message (the code will be 0)\n   *        - Object: arbitrary properties\n   *        - `MediaError` (native): used to populate a video.js `MediaError` object\n   *        - `MediaError` (video.js): will return itself if it's already a\n   *          video.js `MediaError` object.\n   *\n   * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\n   * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\n   *\n   * @class MediaError\n   */\n  function MediaError(value) {\n    // Allow redundant calls to this constructor to avoid having `instanceof`\n    // checks peppered around the code.\n    if (value instanceof MediaError) {\n      return value;\n    }\n    if (typeof value === 'number') {\n      this.code = value;\n    } else if (typeof value === 'string') {\n      // default code is zero, so this is a custom error\n      this.message = value;\n    } else if (isObject$1(value)) {\n      // We assign the `code` property manually because native `MediaError` objects\n      // do not expose it as an own/enumerable property of the object.\n      if (typeof value.code === 'number') {\n        this.code = value.code;\n      }\n      Object.assign(this, value);\n    }\n    if (!this.message) {\n      this.message = MediaError.defaultMessages[this.code] || '';\n    }\n  }\n\n  /**\n   * The error code that refers two one of the defined `MediaError` types\n   *\n   * @type {Number}\n   */\n  MediaError.prototype.code = 0;\n\n  /**\n   * An optional message that to show with the error. Message is not part of the HTML5\n   * video spec but allows for more informative custom errors.\n   *\n   * @type {String}\n   */\n  MediaError.prototype.message = '';\n\n  /**\n   * An optional status code that can be set by plugins to allow even more detail about\n   * the error. For example a plugin might provide a specific HTTP status code and an\n   * error message for that code. Then when the plugin gets that error this class will\n   * know how to display an error message for it. This allows a custom message to show\n   * up on the `Player` error overlay.\n   *\n   * @type {Array}\n   */\n  MediaError.prototype.status = null;\n\n  /**\n   * An object containing an error type, as well as other information regarding the error.\n   *\n   * @typedef {{errorType: string, [key: string]: any}} ErrorMetadata\n   */\n\n  /**\n   * An optional object to give more detail about the error. This can be used to give\n   * a higher level of specificity to an error versus the more generic MediaError codes.\n   * `metadata` expects an `errorType` string that should align with the values from videojs.Error.\n   *\n   * @type {ErrorMetadata}\n   */\n  MediaError.prototype.metadata = null;\n\n  /**\n   * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\n   * specification listed under {@link MediaError} for more information.\n   *\n   * @enum {array}\n   * @readonly\n   * @property {string} 0 - MEDIA_ERR_CUSTOM\n   * @property {string} 1 - MEDIA_ERR_ABORTED\n   * @property {string} 2 - MEDIA_ERR_NETWORK\n   * @property {string} 3 - MEDIA_ERR_DECODE\n   * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\n   * @property {string} 5 - MEDIA_ERR_ENCRYPTED\n   */\n  MediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\n\n  /**\n   * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\n   *\n   * @type {Array}\n   * @constant\n   */\n  MediaError.defaultMessages = {\n    1: 'You aborted the media playback',\n    2: 'A network error caused the media download to fail part-way.',\n    3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\n    4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\n    5: 'The media is encrypted and we do not have the keys to decrypt it.'\n  };\n\n  /**\n   * W3C error code for any custom error.\n   *\n   * @member MediaError#MEDIA_ERR_CUSTOM\n   * @constant {number}\n   * @default 0\n   */\n  MediaError.MEDIA_ERR_CUSTOM = 0;\n\n  /**\n   * W3C error code for any custom error.\n   *\n   * @member MediaError.MEDIA_ERR_CUSTOM\n   * @constant {number}\n   * @default 0\n   */\n  MediaError.prototype.MEDIA_ERR_CUSTOM = 0;\n\n  /**\n   * W3C error code for media error aborted.\n   *\n   * @member MediaError#MEDIA_ERR_ABORTED\n   * @constant {number}\n   * @default 1\n   */\n  MediaError.MEDIA_ERR_ABORTED = 1;\n\n  /**\n   * W3C error code for media error aborted.\n   *\n   * @member MediaError.MEDIA_ERR_ABORTED\n   * @constant {number}\n   * @default 1\n   */\n  MediaError.prototype.MEDIA_ERR_ABORTED = 1;\n\n  /**\n   * W3C error code for any network error.\n   *\n   * @member MediaError#MEDIA_ERR_NETWORK\n   * @constant {number}\n   * @default 2\n   */\n  MediaError.MEDIA_ERR_NETWORK = 2;\n\n  /**\n   * W3C error code for any network error.\n   *\n   * @member MediaError.MEDIA_ERR_NETWORK\n   * @constant {number}\n   * @default 2\n   */\n  MediaError.prototype.MEDIA_ERR_NETWORK = 2;\n\n  /**\n   * W3C error code for any decoding error.\n   *\n   * @member MediaError#MEDIA_ERR_DECODE\n   * @constant {number}\n   * @default 3\n   */\n  MediaError.MEDIA_ERR_DECODE = 3;\n\n  /**\n   * W3C error code for any decoding error.\n   *\n   * @member MediaError.MEDIA_ERR_DECODE\n   * @constant {number}\n   * @default 3\n   */\n  MediaError.prototype.MEDIA_ERR_DECODE = 3;\n\n  /**\n   * W3C error code for any time that a source is not supported.\n   *\n   * @member MediaError#MEDIA_ERR_SRC_NOT_SUPPORTED\n   * @constant {number}\n   * @default 4\n   */\n  MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\n  /**\n   * W3C error code for any time that a source is not supported.\n   *\n   * @member MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED\n   * @constant {number}\n   * @default 4\n   */\n  MediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\n  /**\n   * W3C error code for any time that a source is encrypted.\n   *\n   * @member MediaError#MEDIA_ERR_ENCRYPTED\n   * @constant {number}\n   * @default 5\n   */\n  MediaError.MEDIA_ERR_ENCRYPTED = 5;\n\n  /**\n   * W3C error code for any time that a source is encrypted.\n   *\n   * @member MediaError.MEDIA_ERR_ENCRYPTED\n   * @constant {number}\n   * @default 5\n   */\n  MediaError.prototype.MEDIA_ERR_ENCRYPTED = 5;\n\n  /**\n   * Returns whether an object is `Promise`-like (i.e. has a `then` method).\n   *\n   * @param  {Object}  value\n   *         An object that may or may not be `Promise`-like.\n   *\n   * @return {boolean}\n   *         Whether or not the object is `Promise`-like.\n   */\n  function isPromise(value) {\n    return value !== undefined && value !== null && typeof value.then === 'function';\n  }\n\n  /**\n   * Silence a Promise-like object.\n   *\n   * This is useful for avoiding non-harmful, but potentially confusing \"uncaught\n   * play promise\" rejection error messages.\n   *\n   * @param  {Object} value\n   *         An object that may or may not be `Promise`-like.\n   */\n  function silencePromise(value) {\n    if (isPromise(value)) {\n      value.then(null, e => {});\n    }\n  }\n\n  /**\n   * @file text-track-list-converter.js Utilities for capturing text track state and\n   * re-creating tracks based on a capture.\n   *\n   * @module text-track-list-converter\n   */\n\n  /** @import Tech from '../tech/tech' */\n\n  /**\n   * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\n   * represents the {@link TextTrack}'s state.\n   *\n   * @param {TextTrack} track\n   *        The text track to query.\n   *\n   * @return {Object}\n   *         A serializable javascript representation of the TextTrack.\n   * @private\n   */\n  const trackToJson_ = function (track) {\n    const ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce((acc, prop, i) => {\n      if (track[prop]) {\n        acc[prop] = track[prop];\n      }\n      return acc;\n    }, {\n      cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\n        return {\n          startTime: cue.startTime,\n          endTime: cue.endTime,\n          text: cue.text,\n          id: cue.id\n        };\n      })\n    });\n    return ret;\n  };\n\n  /**\n   * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\n   * state of all {@link TextTrack}s currently configured. The return array is compatible with\n   * {@link text-track-list-converter:jsonToTextTracks}.\n   *\n   * @param {Tech} tech\n   *        The tech object to query\n   *\n   * @return {Array}\n   *         A serializable javascript representation of the {@link Tech}s\n   *         {@link TextTrackList}.\n   */\n  const textTracksToJson = function (tech) {\n    const trackEls = tech.$$('track');\n    const trackObjs = Array.prototype.map.call(trackEls, t => t.track);\n    const tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n      const json = trackToJson_(trackEl.track);\n      if (trackEl.src) {\n        json.src = trackEl.src;\n      }\n      return json;\n    });\n    return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\n      return trackObjs.indexOf(track) === -1;\n    }).map(trackToJson_));\n  };\n\n  /**\n   * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\n   * object {@link TextTrack} representations.\n   *\n   * @param {Array} json\n   *        An array of `TextTrack` representation objects, like those that would be\n   *        produced by `textTracksToJson`.\n   *\n   * @param {Tech} tech\n   *        The `Tech` to create the `TextTrack`s on.\n   */\n  const jsonToTextTracks = function (json, tech) {\n    json.forEach(function (track) {\n      const addedTrack = tech.addRemoteTextTrack(track).track;\n      if (!track.src && track.cues) {\n        track.cues.forEach(cue => addedTrack.addCue(cue));\n      }\n    });\n    return tech.textTracks();\n  };\n  var textTrackConverter = {\n    textTracksToJson,\n    jsonToTextTracks,\n    trackToJson_\n  };\n\n  /**\n   * @file modal-dialog.js\n   */\n\n  /** @import Player from './player' */\n  /** @import { ContentDescriptor } from './utils/dom' */\n\n  const MODAL_CLASS_NAME = 'vjs-modal-dialog';\n\n  /**\n   * The `ModalDialog` displays over the video and its controls, which blocks\n   * interaction with the player until it is closed.\n   *\n   * Modal dialogs include a \"Close\" button and will close when that button\n   * is activated - or when ESC is pressed anywhere.\n   *\n   * @extends Component\n   */\n  class ModalDialog extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {ContentDescriptor} [options.content=undefined]\n     *        Provide customized content for this modal.\n     *\n     * @param {string} [options.description]\n     *        A text description for the modal, primarily for accessibility.\n     *\n     * @param {boolean} [options.fillAlways=false]\n     *        Normally, modals are automatically filled only the first time\n     *        they open. This tells the modal to refresh its content\n     *        every time it opens.\n     *\n     * @param {string} [options.label]\n     *        A text label for the modal, primarily for accessibility.\n     *\n     * @param {boolean} [options.pauseOnOpen=true]\n     *        If `true`, playback will will be paused if playing when\n     *        the modal opens, and resumed when it closes.\n     *\n     * @param {boolean} [options.temporary=true]\n     *        If `true`, the modal can only be opened once; it will be\n     *        disposed as soon as it's closed.\n     *\n     * @param {boolean} [options.uncloseable=false]\n     *        If `true`, the user will not be able to close the modal\n     *        through the UI in the normal ways. Programmatic closing is\n     *        still possible.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.handleKeyDown_ = e => this.handleKeyDown(e);\n      this.close_ = e => this.close(e);\n      this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n      this.closeable(!this.options_.uncloseable);\n      this.content(this.options_.content);\n\n      // Make sure the contentEl is defined AFTER any children are initialized\n      // because we only want the contents of the modal in the contentEl\n      // (not the UI elements like the close button).\n      this.contentEl_ = createEl('div', {\n        className: `${MODAL_CLASS_NAME}-content`\n      }, {\n        role: 'document'\n      });\n      this.descEl_ = createEl('p', {\n        className: `${MODAL_CLASS_NAME}-description vjs-control-text`,\n        id: this.el().getAttribute('aria-describedby')\n      });\n      textContent(this.descEl_, this.description());\n      this.el_.appendChild(this.descEl_);\n      this.el_.appendChild(this.contentEl_);\n    }\n\n    /**\n     * Create the `ModalDialog`'s DOM element\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: this.buildCSSClass(),\n        tabIndex: -1\n      }, {\n        'aria-describedby': `${this.id()}_description`,\n        'aria-hidden': 'true',\n        'aria-label': this.label(),\n        'role': 'dialog',\n        'aria-live': 'polite'\n      });\n    }\n    dispose() {\n      this.contentEl_ = null;\n      this.descEl_ = null;\n      this.previouslyActiveEl_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Returns the label string for this modal. Primarily used for accessibility.\n     *\n     * @return {string}\n     *         the localized or raw label of this modal.\n     */\n    label() {\n      return this.localize(this.options_.label || 'Modal Window');\n    }\n\n    /**\n     * Returns the description string for this modal. Primarily used for\n     * accessibility.\n     *\n     * @return {string}\n     *         The localized or raw description of this modal.\n     */\n    description() {\n      let desc = this.options_.description || this.localize('This is a modal window.');\n\n      // Append a universal closeability message if the modal is closeable.\n      if (this.closeable()) {\n        desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n      }\n      return desc;\n    }\n\n    /**\n     * Opens the modal.\n     *\n     * @fires ModalDialog#beforemodalopen\n     * @fires ModalDialog#modalopen\n     */\n    open() {\n      if (this.opened_) {\n        if (this.options_.fillAlways) {\n          this.fill();\n        }\n        return;\n      }\n      const player = this.player();\n\n      /**\n        * Fired just before a `ModalDialog` is opened.\n        *\n        * @event ModalDialog#beforemodalopen\n        * @type {Event}\n        */\n      this.trigger('beforemodalopen');\n      this.opened_ = true;\n\n      // Fill content if the modal has never opened before and\n      // never been filled.\n      if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n        this.fill();\n      }\n\n      // If the player was playing, pause it and take note of its previously\n      // playing state.\n      this.wasPlaying_ = !player.paused();\n      if (this.options_.pauseOnOpen && this.wasPlaying_) {\n        player.pause();\n      }\n      this.on('keydown', this.handleKeyDown_);\n\n      // Hide controls and note if they were enabled.\n      this.hadControls_ = player.controls();\n      player.controls(false);\n      this.show();\n      this.conditionalFocus_();\n      this.el().setAttribute('aria-hidden', 'false');\n\n      /**\n        * Fired just after a `ModalDialog` is opened.\n        *\n        * @event ModalDialog#modalopen\n        * @type {Event}\n        */\n      this.trigger('modalopen');\n      this.hasBeenOpened_ = true;\n    }\n\n    /**\n     * If the `ModalDialog` is currently open or closed.\n     *\n     * @param  {boolean} [value]\n     *         If given, it will open (`true`) or close (`false`) the modal.\n     *\n     * @return {boolean}\n     *         the current open state of the modaldialog\n     */\n    opened(value) {\n      if (typeof value === 'boolean') {\n        this[value ? 'open' : 'close']();\n      }\n      return this.opened_;\n    }\n\n    /**\n     * Closes the modal, does nothing if the `ModalDialog` is\n     * not open.\n     *\n     * @fires ModalDialog#beforemodalclose\n     * @fires ModalDialog#modalclose\n     */\n    close() {\n      if (!this.opened_) {\n        return;\n      }\n      const player = this.player();\n\n      /**\n        * Fired just before a `ModalDialog` is closed.\n        *\n        * @event ModalDialog#beforemodalclose\n        * @type {Event}\n        */\n      this.trigger('beforemodalclose');\n      this.opened_ = false;\n      if (this.wasPlaying_ && this.options_.pauseOnOpen) {\n        player.play();\n      }\n      this.off('keydown', this.handleKeyDown_);\n      if (this.hadControls_) {\n        player.controls(true);\n      }\n      this.hide();\n      this.el().setAttribute('aria-hidden', 'true');\n\n      /**\n        * Fired just after a `ModalDialog` is closed.\n        *\n        * @event ModalDialog#modalclose\n        * @type {Event}\n        *\n        * @property {boolean} [bubbles=true]\n        */\n      this.trigger({\n        type: 'modalclose',\n        bubbles: true\n      });\n      this.conditionalBlur_();\n      if (this.options_.temporary) {\n        this.dispose();\n      }\n    }\n\n    /**\n     * Check to see if the `ModalDialog` is closeable via the UI.\n     *\n     * @param  {boolean} [value]\n     *         If given as a boolean, it will set the `closeable` option.\n     *\n     * @return {boolean}\n     *         Returns the final value of the closable option.\n     */\n    closeable(value) {\n      if (typeof value === 'boolean') {\n        const closeable = this.closeable_ = !!value;\n        let close = this.getChild('closeButton');\n\n        // If this is being made closeable and has no close button, add one.\n        if (closeable && !close) {\n          // The close button should be a child of the modal - not its\n          // content element, so temporarily change the content element.\n          const temp = this.contentEl_;\n          this.contentEl_ = this.el_;\n          close = this.addChild('closeButton', {\n            controlText: 'Close Modal Dialog'\n          });\n          this.contentEl_ = temp;\n          this.on(close, 'close', this.close_);\n        }\n\n        // If this is being made uncloseable and has a close button, remove it.\n        if (!closeable && close) {\n          this.off(close, 'close', this.close_);\n          this.removeChild(close);\n          close.dispose();\n        }\n      }\n      return this.closeable_;\n    }\n\n    /**\n     * Fill the modal's content element with the modal's \"content\" option.\n     * The content element will be emptied before this change takes place.\n     */\n    fill() {\n      this.fillWith(this.content());\n    }\n\n    /**\n     * Fill the modal's content element with arbitrary content.\n     * The content element will be emptied before this change takes place.\n     *\n     * @fires ModalDialog#beforemodalfill\n     * @fires ModalDialog#modalfill\n     *\n     * @param {ContentDescriptor} [content]\n     *        The same rules apply to this as apply to the `content` option.\n     */\n    fillWith(content) {\n      const contentEl = this.contentEl();\n      const parentEl = contentEl.parentNode;\n      const nextSiblingEl = contentEl.nextSibling;\n\n      /**\n        * Fired just before a `ModalDialog` is filled with content.\n        *\n        * @event ModalDialog#beforemodalfill\n        * @type {Event}\n        */\n      this.trigger('beforemodalfill');\n      this.hasBeenFilled_ = true;\n\n      // Detach the content element from the DOM before performing\n      // manipulation to avoid modifying the live DOM multiple times.\n      parentEl.removeChild(contentEl);\n      this.empty();\n      insertContent(contentEl, content);\n      /**\n       * Fired just after a `ModalDialog` is filled with content.\n       *\n       * @event ModalDialog#modalfill\n       * @type {Event}\n       */\n      this.trigger('modalfill');\n\n      // Re-inject the re-filled content element.\n      if (nextSiblingEl) {\n        parentEl.insertBefore(contentEl, nextSiblingEl);\n      } else {\n        parentEl.appendChild(contentEl);\n      }\n\n      // make sure that the close button is last in the dialog DOM\n      const closeButton = this.getChild('closeButton');\n      if (closeButton) {\n        parentEl.appendChild(closeButton.el_);\n      }\n\n      /**\n       * Fired after `ModalDialog` is re-filled with content & close button is appended.\n       *\n       * @event ModalDialog#aftermodalfill\n       * @type {Event}\n       */\n      this.trigger('aftermodalfill');\n    }\n\n    /**\n     * Empties the content element. This happens anytime the modal is filled.\n     *\n     * @fires ModalDialog#beforemodalempty\n     * @fires ModalDialog#modalempty\n     */\n    empty() {\n      /**\n      * Fired just before a `ModalDialog` is emptied.\n      *\n      * @event ModalDialog#beforemodalempty\n      * @type {Event}\n      */\n      this.trigger('beforemodalempty');\n      emptyEl(this.contentEl());\n\n      /**\n      * Fired just after a `ModalDialog` is emptied.\n      *\n      * @event ModalDialog#modalempty\n      * @type {Event}\n      */\n      this.trigger('modalempty');\n    }\n\n    /**\n     * Gets or sets the modal content, which gets normalized before being\n     * rendered into the DOM.\n     *\n     * This does not update the DOM or fill the modal, but it is called during\n     * that process.\n     *\n     * @param  {ContentDescriptor} [value]\n     *         If defined, sets the internal content value to be used on the\n     *         next call(s) to `fill`. This value is normalized before being\n     *         inserted. To \"clear\" the internal content value, pass `null`.\n     *\n     * @return {ContentDescriptor}\n     *         The current content of the modal dialog\n     */\n    content(value) {\n      if (typeof value !== 'undefined') {\n        this.content_ = value;\n      }\n      return this.content_;\n    }\n\n    /**\n     * conditionally focus the modal dialog if focus was previously on the player.\n     *\n     * @private\n     */\n    conditionalFocus_() {\n      const activeEl = document.activeElement;\n      const playerEl = this.player_.el_;\n      this.previouslyActiveEl_ = null;\n      if (playerEl.contains(activeEl) || playerEl === activeEl) {\n        this.previouslyActiveEl_ = activeEl;\n        this.focus();\n      }\n    }\n\n    /**\n     * conditionally blur the element and refocus the last focused element\n     *\n     * @private\n     */\n    conditionalBlur_() {\n      if (this.previouslyActiveEl_) {\n        this.previouslyActiveEl_.focus();\n        this.previouslyActiveEl_ = null;\n      }\n    }\n\n    /**\n     * Keydown handler. Attached when modal is focused.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      /**\n       * Fired a custom keyDown event that bubbles.\n       *\n       * @event ModalDialog#modalKeydown\n       * @type {Event}\n       */\n      this.trigger({\n        type: 'modalKeydown',\n        originalEvent: event,\n        target: this,\n        bubbles: true\n      });\n      // Do not allow keydowns to reach out of the modal dialog.\n      event.stopPropagation();\n      if (event.key === 'Escape' && this.closeable()) {\n        event.preventDefault();\n        this.close();\n        return;\n      }\n\n      // exit early if it isn't a tab key\n      if (event.key !== 'Tab') {\n        return;\n      }\n      const focusableEls = this.focusableEls_();\n      const activeEl = this.el_.querySelector(':focus');\n      let focusIndex;\n      for (let i = 0; i < focusableEls.length; i++) {\n        if (activeEl === focusableEls[i]) {\n          focusIndex = i;\n          break;\n        }\n      }\n      if (document.activeElement === this.el_) {\n        focusIndex = 0;\n      }\n      if (event.shiftKey && focusIndex === 0) {\n        focusableEls[focusableEls.length - 1].focus();\n        event.preventDefault();\n      } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\n        focusableEls[0].focus();\n        event.preventDefault();\n      }\n    }\n\n    /**\n     * get all focusable elements\n     *\n     * @private\n     */\n    focusableEls_() {\n      const allChildren = this.el_.querySelectorAll('*');\n      return Array.prototype.filter.call(allChildren, child => {\n        return (child instanceof window.HTMLAnchorElement || child instanceof window.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window.HTMLInputElement || child instanceof window.HTMLSelectElement || child instanceof window.HTMLTextAreaElement || child instanceof window.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window.HTMLIFrameElement || child instanceof window.HTMLObjectElement || child instanceof window.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\n      });\n    }\n  }\n\n  /**\n   * Default options for `ModalDialog` default options.\n   *\n   * @type {Object}\n   * @private\n   */\n  ModalDialog.prototype.options_ = {\n    pauseOnOpen: true,\n    temporary: true\n  };\n  Component$1.registerComponent('ModalDialog', ModalDialog);\n\n  /**\n   * @file track-list.js\n   */\n\n  /** @import Track from './track' */\n\n  /**\n   * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\n   * {@link VideoTrackList}\n   *\n   * @extends EventTarget\n   */\n  class TrackList extends EventTarget$2 {\n    /**\n     * Create an instance of this class\n     *\n     * @param { Track[] } tracks\n     *        A list of tracks to initialize the list with.\n     *\n     * @abstract\n     */\n    constructor(tracks = []) {\n      super();\n      this.tracks_ = [];\n\n      /**\n       * @memberof TrackList\n       * @member {number} length\n       *         The current number of `Track`s in the this Trackist.\n       * @instance\n       */\n      Object.defineProperty(this, 'length', {\n        get() {\n          return this.tracks_.length;\n        }\n      });\n      for (let i = 0; i < tracks.length; i++) {\n        this.addTrack(tracks[i]);\n      }\n    }\n\n    /**\n     * Add a {@link Track} to the `TrackList`\n     *\n     * @param {Track} track\n     *        The audio, video, or text track to add to the list.\n     *\n     * @fires TrackList#addtrack\n     */\n    addTrack(track) {\n      const index = this.tracks_.length;\n      if (!('' + index in this)) {\n        Object.defineProperty(this, index, {\n          get() {\n            return this.tracks_[index];\n          }\n        });\n      }\n\n      // Do not add duplicate tracks\n      if (this.tracks_.indexOf(track) === -1) {\n        this.tracks_.push(track);\n        /**\n         * Triggered when a track is added to a track list.\n         *\n         * @event TrackList#addtrack\n         * @type {Event}\n         * @property {Track} track\n         *           A reference to track that was added.\n         */\n        this.trigger({\n          track,\n          type: 'addtrack',\n          target: this\n        });\n      }\n\n      /**\n       * Triggered when a track label is changed.\n       *\n       * @event TrackList#addtrack\n       * @type {Event}\n       * @property {Track} track\n       *           A reference to track that was added.\n       */\n      track.labelchange_ = () => {\n        this.trigger({\n          track,\n          type: 'labelchange',\n          target: this\n        });\n      };\n      if (isEvented(track)) {\n        track.addEventListener('labelchange', track.labelchange_);\n      }\n    }\n\n    /**\n     * Remove a {@link Track} from the `TrackList`\n     *\n     * @param {Track} rtrack\n     *        The audio, video, or text track to remove from the list.\n     *\n     * @fires TrackList#removetrack\n     */\n    removeTrack(rtrack) {\n      let track;\n      for (let i = 0, l = this.length; i < l; i++) {\n        if (this[i] === rtrack) {\n          track = this[i];\n          if (track.off) {\n            track.off();\n          }\n          this.tracks_.splice(i, 1);\n          break;\n        }\n      }\n      if (!track) {\n        return;\n      }\n\n      /**\n       * Triggered when a track is removed from track list.\n       *\n       * @event TrackList#removetrack\n       * @type {Event}\n       * @property {Track} track\n       *           A reference to track that was removed.\n       */\n      this.trigger({\n        track,\n        type: 'removetrack',\n        target: this\n      });\n    }\n\n    /**\n     * Get a Track from the TrackList by a tracks id\n     *\n     * @param {string} id - the id of the track to get\n     * @method getTrackById\n     * @return {Track}\n     * @private\n     */\n    getTrackById(id) {\n      let result = null;\n      for (let i = 0, l = this.length; i < l; i++) {\n        const track = this[i];\n        if (track.id === id) {\n          result = track;\n          break;\n        }\n      }\n      return result;\n    }\n  }\n\n  /**\n   * Triggered when a different track is selected/enabled.\n   *\n   * @event TrackList#change\n   * @type {Event}\n   */\n\n  /**\n   * Events that can be called with on + eventName. See {@link EventHandler}.\n   *\n   * @property {Object} TrackList#allowedEvents_\n   * @protected\n   */\n  TrackList.prototype.allowedEvents_ = {\n    change: 'change',\n    addtrack: 'addtrack',\n    removetrack: 'removetrack',\n    labelchange: 'labelchange'\n  };\n\n  // emulate attribute EventHandler support to allow for feature detection\n  for (const event in TrackList.prototype.allowedEvents_) {\n    TrackList.prototype['on' + event] = null;\n  }\n\n  /**\n   * @file audio-track-list.js\n   */\n\n  /** @import AudioTrack from './audio-track' */\n\n  /**\n   * Anywhere we call this function we diverge from the spec\n   * as we only support one enabled audiotrack at a time\n   *\n   * @param {AudioTrackList} list\n   *        list to work on\n   *\n   * @param {AudioTrack} track\n   *        The track to skip\n   *\n   * @private\n   */\n  const disableOthers$1 = function (list, track) {\n    for (let i = 0; i < list.length; i++) {\n      if (!Object.keys(list[i]).length || track.id === list[i].id) {\n        continue;\n      }\n      // another audio track is enabled, disable it\n      list[i].enabled = false;\n    }\n  };\n\n  /**\n   * The current list of {@link AudioTrack} for a media file.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\n   * @extends TrackList\n   */\n  class AudioTrackList extends TrackList {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {AudioTrack[]} [tracks=[]]\n     *        A list of `AudioTrack` to instantiate the list with.\n     */\n    constructor(tracks = []) {\n      // make sure only 1 track is enabled\n      // sorted from last index to first index\n      for (let i = tracks.length - 1; i >= 0; i--) {\n        if (tracks[i].enabled) {\n          disableOthers$1(tracks, tracks[i]);\n          break;\n        }\n      }\n      super(tracks);\n      this.changing_ = false;\n    }\n\n    /**\n     * Add an {@link AudioTrack} to the `AudioTrackList`.\n     *\n     * @param {AudioTrack} track\n     *        The AudioTrack to add to the list\n     *\n     * @fires TrackList#addtrack\n     */\n    addTrack(track) {\n      if (track.enabled) {\n        disableOthers$1(this, track);\n      }\n      super.addTrack(track);\n      // native tracks don't have this\n      if (!track.addEventListener) {\n        return;\n      }\n      track.enabledChange_ = () => {\n        // when we are disabling other tracks (since we don't support\n        // more than one track at a time) we will set changing_\n        // to true so that we don't trigger additional change events\n        if (this.changing_) {\n          return;\n        }\n        this.changing_ = true;\n        disableOthers$1(this, track);\n        this.changing_ = false;\n        this.trigger('change');\n      };\n\n      /**\n       * @listens AudioTrack#enabledchange\n       * @fires TrackList#change\n       */\n      track.addEventListener('enabledchange', track.enabledChange_);\n    }\n    removeTrack(rtrack) {\n      super.removeTrack(rtrack);\n      if (rtrack.removeEventListener && rtrack.enabledChange_) {\n        rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n        rtrack.enabledChange_ = null;\n      }\n    }\n  }\n\n  /**\n   * @file video-track-list.js\n   */\n\n  /** @import VideoTrack from './video-track' */\n\n  /**\n   * Un-select all other {@link VideoTrack}s that are selected.\n   *\n   * @param {VideoTrackList} list\n   *        list to work on\n   *\n   * @param {VideoTrack} track\n   *        The track to skip\n   *\n   * @private\n   */\n  const disableOthers = function (list, track) {\n    for (let i = 0; i < list.length; i++) {\n      if (!Object.keys(list[i]).length || track.id === list[i].id) {\n        continue;\n      }\n      // another video track is enabled, disable it\n      list[i].selected = false;\n    }\n  };\n\n  /**\n   * The current list of {@link VideoTrack} for a video.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\n   * @extends TrackList\n   */\n  class VideoTrackList extends TrackList {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {VideoTrack[]} [tracks=[]]\n     *        A list of `VideoTrack` to instantiate the list with.\n     */\n    constructor(tracks = []) {\n      // make sure only 1 track is enabled\n      // sorted from last index to first index\n      for (let i = tracks.length - 1; i >= 0; i--) {\n        if (tracks[i].selected) {\n          disableOthers(tracks, tracks[i]);\n          break;\n        }\n      }\n      super(tracks);\n      this.changing_ = false;\n\n      /**\n       * @member {number} VideoTrackList#selectedIndex\n       *         The current index of the selected {@link VideoTrack`}.\n       */\n      Object.defineProperty(this, 'selectedIndex', {\n        get() {\n          for (let i = 0; i < this.length; i++) {\n            if (this[i].selected) {\n              return i;\n            }\n          }\n          return -1;\n        },\n        set() {}\n      });\n    }\n\n    /**\n     * Add a {@link VideoTrack} to the `VideoTrackList`.\n     *\n     * @param {VideoTrack} track\n     *        The VideoTrack to add to the list\n     *\n     * @fires TrackList#addtrack\n     */\n    addTrack(track) {\n      if (track.selected) {\n        disableOthers(this, track);\n      }\n      super.addTrack(track);\n      // native tracks don't have this\n      if (!track.addEventListener) {\n        return;\n      }\n      track.selectedChange_ = () => {\n        if (this.changing_) {\n          return;\n        }\n        this.changing_ = true;\n        disableOthers(this, track);\n        this.changing_ = false;\n        this.trigger('change');\n      };\n\n      /**\n       * @listens VideoTrack#selectedchange\n       * @fires TrackList#change\n       */\n      track.addEventListener('selectedchange', track.selectedChange_);\n    }\n    removeTrack(rtrack) {\n      super.removeTrack(rtrack);\n      if (rtrack.removeEventListener && rtrack.selectedChange_) {\n        rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n        rtrack.selectedChange_ = null;\n      }\n    }\n  }\n\n  /**\n   * @file text-track-list.js\n   */\n\n  /** @import TextTrack from './text-track' */\n\n  /**\n   * The current list of {@link TextTrack} for a media file.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\n   * @extends TrackList\n   */\n  class TextTrackList extends TrackList {\n    /**\n     * Add a {@link TextTrack} to the `TextTrackList`\n     *\n     * @param {TextTrack} track\n     *        The text track to add to the list.\n     *\n     * @fires TrackList#addtrack\n     */\n    addTrack(track) {\n      super.addTrack(track);\n      if (!this.queueChange_) {\n        this.queueChange_ = () => this.queueTrigger('change');\n      }\n      if (!this.triggerSelectedlanguagechange) {\n        this.triggerSelectedlanguagechange_ = () => this.trigger('selectedlanguagechange');\n      }\n\n      /**\n       * @listens TextTrack#modechange\n       * @fires TrackList#change\n       */\n      track.addEventListener('modechange', this.queueChange_);\n      const nonLanguageTextTrackKind = ['metadata', 'chapters'];\n      if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n        track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n      }\n    }\n    removeTrack(rtrack) {\n      super.removeTrack(rtrack);\n\n      // manually remove the event handlers we added\n      if (rtrack.removeEventListener) {\n        if (this.queueChange_) {\n          rtrack.removeEventListener('modechange', this.queueChange_);\n        }\n        if (this.selectedlanguagechange_) {\n          rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\n        }\n      }\n    }\n  }\n\n  /**\n   * @file html-track-element-list.js\n   */\n\n  /**\n   * The current list of {@link HtmlTrackElement}s.\n   */\n  class HtmlTrackElementList {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {HtmlTrackElement[]} [tracks=[]]\n     *        A list of `HtmlTrackElement` to instantiate the list with.\n     */\n    constructor(trackElements = []) {\n      this.trackElements_ = [];\n\n      /**\n       * @memberof HtmlTrackElementList\n       * @member {number} length\n       *         The current number of `Track`s in the this Trackist.\n       * @instance\n       */\n      Object.defineProperty(this, 'length', {\n        get() {\n          return this.trackElements_.length;\n        }\n      });\n      for (let i = 0, length = trackElements.length; i < length; i++) {\n        this.addTrackElement_(trackElements[i]);\n      }\n    }\n\n    /**\n     * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\n     *\n     * @param {HtmlTrackElement} trackElement\n     *        The track element to add to the list.\n     *\n     * @private\n     */\n    addTrackElement_(trackElement) {\n      const index = this.trackElements_.length;\n      if (!('' + index in this)) {\n        Object.defineProperty(this, index, {\n          get() {\n            return this.trackElements_[index];\n          }\n        });\n      }\n\n      // Do not add duplicate elements\n      if (this.trackElements_.indexOf(trackElement) === -1) {\n        this.trackElements_.push(trackElement);\n      }\n    }\n\n    /**\n     * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\n     * {@link TextTrack}.\n     *\n     * @param {TextTrack} track\n     *        The track associated with a track element.\n     *\n     * @return {HtmlTrackElement|undefined}\n     *         The track element that was found or undefined.\n     *\n     * @private\n     */\n    getTrackElementByTrack_(track) {\n      let trackElement_;\n      for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n        if (track === this.trackElements_[i].track) {\n          trackElement_ = this.trackElements_[i];\n          break;\n        }\n      }\n      return trackElement_;\n    }\n\n    /**\n     * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\n     *\n     * @param {HtmlTrackElement} trackElement\n     *        The track element to remove from the list.\n     *\n     * @private\n     */\n    removeTrackElement_(trackElement) {\n      for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n        if (trackElement === this.trackElements_[i]) {\n          if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\n            this.trackElements_[i].track.off();\n          }\n          if (typeof this.trackElements_[i].off === 'function') {\n            this.trackElements_[i].off();\n          }\n          this.trackElements_.splice(i, 1);\n          break;\n        }\n      }\n    }\n  }\n\n  /**\n   * @file text-track-cue-list.js\n   */\n\n  /**\n   * @typedef {Object} TextTrackCueList~TextTrackCue\n   *\n   * @property {string} id\n   *           The unique id for this text track cue\n   *\n   * @property {number} startTime\n   *           The start time for this text track cue\n   *\n   * @property {number} endTime\n   *           The end time for this text track cue\n   *\n   * @property {boolean} pauseOnExit\n   *           Pause when the end time is reached if true.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\n   */\n\n  /**\n   * A List of TextTrackCues.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n   */\n  class TextTrackCueList {\n    /**\n     * Create an instance of this class..\n     *\n     * @param {Array} cues\n     *        A list of cues to be initialized with\n     */\n    constructor(cues) {\n      TextTrackCueList.prototype.setCues_.call(this, cues);\n\n      /**\n       * @memberof TextTrackCueList\n       * @member {number} length\n       *         The current number of `TextTrackCue`s in the TextTrackCueList.\n       * @instance\n       */\n      Object.defineProperty(this, 'length', {\n        get() {\n          return this.length_;\n        }\n      });\n    }\n\n    /**\n     * A setter for cues in this list. Creates getters\n     * an an index for the cues.\n     *\n     * @param {Array} cues\n     *        An array of cues to set\n     *\n     * @private\n     */\n    setCues_(cues) {\n      const oldLength = this.length || 0;\n      let i = 0;\n      const l = cues.length;\n      this.cues_ = cues;\n      this.length_ = cues.length;\n      const defineProp = function (index) {\n        if (!('' + index in this)) {\n          Object.defineProperty(this, '' + index, {\n            get() {\n              return this.cues_[index];\n            }\n          });\n        }\n      };\n      if (oldLength < l) {\n        i = oldLength;\n        for (; i < l; i++) {\n          defineProp.call(this, i);\n        }\n      }\n    }\n\n    /**\n     * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\n     *\n     * @param {string} id\n     *        The id of the cue that should be searched for.\n     *\n     * @return {TextTrackCueList~TextTrackCue|null}\n     *         A single cue or null if none was found.\n     */\n    getCueById(id) {\n      let result = null;\n      for (let i = 0, l = this.length; i < l; i++) {\n        const cue = this[i];\n        if (cue.id === id) {\n          result = cue;\n          break;\n        }\n      }\n      return result;\n    }\n  }\n\n  /**\n   * @file track-kinds.js\n   */\n\n  /**\n   * All possible `VideoTrackKind`s\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\n   * @typedef VideoTrack~Kind\n   * @enum\n   */\n  const VideoTrackKind = {\n    alternative: 'alternative',\n    captions: 'captions',\n    main: 'main',\n    sign: 'sign',\n    subtitles: 'subtitles',\n    commentary: 'commentary'\n  };\n\n  /**\n   * All possible `AudioTrackKind`s\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\n   * @typedef AudioTrack~Kind\n   * @enum\n   */\n  const AudioTrackKind = {\n    'alternative': 'alternative',\n    'descriptions': 'descriptions',\n    'main': 'main',\n    'main-desc': 'main-desc',\n    'translation': 'translation',\n    'commentary': 'commentary'\n  };\n\n  /**\n   * All possible `TextTrackKind`s\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\n   * @typedef TextTrack~Kind\n   * @enum\n   */\n  const TextTrackKind = {\n    subtitles: 'subtitles',\n    captions: 'captions',\n    descriptions: 'descriptions',\n    chapters: 'chapters',\n    metadata: 'metadata'\n  };\n\n  /**\n   * All possible `TextTrackMode`s\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n   * @typedef TextTrack~Mode\n   * @enum\n   */\n  const TextTrackMode = {\n    disabled: 'disabled',\n    hidden: 'hidden',\n    showing: 'showing'\n  };\n\n  /**\n   * @file track.js\n   */\n\n  /**\n   * A Track class that contains all of the common functionality for {@link AudioTrack},\n   * {@link VideoTrack}, and {@link TextTrack}.\n   *\n   * > Note: This class should not be used directly\n   *\n   * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\n   * @extends EventTarget\n   * @abstract\n   */\n  class Track extends EventTarget$2 {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Object} [options={}]\n     *        Object of option names and values\n     *\n     * @param {string} [options.kind='']\n     *        A valid kind for the track type you are creating.\n     *\n     * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n     *        A unique id for this AudioTrack.\n     *\n     * @param {string} [options.label='']\n     *        The menu label for this track.\n     *\n     * @param {string} [options.language='']\n     *        A valid two character language code.\n     *\n     * @abstract\n     */\n    constructor(options = {}) {\n      super();\n      const trackProps = {\n        id: options.id || 'vjs_track_' + newGUID(),\n        kind: options.kind || '',\n        language: options.language || ''\n      };\n      let label = options.label || '';\n\n      /**\n       * @memberof Track\n       * @member {string} id\n       *         The id of this track. Cannot be changed after creation.\n       * @instance\n       *\n       * @readonly\n       */\n\n      /**\n       * @memberof Track\n       * @member {string} kind\n       *         The kind of track that this is. Cannot be changed after creation.\n       * @instance\n       *\n       * @readonly\n       */\n\n      /**\n       * @memberof Track\n       * @member {string} language\n       *         The two letter language code for this track. Cannot be changed after\n       *         creation.\n       * @instance\n       *\n       * @readonly\n       */\n\n      for (const key in trackProps) {\n        Object.defineProperty(this, key, {\n          get() {\n            return trackProps[key];\n          },\n          set() {}\n        });\n      }\n\n      /**\n       * @memberof Track\n       * @member {string} label\n       *         The label of this track. Cannot be changed after creation.\n       * @instance\n       *\n       * @fires Track#labelchange\n       */\n      Object.defineProperty(this, 'label', {\n        get() {\n          return label;\n        },\n        set(newLabel) {\n          if (newLabel !== label) {\n            label = newLabel;\n\n            /**\n             * An event that fires when label changes on this track.\n             *\n             * > Note: This is not part of the spec!\n             *\n             * @event Track#labelchange\n             * @type {Event}\n             */\n            this.trigger('labelchange');\n          }\n        }\n      });\n    }\n  }\n\n  /**\n   * @file url.js\n   * @module url\n   */\n\n  /**\n   * Resolve and parse the elements of a URL.\n   *\n   * @function\n   * @param    {string} url\n   *           The url to parse\n   *\n   * @return   {URL}\n   *           An object of url details\n   */\n  const parseUrl = function (url) {\n    return new URL(url, document.baseURI);\n  };\n\n  /**\n   * Get absolute version of relative URL.\n   *\n   * @function\n   * @param    {string} url\n   *           URL to make absolute\n   *\n   * @return   {string}\n   *           Absolute URL\n   */\n  const getAbsoluteURL = function (url) {\n    return new URL(url, document.baseURI).href;\n  };\n\n  /**\n   * Returns the extension of the passed file name. It will return an empty string\n   * if passed an invalid path.\n   *\n   * @function\n   * @param    {string} path\n   *           The fileName path like '/path/to/file.mp4'\n   *\n   * @return  {string}\n   *           The extension in lower case or an empty string if no\n   *           extension could be found.\n   */\n  const getFileExtension = function (path) {\n    if (typeof path === 'string') {\n      const splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n      const pathParts = splitPathRe.exec(path);\n      if (pathParts) {\n        return pathParts.pop().toLowerCase();\n      }\n    }\n    return '';\n  };\n\n  /**\n   * Returns whether the url passed is a cross domain request or not.\n   *\n   * @function\n   * @param    {string} url\n   *           The url to check.\n   *\n   * @param    {URL} [winLoc]\n   *           the domain to check the url against, defaults to window.location\n   *\n   * @return   {boolean}\n   *           Whether it is a cross domain request or not.\n   */\n  const isCrossOrigin = function (url, winLoc = window.location) {\n    return parseUrl(url).origin !== winLoc.origin;\n  };\n\n  var Url = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    parseUrl: parseUrl,\n    getAbsoluteURL: getAbsoluteURL,\n    getFileExtension: getFileExtension,\n    isCrossOrigin: isCrossOrigin\n  });\n\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n  function unwrapExports (x) {\n  \treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n  }\n\n  function createCommonjsModule(fn, module) {\n  \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n  }\n\n  var win;\n  if (typeof window !== \"undefined\") {\n    win = window;\n  } else if (typeof commonjsGlobal !== \"undefined\") {\n    win = commonjsGlobal;\n  } else if (typeof self !== \"undefined\") {\n    win = self;\n  } else {\n    win = {};\n  }\n  var window_1 = win;\n\n  var _extends_1 = createCommonjsModule(function (module) {\n    function _extends() {\n      return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n        for (var e = 1; e < arguments.length; e++) {\n          var t = arguments[e];\n          for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n        }\n        return n;\n      }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _extends.apply(null, arguments);\n    }\n    module.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  });\n  var _extends$1 = unwrapExports(_extends_1);\n\n  var isFunction_1 = isFunction;\n  var toString = Object.prototype.toString;\n  function isFunction(fn) {\n    if (!fn) {\n      return false;\n    }\n    var string = toString.call(fn);\n    return string === '[object Function]' || typeof fn === 'function' && string !== '[object RegExp]' || typeof window !== 'undefined' && (\n    // IE8 and below\n    fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt);\n  }\n\n  function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n    var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n    if (it) return (it = it.call(o)).next.bind(it);\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n  function _unsupportedIterableToArray(o, minLen) {\n    if (!o) return;\n    if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n    var n = Object.prototype.toString.call(o).slice(8, -1);\n    if (n === \"Object\" && o.constructor) n = o.constructor.name;\n    if (n === \"Map\" || n === \"Set\") return Array.from(o);\n    if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n  }\n  function _arrayLikeToArray(arr, len) {\n    if (len == null || len > arr.length) len = arr.length;\n    for (var i = 0, arr2 = new Array(len); i < len; i++) {\n      arr2[i] = arr[i];\n    }\n    return arr2;\n  }\n  var InterceptorsStorage = /*#__PURE__*/function () {\n    function InterceptorsStorage() {\n      this.typeToInterceptorsMap_ = new Map();\n      this.enabled_ = false;\n    }\n    var _proto = InterceptorsStorage.prototype;\n    _proto.getIsEnabled = function getIsEnabled() {\n      return this.enabled_;\n    };\n    _proto.enable = function enable() {\n      this.enabled_ = true;\n    };\n    _proto.disable = function disable() {\n      this.enabled_ = false;\n    };\n    _proto.reset = function reset() {\n      this.typeToInterceptorsMap_ = new Map();\n      this.enabled_ = false;\n    };\n    _proto.addInterceptor = function addInterceptor(type, interceptor) {\n      if (!this.typeToInterceptorsMap_.has(type)) {\n        this.typeToInterceptorsMap_.set(type, new Set());\n      }\n      var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n      if (interceptorsSet.has(interceptor)) {\n        // already have this interceptor\n        return false;\n      }\n      interceptorsSet.add(interceptor);\n      return true;\n    };\n    _proto.removeInterceptor = function removeInterceptor(type, interceptor) {\n      var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n      if (interceptorsSet && interceptorsSet.has(interceptor)) {\n        interceptorsSet.delete(interceptor);\n        return true;\n      }\n      return false;\n    };\n    _proto.clearInterceptorsByType = function clearInterceptorsByType(type) {\n      var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n      if (!interceptorsSet) {\n        return false;\n      }\n      this.typeToInterceptorsMap_.delete(type);\n      this.typeToInterceptorsMap_.set(type, new Set());\n      return true;\n    };\n    _proto.clear = function clear() {\n      if (!this.typeToInterceptorsMap_.size) {\n        return false;\n      }\n      this.typeToInterceptorsMap_ = new Map();\n      return true;\n    };\n    _proto.getForType = function getForType(type) {\n      return this.typeToInterceptorsMap_.get(type) || new Set();\n    };\n    _proto.execute = function execute(type, payload) {\n      var interceptors = this.getForType(type);\n      for (var _iterator = _createForOfIteratorHelperLoose(interceptors), _step; !(_step = _iterator()).done;) {\n        var interceptor = _step.value;\n        try {\n          payload = interceptor(payload);\n        } catch (e) {//ignore\n        }\n      }\n      return payload;\n    };\n    return InterceptorsStorage;\n  }();\n  var interceptors = InterceptorsStorage;\n\n  var RetryManager = /*#__PURE__*/function () {\n    function RetryManager() {\n      this.maxAttempts_ = 1;\n      this.delayFactor_ = 0.1;\n      this.fuzzFactor_ = 0.1;\n      this.initialDelay_ = 1000;\n      this.enabled_ = false;\n    }\n    var _proto = RetryManager.prototype;\n    _proto.getIsEnabled = function getIsEnabled() {\n      return this.enabled_;\n    };\n    _proto.enable = function enable() {\n      this.enabled_ = true;\n    };\n    _proto.disable = function disable() {\n      this.enabled_ = false;\n    };\n    _proto.reset = function reset() {\n      this.maxAttempts_ = 1;\n      this.delayFactor_ = 0.1;\n      this.fuzzFactor_ = 0.1;\n      this.initialDelay_ = 1000;\n      this.enabled_ = false;\n    };\n    _proto.getMaxAttempts = function getMaxAttempts() {\n      return this.maxAttempts_;\n    };\n    _proto.setMaxAttempts = function setMaxAttempts(maxAttempts) {\n      this.maxAttempts_ = maxAttempts;\n    };\n    _proto.getDelayFactor = function getDelayFactor() {\n      return this.delayFactor_;\n    };\n    _proto.setDelayFactor = function setDelayFactor(delayFactor) {\n      this.delayFactor_ = delayFactor;\n    };\n    _proto.getFuzzFactor = function getFuzzFactor() {\n      return this.fuzzFactor_;\n    };\n    _proto.setFuzzFactor = function setFuzzFactor(fuzzFactor) {\n      this.fuzzFactor_ = fuzzFactor;\n    };\n    _proto.getInitialDelay = function getInitialDelay() {\n      return this.initialDelay_;\n    };\n    _proto.setInitialDelay = function setInitialDelay(initialDelay) {\n      this.initialDelay_ = initialDelay;\n    };\n    _proto.createRetry = function createRetry(_temp) {\n      var _ref = _temp === void 0 ? {} : _temp,\n        maxAttempts = _ref.maxAttempts,\n        delayFactor = _ref.delayFactor,\n        fuzzFactor = _ref.fuzzFactor,\n        initialDelay = _ref.initialDelay;\n      return new Retry({\n        maxAttempts: maxAttempts || this.maxAttempts_,\n        delayFactor: delayFactor || this.delayFactor_,\n        fuzzFactor: fuzzFactor || this.fuzzFactor_,\n        initialDelay: initialDelay || this.initialDelay_\n      });\n    };\n    return RetryManager;\n  }();\n  var Retry = /*#__PURE__*/function () {\n    function Retry(options) {\n      this.maxAttempts_ = options.maxAttempts;\n      this.delayFactor_ = options.delayFactor;\n      this.fuzzFactor_ = options.fuzzFactor;\n      this.currentDelay_ = options.initialDelay;\n      this.currentAttempt_ = 1;\n    }\n    var _proto2 = Retry.prototype;\n    _proto2.moveToNextAttempt = function moveToNextAttempt() {\n      this.currentAttempt_++;\n      var delayDelta = this.currentDelay_ * this.delayFactor_;\n      this.currentDelay_ = this.currentDelay_ + delayDelta;\n    };\n    _proto2.shouldRetry = function shouldRetry() {\n      return this.currentAttempt_ < this.maxAttempts_;\n    };\n    _proto2.getCurrentDelay = function getCurrentDelay() {\n      return this.currentDelay_;\n    };\n    _proto2.getCurrentMinPossibleDelay = function getCurrentMinPossibleDelay() {\n      return (1 - this.fuzzFactor_) * this.currentDelay_;\n    };\n    _proto2.getCurrentMaxPossibleDelay = function getCurrentMaxPossibleDelay() {\n      return (1 + this.fuzzFactor_) * this.currentDelay_;\n    }\n    /**\n     * For example fuzzFactor is 0.1\n     * This means ±10% deviation\n     * So if we have delay as 1000\n     * This function can generate any value from 900 to 1100\n     */;\n    _proto2.getCurrentFuzzedDelay = function getCurrentFuzzedDelay() {\n      var lowValue = this.getCurrentMinPossibleDelay();\n      var highValue = this.getCurrentMaxPossibleDelay();\n      return lowValue + Math.random() * (highValue - lowValue);\n    };\n    return Retry;\n  }();\n  var retry = RetryManager;\n\n  var httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n    if (decodeResponseBody === void 0) {\n      decodeResponseBody = false;\n    }\n    return function (err, response, responseBody) {\n      // if the XHR failed, return that error\n      if (err) {\n        callback(err);\n        return;\n      } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n      if (response.statusCode >= 400 && response.statusCode <= 599) {\n        var cause = responseBody;\n        if (decodeResponseBody) {\n          if (window_1.TextDecoder) {\n            var charset = getCharset(response.headers && response.headers['content-type']);\n            try {\n              cause = new TextDecoder(charset).decode(responseBody);\n            } catch (e) {}\n          } else {\n            cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n          }\n        }\n        callback({\n          cause: cause\n        });\n        return;\n      } // otherwise, request succeeded\n\n      callback(null, responseBody);\n    };\n  };\n  function getCharset(contentTypeHeader) {\n    if (contentTypeHeader === void 0) {\n      contentTypeHeader = '';\n    }\n    return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n      var _contentType$split = contentType.split('='),\n        type = _contentType$split[0],\n        value = _contentType$split[1];\n      if (type.trim() === 'charset') {\n        return value.trim();\n      }\n      return charset;\n    }, 'utf-8');\n  }\n  var httpHandler = httpResponseHandler;\n\n  createXHR.httpHandler = httpHandler;\n  createXHR.requestInterceptorsStorage = new interceptors();\n  createXHR.responseInterceptorsStorage = new interceptors();\n  createXHR.retryManager = new retry();\n  /**\n   * @license\n   * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\n   * Copyright (c) 2014 David Björklund\n   * Available under the MIT license\n   * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\n   */\n\n  var parseHeaders = function parseHeaders(headers) {\n    var result = {};\n    if (!headers) {\n      return result;\n    }\n    headers.trim().split('\\n').forEach(function (row) {\n      var index = row.indexOf(':');\n      var key = row.slice(0, index).trim().toLowerCase();\n      var value = row.slice(index + 1).trim();\n      if (typeof result[key] === 'undefined') {\n        result[key] = value;\n      } else if (Array.isArray(result[key])) {\n        result[key].push(value);\n      } else {\n        result[key] = [result[key], value];\n      }\n    });\n    return result;\n  };\n  var lib = createXHR; // Allow use of default import syntax in TypeScript\n\n  var default_1 = createXHR;\n  createXHR.XMLHttpRequest = window_1.XMLHttpRequest || noop$1;\n  createXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window_1.XDomainRequest;\n  forEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n    createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n      options = initParams(uri, options, callback);\n      options.method = method.toUpperCase();\n      return _createXHR(options);\n    };\n  });\n  function forEachArray(array, iterator) {\n    for (var i = 0; i < array.length; i++) {\n      iterator(array[i]);\n    }\n  }\n  function isEmpty(obj) {\n    for (var i in obj) {\n      if (obj.hasOwnProperty(i)) return false;\n    }\n    return true;\n  }\n  function initParams(uri, options, callback) {\n    var params = uri;\n    if (isFunction_1(options)) {\n      callback = options;\n      if (typeof uri === \"string\") {\n        params = {\n          uri: uri\n        };\n      }\n    } else {\n      params = _extends_1({}, options, {\n        uri: uri\n      });\n    }\n    params.callback = callback;\n    return params;\n  }\n  function createXHR(uri, options, callback) {\n    options = initParams(uri, options, callback);\n    return _createXHR(options);\n  }\n  function _createXHR(options) {\n    if (typeof options.callback === \"undefined\") {\n      throw new Error(\"callback argument missing\");\n    } // call all registered request interceptors for a given request type:\n\n    if (options.requestType && createXHR.requestInterceptorsStorage.getIsEnabled()) {\n      var requestInterceptorPayload = {\n        uri: options.uri || options.url,\n        headers: options.headers || {},\n        body: options.body,\n        metadata: options.metadata || {},\n        retry: options.retry,\n        timeout: options.timeout\n      };\n      var updatedPayload = createXHR.requestInterceptorsStorage.execute(options.requestType, requestInterceptorPayload);\n      options.uri = updatedPayload.uri;\n      options.headers = updatedPayload.headers;\n      options.body = updatedPayload.body;\n      options.metadata = updatedPayload.metadata;\n      options.retry = updatedPayload.retry;\n      options.timeout = updatedPayload.timeout;\n    }\n    var called = false;\n    var callback = function cbOnce(err, response, body) {\n      if (!called) {\n        called = true;\n        options.callback(err, response, body);\n      }\n    };\n    function readystatechange() {\n      // do not call load 2 times when response interceptors are enabled\n      // why do we even need this 2nd load?\n      if (xhr.readyState === 4 && !createXHR.responseInterceptorsStorage.getIsEnabled()) {\n        setTimeout(loadFunc, 0);\n      }\n    }\n    function getBody() {\n      // Chrome with requestType=blob throws errors arround when even testing access to responseText\n      var body = undefined;\n      if (xhr.response) {\n        body = xhr.response;\n      } else {\n        body = xhr.responseText || getXml(xhr);\n      }\n      if (isJson) {\n        try {\n          body = JSON.parse(body);\n        } catch (e) {}\n      }\n      return body;\n    }\n    function errorFunc(evt) {\n      clearTimeout(timeoutTimer);\n      clearTimeout(options.retryTimeout);\n      if (!(evt instanceof Error)) {\n        evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n      }\n      evt.statusCode = 0; // we would like to retry on error:\n\n      if (!aborted && createXHR.retryManager.getIsEnabled() && options.retry && options.retry.shouldRetry()) {\n        options.retryTimeout = setTimeout(function () {\n          options.retry.moveToNextAttempt(); // we want to re-use the same options and the same xhr object:\n\n          options.xhr = xhr;\n          _createXHR(options);\n        }, options.retry.getCurrentFuzzedDelay());\n        return;\n      } // call all registered response interceptors for a given request type:\n\n      if (options.requestType && createXHR.responseInterceptorsStorage.getIsEnabled()) {\n        var responseInterceptorPayload = {\n          headers: failureResponse.headers || {},\n          body: failureResponse.body,\n          responseUrl: xhr.responseURL,\n          responseType: xhr.responseType\n        };\n        var _updatedPayload = createXHR.responseInterceptorsStorage.execute(options.requestType, responseInterceptorPayload);\n        failureResponse.body = _updatedPayload.body;\n        failureResponse.headers = _updatedPayload.headers;\n      }\n      return callback(evt, failureResponse);\n    } // will load the data & process the response in a special response object\n\n    function loadFunc() {\n      if (aborted) return;\n      var status;\n      clearTimeout(timeoutTimer);\n      clearTimeout(options.retryTimeout);\n      if (options.useXDR && xhr.status === undefined) {\n        //IE8 CORS GET successful response doesn't have a status field, but body is fine\n        status = 200;\n      } else {\n        status = xhr.status === 1223 ? 204 : xhr.status;\n      }\n      var response = failureResponse;\n      var err = null;\n      if (status !== 0) {\n        response = {\n          body: getBody(),\n          statusCode: status,\n          method: method,\n          headers: {},\n          url: uri,\n          rawRequest: xhr\n        };\n        if (xhr.getAllResponseHeaders) {\n          //remember xhr can in fact be XDR for CORS in IE\n          response.headers = parseHeaders(xhr.getAllResponseHeaders());\n        }\n      } else {\n        err = new Error(\"Internal XMLHttpRequest Error\");\n      } // call all registered response interceptors for a given request type:\n\n      if (options.requestType && createXHR.responseInterceptorsStorage.getIsEnabled()) {\n        var responseInterceptorPayload = {\n          headers: response.headers || {},\n          body: response.body,\n          responseUrl: xhr.responseURL,\n          responseType: xhr.responseType\n        };\n        var _updatedPayload2 = createXHR.responseInterceptorsStorage.execute(options.requestType, responseInterceptorPayload);\n        response.body = _updatedPayload2.body;\n        response.headers = _updatedPayload2.headers;\n      }\n      return callback(err, response, response.body);\n    }\n    var xhr = options.xhr || null;\n    if (!xhr) {\n      if (options.cors || options.useXDR) {\n        xhr = new createXHR.XDomainRequest();\n      } else {\n        xhr = new createXHR.XMLHttpRequest();\n      }\n    }\n    var key;\n    var aborted;\n    var uri = xhr.url = options.uri || options.url;\n    var method = xhr.method = options.method || \"GET\";\n    var body = options.body || options.data;\n    var headers = xhr.headers = options.headers || {};\n    var sync = !!options.sync;\n    var isJson = false;\n    var timeoutTimer;\n    var failureResponse = {\n      body: undefined,\n      headers: {},\n      statusCode: 0,\n      method: method,\n      url: uri,\n      rawRequest: xhr\n    };\n    if (\"json\" in options && options.json !== false) {\n      isJson = true;\n      headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n      if (method !== \"GET\" && method !== \"HEAD\") {\n        headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n        body = JSON.stringify(options.json === true ? body : options.json);\n      }\n    }\n    xhr.onreadystatechange = readystatechange;\n    xhr.onload = loadFunc;\n    xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n    xhr.onprogress = function () {// IE must die\n    };\n    xhr.onabort = function () {\n      aborted = true;\n      clearTimeout(options.retryTimeout);\n    };\n    xhr.ontimeout = errorFunc;\n    xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n    if (!sync) {\n      xhr.withCredentials = !!options.withCredentials;\n    } // Cannot set timeout with sync request\n    // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n    // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n    if (!sync && options.timeout > 0) {\n      timeoutTimer = setTimeout(function () {\n        if (aborted) return;\n        aborted = true; //IE9 may still call readystatechange\n\n        xhr.abort(\"timeout\");\n        var e = new Error(\"XMLHttpRequest timeout\");\n        e.code = \"ETIMEDOUT\";\n        errorFunc(e);\n      }, options.timeout);\n    }\n    if (xhr.setRequestHeader) {\n      for (key in headers) {\n        if (headers.hasOwnProperty(key)) {\n          xhr.setRequestHeader(key, headers[key]);\n        }\n      }\n    } else if (options.headers && !isEmpty(options.headers)) {\n      throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n    }\n    if (\"responseType\" in options) {\n      xhr.responseType = options.responseType;\n    }\n    if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n      options.beforeSend(xhr);\n    } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n    // XMLHttpRequest spec says to pass null as body to indicate no body\n    // See https://github.com/naugtur/xhr/issues/100.\n\n    xhr.send(body || null);\n    return xhr;\n  }\n  function getXml(xhr) {\n    // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n    // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n    try {\n      if (xhr.responseType === \"document\") {\n        return xhr.responseXML;\n      }\n      var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n      if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n        return xhr.responseXML;\n      }\n    } catch (e) {}\n    return null;\n  }\n  function noop$1() {}\n  lib.default = default_1;\n\n  /**\n   * @file text-track.js\n   */\n\n  /** @import Tech from '../tech/tech' */\n\n  /**\n   * Takes a webvtt file contents and parses it into cues\n   *\n   * @param {string} srcContent\n   *        webVTT file contents\n   *\n   * @param {TextTrack} track\n   *        TextTrack to add cues to. Cues come from the srcContent.\n   *\n   * @private\n   */\n  const parseCues = function (srcContent, track) {\n    const parser = new window.WebVTT.Parser(window, window.vttjs, window.WebVTT.StringDecoder());\n    const errors = [];\n    parser.oncue = function (cue) {\n      track.addCue(cue);\n    };\n    parser.onparsingerror = function (error) {\n      errors.push(error);\n    };\n    parser.onflush = function () {\n      track.trigger({\n        type: 'loadeddata',\n        target: track\n      });\n    };\n    parser.parse(srcContent);\n    if (errors.length > 0) {\n      if (window.console && window.console.groupCollapsed) {\n        window.console.groupCollapsed(`Text Track parsing errors for ${track.src}`);\n      }\n      errors.forEach(error => log$1.error(error));\n      if (window.console && window.console.groupEnd) {\n        window.console.groupEnd();\n      }\n    }\n    parser.flush();\n  };\n\n  /**\n   * Load a `TextTrack` from a specified url.\n   *\n   * @param {string} src\n   *        Url to load track from.\n   *\n   * @param {TextTrack} track\n   *        Track to add cues to. Comes from the content at the end of `url`.\n   *\n   * @private\n   */\n  const loadTrack = function (src, track) {\n    const opts = {\n      uri: src\n    };\n    const crossOrigin = isCrossOrigin(src);\n    if (crossOrigin) {\n      opts.cors = crossOrigin;\n    }\n    const withCredentials = track.tech_.crossOrigin() === 'use-credentials';\n    if (withCredentials) {\n      opts.withCredentials = withCredentials;\n    }\n    lib(opts, bind_(this, function (err, response, responseBody) {\n      if (err) {\n        return log$1.error(err, response);\n      }\n      track.loaded_ = true;\n\n      // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n      // NOTE: this is only used for the alt/video.novtt.js build\n      if (typeof window.WebVTT !== 'function') {\n        if (track.tech_) {\n          // to prevent use before define eslint error, we define loadHandler\n          // as a let here\n          track.tech_.any(['vttjsloaded', 'vttjserror'], event => {\n            if (event.type === 'vttjserror') {\n              log$1.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n              return;\n            }\n            return parseCues(responseBody, track);\n          });\n        }\n      } else {\n        parseCues(responseBody, track);\n      }\n    }));\n  };\n\n  /**\n   * A representation of a single `TextTrack`.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\n   * @extends Track\n   */\n  class TextTrack extends Track {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Object} options={}\n     *        Object of option names and values\n     *\n     * @param {Tech} options.tech\n     *        A reference to the tech that owns this TextTrack.\n     *\n     * @param {TextTrack~Kind} [options.kind='subtitles']\n     *        A valid text track kind.\n     *\n     * @param {TextTrack~Mode} [options.mode='disabled']\n     *        A valid text track mode.\n     *\n     * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n     *        A unique id for this TextTrack.\n     *\n     * @param {string} [options.label='']\n     *        The menu label for this track.\n     *\n     * @param {string} [options.language='']\n     *        A valid two character language code.\n     *\n     * @param {string} [options.srclang='']\n     *        A valid two character language code. An alternative, but deprioritized\n     *        version of `options.language`\n     *\n     * @param {string} [options.src]\n     *        A url to TextTrack cues.\n     *\n     * @param {boolean} [options.default]\n     *        If this track should default to on or off.\n     */\n    constructor(options = {}) {\n      if (!options.tech) {\n        throw new Error('A tech was not provided.');\n      }\n      const settings = merge$2(options, {\n        kind: TextTrackKind[options.kind] || 'subtitles',\n        language: options.language || options.srclang || ''\n      });\n      let mode = TextTrackMode[settings.mode] || 'disabled';\n      const default_ = settings.default;\n      if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n        mode = 'hidden';\n      }\n      super(settings);\n      this.tech_ = settings.tech;\n      this.cues_ = [];\n      this.activeCues_ = [];\n      this.preload_ = this.tech_.preloadTextTracks !== false;\n      const cues = new TextTrackCueList(this.cues_);\n      const activeCues = new TextTrackCueList(this.activeCues_);\n      let changed = false;\n      this.timeupdateHandler = bind_(this, function (event = {}) {\n        if (this.tech_.isDisposed()) {\n          return;\n        }\n        if (!this.tech_.isReady_) {\n          if (event.type !== 'timeupdate') {\n            this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n          }\n          return;\n        }\n\n        // Accessing this.activeCues for the side-effects of updating itself\n        // due to its nature as a getter function. Do not remove or cues will\n        // stop updating!\n        // Use the setter to prevent deletion from uglify (pure_getters rule)\n        this.activeCues = this.activeCues;\n        if (changed) {\n          this.trigger('cuechange');\n          changed = false;\n        }\n        if (event.type !== 'timeupdate') {\n          this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n        }\n      });\n      const disposeHandler = () => {\n        this.stopTracking();\n      };\n      this.tech_.one('dispose', disposeHandler);\n      if (mode !== 'disabled') {\n        this.startTracking();\n      }\n      Object.defineProperties(this, {\n        /**\n         * @memberof TextTrack\n         * @member {boolean} default\n         *         If this track was set to be on or off by default. Cannot be changed after\n         *         creation.\n         * @instance\n         *\n         * @readonly\n         */\n        default: {\n          get() {\n            return default_;\n          },\n          set() {}\n        },\n        /**\n         * @memberof TextTrack\n         * @member {string} mode\n         *         Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\n         *         not be set if setting to an invalid mode.\n         * @instance\n         *\n         * @fires TextTrack#modechange\n         */\n        mode: {\n          get() {\n            return mode;\n          },\n          set(newMode) {\n            if (!TextTrackMode[newMode]) {\n              return;\n            }\n            if (mode === newMode) {\n              return;\n            }\n            mode = newMode;\n            if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) {\n              // On-demand load.\n              loadTrack(this.src, this);\n            }\n            this.stopTracking();\n            if (mode !== 'disabled') {\n              this.startTracking();\n            }\n            /**\n             * An event that fires when mode changes on this track. This allows\n             * the TextTrackList that holds this track to act accordingly.\n             *\n             * > Note: This is not part of the spec!\n             *\n             * @event TextTrack#modechange\n             * @type {Event}\n             */\n            this.trigger('modechange');\n          }\n        },\n        /**\n         * @memberof TextTrack\n         * @member {TextTrackCueList} cues\n         *         The text track cue list for this TextTrack.\n         * @instance\n         */\n        cues: {\n          get() {\n            if (!this.loaded_) {\n              return null;\n            }\n            return cues;\n          },\n          set() {}\n        },\n        /**\n         * @memberof TextTrack\n         * @member {TextTrackCueList} activeCues\n         *         The list text track cues that are currently active for this TextTrack.\n         * @instance\n         */\n        activeCues: {\n          get() {\n            if (!this.loaded_) {\n              return null;\n            }\n\n            // nothing to do\n            if (this.cues.length === 0) {\n              return activeCues;\n            }\n            const ct = this.tech_.currentTime();\n            const active = [];\n            for (let i = 0, l = this.cues.length; i < l; i++) {\n              const cue = this.cues[i];\n              if (cue.startTime <= ct && cue.endTime >= ct) {\n                active.push(cue);\n              }\n            }\n            changed = false;\n            if (active.length !== this.activeCues_.length) {\n              changed = true;\n            } else {\n              for (let i = 0; i < active.length; i++) {\n                if (this.activeCues_.indexOf(active[i]) === -1) {\n                  changed = true;\n                }\n              }\n            }\n            this.activeCues_ = active;\n            activeCues.setCues_(this.activeCues_);\n            return activeCues;\n          },\n          // /!\\ Keep this setter empty (see the timeupdate handler above)\n          set() {}\n        }\n      });\n      if (settings.src) {\n        this.src = settings.src;\n        if (!this.preload_) {\n          // Tracks will load on-demand.\n          // Act like we're loaded for other purposes.\n          this.loaded_ = true;\n        }\n        if (this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\n          loadTrack(this.src, this);\n        }\n      } else {\n        this.loaded_ = true;\n      }\n    }\n    startTracking() {\n      // More precise cues based on requestVideoFrameCallback with a requestAnimationFram fallback\n      this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n      // Also listen to timeupdate in case rVFC/rAF stops (window in background, audio in video el)\n      this.tech_.on('timeupdate', this.timeupdateHandler);\n    }\n    stopTracking() {\n      if (this.rvf_) {\n        this.tech_.cancelVideoFrameCallback(this.rvf_);\n        this.rvf_ = undefined;\n      }\n      this.tech_.off('timeupdate', this.timeupdateHandler);\n    }\n\n    /**\n     * Add a cue to the internal list of cues.\n     *\n     * @param {TextTrack~Cue} cue\n     *        The cue to add to our internal list\n     */\n    addCue(originalCue) {\n      let cue = originalCue;\n\n      // Testing if the cue is a VTTCue in a way that survives minification\n      if (!('getCueAsHTML' in cue)) {\n        cue = new window.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\n        for (const prop in originalCue) {\n          if (!(prop in cue)) {\n            cue[prop] = originalCue[prop];\n          }\n        }\n\n        // make sure that `id` is copied over\n        cue.id = originalCue.id;\n        cue.originalCue_ = originalCue;\n      }\n      const tracks = this.tech_.textTracks();\n      for (let i = 0; i < tracks.length; i++) {\n        if (tracks[i] !== this) {\n          tracks[i].removeCue(cue);\n        }\n      }\n      this.cues_.push(cue);\n      this.cues.setCues_(this.cues_);\n    }\n\n    /**\n     * Remove a cue from our internal list\n     *\n     * @param {TextTrack~Cue} removeCue\n     *        The cue to remove from our internal list\n     */\n    removeCue(removeCue) {\n      let i = this.cues_.length;\n      while (i--) {\n        const cue = this.cues_[i];\n        if (cue === removeCue || cue.originalCue_ && cue.originalCue_ === removeCue) {\n          this.cues_.splice(i, 1);\n          this.cues.setCues_(this.cues_);\n          break;\n        }\n      }\n    }\n  }\n\n  /**\n   * cuechange - One or more cues in the track have become active or stopped being active.\n   *\n   * @protected\n   */\n  TextTrack.prototype.allowedEvents_ = {\n    cuechange: 'cuechange'\n  };\n\n  /**\n   * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\n   * only one `AudioTrack` in the list will be enabled at a time.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\n   * @extends Track\n   */\n  class AudioTrack extends Track {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Object} [options={}]\n     *        Object of option names and values\n     *\n     * @param {AudioTrack~Kind} [options.kind='']\n     *        A valid audio track kind\n     *\n     * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n     *        A unique id for this AudioTrack.\n     *\n     * @param {string} [options.label='']\n     *        The menu label for this track.\n     *\n     * @param {string} [options.language='']\n     *        A valid two character language code.\n     *\n     * @param {boolean} [options.enabled]\n     *        If this track is the one that is currently playing. If this track is part of\n     *        an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\n     */\n    constructor(options = {}) {\n      const settings = merge$2(options, {\n        kind: AudioTrackKind[options.kind] || ''\n      });\n      super(settings);\n      let enabled = false;\n\n      /**\n       * @memberof AudioTrack\n       * @member {boolean} enabled\n       *         If this `AudioTrack` is enabled or not. When setting this will\n       *         fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\n       * @instance\n       *\n       * @fires VideoTrack#selectedchange\n       */\n      Object.defineProperty(this, 'enabled', {\n        get() {\n          return enabled;\n        },\n        set(newEnabled) {\n          // an invalid or unchanged value\n          if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\n            return;\n          }\n          enabled = newEnabled;\n\n          /**\n           * An event that fires when enabled changes on this track. This allows\n           * the AudioTrackList that holds this track to act accordingly.\n           *\n           * > Note: This is not part of the spec! Native tracks will do\n           *         this internally without an event.\n           *\n           * @event AudioTrack#enabledchange\n           * @type {Event}\n           */\n          this.trigger('enabledchange');\n        }\n      });\n\n      // if the user sets this track to selected then\n      // set selected to that true value otherwise\n      // we keep it false\n      if (settings.enabled) {\n        this.enabled = settings.enabled;\n      }\n      this.loaded_ = true;\n    }\n  }\n\n  /**\n   * A representation of a single `VideoTrack`.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\n   * @extends Track\n   */\n  class VideoTrack extends Track {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Object} [options={}]\n     *        Object of option names and values\n     *\n     * @param {string} [options.kind='']\n     *        A valid {@link VideoTrack~Kind}\n     *\n     * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n     *        A unique id for this AudioTrack.\n     *\n     * @param {string} [options.label='']\n     *        The menu label for this track.\n     *\n     * @param {string} [options.language='']\n     *        A valid two character language code.\n     *\n     * @param {boolean} [options.selected]\n     *        If this track is the one that is currently playing.\n     */\n    constructor(options = {}) {\n      const settings = merge$2(options, {\n        kind: VideoTrackKind[options.kind] || ''\n      });\n      super(settings);\n      let selected = false;\n\n      /**\n       * @memberof VideoTrack\n       * @member {boolean} selected\n       *         If this `VideoTrack` is selected or not. When setting this will\n       *         fire {@link VideoTrack#selectedchange} if the state of selected changed.\n       * @instance\n       *\n       * @fires VideoTrack#selectedchange\n       */\n      Object.defineProperty(this, 'selected', {\n        get() {\n          return selected;\n        },\n        set(newSelected) {\n          // an invalid or unchanged value\n          if (typeof newSelected !== 'boolean' || newSelected === selected) {\n            return;\n          }\n          selected = newSelected;\n\n          /**\n           * An event that fires when selected changes on this track. This allows\n           * the VideoTrackList that holds this track to act accordingly.\n           *\n           * > Note: This is not part of the spec! Native tracks will do\n           *         this internally without an event.\n           *\n           * @event VideoTrack#selectedchange\n           * @type {Event}\n           */\n          this.trigger('selectedchange');\n        }\n      });\n\n      // if the user sets this track to selected then\n      // set selected to that true value otherwise\n      // we keep it false\n      if (settings.selected) {\n        this.selected = settings.selected;\n      }\n    }\n  }\n\n  /**\n   * @file html-track-element.js\n   */\n\n  /** @import Tech from '../tech/tech' */\n\n  /**\n   * A single track represented in the DOM.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\n   * @extends EventTarget\n   */\n  class HTMLTrackElement extends EventTarget$2 {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Object} options={}\n     *        Object of option names and values\n     *\n     * @param {Tech} options.tech\n     *        A reference to the tech that owns this HTMLTrackElement.\n     *\n     * @param {TextTrack~Kind} [options.kind='subtitles']\n     *        A valid text track kind.\n     *\n     * @param {TextTrack~Mode} [options.mode='disabled']\n     *        A valid text track mode.\n     *\n     * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n     *        A unique id for this TextTrack.\n     *\n     * @param {string} [options.label='']\n     *        The menu label for this track.\n     *\n     * @param {string} [options.language='']\n     *        A valid two character language code.\n     *\n     * @param {string} [options.srclang='']\n     *        A valid two character language code. An alternative, but deprioritized\n     *        version of `options.language`\n     *\n     * @param {string} [options.src]\n     *        A url to TextTrack cues.\n     *\n     * @param {boolean} [options.default]\n     *        If this track should default to on or off.\n     */\n    constructor(options = {}) {\n      super();\n      let readyState;\n      const track = new TextTrack(options);\n      this.kind = track.kind;\n      this.src = track.src;\n      this.srclang = track.language;\n      this.label = track.label;\n      this.default = track.default;\n      Object.defineProperties(this, {\n        /**\n         * @memberof HTMLTrackElement\n         * @member {HTMLTrackElement~ReadyState} readyState\n         *         The current ready state of the track element.\n         * @instance\n         */\n        readyState: {\n          get() {\n            return readyState;\n          }\n        },\n        /**\n         * @memberof HTMLTrackElement\n         * @member {TextTrack} track\n         *         The underlying TextTrack object.\n         * @instance\n         *\n         */\n        track: {\n          get() {\n            return track;\n          }\n        }\n      });\n      readyState = HTMLTrackElement.NONE;\n\n      /**\n       * @listens TextTrack#loadeddata\n       * @fires HTMLTrackElement#load\n       */\n      track.addEventListener('loadeddata', () => {\n        readyState = HTMLTrackElement.LOADED;\n        this.trigger({\n          type: 'load',\n          target: this\n        });\n      });\n    }\n  }\n\n  /**\n   * @protected\n   */\n  HTMLTrackElement.prototype.allowedEvents_ = {\n    load: 'load'\n  };\n\n  /**\n   * The text track not loaded state.\n   *\n   * @type {number}\n   * @static\n   */\n  HTMLTrackElement.NONE = 0;\n\n  /**\n   * The text track loading state.\n   *\n   * @type {number}\n   * @static\n   */\n  HTMLTrackElement.LOADING = 1;\n\n  /**\n   * The text track loaded state.\n   *\n   * @type {number}\n   * @static\n   */\n  HTMLTrackElement.LOADED = 2;\n\n  /**\n   * The text track failed to load state.\n   *\n   * @type {number}\n   * @static\n   */\n  HTMLTrackElement.ERROR = 3;\n\n  /*\n   * This file contains all track properties that are used in\n   * player.js, tech.js, html5.js and possibly other techs in the future.\n   */\n\n  const NORMAL = {\n    audio: {\n      ListClass: AudioTrackList,\n      TrackClass: AudioTrack,\n      capitalName: 'Audio'\n    },\n    video: {\n      ListClass: VideoTrackList,\n      TrackClass: VideoTrack,\n      capitalName: 'Video'\n    },\n    text: {\n      ListClass: TextTrackList,\n      TrackClass: TextTrack,\n      capitalName: 'Text'\n    }\n  };\n  Object.keys(NORMAL).forEach(function (type) {\n    NORMAL[type].getterName = `${type}Tracks`;\n    NORMAL[type].privateName = `${type}Tracks_`;\n  });\n  const REMOTE = {\n    remoteText: {\n      ListClass: TextTrackList,\n      TrackClass: TextTrack,\n      capitalName: 'RemoteText',\n      getterName: 'remoteTextTracks',\n      privateName: 'remoteTextTracks_'\n    },\n    remoteTextEl: {\n      ListClass: HtmlTrackElementList,\n      TrackClass: HTMLTrackElement,\n      capitalName: 'RemoteTextTrackEls',\n      getterName: 'remoteTextTrackEls',\n      privateName: 'remoteTextTrackEls_'\n    }\n  };\n  const ALL = Object.assign({}, NORMAL, REMOTE);\n  REMOTE.names = Object.keys(REMOTE);\n  NORMAL.names = Object.keys(NORMAL);\n  ALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\n\n  var minDoc = {};\n\n  var topLevel = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof window !== 'undefined' ? window : {};\n  var doccy;\n  if (typeof document !== 'undefined') {\n    doccy = document;\n  } else {\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n    if (!doccy) {\n      doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n    }\n  }\n  var document_1 = doccy;\n\n  /**\n   * Copyright 2013 vtt.js Contributors\n   *\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\n   * you may not use this file except in compliance with the License.\n   * You may obtain a copy of the License at\n   *\n   *   http://www.apache.org/licenses/LICENSE-2.0\n   *\n   * Unless required by applicable law or agreed to in writing, software\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   * See the License for the specific language governing permissions and\n   * limitations under the License.\n   */\n\n  /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n  /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n\n  var _objCreate = Object.create || function () {\n    function F() {}\n    return function (o) {\n      if (arguments.length !== 1) {\n        throw new Error('Object.create shim only accepts one parameter.');\n      }\n      F.prototype = o;\n      return new F();\n    };\n  }();\n\n  // Creates a new ParserError object from an errorData object. The errorData\n  // object should have default code and message properties. The default message\n  // property can be overriden by passing in a message parameter.\n  // See ParsingError.Errors below for acceptable errors.\n  function ParsingError(errorData, message) {\n    this.name = \"ParsingError\";\n    this.code = errorData.code;\n    this.message = message || errorData.message;\n  }\n  ParsingError.prototype = _objCreate(Error.prototype);\n  ParsingError.prototype.constructor = ParsingError;\n\n  // ParsingError metadata for acceptable ParsingErrors.\n  ParsingError.Errors = {\n    BadSignature: {\n      code: 0,\n      message: \"Malformed WebVTT signature.\"\n    },\n    BadTimeStamp: {\n      code: 1,\n      message: \"Malformed time stamp.\"\n    }\n  };\n\n  // Try to parse input as a time stamp.\n  function parseTimeStamp(input) {\n    function computeSeconds(h, m, s, f) {\n      return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n    }\n    var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n    if (!m) {\n      return null;\n    }\n    if (m[3]) {\n      // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n      return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n    } else if (m[1] > 59) {\n      // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n      // First position is hours as it's over 59.\n      return computeSeconds(m[1], m[2], 0, m[4]);\n    } else {\n      // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n      return computeSeconds(0, m[1], m[2], m[4]);\n    }\n  }\n\n  // A settings object holds key/value pairs and will ignore anything but the first\n  // assignment to a specific key.\n  function Settings() {\n    this.values = _objCreate(null);\n  }\n  Settings.prototype = {\n    // Only accept the first assignment to any key.\n    set: function (k, v) {\n      if (!this.get(k) && v !== \"\") {\n        this.values[k] = v;\n      }\n    },\n    // Return the value for a key, or a default value.\n    // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n    // a number of possible default values as properties where 'defaultKey' is\n    // the key of the property that will be chosen; otherwise it's assumed to be\n    // a single value.\n    get: function (k, dflt, defaultKey) {\n      if (defaultKey) {\n        return this.has(k) ? this.values[k] : dflt[defaultKey];\n      }\n      return this.has(k) ? this.values[k] : dflt;\n    },\n    // Check whether we have a value for a key.\n    has: function (k) {\n      return k in this.values;\n    },\n    // Accept a setting if its one of the given alternatives.\n    alt: function (k, v, a) {\n      for (var n = 0; n < a.length; ++n) {\n        if (v === a[n]) {\n          this.set(k, v);\n          break;\n        }\n      }\n    },\n    // Accept a setting if its a valid (signed) integer.\n    integer: function (k, v) {\n      if (/^-?\\d+$/.test(v)) {\n        // integer\n        this.set(k, parseInt(v, 10));\n      }\n    },\n    // Accept a setting if its a valid percentage.\n    percent: function (k, v) {\n      if (v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/)) {\n        v = parseFloat(v);\n        if (v >= 0 && v <= 100) {\n          this.set(k, v);\n          return true;\n        }\n      }\n      return false;\n    }\n  };\n\n  // Helper function to parse input into groups separated by 'groupDelim', and\n  // interprete each group as a key/value pair separated by 'keyValueDelim'.\n  function parseOptions(input, callback, keyValueDelim, groupDelim) {\n    var groups = groupDelim ? input.split(groupDelim) : [input];\n    for (var i in groups) {\n      if (typeof groups[i] !== \"string\") {\n        continue;\n      }\n      var kv = groups[i].split(keyValueDelim);\n      if (kv.length !== 2) {\n        continue;\n      }\n      var k = kv[0].trim();\n      var v = kv[1].trim();\n      callback(k, v);\n    }\n  }\n  function parseCue(input, cue, regionList) {\n    // Remember the original input if we need to throw an error.\n    var oInput = input;\n    // 4.1 WebVTT timestamp\n    function consumeTimeStamp() {\n      var ts = parseTimeStamp(input);\n      if (ts === null) {\n        throw new ParsingError(ParsingError.Errors.BadTimeStamp, \"Malformed timestamp: \" + oInput);\n      }\n      // Remove time stamp from input.\n      input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n      return ts;\n    }\n\n    // 4.4.2 WebVTT cue settings\n    function consumeCueSettings(input, cue) {\n      var settings = new Settings();\n      parseOptions(input, function (k, v) {\n        switch (k) {\n          case \"region\":\n            // Find the last region we parsed with the same region id.\n            for (var i = regionList.length - 1; i >= 0; i--) {\n              if (regionList[i].id === v) {\n                settings.set(k, regionList[i].region);\n                break;\n              }\n            }\n            break;\n          case \"vertical\":\n            settings.alt(k, v, [\"rl\", \"lr\"]);\n            break;\n          case \"line\":\n            var vals = v.split(\",\"),\n              vals0 = vals[0];\n            settings.integer(k, vals0);\n            settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n            settings.alt(k, vals0, [\"auto\"]);\n            if (vals.length === 2) {\n              settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n            }\n            break;\n          case \"position\":\n            vals = v.split(\",\");\n            settings.percent(k, vals[0]);\n            if (vals.length === 2) {\n              settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n            }\n            break;\n          case \"size\":\n            settings.percent(k, v);\n            break;\n          case \"align\":\n            settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n            break;\n        }\n      }, /:/, /\\s/);\n\n      // Apply default values for any missing fields.\n      cue.region = settings.get(\"region\", null);\n      cue.vertical = settings.get(\"vertical\", \"\");\n      try {\n        cue.line = settings.get(\"line\", \"auto\");\n      } catch (e) {}\n      cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n      cue.snapToLines = settings.get(\"snapToLines\", true);\n      cue.size = settings.get(\"size\", 100);\n      // Safari still uses the old middle value and won't accept center\n      try {\n        cue.align = settings.get(\"align\", \"center\");\n      } catch (e) {\n        cue.align = settings.get(\"align\", \"middle\");\n      }\n      try {\n        cue.position = settings.get(\"position\", \"auto\");\n      } catch (e) {\n        cue.position = settings.get(\"position\", {\n          start: 0,\n          left: 0,\n          center: 50,\n          middle: 50,\n          end: 100,\n          right: 100\n        }, cue.align);\n      }\n      cue.positionAlign = settings.get(\"positionAlign\", {\n        start: \"start\",\n        left: \"start\",\n        center: \"center\",\n        middle: \"center\",\n        end: \"end\",\n        right: \"end\"\n      }, cue.align);\n    }\n    function skipWhitespace() {\n      input = input.replace(/^\\s+/, \"\");\n    }\n\n    // 4.1 WebVTT cue timings.\n    skipWhitespace();\n    cue.startTime = consumeTimeStamp(); // (1) collect cue start time\n    skipWhitespace();\n    if (input.substr(0, 3) !== \"-->\") {\n      // (3) next characters must match \"-->\"\n      throw new ParsingError(ParsingError.Errors.BadTimeStamp, \"Malformed time stamp (time stamps must be separated by '-->'): \" + oInput);\n    }\n    input = input.substr(3);\n    skipWhitespace();\n    cue.endTime = consumeTimeStamp(); // (5) collect cue end time\n\n    // 4.1 WebVTT cue settings list.\n    skipWhitespace();\n    consumeCueSettings(input, cue);\n  }\n\n  // When evaluating this file as part of a Webpack bundle for server\n  // side rendering, `document` is an empty object.\n  var TEXTAREA_ELEMENT = document_1.createElement && document_1.createElement(\"textarea\");\n  var TAG_NAME = {\n    c: \"span\",\n    i: \"i\",\n    b: \"b\",\n    u: \"u\",\n    ruby: \"ruby\",\n    rt: \"rt\",\n    v: \"span\",\n    lang: \"span\"\n  };\n\n  // 5.1 default text color\n  // 5.2 default text background color is equivalent to text color with bg_ prefix\n  var DEFAULT_COLOR_CLASS = {\n    white: 'rgba(255,255,255,1)',\n    lime: 'rgba(0,255,0,1)',\n    cyan: 'rgba(0,255,255,1)',\n    red: 'rgba(255,0,0,1)',\n    yellow: 'rgba(255,255,0,1)',\n    magenta: 'rgba(255,0,255,1)',\n    blue: 'rgba(0,0,255,1)',\n    black: 'rgba(0,0,0,1)'\n  };\n  var TAG_ANNOTATION = {\n    v: \"title\",\n    lang: \"lang\"\n  };\n  var NEEDS_PARENT = {\n    rt: \"ruby\"\n  };\n\n  // Parse content into a document fragment.\n  function parseContent(window, input) {\n    function nextToken() {\n      // Check for end-of-string.\n      if (!input) {\n        return null;\n      }\n\n      // Consume 'n' characters from the input.\n      function consume(result) {\n        input = input.substr(result.length);\n        return result;\n      }\n      var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n      // If there is some text before the next tag, return it, otherwise return\n      // the tag.\n      return consume(m[1] ? m[1] : m[2]);\n    }\n    function unescape(s) {\n      TEXTAREA_ELEMENT.innerHTML = s;\n      s = TEXTAREA_ELEMENT.textContent;\n      TEXTAREA_ELEMENT.textContent = \"\";\n      return s;\n    }\n    function shouldAdd(current, element) {\n      return !NEEDS_PARENT[element.localName] || NEEDS_PARENT[element.localName] === current.localName;\n    }\n\n    // Create an element for this tag.\n    function createElement(type, annotation) {\n      var tagName = TAG_NAME[type];\n      if (!tagName) {\n        return null;\n      }\n      var element = window.document.createElement(tagName);\n      var name = TAG_ANNOTATION[type];\n      if (name && annotation) {\n        element[name] = annotation.trim();\n      }\n      return element;\n    }\n    var rootDiv = window.document.createElement(\"div\"),\n      current = rootDiv,\n      t,\n      tagStack = [];\n    while ((t = nextToken()) !== null) {\n      if (t[0] === '<') {\n        if (t[1] === \"/\") {\n          // If the closing tag matches, move back up to the parent node.\n          if (tagStack.length && tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n            tagStack.pop();\n            current = current.parentNode;\n          }\n          // Otherwise just ignore the end tag.\n          continue;\n        }\n        var ts = parseTimeStamp(t.substr(1, t.length - 2));\n        var node;\n        if (ts) {\n          // Timestamps are lead nodes as well.\n          node = window.document.createProcessingInstruction(\"timestamp\", ts);\n          current.appendChild(node);\n          continue;\n        }\n        var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n        // If we can't parse the tag, skip to the next tag.\n        if (!m) {\n          continue;\n        }\n        // Try to construct an element, and ignore the tag if we couldn't.\n        node = createElement(m[1], m[3]);\n        if (!node) {\n          continue;\n        }\n        // Determine if the tag should be added based on the context of where it\n        // is placed in the cuetext.\n        if (!shouldAdd(current, node)) {\n          continue;\n        }\n        // Set the class list (as a list of classes, separated by space).\n        if (m[2]) {\n          var classes = m[2].split('.');\n          classes.forEach(function (cl) {\n            var bgColor = /^bg_/.test(cl);\n            // slice out `bg_` if it's a background color\n            var colorName = bgColor ? cl.slice(3) : cl;\n            if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n              var propName = bgColor ? 'background-color' : 'color';\n              var propValue = DEFAULT_COLOR_CLASS[colorName];\n              node.style[propName] = propValue;\n            }\n          });\n          node.className = classes.join(' ');\n        }\n        // Append the node to the current node, and enter the scope of the new\n        // node.\n        tagStack.push(m[1]);\n        current.appendChild(node);\n        current = node;\n        continue;\n      }\n\n      // Text nodes are leaf nodes.\n      current.appendChild(window.document.createTextNode(unescape(t)));\n    }\n    return rootDiv;\n  }\n\n  // This is a list of all the Unicode characters that have a strong\n  // right-to-left category. What this means is that these characters are\n  // written right-to-left for sure. It was generated by pulling all the strong\n  // right-to-left characters out of the Unicode data table. That table can\n  // found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\n  var strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6], [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d], [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6], [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5], [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815], [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858], [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f], [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c], [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1], [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc], [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808], [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855], [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f], [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13], [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58], [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72], [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f], [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32], [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42], [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f], [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59], [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62], [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77], [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b], [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n  function isStrongRTLChar(charCode) {\n    for (var i = 0; i < strongRTLRanges.length; i++) {\n      var currentRange = strongRTLRanges[i];\n      if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n        return true;\n      }\n    }\n    return false;\n  }\n  function determineBidi(cueDiv) {\n    var nodeStack = [],\n      text = \"\",\n      charCode;\n    if (!cueDiv || !cueDiv.childNodes) {\n      return \"ltr\";\n    }\n    function pushNodes(nodeStack, node) {\n      for (var i = node.childNodes.length - 1; i >= 0; i--) {\n        nodeStack.push(node.childNodes[i]);\n      }\n    }\n    function nextTextNode(nodeStack) {\n      if (!nodeStack || !nodeStack.length) {\n        return null;\n      }\n      var node = nodeStack.pop(),\n        text = node.textContent || node.innerText;\n      if (text) {\n        // TODO: This should match all unicode type B characters (paragraph\n        // separator characters). See issue #115.\n        var m = text.match(/^.*(\\n|\\r)/);\n        if (m) {\n          nodeStack.length = 0;\n          return m[0];\n        }\n        return text;\n      }\n      if (node.tagName === \"ruby\") {\n        return nextTextNode(nodeStack);\n      }\n      if (node.childNodes) {\n        pushNodes(nodeStack, node);\n        return nextTextNode(nodeStack);\n      }\n    }\n    pushNodes(nodeStack, cueDiv);\n    while (text = nextTextNode(nodeStack)) {\n      for (var i = 0; i < text.length; i++) {\n        charCode = text.charCodeAt(i);\n        if (isStrongRTLChar(charCode)) {\n          return \"rtl\";\n        }\n      }\n    }\n    return \"ltr\";\n  }\n  function computeLinePos(cue) {\n    if (typeof cue.line === \"number\" && (cue.snapToLines || cue.line >= 0 && cue.line <= 100)) {\n      return cue.line;\n    }\n    if (!cue.track || !cue.track.textTrackList || !cue.track.textTrackList.mediaElement) {\n      return -1;\n    }\n    var track = cue.track,\n      trackList = track.textTrackList,\n      count = 0;\n    for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n      if (trackList[i].mode === \"showing\") {\n        count++;\n      }\n    }\n    return ++count * -1;\n  }\n  function StyleBox() {}\n\n  // Apply styles to a div. If there is no div passed then it defaults to the\n  // div on 'this'.\n  StyleBox.prototype.applyStyles = function (styles, div) {\n    div = div || this.div;\n    for (var prop in styles) {\n      if (styles.hasOwnProperty(prop)) {\n        div.style[prop] = styles[prop];\n      }\n    }\n  };\n  StyleBox.prototype.formatStyle = function (val, unit) {\n    return val === 0 ? 0 : val + unit;\n  };\n\n  // Constructs the computed display state of the cue (a div). Places the div\n  // into the overlay which should be a block level element (usually a div).\n  function CueStyleBox(window, cue, styleOptions) {\n    StyleBox.call(this);\n    this.cue = cue;\n\n    // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n    // have inline positioning and will function as the cue background box.\n    this.cueDiv = parseContent(window, cue.text);\n    var styles = {\n      color: \"rgba(255, 255, 255, 1)\",\n      backgroundColor: \"rgba(0, 0, 0, 0.8)\",\n      position: \"relative\",\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0,\n      display: \"inline\",\n      writingMode: cue.vertical === \"\" ? \"horizontal-tb\" : cue.vertical === \"lr\" ? \"vertical-lr\" : \"vertical-rl\",\n      unicodeBidi: \"plaintext\"\n    };\n    this.applyStyles(styles, this.cueDiv);\n\n    // Create an absolutely positioned div that will be used to position the cue\n    // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n    // mirrors of them except middle instead of center on Safari.\n    this.div = window.document.createElement(\"div\");\n    styles = {\n      direction: determineBidi(this.cueDiv),\n      writingMode: cue.vertical === \"\" ? \"horizontal-tb\" : cue.vertical === \"lr\" ? \"vertical-lr\" : \"vertical-rl\",\n      unicodeBidi: \"plaintext\",\n      textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n      font: styleOptions.font,\n      whiteSpace: \"pre-line\",\n      position: \"absolute\"\n    };\n    this.applyStyles(styles);\n    this.div.appendChild(this.cueDiv);\n\n    // Calculate the distance from the reference edge of the viewport to the text\n    // position of the cue box. The reference edge will be resolved later when\n    // the box orientation styles are applied.\n    var textPos = 0;\n    switch (cue.positionAlign) {\n      case \"start\":\n      case \"line-left\":\n        textPos = cue.position;\n        break;\n      case \"center\":\n        textPos = cue.position - cue.size / 2;\n        break;\n      case \"end\":\n      case \"line-right\":\n        textPos = cue.position - cue.size;\n        break;\n    }\n\n    // Horizontal box orientation; textPos is the distance from the left edge of the\n    // area to the left edge of the box and cue.size is the distance extending to\n    // the right from there.\n    if (cue.vertical === \"\") {\n      this.applyStyles({\n        left: this.formatStyle(textPos, \"%\"),\n        width: this.formatStyle(cue.size, \"%\")\n      });\n      // Vertical box orientation; textPos is the distance from the top edge of the\n      // area to the top edge of the box and cue.size is the height extending\n      // downwards from there.\n    } else {\n      this.applyStyles({\n        top: this.formatStyle(textPos, \"%\"),\n        height: this.formatStyle(cue.size, \"%\")\n      });\n    }\n    this.move = function (box) {\n      this.applyStyles({\n        top: this.formatStyle(box.top, \"px\"),\n        bottom: this.formatStyle(box.bottom, \"px\"),\n        left: this.formatStyle(box.left, \"px\"),\n        right: this.formatStyle(box.right, \"px\"),\n        height: this.formatStyle(box.height, \"px\"),\n        width: this.formatStyle(box.width, \"px\")\n      });\n    };\n  }\n  CueStyleBox.prototype = _objCreate(StyleBox.prototype);\n  CueStyleBox.prototype.constructor = CueStyleBox;\n\n  // Represents the co-ordinates of an Element in a way that we can easily\n  // compute things with such as if it overlaps or intersects with another Element.\n  // Can initialize it with either a StyleBox or another BoxPosition.\n  function BoxPosition(obj) {\n    // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n    // was passed in and we need to copy the results of 'getBoundingClientRect'\n    // as the object returned is readonly. All co-ordinate values are in reference\n    // to the viewport origin (top left).\n    var lh, height, width, top;\n    if (obj.div) {\n      height = obj.div.offsetHeight;\n      width = obj.div.offsetWidth;\n      top = obj.div.offsetTop;\n      var rects = (rects = obj.div.childNodes) && (rects = rects[0]) && rects.getClientRects && rects.getClientRects();\n      obj = obj.div.getBoundingClientRect();\n      // In certain cases the outter div will be slightly larger then the sum of\n      // the inner div's lines. This could be due to bold text, etc, on some platforms.\n      // In this case we should get the average line height and use that. This will\n      // result in the desired behaviour.\n      lh = rects ? Math.max(rects[0] && rects[0].height || 0, obj.height / rects.length) : 0;\n    }\n    this.left = obj.left;\n    this.right = obj.right;\n    this.top = obj.top || top;\n    this.height = obj.height || height;\n    this.bottom = obj.bottom || top + (obj.height || height);\n    this.width = obj.width || width;\n    this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n  }\n\n  // Move the box along a particular axis. Optionally pass in an amount to move\n  // the box. If no amount is passed then the default is the line height of the\n  // box.\n  BoxPosition.prototype.move = function (axis, toMove) {\n    toMove = toMove !== undefined ? toMove : this.lineHeight;\n    switch (axis) {\n      case \"+x\":\n        this.left += toMove;\n        this.right += toMove;\n        break;\n      case \"-x\":\n        this.left -= toMove;\n        this.right -= toMove;\n        break;\n      case \"+y\":\n        this.top += toMove;\n        this.bottom += toMove;\n        break;\n      case \"-y\":\n        this.top -= toMove;\n        this.bottom -= toMove;\n        break;\n    }\n  };\n\n  // Check if this box overlaps another box, b2.\n  BoxPosition.prototype.overlaps = function (b2) {\n    return this.left < b2.right && this.right > b2.left && this.top < b2.bottom && this.bottom > b2.top;\n  };\n\n  // Check if this box overlaps any other boxes in boxes.\n  BoxPosition.prototype.overlapsAny = function (boxes) {\n    for (var i = 0; i < boxes.length; i++) {\n      if (this.overlaps(boxes[i])) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  // Check if this box is within another box.\n  BoxPosition.prototype.within = function (container) {\n    return this.top >= container.top && this.bottom <= container.bottom && this.left >= container.left && this.right <= container.right;\n  };\n\n  // Check if this box is entirely within the container or it is overlapping\n  // on the edge opposite of the axis direction passed. For example, if \"+x\" is\n  // passed and the box is overlapping on the left edge of the container, then\n  // return true.\n  BoxPosition.prototype.overlapsOppositeAxis = function (container, axis) {\n    switch (axis) {\n      case \"+x\":\n        return this.left < container.left;\n      case \"-x\":\n        return this.right > container.right;\n      case \"+y\":\n        return this.top < container.top;\n      case \"-y\":\n        return this.bottom > container.bottom;\n    }\n  };\n\n  // Find the percentage of the area that this box is overlapping with another\n  // box.\n  BoxPosition.prototype.intersectPercentage = function (b2) {\n    var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n      y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n      intersectArea = x * y;\n    return intersectArea / (this.height * this.width);\n  };\n\n  // Convert the positions from this box to CSS compatible positions using\n  // the reference container's positions. This has to be done because this\n  // box's positions are in reference to the viewport origin, whereas, CSS\n  // values are in referecne to their respective edges.\n  BoxPosition.prototype.toCSSCompatValues = function (reference) {\n    return {\n      top: this.top - reference.top,\n      bottom: reference.bottom - this.bottom,\n      left: this.left - reference.left,\n      right: reference.right - this.right,\n      height: this.height,\n      width: this.width\n    };\n  };\n\n  // Get an object that represents the box's position without anything extra.\n  // Can pass a StyleBox, HTMLElement, or another BoxPositon.\n  BoxPosition.getSimpleBoxPosition = function (obj) {\n    var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n    var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n    var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n    obj = obj.div ? obj.div.getBoundingClientRect() : obj.tagName ? obj.getBoundingClientRect() : obj;\n    var ret = {\n      left: obj.left,\n      right: obj.right,\n      top: obj.top || top,\n      height: obj.height || height,\n      bottom: obj.bottom || top + (obj.height || height),\n      width: obj.width || width\n    };\n    return ret;\n  };\n\n  // Move a StyleBox to its specified, or next best, position. The containerBox\n  // is the box that contains the StyleBox, such as a div. boxPositions are\n  // a list of other boxes that the styleBox can't overlap with.\n  function moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n    // Find the best position for a cue box, b, on the video. The axis parameter\n    // is a list of axis, the order of which, it will move the box along. For example:\n    // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n    // direction. If it doesn't find a good position for it there it will then move\n    // it along the x axis in the negative direction.\n    function findBestPosition(b, axis) {\n      var bestPosition,\n        specifiedPosition = new BoxPosition(b),\n        percentage = 1; // Highest possible so the first thing we get is better.\n\n      for (var i = 0; i < axis.length; i++) {\n        while (b.overlapsOppositeAxis(containerBox, axis[i]) || b.within(containerBox) && b.overlapsAny(boxPositions)) {\n          b.move(axis[i]);\n        }\n        // We found a spot where we aren't overlapping anything. This is our\n        // best position.\n        if (b.within(containerBox)) {\n          return b;\n        }\n        var p = b.intersectPercentage(containerBox);\n        // If we're outside the container box less then we were on our last try\n        // then remember this position as the best position.\n        if (percentage > p) {\n          bestPosition = new BoxPosition(b);\n          percentage = p;\n        }\n        // Reset the box position to the specified position.\n        b = new BoxPosition(specifiedPosition);\n      }\n      return bestPosition || specifiedPosition;\n    }\n    var boxPosition = new BoxPosition(styleBox),\n      cue = styleBox.cue,\n      linePos = computeLinePos(cue),\n      axis = [];\n\n    // If we have a line number to align the cue to.\n    if (cue.snapToLines) {\n      var size;\n      switch (cue.vertical) {\n        case \"\":\n          axis = [\"+y\", \"-y\"];\n          size = \"height\";\n          break;\n        case \"rl\":\n          axis = [\"+x\", \"-x\"];\n          size = \"width\";\n          break;\n        case \"lr\":\n          axis = [\"-x\", \"+x\"];\n          size = \"width\";\n          break;\n      }\n      var step = boxPosition.lineHeight,\n        position = step * Math.round(linePos),\n        maxPosition = containerBox[size] + step,\n        initialAxis = axis[0];\n\n      // If the specified intial position is greater then the max position then\n      // clamp the box to the amount of steps it would take for the box to\n      // reach the max position.\n      if (Math.abs(position) > maxPosition) {\n        position = position < 0 ? -1 : 1;\n        position *= Math.ceil(maxPosition / step) * step;\n      }\n\n      // If computed line position returns negative then line numbers are\n      // relative to the bottom of the video instead of the top. Therefore, we\n      // need to increase our initial position by the length or width of the\n      // video, depending on the writing direction, and reverse our axis directions.\n      if (linePos < 0) {\n        position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n        axis = axis.reverse();\n      }\n\n      // Move the box to the specified position. This may not be its best\n      // position.\n      boxPosition.move(initialAxis, position);\n    } else {\n      // If we have a percentage line value for the cue.\n      var calculatedPercentage = boxPosition.lineHeight / containerBox.height * 100;\n      switch (cue.lineAlign) {\n        case \"center\":\n          linePos -= calculatedPercentage / 2;\n          break;\n        case \"end\":\n          linePos -= calculatedPercentage;\n          break;\n      }\n\n      // Apply initial line position to the cue box.\n      switch (cue.vertical) {\n        case \"\":\n          styleBox.applyStyles({\n            top: styleBox.formatStyle(linePos, \"%\")\n          });\n          break;\n        case \"rl\":\n          styleBox.applyStyles({\n            left: styleBox.formatStyle(linePos, \"%\")\n          });\n          break;\n        case \"lr\":\n          styleBox.applyStyles({\n            right: styleBox.formatStyle(linePos, \"%\")\n          });\n          break;\n      }\n      axis = [\"+y\", \"-x\", \"+x\", \"-y\"];\n\n      // Get the box position again after we've applied the specified positioning\n      // to it.\n      boxPosition = new BoxPosition(styleBox);\n    }\n    var bestPosition = findBestPosition(boxPosition, axis);\n    styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n  }\n  function WebVTT$1() {\n    // Nothing\n  }\n\n  // Helper to allow strings to be decoded instead of the default binary utf8 data.\n  WebVTT$1.StringDecoder = function () {\n    return {\n      decode: function (data) {\n        if (!data) {\n          return \"\";\n        }\n        if (typeof data !== \"string\") {\n          throw new Error(\"Error - expected string data.\");\n        }\n        return decodeURIComponent(encodeURIComponent(data));\n      }\n    };\n  };\n  WebVTT$1.convertCueToDOMTree = function (window, cuetext) {\n    if (!window || !cuetext) {\n      return null;\n    }\n    return parseContent(window, cuetext);\n  };\n  var FONT_SIZE_PERCENT = 0.05;\n  var FONT_STYLE = \"sans-serif\";\n  var CUE_BACKGROUND_PADDING = \"1.5%\";\n\n  // Runs the processing model over the cues and regions passed to it.\n  // @param overlay A block level element (usually a div) that the computed cues\n  //                and regions will be placed into.\n  WebVTT$1.processCues = function (window, cues, overlay) {\n    if (!window || !cues || !overlay) {\n      return null;\n    }\n\n    // Remove all previous children.\n    while (overlay.firstChild) {\n      overlay.removeChild(overlay.firstChild);\n    }\n    var paddedOverlay = window.document.createElement(\"div\");\n    paddedOverlay.style.position = \"absolute\";\n    paddedOverlay.style.left = \"0\";\n    paddedOverlay.style.right = \"0\";\n    paddedOverlay.style.top = \"0\";\n    paddedOverlay.style.bottom = \"0\";\n    paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n    overlay.appendChild(paddedOverlay);\n\n    // Determine if we need to compute the display states of the cues. This could\n    // be the case if a cue's state has been changed since the last computation or\n    // if it has not been computed yet.\n    function shouldCompute(cues) {\n      for (var i = 0; i < cues.length; i++) {\n        if (cues[i].hasBeenReset || !cues[i].displayState) {\n          return true;\n        }\n      }\n      return false;\n    }\n\n    // We don't need to recompute the cues' display states. Just reuse them.\n    if (!shouldCompute(cues)) {\n      for (var i = 0; i < cues.length; i++) {\n        paddedOverlay.appendChild(cues[i].displayState);\n      }\n      return;\n    }\n    var boxPositions = [],\n      containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n      fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n    var styleOptions = {\n      font: fontSize + \"px \" + FONT_STYLE\n    };\n    (function () {\n      var styleBox, cue;\n      for (var i = 0; i < cues.length; i++) {\n        cue = cues[i];\n\n        // Compute the intial position and styles of the cue div.\n        styleBox = new CueStyleBox(window, cue, styleOptions);\n        paddedOverlay.appendChild(styleBox.div);\n\n        // Move the cue div to it's correct line position.\n        moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n        // Remember the computed div so that we don't have to recompute it later\n        // if we don't have too.\n        cue.displayState = styleBox.div;\n        boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n      }\n    })();\n  };\n  WebVTT$1.Parser = function (window, vttjs, decoder) {\n    if (!decoder) {\n      decoder = vttjs;\n      vttjs = {};\n    }\n    if (!vttjs) {\n      vttjs = {};\n    }\n    this.window = window;\n    this.vttjs = vttjs;\n    this.state = \"INITIAL\";\n    this.buffer = \"\";\n    this.decoder = decoder || new TextDecoder(\"utf8\");\n    this.regionList = [];\n  };\n  WebVTT$1.Parser.prototype = {\n    // If the error is a ParsingError then report it to the consumer if\n    // possible. If it's not a ParsingError then throw it like normal.\n    reportOrThrowError: function (e) {\n      if (e instanceof ParsingError) {\n        this.onparsingerror && this.onparsingerror(e);\n      } else {\n        throw e;\n      }\n    },\n    parse: function (data) {\n      var self = this;\n\n      // If there is no data then we won't decode it, but will just try to parse\n      // whatever is in buffer already. This may occur in circumstances, for\n      // example when flush() is called.\n      if (data) {\n        // Try to decode the data that we received.\n        self.buffer += self.decoder.decode(data, {\n          stream: true\n        });\n      }\n      function collectNextLine() {\n        var buffer = self.buffer;\n        var pos = 0;\n        while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n          ++pos;\n        }\n        var line = buffer.substr(0, pos);\n        // Advance the buffer early in case we fail below.\n        if (buffer[pos] === '\\r') {\n          ++pos;\n        }\n        if (buffer[pos] === '\\n') {\n          ++pos;\n        }\n        self.buffer = buffer.substr(pos);\n        return line;\n      }\n\n      // 3.4 WebVTT region and WebVTT region settings syntax\n      function parseRegion(input) {\n        var settings = new Settings();\n        parseOptions(input, function (k, v) {\n          switch (k) {\n            case \"id\":\n              settings.set(k, v);\n              break;\n            case \"width\":\n              settings.percent(k, v);\n              break;\n            case \"lines\":\n              settings.integer(k, v);\n              break;\n            case \"regionanchor\":\n            case \"viewportanchor\":\n              var xy = v.split(',');\n              if (xy.length !== 2) {\n                break;\n              }\n              // We have to make sure both x and y parse, so use a temporary\n              // settings object here.\n              var anchor = new Settings();\n              anchor.percent(\"x\", xy[0]);\n              anchor.percent(\"y\", xy[1]);\n              if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n                break;\n              }\n              settings.set(k + \"X\", anchor.get(\"x\"));\n              settings.set(k + \"Y\", anchor.get(\"y\"));\n              break;\n            case \"scroll\":\n              settings.alt(k, v, [\"up\"]);\n              break;\n          }\n        }, /=/, /\\s/);\n\n        // Create the region, using default values for any values that were not\n        // specified.\n        if (settings.has(\"id\")) {\n          var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n          region.width = settings.get(\"width\", 100);\n          region.lines = settings.get(\"lines\", 3);\n          region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n          region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n          region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n          region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n          region.scroll = settings.get(\"scroll\", \"\");\n          // Register the region.\n          self.onregion && self.onregion(region);\n          // Remember the VTTRegion for later in case we parse any VTTCues that\n          // reference it.\n          self.regionList.push({\n            id: settings.get(\"id\"),\n            region: region\n          });\n        }\n      }\n\n      // draft-pantos-http-live-streaming-20\n      // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n      // 3.5 WebVTT\n      function parseTimestampMap(input) {\n        var settings = new Settings();\n        parseOptions(input, function (k, v) {\n          switch (k) {\n            case \"MPEGT\":\n              settings.integer(k + 'S', v);\n              break;\n            case \"LOCA\":\n              settings.set(k + 'L', parseTimeStamp(v));\n              break;\n          }\n        }, /[^\\d]:/, /,/);\n        self.ontimestampmap && self.ontimestampmap({\n          \"MPEGTS\": settings.get(\"MPEGTS\"),\n          \"LOCAL\": settings.get(\"LOCAL\")\n        });\n      }\n\n      // 3.2 WebVTT metadata header syntax\n      function parseHeader(input) {\n        if (input.match(/X-TIMESTAMP-MAP/)) {\n          // This line contains HLS X-TIMESTAMP-MAP metadata\n          parseOptions(input, function (k, v) {\n            switch (k) {\n              case \"X-TIMESTAMP-MAP\":\n                parseTimestampMap(v);\n                break;\n            }\n          }, /=/);\n        } else {\n          parseOptions(input, function (k, v) {\n            switch (k) {\n              case \"Region\":\n                // 3.3 WebVTT region metadata header syntax\n                parseRegion(v);\n                break;\n            }\n          }, /:/);\n        }\n      }\n\n      // 5.1 WebVTT file parsing.\n      try {\n        var line;\n        if (self.state === \"INITIAL\") {\n          // We can't start parsing until we have the first line.\n          if (!/\\r\\n|\\n/.test(self.buffer)) {\n            return this;\n          }\n          line = collectNextLine();\n          var m = line.match(/^WEBVTT([ \\t].*)?$/);\n          if (!m || !m[0]) {\n            throw new ParsingError(ParsingError.Errors.BadSignature);\n          }\n          self.state = \"HEADER\";\n        }\n        var alreadyCollectedLine = false;\n        while (self.buffer) {\n          // We can't parse a line until we have the full line.\n          if (!/\\r\\n|\\n/.test(self.buffer)) {\n            return this;\n          }\n          if (!alreadyCollectedLine) {\n            line = collectNextLine();\n          } else {\n            alreadyCollectedLine = false;\n          }\n          switch (self.state) {\n            case \"HEADER\":\n              // 13-18 - Allow a header (metadata) under the WEBVTT line.\n              if (/:/.test(line)) {\n                parseHeader(line);\n              } else if (!line) {\n                // An empty line terminates the header and starts the body (cues).\n                self.state = \"ID\";\n              }\n              continue;\n            case \"NOTE\":\n              // Ignore NOTE blocks.\n              if (!line) {\n                self.state = \"ID\";\n              }\n              continue;\n            case \"ID\":\n              // Check for the start of NOTE blocks.\n              if (/^NOTE($|[ \\t])/.test(line)) {\n                self.state = \"NOTE\";\n                break;\n              }\n              // 19-29 - Allow any number of line terminators, then initialize new cue values.\n              if (!line) {\n                continue;\n              }\n              self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n              // Safari still uses the old middle value and won't accept center\n              try {\n                self.cue.align = \"center\";\n              } catch (e) {\n                self.cue.align = \"middle\";\n              }\n              self.state = \"CUE\";\n              // 30-39 - Check if self line contains an optional identifier or timing data.\n              if (line.indexOf(\"-->\") === -1) {\n                self.cue.id = line;\n                continue;\n              }\n            // Process line as start of a cue.\n            /*falls through*/\n            case \"CUE\":\n              // 40 - Collect cue timings and settings.\n              try {\n                parseCue(line, self.cue, self.regionList);\n              } catch (e) {\n                self.reportOrThrowError(e);\n                // In case of an error ignore rest of the cue.\n                self.cue = null;\n                self.state = \"BADCUE\";\n                continue;\n              }\n              self.state = \"CUETEXT\";\n              continue;\n            case \"CUETEXT\":\n              var hasSubstring = line.indexOf(\"-->\") !== -1;\n              // 34 - If we have an empty line then report the cue.\n              // 35 - If we have the special substring '-->' then report the cue,\n              // but do not collect the line as we need to process the current\n              // one as a new cue.\n              if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n                // We are done parsing self cue.\n                self.oncue && self.oncue(self.cue);\n                self.cue = null;\n                self.state = \"ID\";\n                continue;\n              }\n              if (self.cue.text) {\n                self.cue.text += \"\\n\";\n              }\n              self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n              continue;\n            case \"BADCUE\":\n              // BADCUE\n              // 54-62 - Collect and discard the remaining cue.\n              if (!line) {\n                self.state = \"ID\";\n              }\n              continue;\n          }\n        }\n      } catch (e) {\n        self.reportOrThrowError(e);\n\n        // If we are currently parsing a cue, report what we have.\n        if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n          self.oncue(self.cue);\n        }\n        self.cue = null;\n        // Enter BADWEBVTT state if header was not parsed correctly otherwise\n        // another exception occurred so enter BADCUE state.\n        self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n      }\n      return this;\n    },\n    flush: function () {\n      var self = this;\n      try {\n        // Finish decoding the stream.\n        self.buffer += self.decoder.decode();\n        // Synthesize the end of the current cue or region.\n        if (self.cue || self.state === \"HEADER\") {\n          self.buffer += \"\\n\\n\";\n          self.parse();\n        }\n        // If we've flushed, parsed, and we're still on the INITIAL state then\n        // that means we don't have enough of the stream to parse the first\n        // line.\n        if (self.state === \"INITIAL\") {\n          throw new ParsingError(ParsingError.Errors.BadSignature);\n        }\n      } catch (e) {\n        self.reportOrThrowError(e);\n      }\n      self.onflush && self.onflush();\n      return this;\n    }\n  };\n  var vtt = WebVTT$1;\n\n  /**\n   * Copyright 2013 vtt.js Contributors\n   *\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\n   * you may not use this file except in compliance with the License.\n   * You may obtain a copy of the License at\n   *\n   *   http://www.apache.org/licenses/LICENSE-2.0\n   *\n   * Unless required by applicable law or agreed to in writing, software\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   * See the License for the specific language governing permissions and\n   * limitations under the License.\n   */\n\n  var autoKeyword = \"auto\";\n  var directionSetting = {\n    \"\": 1,\n    \"lr\": 1,\n    \"rl\": 1\n  };\n  var alignSetting = {\n    \"start\": 1,\n    \"center\": 1,\n    \"end\": 1,\n    \"left\": 1,\n    \"right\": 1,\n    \"auto\": 1,\n    \"line-left\": 1,\n    \"line-right\": 1\n  };\n  function findDirectionSetting(value) {\n    if (typeof value !== \"string\") {\n      return false;\n    }\n    var dir = directionSetting[value.toLowerCase()];\n    return dir ? value.toLowerCase() : false;\n  }\n  function findAlignSetting(value) {\n    if (typeof value !== \"string\") {\n      return false;\n    }\n    var align = alignSetting[value.toLowerCase()];\n    return align ? value.toLowerCase() : false;\n  }\n  function VTTCue(startTime, endTime, text) {\n    /**\n     * Shim implementation specific properties. These properties are not in\n     * the spec.\n     */\n\n    // Lets us know when the VTTCue's data has changed in such a way that we need\n    // to recompute its display state. This lets us compute its display state\n    // lazily.\n    this.hasBeenReset = false;\n\n    /**\n     * VTTCue and TextTrackCue properties\n     * http://dev.w3.org/html5/webvtt/#vttcue-interface\n     */\n\n    var _id = \"\";\n    var _pauseOnExit = false;\n    var _startTime = startTime;\n    var _endTime = endTime;\n    var _text = text;\n    var _region = null;\n    var _vertical = \"\";\n    var _snapToLines = true;\n    var _line = \"auto\";\n    var _lineAlign = \"start\";\n    var _position = \"auto\";\n    var _positionAlign = \"auto\";\n    var _size = 100;\n    var _align = \"center\";\n    Object.defineProperties(this, {\n      \"id\": {\n        enumerable: true,\n        get: function () {\n          return _id;\n        },\n        set: function (value) {\n          _id = \"\" + value;\n        }\n      },\n      \"pauseOnExit\": {\n        enumerable: true,\n        get: function () {\n          return _pauseOnExit;\n        },\n        set: function (value) {\n          _pauseOnExit = !!value;\n        }\n      },\n      \"startTime\": {\n        enumerable: true,\n        get: function () {\n          return _startTime;\n        },\n        set: function (value) {\n          if (typeof value !== \"number\") {\n            throw new TypeError(\"Start time must be set to a number.\");\n          }\n          _startTime = value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"endTime\": {\n        enumerable: true,\n        get: function () {\n          return _endTime;\n        },\n        set: function (value) {\n          if (typeof value !== \"number\") {\n            throw new TypeError(\"End time must be set to a number.\");\n          }\n          _endTime = value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"text\": {\n        enumerable: true,\n        get: function () {\n          return _text;\n        },\n        set: function (value) {\n          _text = \"\" + value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"region\": {\n        enumerable: true,\n        get: function () {\n          return _region;\n        },\n        set: function (value) {\n          _region = value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"vertical\": {\n        enumerable: true,\n        get: function () {\n          return _vertical;\n        },\n        set: function (value) {\n          var setting = findDirectionSetting(value);\n          // Have to check for false because the setting an be an empty string.\n          if (setting === false) {\n            throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n          }\n          _vertical = setting;\n          this.hasBeenReset = true;\n        }\n      },\n      \"snapToLines\": {\n        enumerable: true,\n        get: function () {\n          return _snapToLines;\n        },\n        set: function (value) {\n          _snapToLines = !!value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"line\": {\n        enumerable: true,\n        get: function () {\n          return _line;\n        },\n        set: function (value) {\n          if (typeof value !== \"number\" && value !== autoKeyword) {\n            throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n          }\n          _line = value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"lineAlign\": {\n        enumerable: true,\n        get: function () {\n          return _lineAlign;\n        },\n        set: function (value) {\n          var setting = findAlignSetting(value);\n          if (!setting) {\n            console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n          } else {\n            _lineAlign = setting;\n            this.hasBeenReset = true;\n          }\n        }\n      },\n      \"position\": {\n        enumerable: true,\n        get: function () {\n          return _position;\n        },\n        set: function (value) {\n          if (value < 0 || value > 100) {\n            throw new Error(\"Position must be between 0 and 100.\");\n          }\n          _position = value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"positionAlign\": {\n        enumerable: true,\n        get: function () {\n          return _positionAlign;\n        },\n        set: function (value) {\n          var setting = findAlignSetting(value);\n          if (!setting) {\n            console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n          } else {\n            _positionAlign = setting;\n            this.hasBeenReset = true;\n          }\n        }\n      },\n      \"size\": {\n        enumerable: true,\n        get: function () {\n          return _size;\n        },\n        set: function (value) {\n          if (value < 0 || value > 100) {\n            throw new Error(\"Size must be between 0 and 100.\");\n          }\n          _size = value;\n          this.hasBeenReset = true;\n        }\n      },\n      \"align\": {\n        enumerable: true,\n        get: function () {\n          return _align;\n        },\n        set: function (value) {\n          var setting = findAlignSetting(value);\n          if (!setting) {\n            throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n          }\n          _align = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    });\n\n    /**\n     * Other <track> spec defined properties\n     */\n\n    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n    this.displayState = undefined;\n  }\n\n  /**\n   * VTTCue methods\n   */\n\n  VTTCue.prototype.getCueAsHTML = function () {\n    // Assume WebVTT.convertCueToDOMTree is on the global.\n    return WebVTT.convertCueToDOMTree(window, this.text);\n  };\n  var vttcue = VTTCue;\n\n  /**\n   * Copyright 2013 vtt.js Contributors\n   *\n   * Licensed under the Apache License, Version 2.0 (the \"License\");\n   * you may not use this file except in compliance with the License.\n   * You may obtain a copy of the License at\n   *\n   *   http://www.apache.org/licenses/LICENSE-2.0\n   *\n   * Unless required by applicable law or agreed to in writing, software\n   * distributed under the License is distributed on an \"AS IS\" BASIS,\n   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   * See the License for the specific language governing permissions and\n   * limitations under the License.\n   */\n\n  var scrollSetting = {\n    \"\": true,\n    \"up\": true\n  };\n  function findScrollSetting(value) {\n    if (typeof value !== \"string\") {\n      return false;\n    }\n    var scroll = scrollSetting[value.toLowerCase()];\n    return scroll ? value.toLowerCase() : false;\n  }\n  function isValidPercentValue(value) {\n    return typeof value === \"number\" && value >= 0 && value <= 100;\n  }\n\n  // VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\n  function VTTRegion() {\n    var _width = 100;\n    var _lines = 3;\n    var _regionAnchorX = 0;\n    var _regionAnchorY = 100;\n    var _viewportAnchorX = 0;\n    var _viewportAnchorY = 100;\n    var _scroll = \"\";\n    Object.defineProperties(this, {\n      \"width\": {\n        enumerable: true,\n        get: function () {\n          return _width;\n        },\n        set: function (value) {\n          if (!isValidPercentValue(value)) {\n            throw new Error(\"Width must be between 0 and 100.\");\n          }\n          _width = value;\n        }\n      },\n      \"lines\": {\n        enumerable: true,\n        get: function () {\n          return _lines;\n        },\n        set: function (value) {\n          if (typeof value !== \"number\") {\n            throw new TypeError(\"Lines must be set to a number.\");\n          }\n          _lines = value;\n        }\n      },\n      \"regionAnchorY\": {\n        enumerable: true,\n        get: function () {\n          return _regionAnchorY;\n        },\n        set: function (value) {\n          if (!isValidPercentValue(value)) {\n            throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n          }\n          _regionAnchorY = value;\n        }\n      },\n      \"regionAnchorX\": {\n        enumerable: true,\n        get: function () {\n          return _regionAnchorX;\n        },\n        set: function (value) {\n          if (!isValidPercentValue(value)) {\n            throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n          }\n          _regionAnchorX = value;\n        }\n      },\n      \"viewportAnchorY\": {\n        enumerable: true,\n        get: function () {\n          return _viewportAnchorY;\n        },\n        set: function (value) {\n          if (!isValidPercentValue(value)) {\n            throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n          }\n          _viewportAnchorY = value;\n        }\n      },\n      \"viewportAnchorX\": {\n        enumerable: true,\n        get: function () {\n          return _viewportAnchorX;\n        },\n        set: function (value) {\n          if (!isValidPercentValue(value)) {\n            throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n          }\n          _viewportAnchorX = value;\n        }\n      },\n      \"scroll\": {\n        enumerable: true,\n        get: function () {\n          return _scroll;\n        },\n        set: function (value) {\n          var setting = findScrollSetting(value);\n          // Have to check for false as an empty string is a legal value.\n          if (setting === false) {\n            console.warn(\"Scroll: an invalid or illegal string was specified.\");\n          } else {\n            _scroll = setting;\n          }\n        }\n      }\n    });\n  }\n  var vttregion = VTTRegion;\n\n  var browserIndex = createCommonjsModule(function (module) {\n    /**\n     * Copyright 2013 vtt.js Contributors\n     *\n     * Licensed under the Apache License, Version 2.0 (the \"License\");\n     * you may not use this file except in compliance with the License.\n     * You may obtain a copy of the License at\n     *\n     *   http://www.apache.org/licenses/LICENSE-2.0\n     *\n     * Unless required by applicable law or agreed to in writing, software\n     * distributed under the License is distributed on an \"AS IS\" BASIS,\n     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     * See the License for the specific language governing permissions and\n     * limitations under the License.\n     */\n\n    // Default exports for Node. Export the extended versions of VTTCue and\n    // VTTRegion in Node since we likely want the capability to convert back and\n    // forth between JSON. If we don't then it's not that big of a deal since we're\n    // off browser.\n\n    var vttjs = module.exports = {\n      WebVTT: vtt,\n      VTTCue: vttcue,\n      VTTRegion: vttregion\n    };\n    window_1.vttjs = vttjs;\n    window_1.WebVTT = vttjs.WebVTT;\n    var cueShim = vttjs.VTTCue;\n    var regionShim = vttjs.VTTRegion;\n    var nativeVTTCue = window_1.VTTCue;\n    var nativeVTTRegion = window_1.VTTRegion;\n    vttjs.shim = function () {\n      window_1.VTTCue = cueShim;\n      window_1.VTTRegion = regionShim;\n    };\n    vttjs.restore = function () {\n      window_1.VTTCue = nativeVTTCue;\n      window_1.VTTRegion = nativeVTTRegion;\n    };\n    if (!window_1.VTTCue) {\n      vttjs.shim();\n    }\n  });\n  browserIndex.WebVTT;\n  browserIndex.VTTCue;\n  browserIndex.VTTRegion;\n\n  /**\n   * @file tech.js\n   */\n\n  /** @import { TimeRange } from '../utils/time' */\n\n  /**\n   * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\n   * that just contains the src url alone.\n   * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\n     * `var SourceString = 'http://example.com/some-video.mp4';`\n   *\n   * @typedef {Object|string} SourceObject\n   *\n   * @property {string} src\n   *           The url to the source\n   *\n   * @property {string} type\n   *           The mime type of the source\n   */\n\n  /**\n   * A function used by {@link Tech} to create a new {@link TextTrack}.\n   *\n   * @private\n   *\n   * @param {Tech} self\n   *        An instance of the Tech class.\n   *\n   * @param {string} kind\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n   *\n   * @param {string} [label]\n   *        Label to identify the text track\n   *\n   * @param {string} [language]\n   *        Two letter language abbreviation\n   *\n   * @param {Object} [options={}]\n   *        An object with additional text track options\n   *\n   * @return {TextTrack}\n   *          The text track that was created.\n   */\n  function createTrackHelper(self, kind, label, language, options = {}) {\n    const tracks = self.textTracks();\n    options.kind = kind;\n    if (label) {\n      options.label = label;\n    }\n    if (language) {\n      options.language = language;\n    }\n    options.tech = self;\n    const track = new ALL.text.TrackClass(options);\n    tracks.addTrack(track);\n    return track;\n  }\n\n  /**\n   * This is the base class for media playback technology controllers, such as\n   * {@link HTML5}\n   *\n   * @extends Component\n   */\n  class Tech extends Component$1 {\n    /**\n    * Create an instance of this Tech.\n    *\n    * @param {Object} [options]\n    *        The key/value store of player options.\n    *\n    * @param {Function} [ready]\n    *        Callback function to call when the `HTML5` Tech is ready.\n    */\n    constructor(options = {}, ready = function () {}) {\n      // we don't want the tech to report user activity automatically.\n      // This is done manually in addControlsListeners\n      options.reportTouchActivity = false;\n      super(null, options, ready);\n      this.onDurationChange_ = e => this.onDurationChange(e);\n      this.trackProgress_ = e => this.trackProgress(e);\n      this.trackCurrentTime_ = e => this.trackCurrentTime(e);\n      this.stopTrackingCurrentTime_ = e => this.stopTrackingCurrentTime(e);\n      this.disposeSourceHandler_ = e => this.disposeSourceHandler(e);\n      this.queuedHanders_ = new Set();\n\n      // keep track of whether the current source has played at all to\n      // implement a very limited played()\n      this.hasStarted_ = false;\n      this.on('playing', function () {\n        this.hasStarted_ = true;\n      });\n      this.on('loadstart', function () {\n        this.hasStarted_ = false;\n      });\n      ALL.names.forEach(name => {\n        const props = ALL[name];\n        if (options && options[props.getterName]) {\n          this[props.privateName] = options[props.getterName];\n        }\n      });\n\n      // Manually track progress in cases where the browser/tech doesn't report it.\n      if (!this.featuresProgressEvents) {\n        this.manualProgressOn();\n      }\n\n      // Manually track timeupdates in cases where the browser/tech doesn't report it.\n      if (!this.featuresTimeupdateEvents) {\n        this.manualTimeUpdatesOn();\n      }\n      ['Text', 'Audio', 'Video'].forEach(track => {\n        if (options[`native${track}Tracks`] === false) {\n          this[`featuresNative${track}Tracks`] = false;\n        }\n      });\n      if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n        this.featuresNativeTextTracks = false;\n      } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n        this.featuresNativeTextTracks = true;\n      }\n      if (!this.featuresNativeTextTracks) {\n        this.emulateTextTracks();\n      }\n      this.preloadTextTracks = options.preloadTextTracks !== false;\n      this.autoRemoteTextTracks_ = new ALL.text.ListClass();\n      this.initTrackListeners();\n\n      // Turn on component tap events only if not using native controls\n      if (!options.nativeControlsForTouch) {\n        this.emitTapEvents();\n      }\n      if (this.constructor) {\n        this.name_ = this.constructor.name || 'Unknown Tech';\n      }\n    }\n\n    /**\n     * A special function to trigger source set in a way that will allow player\n     * to re-trigger if the player or tech are not ready yet.\n     *\n     * @fires Tech#sourceset\n     * @param {string} src The source string at the time of the source changing.\n     */\n    triggerSourceset(src) {\n      if (!this.isReady_) {\n        // on initial ready we have to trigger source set\n        // 1ms after ready so that player can watch for it.\n        this.one('ready', () => this.setTimeout(() => this.triggerSourceset(src), 1));\n      }\n\n      /**\n       * Fired when the source is set on the tech causing the media element\n       * to reload.\n       *\n       * @see {@link Player#event:sourceset}\n       * @event Tech#sourceset\n       * @type {Event}\n       */\n      this.trigger({\n        src,\n        type: 'sourceset'\n      });\n    }\n\n    /* Fallbacks for unsupported event types\n    ================================================================================ */\n\n    /**\n     * Polyfill the `progress` event for browsers that don't support it natively.\n     *\n     * @see {@link Tech#trackProgress}\n     */\n    manualProgressOn() {\n      this.on('durationchange', this.onDurationChange_);\n      this.manualProgress = true;\n\n      // Trigger progress watching when a source begins loading\n      this.one('ready', this.trackProgress_);\n    }\n\n    /**\n     * Turn off the polyfill for `progress` events that was created in\n     * {@link Tech#manualProgressOn}\n     */\n    manualProgressOff() {\n      this.manualProgress = false;\n      this.stopTrackingProgress();\n      this.off('durationchange', this.onDurationChange_);\n    }\n\n    /**\n     * This is used to trigger a `progress` event when the buffered percent changes. It\n     * sets an interval function that will be called every 500 milliseconds to check if the\n     * buffer end percent has changed.\n     *\n     * > This function is called by {@link Tech#manualProgressOn}\n     *\n     * @param {Event} event\n     *        The `ready` event that caused this to run.\n     *\n     * @listens Tech#ready\n     * @fires Tech#progress\n     */\n    trackProgress(event) {\n      this.stopTrackingProgress();\n      this.progressInterval = this.setInterval(bind_(this, function () {\n        // Don't trigger unless buffered amount is greater than last time\n\n        const numBufferedPercent = this.bufferedPercent();\n        if (this.bufferedPercent_ !== numBufferedPercent) {\n          /**\n           * See {@link Player#progress}\n           *\n           * @event Tech#progress\n           * @type {Event}\n           */\n          this.trigger('progress');\n        }\n        this.bufferedPercent_ = numBufferedPercent;\n        if (numBufferedPercent === 1) {\n          this.stopTrackingProgress();\n        }\n      }), 500);\n    }\n\n    /**\n     * Update our internal duration on a `durationchange` event by calling\n     * {@link Tech#duration}.\n     *\n     * @param {Event} event\n     *        The `durationchange` event that caused this to run.\n     *\n     * @listens Tech#durationchange\n     */\n    onDurationChange(event) {\n      this.duration_ = this.duration();\n    }\n\n    /**\n     * Get and create a `TimeRange` object for buffering.\n     *\n     * @return {TimeRange}\n     *         The time range object that was created.\n     */\n    buffered() {\n      return createTimeRanges$1(0, 0);\n    }\n\n    /**\n     * Get the percentage of the current video that is currently buffered.\n     *\n     * @return {number}\n     *         A number from 0 to 1 that represents the decimal percentage of the\n     *         video that is buffered.\n     *\n     */\n    bufferedPercent() {\n      return bufferedPercent(this.buffered(), this.duration_);\n    }\n\n    /**\n     * Turn off the polyfill for `progress` events that was created in\n     * {@link Tech#manualProgressOn}\n     * Stop manually tracking progress events by clearing the interval that was set in\n     * {@link Tech#trackProgress}.\n     */\n    stopTrackingProgress() {\n      this.clearInterval(this.progressInterval);\n    }\n\n    /**\n     * Polyfill the `timeupdate` event for browsers that don't support it.\n     *\n     * @see {@link Tech#trackCurrentTime}\n     */\n    manualTimeUpdatesOn() {\n      this.manualTimeUpdates = true;\n      this.on('play', this.trackCurrentTime_);\n      this.on('pause', this.stopTrackingCurrentTime_);\n    }\n\n    /**\n     * Turn off the polyfill for `timeupdate` events that was created in\n     * {@link Tech#manualTimeUpdatesOn}\n     */\n    manualTimeUpdatesOff() {\n      this.manualTimeUpdates = false;\n      this.stopTrackingCurrentTime();\n      this.off('play', this.trackCurrentTime_);\n      this.off('pause', this.stopTrackingCurrentTime_);\n    }\n\n    /**\n     * Sets up an interval function to track current time and trigger `timeupdate` every\n     * 250 milliseconds.\n     *\n     * @listens Tech#play\n     * @triggers Tech#timeupdate\n     */\n    trackCurrentTime() {\n      if (this.currentTimeInterval) {\n        this.stopTrackingCurrentTime();\n      }\n      this.currentTimeInterval = this.setInterval(function () {\n        /**\n         * Triggered at an interval of 250ms to indicated that time is passing in the video.\n         *\n         * @event Tech#timeupdate\n         * @type {Event}\n         */\n        this.trigger({\n          type: 'timeupdate',\n          target: this,\n          manuallyTriggered: true\n        });\n\n        // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n      }, 250);\n    }\n\n    /**\n     * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\n     * `timeupdate` event is no longer triggered.\n     *\n     * @listens {Tech#pause}\n     */\n    stopTrackingCurrentTime() {\n      this.clearInterval(this.currentTimeInterval);\n\n      // #1002 - if the video ends right before the next timeupdate would happen,\n      // the progress bar won't make it all the way to the end\n      this.trigger({\n        type: 'timeupdate',\n        target: this,\n        manuallyTriggered: true\n      });\n    }\n\n    /**\n     * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\n     * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\n     *\n     * @fires Component#dispose\n     */\n    dispose() {\n      // clear out all tracks because we can't reuse them between techs\n      this.clearTracks(NORMAL.names);\n\n      // Turn off any manual progress or timeupdate tracking\n      if (this.manualProgress) {\n        this.manualProgressOff();\n      }\n      if (this.manualTimeUpdates) {\n        this.manualTimeUpdatesOff();\n      }\n      super.dispose();\n    }\n\n    /**\n     * Clear out a single `TrackList` or an array of `TrackLists` given their names.\n     *\n     * > Note: Techs without source handlers should call this between sources for `video`\n     *         & `audio` tracks. You don't want to use them between tracks!\n     *\n     * @param {string[]|string} types\n     *        TrackList names to clear, valid names are `video`, `audio`, and\n     *        `text`.\n     */\n    clearTracks(types) {\n      types = [].concat(types);\n      // clear out all tracks because we can't reuse them between techs\n      types.forEach(type => {\n        const list = this[`${type}Tracks`]() || [];\n        let i = list.length;\n        while (i--) {\n          const track = list[i];\n          if (type === 'text') {\n            this.removeRemoteTextTrack(track);\n          }\n          list.removeTrack(track);\n        }\n      });\n    }\n\n    /**\n     * Remove any TextTracks added via addRemoteTextTrack that are\n     * flagged for automatic garbage collection\n     */\n    cleanupAutoTextTracks() {\n      const list = this.autoRemoteTextTracks_ || [];\n      let i = list.length;\n      while (i--) {\n        const track = list[i];\n        this.removeRemoteTextTrack(track);\n      }\n    }\n\n    /**\n     * Reset the tech, which will removes all sources and reset the internal readyState.\n     *\n     * @abstract\n     */\n    reset() {}\n\n    /**\n     * Get the value of `crossOrigin` from the tech.\n     *\n     * @abstract\n     *\n     * @see {Html5#crossOrigin}\n     */\n    crossOrigin() {}\n\n    /**\n     * Set the value of `crossOrigin` on the tech.\n     *\n     * @abstract\n     *\n     * @param {string} crossOrigin the crossOrigin value\n     * @see {Html5#setCrossOrigin}\n     */\n    setCrossOrigin() {}\n\n    /**\n     * Get or set an error on the Tech.\n     *\n     * @param {MediaError} [err]\n     *        Error to set on the Tech\n     *\n     * @return {MediaError|null}\n     *         The current error object on the tech, or null if there isn't one.\n     */\n    error(err) {\n      if (err !== undefined) {\n        this.error_ = new MediaError(err);\n        this.trigger('error');\n      }\n      return this.error_;\n    }\n\n    /**\n     * Returns the `TimeRange`s that have been played through for the current source.\n     *\n     * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\n     *         It only checks whether the source has played at all or not.\n     *\n     * @return {TimeRange}\n     *         - A single time range if this video has played\n     *         - An empty set of ranges if not.\n     */\n    played() {\n      if (this.hasStarted_) {\n        return createTimeRanges$1(0, 0);\n      }\n      return createTimeRanges$1();\n    }\n\n    /**\n     * Start playback\n     *\n     * @abstract\n     *\n     * @see {Html5#play}\n     */\n    play() {}\n\n    /**\n     * Set whether we are scrubbing or not\n     *\n     * @abstract\n     * @param {boolean} _isScrubbing\n     *                  - true for we are currently scrubbing\n     *                  - false for we are no longer scrubbing\n     *\n     * @see {Html5#setScrubbing}\n     */\n    setScrubbing(_isScrubbing) {}\n\n    /**\n     * Get whether we are scrubbing or not\n     *\n     * @abstract\n     *\n     * @see {Html5#scrubbing}\n     */\n    scrubbing() {}\n\n    /**\n     * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\n     * previously called.\n     *\n     * @param {number} _seconds\n     *        Set the current time of the media to this.\n     * @fires Tech#timeupdate\n     */\n    setCurrentTime(_seconds) {\n      // improve the accuracy of manual timeupdates\n      if (this.manualTimeUpdates) {\n        /**\n         * A manual `timeupdate` event.\n         *\n         * @event Tech#timeupdate\n         * @type {Event}\n         */\n        this.trigger({\n          type: 'timeupdate',\n          target: this,\n          manuallyTriggered: true\n        });\n      }\n    }\n\n    /**\n     * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\n     * {@link TextTrackList} events.\n     *\n     * This adds {@link EventTarget~EventListeners} for `addtrack`, and  `removetrack`.\n     *\n     * @fires Tech#audiotrackchange\n     * @fires Tech#videotrackchange\n     * @fires Tech#texttrackchange\n     */\n    initTrackListeners() {\n      /**\n        * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\n        *\n        * @event Tech#audiotrackchange\n        * @type {Event}\n        */\n\n      /**\n        * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\n        *\n        * @event Tech#videotrackchange\n        * @type {Event}\n        */\n\n      /**\n        * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\n        *\n        * @event Tech#texttrackchange\n        * @type {Event}\n        */\n      NORMAL.names.forEach(name => {\n        const props = NORMAL[name];\n        const trackListChanges = () => {\n          this.trigger(`${name}trackchange`);\n        };\n        const tracks = this[props.getterName]();\n        tracks.addEventListener('removetrack', trackListChanges);\n        tracks.addEventListener('addtrack', trackListChanges);\n        this.on('dispose', () => {\n          tracks.removeEventListener('removetrack', trackListChanges);\n          tracks.removeEventListener('addtrack', trackListChanges);\n        });\n      });\n    }\n\n    /**\n     * Emulate TextTracks using vtt.js if necessary\n     *\n     * @fires Tech#vttjsloaded\n     * @fires Tech#vttjserror\n     */\n    addWebVttScript_() {\n      if (window.WebVTT) {\n        return;\n      }\n\n      // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\n      // signals that the Tech is ready at which point Tech.el_ is part of the DOM\n      // before inserting the WebVTT script\n      if (document.body.contains(this.el())) {\n        // load via require if available and vtt.js script location was not passed in\n        // as an option. novtt builds will turn the above require call into an empty object\n        // which will cause this if check to always fail.\n        if (!this.options_['vtt.js'] && isPlain(browserIndex) && Object.keys(browserIndex).length > 0) {\n          this.trigger('vttjsloaded');\n          return;\n        }\n\n        // load vtt.js via the script location option or the cdn of no location was\n        // passed in\n        const script = document.createElement('script');\n        script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n        script.onload = () => {\n          /**\n           * Fired when vtt.js is loaded.\n           *\n           * @event Tech#vttjsloaded\n           * @type {Event}\n           */\n          this.trigger('vttjsloaded');\n        };\n        script.onerror = () => {\n          /**\n           * Fired when vtt.js was not loaded due to an error\n           *\n           * @event Tech#vttjsloaded\n           * @type {Event}\n           */\n          this.trigger('vttjserror');\n        };\n        this.on('dispose', () => {\n          script.onload = null;\n          script.onerror = null;\n        });\n        // but have not loaded yet and we set it to true before the inject so that\n        // we don't overwrite the injected window.WebVTT if it loads right away\n        window.WebVTT = true;\n        this.el().parentNode.appendChild(script);\n      } else {\n        this.ready(this.addWebVttScript_);\n      }\n    }\n\n    /**\n     * Emulate texttracks\n     *\n     */\n    emulateTextTracks() {\n      const tracks = this.textTracks();\n      const remoteTracks = this.remoteTextTracks();\n      const handleAddTrack = e => tracks.addTrack(e.track);\n      const handleRemoveTrack = e => tracks.removeTrack(e.track);\n      remoteTracks.on('addtrack', handleAddTrack);\n      remoteTracks.on('removetrack', handleRemoveTrack);\n      this.addWebVttScript_();\n      const updateDisplay = () => this.trigger('texttrackchange');\n      const textTracksChanges = () => {\n        updateDisplay();\n        for (let i = 0; i < tracks.length; i++) {\n          const track = tracks[i];\n          track.removeEventListener('cuechange', updateDisplay);\n          if (track.mode === 'showing') {\n            track.addEventListener('cuechange', updateDisplay);\n          }\n        }\n      };\n      textTracksChanges();\n      tracks.addEventListener('change', textTracksChanges);\n      tracks.addEventListener('addtrack', textTracksChanges);\n      tracks.addEventListener('removetrack', textTracksChanges);\n      this.on('dispose', function () {\n        remoteTracks.off('addtrack', handleAddTrack);\n        remoteTracks.off('removetrack', handleRemoveTrack);\n        tracks.removeEventListener('change', textTracksChanges);\n        tracks.removeEventListener('addtrack', textTracksChanges);\n        tracks.removeEventListener('removetrack', textTracksChanges);\n        for (let i = 0; i < tracks.length; i++) {\n          const track = tracks[i];\n          track.removeEventListener('cuechange', updateDisplay);\n        }\n      });\n    }\n\n    /**\n     * Create and returns a remote {@link TextTrack} object.\n     *\n     * @param {string} kind\n     *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n     *\n     * @param {string} [label]\n     *        Label to identify the text track\n     *\n     * @param {string} [language]\n     *        Two letter language abbreviation\n     *\n     * @return {TextTrack}\n     *         The TextTrack that gets created.\n     */\n    addTextTrack(kind, label, language) {\n      if (!kind) {\n        throw new Error('TextTrack kind is required but was not provided');\n      }\n      return createTrackHelper(this, kind, label, language);\n    }\n\n    /**\n     * Create an emulated TextTrack for use by addRemoteTextTrack\n     *\n     * This is intended to be overridden by classes that inherit from\n     * Tech in order to create native or custom TextTracks.\n     *\n     * @param {Object} options\n     *        The object should contain the options to initialize the TextTrack with.\n     *\n     * @param {string} [options.kind]\n     *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n     *\n     * @param {string} [options.label].\n     *        Label to identify the text track\n     *\n     * @param {string} [options.language]\n     *        Two letter language abbreviation.\n     *\n     * @return {HTMLTrackElement}\n     *         The track element that gets created.\n     */\n    createRemoteTextTrack(options) {\n      const track = merge$2(options, {\n        tech: this\n      });\n      return new REMOTE.remoteTextEl.TrackClass(track);\n    }\n\n    /**\n     * Creates a remote text track object and returns an html track element.\n     *\n     * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\n     *\n     * @param {Object} options\n     *        See {@link Tech#createRemoteTextTrack} for more detailed properties.\n     *\n     * @param {boolean} [manualCleanup=false]\n     *        - When false: the TextTrack will be automatically removed from the video\n     *          element whenever the source changes\n     *        - When True: The TextTrack will have to be cleaned up manually\n     *\n     * @return {HTMLTrackElement}\n     *         An Html Track Element.\n     *\n     */\n    addRemoteTextTrack(options = {}, manualCleanup) {\n      const htmlTrackElement = this.createRemoteTextTrack(options);\n      if (typeof manualCleanup !== 'boolean') {\n        manualCleanup = false;\n      }\n\n      // store HTMLTrackElement and TextTrack to remote list\n      this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n      this.remoteTextTracks().addTrack(htmlTrackElement.track);\n      if (manualCleanup === false) {\n        // create the TextTrackList if it doesn't exist\n        this.ready(() => this.autoRemoteTextTracks_.addTrack(htmlTrackElement.track));\n      }\n      return htmlTrackElement;\n    }\n\n    /**\n     * Remove a remote text track from the remote `TextTrackList`.\n     *\n     * @param {TextTrack} track\n     *        `TextTrack` to remove from the `TextTrackList`\n     */\n    removeRemoteTextTrack(track) {\n      const trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n      // remove HTMLTrackElement and TextTrack from remote list\n      this.remoteTextTrackEls().removeTrackElement_(trackElement);\n      this.remoteTextTracks().removeTrack(track);\n      this.autoRemoteTextTracks_.removeTrack(track);\n    }\n\n    /**\n     * Gets available media playback quality metrics as specified by the W3C's Media\n     * Playback Quality API.\n     *\n     * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n     *\n     * @return {Object}\n     *         An object with supported media playback quality metrics\n     *\n     * @abstract\n     */\n    getVideoPlaybackQuality() {\n      return {};\n    }\n\n    /**\n     * Attempt to create a floating video window always on top of other windows\n     * so that users may continue consuming media while they interact with other\n     * content sites, or applications on their device.\n     *\n     * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n     *\n     * @return {Promise|undefined}\n     *         A promise with a Picture-in-Picture window if the browser supports\n     *         Promises (or one was passed in as an option). It returns undefined\n     *         otherwise.\n     *\n     * @abstract\n     */\n    requestPictureInPicture() {\n      return Promise.reject();\n    }\n\n    /**\n     * A method to check for the value of the 'disablePictureInPicture' <video> property.\n     * Defaults to true, as it should be considered disabled if the tech does not support pip\n     *\n     * @abstract\n     */\n    disablePictureInPicture() {\n      return true;\n    }\n\n    /**\n     * A method to set or unset the 'disablePictureInPicture' <video> property.\n     *\n     * @abstract\n     */\n    setDisablePictureInPicture() {}\n\n    /**\n     * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame\n     *\n     * @param {function} cb\n     * @return {number} request id\n     */\n    requestVideoFrameCallback(cb) {\n      const id = newGUID();\n      if (!this.isReady_ || this.paused()) {\n        this.queuedHanders_.add(id);\n        this.one('playing', () => {\n          if (this.queuedHanders_.has(id)) {\n            this.queuedHanders_.delete(id);\n            cb();\n          }\n        });\n      } else {\n        this.requestNamedAnimationFrame(id, cb);\n      }\n      return id;\n    }\n\n    /**\n     * A fallback implementation of cancelVideoFrameCallback\n     *\n     * @param {number} id id of callback to be cancelled\n     */\n    cancelVideoFrameCallback(id) {\n      if (this.queuedHanders_.has(id)) {\n        this.queuedHanders_.delete(id);\n      } else {\n        this.cancelNamedAnimationFrame(id);\n      }\n    }\n\n    /**\n     * A method to set a poster from a `Tech`.\n     *\n     * @abstract\n     */\n    setPoster() {}\n\n    /**\n     * A method to check for the presence of the 'playsinline' <video> attribute.\n     *\n     * @abstract\n     */\n    playsinline() {}\n\n    /**\n     * A method to set or unset the 'playsinline' <video> attribute.\n     *\n     * @abstract\n     */\n    setPlaysinline() {}\n\n    /**\n     * Attempt to force override of native audio tracks.\n     *\n     * @param {boolean} override - If set to true native audio will be overridden,\n     * otherwise native audio will potentially be used.\n     *\n     * @abstract\n     */\n    overrideNativeAudioTracks(override) {}\n\n    /**\n     * Attempt to force override of native video tracks.\n     *\n     * @param {boolean} override - If set to true native video will be overridden,\n     * otherwise native video will potentially be used.\n     *\n     * @abstract\n     */\n    overrideNativeVideoTracks(override) {}\n\n    /**\n     * Check if the tech can support the given mime-type.\n     *\n     * The base tech does not support any type, but source handlers might\n     * overwrite this.\n     *\n     * @param  {string} _type\n     *         The mimetype to check for support\n     *\n     * @return {string}\n     *         'probably', 'maybe', or empty string\n     *\n     * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\n     *\n     * @abstract\n     */\n    canPlayType(_type) {\n      return '';\n    }\n\n    /**\n     * Check if the type is supported by this tech.\n     *\n     * The base tech does not support any type, but source handlers might\n     * overwrite this.\n     *\n     * @param {string} _type\n     *        The media type to check\n     * @return {string} Returns the native video element's response\n     */\n    static canPlayType(_type) {\n      return '';\n    }\n\n    /**\n     * Check if the tech can support the given source\n     *\n     * @param {Object} srcObj\n     *        The source object\n     * @param {Object} options\n     *        The options passed to the tech\n     * @return {string} 'probably', 'maybe', or '' (empty string)\n     */\n    static canPlaySource(srcObj, options) {\n      return Tech.canPlayType(srcObj.type);\n    }\n\n    /*\n     * Return whether the argument is a Tech or not.\n     * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n     *\n     * @param {Object} component\n     *        The item to check\n     *\n     * @return {boolean}\n     *         Whether it is a tech or not\n     *         - True if it is a tech\n     *         - False if it is not\n     */\n    static isTech(component) {\n      return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\n    }\n\n    /**\n     * Registers a `Tech` into a shared list for videojs.\n     *\n     * @param {string} name\n     *        Name of the `Tech` to register.\n     *\n     * @param {Object} tech\n     *        The `Tech` class to register.\n     */\n    static registerTech(name, tech) {\n      if (!Tech.techs_) {\n        Tech.techs_ = {};\n      }\n      if (!Tech.isTech(tech)) {\n        throw new Error(`Tech ${name} must be a Tech`);\n      }\n      if (!Tech.canPlayType) {\n        throw new Error('Techs must have a static canPlayType method on them');\n      }\n      if (!Tech.canPlaySource) {\n        throw new Error('Techs must have a static canPlaySource method on them');\n      }\n      name = toTitleCase$1(name);\n      Tech.techs_[name] = tech;\n      Tech.techs_[toLowerCase(name)] = tech;\n      if (name !== 'Tech') {\n        // camel case the techName for use in techOrder\n        Tech.defaultTechOrder_.push(name);\n      }\n      return tech;\n    }\n\n    /**\n     * Get a `Tech` from the shared list by name.\n     *\n     * @param {string} name\n     *        `camelCase` or `TitleCase` name of the Tech to get\n     *\n     * @return {Tech|undefined}\n     *         The `Tech` or undefined if there was no tech with the name requested.\n     */\n    static getTech(name) {\n      if (!name) {\n        return;\n      }\n      if (Tech.techs_ && Tech.techs_[name]) {\n        return Tech.techs_[name];\n      }\n      name = toTitleCase$1(name);\n      if (window && window.videojs && window.videojs[name]) {\n        log$1.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n        return window.videojs[name];\n      }\n    }\n  }\n\n  /**\n   * Get the {@link VideoTrackList}\n   *\n   * @returns {VideoTrackList}\n   * @method Tech.prototype.videoTracks\n   */\n\n  /**\n   * Get the {@link AudioTrackList}\n   *\n   * @returns {AudioTrackList}\n   * @method Tech.prototype.audioTracks\n   */\n\n  /**\n   * Get the {@link TextTrackList}\n   *\n   * @returns {TextTrackList}\n   * @method Tech.prototype.textTracks\n   */\n\n  /**\n   * Get the remote element {@link TextTrackList}\n   *\n   * @returns {TextTrackList}\n   * @method Tech.prototype.remoteTextTracks\n   */\n\n  /**\n   * Get the remote element {@link HtmlTrackElementList}\n   *\n   * @returns {HtmlTrackElementList}\n   * @method Tech.prototype.remoteTextTrackEls\n   */\n\n  ALL.names.forEach(function (name) {\n    const props = ALL[name];\n    Tech.prototype[props.getterName] = function () {\n      this[props.privateName] = this[props.privateName] || new props.ListClass();\n      return this[props.privateName];\n    };\n  });\n\n  /**\n   * List of associated text tracks\n   *\n   * @type {TextTrackList}\n   * @private\n   * @property Tech#textTracks_\n   */\n\n  /**\n   * List of associated audio tracks.\n   *\n   * @type {AudioTrackList}\n   * @private\n   * @property Tech#audioTracks_\n   */\n\n  /**\n   * List of associated video tracks.\n   *\n   * @type {VideoTrackList}\n   * @private\n   * @property Tech#videoTracks_\n   */\n\n  /**\n   * Boolean indicating whether the `Tech` supports volume control.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresVolumeControl = true;\n\n  /**\n   * Boolean indicating whether the `Tech` supports muting volume.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresMuteControl = true;\n\n  /**\n   * Boolean indicating whether the `Tech` supports fullscreen resize control.\n   * Resizing plugins using request fullscreen reloads the plugin\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresFullscreenResize = false;\n\n  /**\n   * Boolean indicating whether the `Tech` supports changing the speed at which the video\n   * plays. Examples:\n   *   - Set player to play 2x (twice) as fast\n   *   - Set player to play 0.5x (half) as fast\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresPlaybackRate = false;\n\n  /**\n   * Boolean indicating whether the `Tech` supports the `progress` event.\n   * This will be used to determine if {@link Tech#manualProgressOn} should be called.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresProgressEvents = false;\n\n  /**\n   * Boolean indicating whether the `Tech` supports the `sourceset` event.\n   *\n   * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\n   * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\n   * a new source.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresSourceset = false;\n\n  /**\n   * Boolean indicating whether the `Tech` supports the `timeupdate` event.\n   * This will be used to determine if {@link Tech#manualTimeUpdates} should be called.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresTimeupdateEvents = false;\n\n  /**\n   * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\n   * This will help us integrate with native `TextTrack`s if the browser supports them.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresNativeTextTracks = false;\n\n  /**\n   * Boolean indicating whether the `Tech` supports `requestVideoFrameCallback`.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Tech.prototype.featuresVideoFrameCallback = false;\n\n  /**\n   * A functional mixin for techs that want to use the Source Handler pattern.\n   * Source handlers are scripts for handling specific formats.\n   * The source handler pattern is used for adaptive formats (HLS, DASH) that\n   * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n   * Example: `Tech.withSourceHandlers.call(MyTech);`\n   *\n   * @param {Tech} _Tech\n   *        The tech to add source handler functions to.\n   *\n   * @mixes Tech~SourceHandlerAdditions\n   */\n  Tech.withSourceHandlers = function (_Tech) {\n    /**\n     * Register a source handler\n     *\n     * @param {Function} handler\n     *        The source handler class\n     *\n     * @param {number} [index]\n     *        Register it at the following index\n     */\n    _Tech.registerSourceHandler = function (handler, index) {\n      let handlers = _Tech.sourceHandlers;\n      if (!handlers) {\n        handlers = _Tech.sourceHandlers = [];\n      }\n      if (index === undefined) {\n        // add to the end of the list\n        index = handlers.length;\n      }\n      handlers.splice(index, 0, handler);\n    };\n\n    /**\n     * Check if the tech can support the given type. Also checks the\n     * Techs sourceHandlers.\n     *\n     * @param {string} type\n     *         The mimetype to check.\n     *\n     * @return {string}\n     *         'probably', 'maybe', or '' (empty string)\n     */\n    _Tech.canPlayType = function (type) {\n      const handlers = _Tech.sourceHandlers || [];\n      let can;\n      for (let i = 0; i < handlers.length; i++) {\n        can = handlers[i].canPlayType(type);\n        if (can) {\n          return can;\n        }\n      }\n      return '';\n    };\n\n    /**\n     * Returns the first source handler that supports the source.\n     *\n     * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n     *\n     * @param {SourceObject} source\n     *        The source object\n     *\n     * @param {Object} options\n     *        The options passed to the tech\n     *\n     * @return {SourceHandler|null}\n     *          The first source handler that supports the source or null if\n     *          no SourceHandler supports the source\n     */\n    _Tech.selectSourceHandler = function (source, options) {\n      const handlers = _Tech.sourceHandlers || [];\n      let can;\n      for (let i = 0; i < handlers.length; i++) {\n        can = handlers[i].canHandleSource(source, options);\n        if (can) {\n          return handlers[i];\n        }\n      }\n      return null;\n    };\n\n    /**\n     * Check if the tech can support the given source.\n     *\n     * @param {SourceObject} srcObj\n     *        The source object\n     *\n     * @param {Object} options\n     *        The options passed to the tech\n     *\n     * @return {string}\n     *         'probably', 'maybe', or '' (empty string)\n     */\n    _Tech.canPlaySource = function (srcObj, options) {\n      const sh = _Tech.selectSourceHandler(srcObj, options);\n      if (sh) {\n        return sh.canHandleSource(srcObj, options);\n      }\n      return '';\n    };\n\n    /**\n     * When using a source handler, prefer its implementation of\n     * any function normally provided by the tech.\n     */\n    const deferrable = ['seekable', 'seeking', 'duration'];\n\n    /**\n     * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\n     * function if it exists, with a fallback to the Techs seekable function.\n     *\n     * @method _Tech.seekable\n     */\n\n    /**\n     * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\n     * function if it exists, otherwise it will fallback to the techs duration function.\n     *\n     * @method _Tech.duration\n     */\n\n    deferrable.forEach(function (fnName) {\n      const originalFn = this[fnName];\n      if (typeof originalFn !== 'function') {\n        return;\n      }\n      this[fnName] = function () {\n        if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n          return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n        }\n        return originalFn.apply(this, arguments);\n      };\n    }, _Tech.prototype);\n\n    /**\n     * Create a function for setting the source using a source object\n     * and source handlers.\n     * Should never be called unless a source handler was found.\n     *\n     * @param {SourceObject} source\n     *        A source object with src and type keys\n     */\n    _Tech.prototype.setSource = function (source) {\n      let sh = _Tech.selectSourceHandler(source, this.options_);\n      if (!sh) {\n        // Fall back to a native source handler when unsupported sources are\n        // deliberately set\n        if (_Tech.nativeSourceHandler) {\n          sh = _Tech.nativeSourceHandler;\n        } else {\n          log$1.error('No source handler found for the current source.');\n        }\n      }\n\n      // Dispose any existing source handler\n      this.disposeSourceHandler();\n      this.off('dispose', this.disposeSourceHandler_);\n      if (sh !== _Tech.nativeSourceHandler) {\n        this.currentSource_ = source;\n      }\n      this.sourceHandler_ = sh.handleSource(source, this, this.options_);\n      this.one('dispose', this.disposeSourceHandler_);\n    };\n\n    /**\n     * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\n     *\n     * @listens Tech#dispose\n     */\n    _Tech.prototype.disposeSourceHandler = function () {\n      // if we have a source and get another one\n      // then we are loading something new\n      // than clear all of our current tracks\n      if (this.currentSource_) {\n        this.clearTracks(['audio', 'video']);\n        this.currentSource_ = null;\n      }\n\n      // always clean up auto-text tracks\n      this.cleanupAutoTextTracks();\n      if (this.sourceHandler_) {\n        if (this.sourceHandler_.dispose) {\n          this.sourceHandler_.dispose();\n        }\n        this.sourceHandler_ = null;\n      }\n    };\n  };\n\n  // The base Tech class needs to be registered as a Component. It is the only\n  // Tech that can be registered as a Component.\n  Component$1.registerComponent('Tech', Tech);\n  Tech.registerTech('Tech', Tech);\n\n  /**\n   * A list of techs that should be added to techOrder on Players\n   *\n   * @private\n   */\n  Tech.defaultTechOrder_ = [];\n\n  /**\n   * @file middleware.js\n   * @module middleware\n   */\n\n  /** @import Player from '../player' */\n  /** @import Tech from '../tech/tech' */\n\n  const middlewares = {};\n  const middlewareInstances = {};\n  const TERMINATOR = {};\n\n  /**\n   * A middleware object is a plain JavaScript object that has methods that\n   * match the {@link Tech} methods found in the lists of allowed\n   * {@link module:middleware.allowedGetters|getters},\n   * {@link module:middleware.allowedSetters|setters}, and\n   * {@link module:middleware.allowedMediators|mediators}.\n   *\n   * @typedef {Object} MiddlewareObject\n   */\n\n  /**\n   * A middleware factory function that should return a\n   * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\n   *\n   * This factory will be called for each player when needed, with the player\n   * passed in as an argument.\n   *\n   * @callback MiddlewareFactory\n   * @param {Player} player\n   *        A Video.js player.\n   */\n\n  /**\n   * Define a middleware that the player should use by way of a factory function\n   * that returns a middleware object.\n   *\n   * @param  {string} type\n   *         The MIME type to match or `\"*\"` for all MIME types.\n   *\n   * @param  {MiddlewareFactory} middleware\n   *         A middleware factory function that will be executed for\n   *         matching types.\n   */\n  function use(type, middleware) {\n    middlewares[type] = middlewares[type] || [];\n    middlewares[type].push(middleware);\n  }\n\n  /**\n   * Asynchronously sets a source using middleware by recursing through any\n   * matching middlewares and calling `setSource` on each, passing along the\n   * previous returned value each time.\n   *\n   * @param  {Player} player\n   *         A {@link Player} instance.\n   *\n   * @param  {Tech~SourceObject} src\n   *         A source object.\n   *\n   * @param  {Function}\n   *         The next middleware to run.\n   */\n  function setSource(player, src, next) {\n    player.setTimeout(() => setSourceHelper(src, middlewares[src.type], next, player), 1);\n  }\n\n  /**\n   * When the tech is set, passes the tech to each middleware's `setTech` method.\n   *\n   * @param {Object[]} middleware\n   *        An array of middleware instances.\n   *\n   * @param {Tech} tech\n   *        A Video.js tech.\n   */\n  function setTech(middleware, tech) {\n    middleware.forEach(mw => mw.setTech && mw.setTech(tech));\n  }\n\n  /**\n   * Calls a getter on the tech first, through each middleware\n   * from right to left to the player.\n   *\n   * @param  {Object[]} middleware\n   *         An array of middleware instances.\n   *\n   * @param  {Tech} tech\n   *         The current tech.\n   *\n   * @param  {string} method\n   *         A method name.\n   *\n   * @return {*}\n   *         The final value from the tech after middleware has intercepted it.\n   */\n  function get(middleware, tech, method) {\n    return middleware.reduceRight(middlewareIterator(method), tech[method]());\n  }\n\n  /**\n   * Takes the argument given to the player and calls the setter method on each\n   * middleware from left to right to the tech.\n   *\n   * @param  {Object[]} middleware\n   *         An array of middleware instances.\n   *\n   * @param  {Tech} tech\n   *         The current tech.\n   *\n   * @param  {string} method\n   *         A method name.\n   *\n   * @param  {*} arg\n   *         The value to set on the tech.\n   *\n   * @return {*}\n   *         The return value of the `method` of the `tech`.\n   */\n  function set(middleware, tech, method, arg) {\n    return tech[method](middleware.reduce(middlewareIterator(method), arg));\n  }\n\n  /**\n   * Takes the argument given to the player and calls the `call` version of the\n   * method on each middleware from left to right.\n   *\n   * Then, call the passed in method on the tech and return the result unchanged\n   * back to the player, through middleware, this time from right to left.\n   *\n   * @param  {Object[]} middleware\n   *         An array of middleware instances.\n   *\n   * @param  {Tech} tech\n   *         The current tech.\n   *\n   * @param  {string} method\n   *         A method name.\n   *\n   * @param  {*} arg\n   *         The value to set on the tech.\n   *\n   * @return {*}\n   *         The return value of the `method` of the `tech`, regardless of the\n   *         return values of middlewares.\n   */\n  function mediate(middleware, tech, method, arg = null) {\n    const callMethod = 'call' + toTitleCase$1(method);\n    const middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n    const terminated = middlewareValue === TERMINATOR;\n    // deprecated. The `null` return value should instead return TERMINATOR to\n    // prevent confusion if a techs method actually returns null.\n    const returnValue = terminated ? null : tech[method](middlewareValue);\n    executeRight(middleware, method, returnValue, terminated);\n    return returnValue;\n  }\n\n  /**\n   * Enumeration of allowed getters where the keys are method names.\n   *\n   * @type {Object}\n   */\n  const allowedGetters = {\n    buffered: 1,\n    currentTime: 1,\n    duration: 1,\n    muted: 1,\n    played: 1,\n    paused: 1,\n    seekable: 1,\n    volume: 1,\n    ended: 1\n  };\n\n  /**\n   * Enumeration of allowed setters where the keys are method names.\n   *\n   * @type {Object}\n   */\n  const allowedSetters = {\n    setCurrentTime: 1,\n    setMuted: 1,\n    setVolume: 1\n  };\n\n  /**\n   * Enumeration of allowed mediators where the keys are method names.\n   *\n   * @type {Object}\n   */\n  const allowedMediators = {\n    play: 1,\n    pause: 1\n  };\n  function middlewareIterator(method) {\n    return (value, mw) => {\n      // if the previous middleware terminated, pass along the termination\n      if (value === TERMINATOR) {\n        return TERMINATOR;\n      }\n      if (mw[method]) {\n        return mw[method](value);\n      }\n      return value;\n    };\n  }\n  function executeRight(mws, method, value, terminated) {\n    for (let i = mws.length - 1; i >= 0; i--) {\n      const mw = mws[i];\n      if (mw[method]) {\n        mw[method](terminated, value);\n      }\n    }\n  }\n\n  /**\n   * Clear the middleware cache for a player.\n   *\n   * @param  {Player} player\n   *         A {@link Player} instance.\n   */\n  function clearCacheForPlayer(player) {\n    if (middlewareInstances.hasOwnProperty(player.id())) {\n      delete middlewareInstances[player.id()];\n    }\n  }\n\n  /**\n   * {\n   *  [playerId]: [[mwFactory, mwInstance], ...]\n   * }\n   *\n   * @private\n   */\n  function getOrCreateFactory(player, mwFactory) {\n    const mws = middlewareInstances[player.id()];\n    let mw = null;\n    if (mws === undefined || mws === null) {\n      mw = mwFactory(player);\n      middlewareInstances[player.id()] = [[mwFactory, mw]];\n      return mw;\n    }\n    for (let i = 0; i < mws.length; i++) {\n      const [mwf, mwi] = mws[i];\n      if (mwf !== mwFactory) {\n        continue;\n      }\n      mw = mwi;\n    }\n    if (mw === null) {\n      mw = mwFactory(player);\n      mws.push([mwFactory, mw]);\n    }\n    return mw;\n  }\n  function setSourceHelper(src = {}, middleware = [], next, player, acc = [], lastRun = false) {\n    const [mwFactory, ...mwrest] = middleware;\n\n    // if mwFactory is a string, then we're at a fork in the road\n    if (typeof mwFactory === 'string') {\n      setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun);\n\n      // if we have an mwFactory, call it with the player to get the mw,\n      // then call the mw's setSource method\n    } else if (mwFactory) {\n      const mw = getOrCreateFactory(player, mwFactory);\n\n      // if setSource isn't present, implicitly select this middleware\n      if (!mw.setSource) {\n        acc.push(mw);\n        return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n      }\n      mw.setSource(Object.assign({}, src), function (err, _src) {\n        // something happened, try the next middleware on the current level\n        // make sure to use the old src\n        if (err) {\n          return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n        }\n\n        // we've succeeded, now we need to go deeper\n        acc.push(mw);\n\n        // if it's the same type, continue down the current chain\n        // otherwise, we want to go down the new chain\n        setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\n      });\n    } else if (mwrest.length) {\n      setSourceHelper(src, mwrest, next, player, acc, lastRun);\n    } else if (lastRun) {\n      next(src, acc);\n    } else {\n      setSourceHelper(src, middlewares['*'], next, player, acc, true);\n    }\n  }\n\n  /** @import Player from '../player' */\n\n  /**\n   * Mimetypes\n   *\n   * @see https://www.iana.org/assignments/media-types/media-types.xhtml\n   * @typedef Mimetypes~Kind\n   * @enum\n   */\n  const MimetypesKind = {\n    opus: 'video/ogg',\n    ogv: 'video/ogg',\n    mp4: 'video/mp4',\n    mov: 'video/mp4',\n    m4v: 'video/mp4',\n    mkv: 'video/x-matroska',\n    m4a: 'audio/mp4',\n    mp3: 'audio/mpeg',\n    aac: 'audio/aac',\n    caf: 'audio/x-caf',\n    flac: 'audio/flac',\n    oga: 'audio/ogg',\n    wav: 'audio/wav',\n    m3u8: 'application/x-mpegURL',\n    mpd: 'application/dash+xml',\n    jpg: 'image/jpeg',\n    jpeg: 'image/jpeg',\n    gif: 'image/gif',\n    png: 'image/png',\n    svg: 'image/svg+xml',\n    webp: 'image/webp'\n  };\n\n  /**\n   * Get the mimetype of a given src url if possible\n   *\n   * @param {string} src\n   *        The url to the src\n   *\n   * @return {string}\n   *         return the mimetype if it was known or empty string otherwise\n   */\n  const getMimetype = function (src = '') {\n    const ext = getFileExtension(src);\n    const mimetype = MimetypesKind[ext.toLowerCase()];\n    return mimetype || '';\n  };\n\n  /**\n   * Find the mime type of a given source string if possible. Uses the player\n   * source cache.\n   *\n   * @param {Player} player\n   *        The player object\n   *\n   * @param {string} src\n   *        The source string\n   *\n   * @return {string}\n   *         The type that was found\n   */\n  const findMimetype = (player, src) => {\n    if (!src) {\n      return '';\n    }\n\n    // 1. check for the type in the `source` cache\n    if (player.cache_.source.src === src && player.cache_.source.type) {\n      return player.cache_.source.type;\n    }\n\n    // 2. see if we have this source in our `currentSources` cache\n    const matchingSources = player.cache_.sources.filter(s => s.src === src);\n    if (matchingSources.length) {\n      return matchingSources[0].type;\n    }\n\n    // 3. look for the src url in source elements and use the type there\n    const sources = player.$$('source');\n    for (let i = 0; i < sources.length; i++) {\n      const s = sources[i];\n      if (s.type && s.src && s.src === src) {\n        return s.type;\n      }\n    }\n\n    // 4. finally fallback to our list of mime types based on src url extension\n    return getMimetype(src);\n  };\n\n  /**\n   * @module filter-source\n   */\n\n  /**\n   * Filter out single bad source objects or multiple source objects in an\n   * array. Also flattens nested source object arrays into a 1 dimensional\n   * array of source objects.\n   *\n   * @param {Tech~SourceObject|Tech~SourceObject[]} src\n   *        The src object to filter\n   *\n   * @return {Tech~SourceObject[]}\n   *         An array of sourceobjects containing only valid sources\n   *\n   * @private\n   */\n  const filterSource = function (src) {\n    // traverse array\n    if (Array.isArray(src)) {\n      let newsrc = [];\n      src.forEach(function (srcobj) {\n        srcobj = filterSource(srcobj);\n        if (Array.isArray(srcobj)) {\n          newsrc = newsrc.concat(srcobj);\n        } else if (isObject$1(srcobj)) {\n          newsrc.push(srcobj);\n        }\n      });\n      src = newsrc;\n    } else if (typeof src === 'string' && src.trim()) {\n      // convert string into object\n      src = [fixSource({\n        src\n      })];\n    } else if (isObject$1(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\n      // src is already valid\n      src = [fixSource(src)];\n    } else {\n      // invalid source, turn it into an empty array\n      src = [];\n    }\n    return src;\n  };\n\n  /**\n   * Checks src mimetype, adding it when possible\n   *\n   * @param {Tech~SourceObject} src\n   *        The src object to check\n   * @return {Tech~SourceObject}\n   *        src Object with known type\n   */\n  function fixSource(src) {\n    if (!src.type) {\n      const mimetype = getMimetype(src.src);\n      if (mimetype) {\n        src.type = mimetype;\n      }\n    }\n    return src;\n  }\n\n  var icons = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n  <defs>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\n    </symbol>\\n  </defs>\\n</svg>\";\n\n  // /**\n\n  // Determine the keycode for the 'back' key based on the platform\n  const backKeyCode = IS_TIZEN ? 10009 : IS_WEBOS ? 461 : 8;\n  const SpatialNavKeyCodes = {\n    codes: {\n      play: 415,\n      pause: 19,\n      ff: 417,\n      rw: 412,\n      back: backKeyCode\n    },\n    names: {\n      415: 'play',\n      19: 'pause',\n      417: 'ff',\n      412: 'rw',\n      [backKeyCode]: 'back'\n    },\n    isEventKey(event, keyName) {\n      keyName = keyName.toLowerCase();\n      if (this.names[event.keyCode] && this.names[event.keyCode] === keyName) {\n        return true;\n      }\n      return false;\n    },\n    getEventName(event) {\n      if (this.names[event.keyCode]) {\n        return this.names[event.keyCode];\n      } else if (this.codes[event.code]) {\n        const code = this.codes[event.code];\n        return this.names[code];\n      }\n      return null;\n    }\n  };\n\n  /**\n   * @file spatial-navigation.js\n   */\n\n  /** @import Component from './component' */\n  /** @import Player from './player' */\n\n  // The number of seconds the `step*` functions move the timeline.\n  const STEP_SECONDS = 5;\n\n  /**\n   * Spatial Navigation in Video.js enhances user experience and accessibility on smartTV devices,\n   * enabling seamless navigation through interactive elements within the player using remote control arrow keys.\n   * This functionality allows users to effortlessly navigate through focusable components.\n   *\n   * @extends EventTarget\n   */\n  class SpatialNavigation extends EventTarget$2 {\n    /**\n     * Constructs a SpatialNavigation instance with initial settings.\n     * Sets up the player instance, and prepares the spatial navigation system.\n     *\n     * @class\n     * @param {Player} player - The Video.js player instance to which the spatial navigation is attached.\n     */\n    constructor(player) {\n      super();\n      this.player_ = player;\n      this.focusableComponents = [];\n      this.isListening_ = false;\n      this.isPaused_ = false;\n      this.onKeyDown_ = this.onKeyDown_.bind(this);\n      this.lastFocusedComponent_ = null;\n    }\n\n    /**\n     * Starts the spatial navigation by adding a keydown event listener to the video container.\n     * This method ensures that the event listener is added only once.\n     */\n    start() {\n      // If the listener is already active, exit early.\n      if (this.isListening_) {\n        return;\n      }\n\n      // Add the event listener since the listener is not yet active.\n      this.player_.on('keydown', this.onKeyDown_);\n      this.player_.on('modalKeydown', this.onKeyDown_);\n      // Listen for source change events\n      this.player_.on('loadedmetadata', () => {\n        this.focus(this.updateFocusableComponents()[0]);\n      });\n      this.player_.on('modalclose', () => {\n        this.refocusComponent();\n      });\n      this.player_.on('focusin', this.handlePlayerFocus_.bind(this));\n      this.player_.on('focusout', this.handlePlayerBlur_.bind(this));\n      this.isListening_ = true;\n      if (this.player_.errorDisplay) {\n        this.player_.errorDisplay.on('aftermodalfill', () => {\n          this.updateFocusableComponents();\n          if (this.focusableComponents.length) {\n            // The modal has focusable components:\n\n            if (this.focusableComponents.length > 1) {\n              // The modal has close button + some additional buttons.\n              // Focusing first additional button:\n\n              this.focusableComponents[1].focus();\n            } else {\n              // The modal has only close button,\n              // Focusing it:\n\n              this.focusableComponents[0].focus();\n            }\n          }\n        });\n      }\n    }\n\n    /**\n     * Stops the spatial navigation by removing the keydown event listener from the video container.\n     * Also sets the `isListening_` flag to false.\n     */\n    stop() {\n      this.player_.off('keydown', this.onKeyDown_);\n      this.isListening_ = false;\n    }\n\n    /**\n     * Responds to keydown events for spatial navigation and media control.\n     *\n     * Determines if spatial navigation or media control is active and handles key inputs accordingly.\n     *\n     * @param {KeyboardEvent} event - The keydown event to be handled.\n     */\n    onKeyDown_(event) {\n      // Determine if the event is a custom modalKeydown event\n      const actualEvent = event.originalEvent ? event.originalEvent : event;\n      if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(actualEvent.key)) {\n        // Handle directional navigation\n        if (this.isPaused_) {\n          return;\n        }\n        actualEvent.preventDefault();\n\n        // \"ArrowLeft\" => \"left\" etc\n        const direction = actualEvent.key.substring(5).toLowerCase();\n        this.move(direction);\n      } else if (SpatialNavKeyCodes.isEventKey(actualEvent, 'play') || SpatialNavKeyCodes.isEventKey(actualEvent, 'pause') || SpatialNavKeyCodes.isEventKey(actualEvent, 'ff') || SpatialNavKeyCodes.isEventKey(actualEvent, 'rw')) {\n        // Handle media actions\n        actualEvent.preventDefault();\n        const action = SpatialNavKeyCodes.getEventName(actualEvent);\n        this.performMediaAction_(action);\n      } else if (SpatialNavKeyCodes.isEventKey(actualEvent, 'Back') && event.target && typeof event.target.closeable === 'function' && event.target.closeable()) {\n        actualEvent.preventDefault();\n        event.target.close();\n      }\n    }\n\n    /**\n     * Performs media control actions based on the given key input.\n     *\n     * Controls the playback and seeking functionalities of the media player.\n     *\n     * @param {string} key - The key representing the media action to be performed.\n     *   Accepted keys: 'play', 'pause', 'ff' (fast-forward), 'rw' (rewind).\n     */\n    performMediaAction_(key) {\n      if (this.player_) {\n        switch (key) {\n          case 'play':\n            if (this.player_.paused()) {\n              this.player_.play();\n            }\n            break;\n          case 'pause':\n            if (!this.player_.paused()) {\n              this.player_.pause();\n            }\n            break;\n          case 'ff':\n            this.userSeek_(this.player_.currentTime() + STEP_SECONDS);\n            break;\n          case 'rw':\n            this.userSeek_(this.player_.currentTime() - STEP_SECONDS);\n            break;\n        }\n      }\n    }\n\n    /**\n     * Prevent liveThreshold from causing seeks to seem like they\n     * are not happening from a user perspective.\n     *\n     * @param {number} ct\n     *        current time to seek to\n     */\n    userSeek_(ct) {\n      if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n        this.player_.liveTracker.nextSeekedFromUser();\n      }\n      this.player_.currentTime(ct);\n    }\n\n    /**\n     * Pauses the spatial navigation functionality.\n     * This method sets a flag that can be used to temporarily disable the navigation logic.\n     */\n    pause() {\n      this.isPaused_ = true;\n    }\n\n    /**\n     * Resumes the spatial navigation functionality if it has been paused.\n     * This method resets the pause flag, re-enabling the navigation logic.\n     */\n    resume() {\n      this.isPaused_ = false;\n    }\n\n    /**\n     * Handles Player Blur.\n     *\n     * @param {string|Event|Object} event\n     *        The name of the event, an `Event`, or an object with a key of type set to\n     *        an event name.\n     *\n     * Calls for handling of the Player Blur if:\n     * *The next focused element is not a child of current focused element &\n     * The next focused element is not a child of the Player.\n     * *There is no next focused element\n     */\n    handlePlayerBlur_(event) {\n      const nextFocusedElement = event.relatedTarget;\n      let isChildrenOfPlayer = null;\n      const currentComponent = this.getCurrentComponent(event.target);\n      if (nextFocusedElement) {\n        isChildrenOfPlayer = Boolean(nextFocusedElement.closest('.video-js'));\n\n        // If nextFocusedElement is the 'TextTrackSettings' component\n        if (nextFocusedElement.classList.contains('vjs-text-track-settings') && !this.isPaused_) {\n          this.searchForTrackSelect_();\n        }\n      }\n      if (!event.currentTarget.contains(event.relatedTarget) && !isChildrenOfPlayer || !nextFocusedElement) {\n        if (currentComponent && currentComponent.name() === 'CloseButton') {\n          this.refocusComponent();\n        } else {\n          this.pause();\n          if (currentComponent && currentComponent.el()) {\n            // Store last focused component\n            this.lastFocusedComponent_ = currentComponent;\n          }\n        }\n      }\n    }\n\n    /**\n     * Handles the Player focus event.\n     *\n     * Calls for handling of the Player Focus if current element is focusable.\n     */\n    handlePlayerFocus_() {\n      if (this.getCurrentComponent() && this.getCurrentComponent().getIsFocusable()) {\n        this.resume();\n      }\n    }\n\n    /**\n     * Gets a set of focusable components.\n     *\n     * @return {Array}\n     *         Returns an array of focusable components.\n     */\n    updateFocusableComponents() {\n      const player = this.player_;\n      const focusableComponents = [];\n\n      /**\n       * Searches for children candidates.\n       *\n       * Pushes Components to array of 'focusableComponents'.\n       * Calls itself if there is children elements inside iterated component.\n       *\n       * @param {Array} componentsArray - The array of components to search for focusable children.\n       */\n      function searchForChildrenCandidates(componentsArray) {\n        for (const i of componentsArray) {\n          if (i.hasOwnProperty('el_') && i.getIsFocusable() && i.getIsAvailableToBeFocused(i.el())) {\n            focusableComponents.push(i);\n          }\n          if (i.hasOwnProperty('children_') && i.children_.length > 0) {\n            searchForChildrenCandidates(i.children_);\n          }\n        }\n      }\n\n      // Iterate inside all children components of the player.\n      player.children_.forEach(value => {\n        if (value.hasOwnProperty('el_')) {\n          // If component has required functions 'getIsFocusable' & 'getIsAvailableToBeFocused', is focusable & available to be focused.\n          if (value.getIsFocusable && value.getIsAvailableToBeFocused && value.getIsFocusable() && value.getIsAvailableToBeFocused(value.el())) {\n            focusableComponents.push(value);\n            return;\n            // If component has posible children components as candidates.\n          } else if (value.hasOwnProperty('children_') && value.children_.length > 0) {\n            searchForChildrenCandidates(value.children_);\n            // If component has posible item components as candidates.\n          } else if (value.hasOwnProperty('items') && value.items.length > 0) {\n            searchForChildrenCandidates(value.items);\n            // If there is a suitable child element within the component's DOM element.\n          } else if (this.findSuitableDOMChild(value)) {\n            focusableComponents.push(value);\n          }\n        }\n\n        // TODO - Refactor the following logic after refactor of videojs-errors elements to be components is done.\n        if (value.name_ === 'ErrorDisplay' && value.opened_) {\n          const buttonContainer = value.el_.querySelector('.vjs-errors-ok-button-container');\n          if (buttonContainer) {\n            const modalButtons = buttonContainer.querySelectorAll('button');\n            modalButtons.forEach((element, index) => {\n              // Add elements as objects to be handled by the spatial navigation\n              focusableComponents.push({\n                name: () => {\n                  return 'ModalButton' + (index + 1);\n                },\n                el: () => element,\n                getPositions: () => {\n                  const rect = element.getBoundingClientRect();\n\n                  // Creating objects that mirror DOMRectReadOnly for boundingClientRect and center\n                  const boundingClientRect = {\n                    x: rect.x,\n                    y: rect.y,\n                    width: rect.width,\n                    height: rect.height,\n                    top: rect.top,\n                    right: rect.right,\n                    bottom: rect.bottom,\n                    left: rect.left\n                  };\n\n                  // Calculating the center position\n                  const center = {\n                    x: rect.left + rect.width / 2,\n                    y: rect.top + rect.height / 2,\n                    width: 0,\n                    height: 0,\n                    top: rect.top + rect.height / 2,\n                    right: rect.left + rect.width / 2,\n                    bottom: rect.top + rect.height / 2,\n                    left: rect.left + rect.width / 2\n                  };\n                  return {\n                    boundingClientRect,\n                    center\n                  };\n                },\n                // Asume that the following are always focusable\n                getIsAvailableToBeFocused: () => true,\n                getIsFocusable: el => true,\n                focus: () => element.focus()\n              });\n            });\n          }\n        }\n      });\n      this.focusableComponents = focusableComponents;\n      return this.focusableComponents;\n    }\n\n    /**\n     * Finds a suitable child element within the provided component's DOM element.\n     *\n     * @param {Object} component - The component containing the DOM element to search within.\n     * @return {HTMLElement|null} Returns the suitable child element if found, or null if not found.\n     */\n    findSuitableDOMChild(component) {\n      /**\n       * Recursively searches for a suitable child node that can be focused within a given component.\n       * It first checks if the provided node itself can be focused according to the component's\n       * `getIsFocusable` and `getIsAvailableToBeFocused` methods. If not, it recursively searches\n       * through the node's children to find a suitable child node that meets the focusability criteria.\n       *\n       * @param {HTMLElement} node - The DOM node to start the search from.\n       * @return {HTMLElement|null} The first child node that is focusable and available to be focused,\n       * or `null` if no suitable child is found.\n       */\n      function searchForSuitableChild(node) {\n        if (component.getIsFocusable(node) && component.getIsAvailableToBeFocused(node)) {\n          return node;\n        }\n        for (let i = 0; i < node.children.length; i++) {\n          const child = node.children[i];\n          const suitableChild = searchForSuitableChild(child);\n          if (suitableChild) {\n            return suitableChild;\n          }\n        }\n        return null;\n      }\n      if (component.el()) {\n        return searchForSuitableChild(component.el());\n      }\n      return null;\n    }\n\n    /**\n     * Gets the currently focused component from the list of focusable components.\n     * If a target element is provided, it uses that element to find the corresponding\n     * component. If no target is provided, it defaults to using the document's currently\n     * active element.\n     *\n     * @param {HTMLElement} [target] - The DOM element to check against the focusable components.\n     *                                 If not provided, `document.activeElement` is used.\n     * @return {Component|null} - Returns the focused component if found among the focusable components,\n     *                            otherwise returns null if no matching component is found.\n     */\n    getCurrentComponent(target) {\n      this.updateFocusableComponents();\n      // eslint-disable-next-line\n      const curComp = target || document.activeElement;\n      if (this.focusableComponents.length) {\n        for (const i of this.focusableComponents) {\n          // If component Node is equal to the current active element.\n          if (i.el() === curComp) {\n            return i;\n          }\n        }\n      }\n    }\n\n    /**\n     * Adds a component to the array of focusable components.\n     *\n     * @param {Component} component\n     *        The `Component` to be added.\n     */\n    add(component) {\n      const focusableComponents = [...this.focusableComponents];\n      if (component.hasOwnProperty('el_') && component.getIsFocusable() && component.getIsAvailableToBeFocused(component.el())) {\n        focusableComponents.push(component);\n      }\n      this.focusableComponents = focusableComponents;\n      // Trigger the notification manually\n      this.trigger({\n        type: 'focusableComponentsChanged',\n        focusableComponents: this.focusableComponents\n      });\n    }\n\n    /**\n     * Removes component from the array of focusable components.\n     *\n     * @param {Component} component - The component to be removed from the focusable components array.\n     */\n    remove(component) {\n      for (let i = 0; i < this.focusableComponents.length; i++) {\n        if (this.focusableComponents[i].name() === component.name()) {\n          this.focusableComponents.splice(i, 1);\n          // Trigger the notification manually\n          this.trigger({\n            type: 'focusableComponentsChanged',\n            focusableComponents: this.focusableComponents\n          });\n          return;\n        }\n      }\n    }\n\n    /**\n     * Clears array of focusable components.\n     */\n    clear() {\n      // Check if the array is already empty to avoid unnecessary event triggering\n      if (this.focusableComponents.length > 0) {\n        // Clear the array\n        this.focusableComponents = [];\n\n        // Trigger the notification manually\n        this.trigger({\n          type: 'focusableComponentsChanged',\n          focusableComponents: this.focusableComponents\n        });\n      }\n    }\n\n    /**\n     * Navigates to the next focusable component based on the specified direction.\n     *\n     * @param {string} direction 'up', 'down', 'left', 'right'\n     */\n    move(direction) {\n      const currentFocusedComponent = this.getCurrentComponent();\n      if (!currentFocusedComponent) {\n        return;\n      }\n      const currentPositions = currentFocusedComponent.getPositions();\n      const candidates = this.focusableComponents.filter(component => component !== currentFocusedComponent && this.isInDirection_(currentPositions.boundingClientRect, component.getPositions().boundingClientRect, direction));\n      const bestCandidate = this.findBestCandidate_(currentPositions.center, candidates, direction);\n      if (bestCandidate) {\n        this.focus(bestCandidate);\n      } else {\n        this.trigger({\n          type: 'endOfFocusableComponents',\n          direction,\n          focusedComponent: currentFocusedComponent\n        });\n      }\n    }\n\n    /**\n     * Finds the best candidate on the current center position,\n     * the list of candidates, and the specified navigation direction.\n     *\n     * @param {Object} currentCenter The center position of the current focused component element.\n     * @param {Array} candidates An array of candidate components to receive focus.\n     * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').\n     * @return {Object|null} The component that is the best candidate for receiving focus.\n     */\n    findBestCandidate_(currentCenter, candidates, direction) {\n      let minDistance = Infinity;\n      let bestCandidate = null;\n      for (const candidate of candidates) {\n        const candidateCenter = candidate.getPositions().center;\n        const distance = this.calculateDistance_(currentCenter, candidateCenter, direction);\n        if (distance < minDistance) {\n          minDistance = distance;\n          bestCandidate = candidate;\n        }\n      }\n      return bestCandidate;\n    }\n\n    /**\n     * Determines if a target rectangle is in the specified navigation direction\n     * relative to a source rectangle.\n     *\n     * @param {Object} srcRect The bounding rectangle of the source element.\n     * @param {Object} targetRect The bounding rectangle of the target element.\n     * @param {string} direction The navigation direction ('up', 'down', 'left', 'right').\n     * @return {boolean} True if the target is in the specified direction relative to the source.\n     */\n    isInDirection_(srcRect, targetRect, direction) {\n      switch (direction) {\n        case 'right':\n          return targetRect.left >= srcRect.right;\n        case 'left':\n          return targetRect.right <= srcRect.left;\n        case 'down':\n          return targetRect.top >= srcRect.bottom;\n        case 'up':\n          return targetRect.bottom <= srcRect.top;\n        default:\n          return false;\n      }\n    }\n\n    /**\n     * Focus the last focused component saved before blur on player.\n     */\n    refocusComponent() {\n      if (this.lastFocusedComponent_) {\n        // If user is not active, set it to active.\n        if (!this.player_.userActive()) {\n          this.player_.userActive(true);\n        }\n        this.updateFocusableComponents();\n\n        // Search inside array of 'focusableComponents' for a match of name of\n        // the last focused component.\n        for (let i = 0; i < this.focusableComponents.length; i++) {\n          if (this.focusableComponents[i].name() === this.lastFocusedComponent_.name()) {\n            this.focus(this.focusableComponents[i]);\n            return;\n          }\n        }\n      } else {\n        this.focus(this.updateFocusableComponents()[0]);\n      }\n    }\n\n    /**\n     * Focuses on a given component.\n     * If the component is available to be focused, it focuses on the component.\n     * If not, it attempts to find a suitable DOM child within the component and focuses on it.\n     *\n     * @param {Component} component - The component to be focused.\n     */\n    focus(component) {\n      if (typeof component !== 'object') {\n        return;\n      }\n      if (component.getIsAvailableToBeFocused(component.el())) {\n        component.focus();\n      } else if (this.findSuitableDOMChild(component)) {\n        this.findSuitableDOMChild(component).focus();\n      }\n    }\n\n    /**\n     * Calculates the distance between two points, adjusting the calculation based on\n     * the specified navigation direction.\n     *\n     * @param {Object} center1 The center point of the first element.\n     * @param {Object} center2 The center point of the second element.\n     * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').\n     * @return {number} The calculated distance between the two centers.\n     */\n    calculateDistance_(center1, center2, direction) {\n      const dx = Math.abs(center1.x - center2.x);\n      const dy = Math.abs(center1.y - center2.y);\n      let distance;\n      switch (direction) {\n        case 'right':\n        case 'left':\n          // Higher weight for vertical distance in horizontal navigation.\n          distance = dx + dy * 100;\n          break;\n        case 'up':\n          // Strongly prioritize vertical proximity for UP navigation.\n          // Adjust the weight to ensure that elements directly above are favored.\n          distance = dy * 2 + dx * 0.5;\n          break;\n        case 'down':\n          // More balanced weight for vertical and horizontal distances.\n          // Adjust the weights here to find the best balance.\n          distance = dy * 5 + dx;\n          break;\n        default:\n          distance = dx + dy;\n      }\n      return distance;\n    }\n\n    /**\n     * This gets called by 'handlePlayerBlur_' if 'spatialNavigation' is enabled.\n     * Searches for the first 'TextTrackSelect' inside of modal to focus.\n     *\n     * @private\n     */\n    searchForTrackSelect_() {\n      const spatialNavigation = this;\n      for (const component of spatialNavigation.updateFocusableComponents()) {\n        if (component.constructor.name === 'TextTrackSelect') {\n          spatialNavigation.focus(component);\n          break;\n        }\n      }\n    }\n  }\n\n  /**\n   * @file loader.js\n   */\n\n  /** @import Player from '../player' */\n\n  /**\n   * The `MediaLoader` is the `Component` that decides which playback technology to load\n   * when a player is initialized.\n   *\n   * @extends Component\n   */\n  class MediaLoader extends Component$1 {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should attach to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function that is run when this component is ready.\n     */\n    constructor(player, options, ready) {\n      // MediaLoader has no element\n      const options_ = merge$2({\n        createEl: false\n      }, options);\n      super(player, options_, ready);\n\n      // If there are no sources when the player is initialized,\n      // load the first supported playback technology.\n\n      if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\n        for (let i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n          const techName = toTitleCase$1(j[i]);\n          let tech = Tech.getTech(techName);\n\n          // Support old behavior of techs being registered as components.\n          // Remove once that deprecated behavior is removed.\n          if (!techName) {\n            tech = Component$1.getComponent(techName);\n          }\n\n          // Check if the browser supports this technology\n          if (tech && tech.isSupported()) {\n            player.loadTech_(techName);\n            break;\n          }\n        }\n      } else {\n        // Loop through playback technologies (e.g. HTML5) and check for support.\n        // Then load the best source.\n        // A few assumptions here:\n        //   All playback technologies respect preload false.\n        player.src(options.playerOptions.sources);\n      }\n    }\n  }\n  Component$1.registerComponent('MediaLoader', MediaLoader);\n\n  /**\n   * @file clickable-component.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * Component which is clickable or keyboard actionable, but is not a\n   * native HTML button.\n   *\n   * @extends Component\n   */\n  class ClickableComponent extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param  {Player} player\n     *         The `Player` that this class should be attached to.\n     *\n     * @param  {Object} [options]\n     *         The key/value store of component options.\n     *\n     * @param  {function} [options.clickHandler]\n     *         The function to call when the button is clicked / activated\n     *\n     * @param  {string} [options.controlText]\n     *         The text to set on the button\n     *\n     * @param  {string} [options.className]\n     *         A class or space separated list of classes to add the component\n     *\n     */\n    constructor(player, options) {\n      super(player, options);\n      if (this.options_.controlText) {\n        this.controlText(this.options_.controlText);\n      }\n      this.handleMouseOver_ = e => this.handleMouseOver(e);\n      this.handleMouseOut_ = e => this.handleMouseOut(e);\n      this.handleClick_ = e => this.handleClick(e);\n      this.handleKeyDown_ = e => this.handleKeyDown(e);\n      this.emitTapEvents();\n      this.enable();\n    }\n\n    /**\n     * Create the `ClickableComponent`s DOM element.\n     *\n     * @param {string} [tag=div]\n     *        The element's node type.\n     *\n     * @param {Object} [props={}]\n     *        An object of properties that should be set on the element.\n     *\n     * @param {Object} [attributes={}]\n     *        An object of attributes that should be set on the element.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl(tag = 'div', props = {}, attributes = {}) {\n      props = Object.assign({\n        className: this.buildCSSClass(),\n        tabIndex: 0\n      }, props);\n      if (tag === 'button') {\n        log$1.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n      }\n\n      // Add ARIA attributes for clickable element which is not a native HTML button\n      attributes = Object.assign({\n        role: 'button'\n      }, attributes);\n      this.tabIndex_ = props.tabIndex;\n      const el = createEl(tag, props, attributes);\n      if (!this.player_.options_.experimentalSvgIcons) {\n        el.appendChild(createEl('span', {\n          className: 'vjs-icon-placeholder'\n        }, {\n          'aria-hidden': true\n        }));\n      }\n      this.createControlTextEl(el);\n      return el;\n    }\n    dispose() {\n      // remove controlTextEl_ on dispose\n      this.controlTextEl_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Create a control text element on this `ClickableComponent`\n     *\n     * @param {Element} [el]\n     *        Parent element for the control text.\n     *\n     * @return {Element}\n     *         The control text element that gets created.\n     */\n    createControlTextEl(el) {\n      this.controlTextEl_ = createEl('span', {\n        className: 'vjs-control-text'\n      }, {\n        // let the screen reader user know that the text of the element may change\n        'aria-live': 'polite'\n      });\n      if (el) {\n        el.appendChild(this.controlTextEl_);\n      }\n      this.controlText(this.controlText_, el);\n      return this.controlTextEl_;\n    }\n\n    /**\n     * Get or set the localize text to use for the controls on the `ClickableComponent`.\n     *\n     * @param {string} [text]\n     *        Control text for element.\n     *\n     * @param {Element} [el=this.el()]\n     *        Element to set the title on.\n     *\n     * @return {string}\n     *         - The control text when getting\n     */\n    controlText(text, el = this.el()) {\n      if (text === undefined) {\n        return this.controlText_ || 'Need Text';\n      }\n      const localizedText = this.localize(text);\n\n      /** @protected */\n      this.controlText_ = text;\n      textContent(this.controlTextEl_, localizedText);\n      if (!this.nonIconControl && !this.player_.options_.noUITitleAttributes) {\n        // Set title attribute if only an icon is shown\n        el.setAttribute('title', localizedText);\n      }\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-control vjs-button ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Enable this `ClickableComponent`\n     */\n    enable() {\n      if (!this.enabled_) {\n        this.enabled_ = true;\n        this.removeClass('vjs-disabled');\n        this.el_.setAttribute('aria-disabled', 'false');\n        if (typeof this.tabIndex_ !== 'undefined') {\n          this.el_.setAttribute('tabIndex', this.tabIndex_);\n        }\n        this.on(['tap', 'click'], this.handleClick_);\n        this.on('keydown', this.handleKeyDown_);\n      }\n    }\n\n    /**\n     * Disable this `ClickableComponent`\n     */\n    disable() {\n      this.enabled_ = false;\n      this.addClass('vjs-disabled');\n      this.el_.setAttribute('aria-disabled', 'true');\n      if (typeof this.tabIndex_ !== 'undefined') {\n        this.el_.removeAttribute('tabIndex');\n      }\n      this.off('mouseover', this.handleMouseOver_);\n      this.off('mouseout', this.handleMouseOut_);\n      this.off(['tap', 'click'], this.handleClick_);\n      this.off('keydown', this.handleKeyDown_);\n    }\n\n    /**\n     * Handles language change in ClickableComponent for the player in components\n     *\n     *\n     */\n    handleLanguagechange() {\n      this.controlText(this.controlText_);\n    }\n\n    /**\n     * Event handler that is called when a `ClickableComponent` receives a\n     * `click` or `tap` event.\n     *\n     * @param {Event} event\n     *        The `tap` or `click` event that caused this function to be called.\n     *\n     * @listens tap\n     * @listens click\n     * @abstract\n     */\n    handleClick(event) {\n      if (this.options_.clickHandler) {\n        this.options_.clickHandler.call(this, arguments);\n      }\n    }\n\n    /**\n     * Event handler that is called when a `ClickableComponent` receives a\n     * `keydown` event.\n     *\n     * By default, if the key is Space or Enter, it will trigger a `click` event.\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      // Support Space or Enter key operation to fire a click event. Also,\n      // prevent the event from propagating through the DOM and triggering\n      // Player hotkeys.\n      if (event.key === ' ' || event.key === 'Enter') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.trigger('click');\n      } else {\n        // Pass keypress handling up for unsupported keys\n        super.handleKeyDown(event);\n      }\n    }\n  }\n  Component$1.registerComponent('ClickableComponent', ClickableComponent);\n\n  /**\n   * @file poster-image.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * A `ClickableComponent` that handles showing the poster image for the player.\n   *\n   * @extends ClickableComponent\n   */\n  class PosterImage extends ClickableComponent {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should attach to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.update();\n      this.update_ = e => this.update(e);\n      player.on('posterchange', this.update_);\n    }\n\n    /**\n     * Clean up and dispose of the `PosterImage`.\n     */\n    dispose() {\n      this.player().off('posterchange', this.update_);\n      super.dispose();\n    }\n\n    /**\n     * Create the `PosterImage`s DOM element.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl() {\n      // The el is an empty div to keep position in the DOM\n      // A picture and img el will be inserted when a source is set\n      return createEl('div', {\n        className: 'vjs-poster'\n      });\n    }\n\n    /**\n     * Get or set the `PosterImage`'s crossOrigin option.\n     *\n     * @param {string|null} [value]\n     *        The value to set the crossOrigin to. If an argument is\n     *        given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.\n     *\n     * @return {string|null}\n     *         - The current crossOrigin value of the `Player` when getting.\n     *         - undefined when setting\n     */\n    crossOrigin(value) {\n      // `null` can be set to unset a value\n      if (typeof value === 'undefined') {\n        if (this.$('img')) {\n          // If the poster's element exists, give its value\n          return this.$('img').crossOrigin;\n        } else if (this.player_.tech_ && this.player_.tech_.isReady_) {\n          // If not but the tech is ready, query the tech\n          return this.player_.crossOrigin();\n        }\n        // Otherwise check options as the  poster is usually set before the state of crossorigin\n        // can be retrieved by the getter\n        return this.player_.options_.crossOrigin || this.player_.options_.crossorigin || null;\n      }\n      if (value !== null && value !== 'anonymous' && value !== 'use-credentials') {\n        this.player_.log.warn(`crossOrigin must be null,  \"anonymous\" or \"use-credentials\", given \"${value}\"`);\n        return;\n      }\n      if (this.$('img')) {\n        this.$('img').crossOrigin = value;\n      }\n      return;\n    }\n\n    /**\n     * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\n     *\n     * @listens Player#posterchange\n     *\n     * @param {Event} [event]\n     *        The `Player#posterchange` event that triggered this function.\n     */\n    update(event) {\n      const url = this.player().poster();\n      this.setSrc(url);\n\n      // If there's no poster source we should display:none on this component\n      // so it's not still clickable or right-clickable\n      if (url) {\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n\n    /**\n     * Set the source of the `PosterImage` depending on the display method. (Re)creates\n     * the inner picture and img elementss when needed.\n     *\n     * @param {string} [url]\n     *        The URL to the source for the `PosterImage`. If not specified or falsy,\n     *        any source and ant inner picture/img are removed.\n     */\n    setSrc(url) {\n      if (!url) {\n        this.el_.textContent = '';\n        return;\n      }\n      if (!this.$('img')) {\n        this.el_.appendChild(createEl('picture', {\n          className: 'vjs-poster',\n          // Don't want poster to be tabbable.\n          tabIndex: -1\n        }, {}, createEl('img', {\n          loading: 'lazy',\n          crossOrigin: this.crossOrigin()\n        }, {\n          alt: ''\n        })));\n      }\n      this.$('img').src = url;\n    }\n\n    /**\n     * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\n     * {@link ClickableComponent#handleClick} for instances where this will be triggered.\n     *\n     * @listens tap\n     * @listens click\n     * @listens keydown\n     *\n     * @param {Event} event\n     +        The `click`, `tap` or `keydown` event that caused this function to be called.\n     */\n    handleClick(event) {\n      // We don't want a click to trigger playback when controls are disabled\n      if (!this.player_.controls()) {\n        return;\n      }\n      if (this.player_.tech(true)) {\n        this.player_.tech(true).focus();\n      }\n      if (this.player_.paused()) {\n        silencePromise(this.player_.play());\n      } else {\n        this.player_.pause();\n      }\n    }\n  }\n\n  /**\n   * Get or set the `PosterImage`'s crossorigin option. For the HTML5 player, this\n   * sets the `crossOrigin` property on the `<img>` tag to control the CORS\n   * behavior.\n   *\n   * @param {string|null} [value]\n   *        The value to set the `PosterImages`'s crossorigin to. If an argument is\n   *        given, must be one of `anonymous` or `use-credentials`.\n   *\n   * @return {string|null|undefined}\n   *         - The current crossorigin value of the `Player` when getting.\n   *         - undefined when setting\n   */\n  PosterImage.prototype.crossorigin = PosterImage.prototype.crossOrigin;\n  Component$1.registerComponent('PosterImage', PosterImage);\n\n  /**\n   * @file text-track-display.js\n   */\n\n  /** @import Player from '../player' */\n\n  const darkGray = '#222';\n  const lightGray = '#ccc';\n  const fontMap = {\n    monospace: 'monospace',\n    sansSerif: 'sans-serif',\n    serif: 'serif',\n    monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n    monospaceSerif: '\"Courier New\", monospace',\n    proportionalSansSerif: 'sans-serif',\n    proportionalSerif: 'serif',\n    casual: '\"Comic Sans MS\", Impact, fantasy',\n    script: '\"Monotype Corsiva\", cursive',\n    smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n  };\n\n  /**\n   * Construct an rgba color from a given hex color code.\n   *\n   * @param {number} color\n   *        Hex number for color, like #f0e or #f604e2.\n   *\n   * @param {number} opacity\n   *        Value for opacity, 0.0 - 1.0.\n   *\n   * @return {string}\n   *         The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\n   */\n  function constructColor(color, opacity) {\n    let hex;\n    if (color.length === 4) {\n      // color looks like \"#f0e\"\n      hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\n    } else if (color.length === 7) {\n      // color looks like \"#f604e2\"\n      hex = color.slice(1);\n    } else {\n      throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\n    }\n    return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\n  }\n\n  /**\n   * Try to update the style of a DOM element. Some style changes will throw an error,\n   * particularly in IE8. Those should be noops.\n   *\n   * @param {Element} el\n   *        The DOM element to be styled.\n   *\n   * @param {string} style\n   *        The CSS property on the element that should be styled.\n   *\n   * @param {string} rule\n   *        The style rule that should be applied to the property.\n   *\n   * @private\n   */\n  function tryUpdateStyle(el, style, rule) {\n    try {\n      el.style[style] = rule;\n    } catch (e) {\n      // Satisfies linter.\n      return;\n    }\n  }\n\n  /**\n   * Converts the CSS top/right/bottom/left property numeric value to string in pixels.\n   *\n   * @param {number} position\n   *        The CSS top/right/bottom/left property value.\n   *\n   * @return {string}\n   *          The CSS property value that was created, like '10px'.\n   *\n   * @private\n   */\n  function getCSSPositionValue(position) {\n    return position ? `${position}px` : '';\n  }\n\n  /**\n   * The component for displaying text track cues.\n   *\n   * @extends Component\n   */\n  class TextTrackDisplay extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function to call when `TextTrackDisplay` is ready.\n     */\n    constructor(player, options, ready) {\n      super(player, options, ready);\n      const updateDisplayTextHandler = e => this.updateDisplay(e);\n      const updateDisplayHandler = e => {\n        this.updateDisplayOverlay();\n        this.updateDisplay(e);\n      };\n      player.on('loadstart', e => this.toggleDisplay(e));\n      player.on('texttrackchange', updateDisplayTextHandler);\n      player.on('loadedmetadata', e => {\n        this.updateDisplayOverlay();\n        this.preselectTrack(e);\n      });\n\n      // This used to be called during player init, but was causing an error\n      // if a track should show by default and the display hadn't loaded yet.\n      // Should probably be moved to an external track loader when we support\n      // tracks that don't need a display.\n      player.ready(bind_(this, function () {\n        if (player.tech_ && player.tech_.featuresNativeTextTracks) {\n          this.hide();\n          return;\n        }\n        player.on('fullscreenchange', updateDisplayHandler);\n        player.on('playerresize', updateDisplayHandler);\n        const screenOrientation = window.screen.orientation || window;\n        const changeOrientationEvent = window.screen.orientation ? 'change' : 'orientationchange';\n        screenOrientation.addEventListener(changeOrientationEvent, updateDisplayHandler);\n        player.on('dispose', () => screenOrientation.removeEventListener(changeOrientationEvent, updateDisplayHandler));\n        const tracks = this.options_.playerOptions.tracks || [];\n        for (let i = 0; i < tracks.length; i++) {\n          this.player_.addRemoteTextTrack(tracks[i], true);\n        }\n        this.preselectTrack();\n      }));\n    }\n\n    /**\n    * Preselect a track following this precedence:\n    * - matches the previously selected {@link TextTrack}'s language and kind\n    * - matches the previously selected {@link TextTrack}'s language only\n    * - is the first default captions track\n    * - is the first default descriptions track\n    *\n    * @listens Player#loadstart\n    */\n    preselectTrack() {\n      const modes = {\n        captions: 1,\n        subtitles: 1\n      };\n      const trackList = this.player_.textTracks();\n      const userPref = this.player_.cache_.selectedLanguage;\n      let firstDesc;\n      let firstCaptions;\n      let preferredTrack;\n      for (let i = 0; i < trackList.length; i++) {\n        const track = trackList[i];\n        if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\n          // Always choose the track that matches both language and kind\n          if (track.kind === userPref.kind) {\n            preferredTrack = track;\n            // or choose the first track that matches language\n          } else if (!preferredTrack) {\n            preferredTrack = track;\n          }\n\n          // clear everything if offTextTrackMenuItem was clicked\n        } else if (userPref && !userPref.enabled) {\n          preferredTrack = null;\n          firstDesc = null;\n          firstCaptions = null;\n        } else if (track.default) {\n          if (track.kind === 'descriptions' && !firstDesc) {\n            firstDesc = track;\n          } else if (track.kind in modes && !firstCaptions) {\n            firstCaptions = track;\n          }\n        }\n      }\n\n      // The preferredTrack matches the user preference and takes\n      // precedence over all the other tracks.\n      // So, display the preferredTrack before the first default track\n      // and the subtitles/captions track before the descriptions track\n      if (preferredTrack) {\n        preferredTrack.mode = 'showing';\n      } else if (firstCaptions) {\n        firstCaptions.mode = 'showing';\n      } else if (firstDesc) {\n        firstDesc.mode = 'showing';\n      }\n    }\n\n    /**\n     * Turn display of {@link TextTrack}'s from the current state into the other state.\n     * There are only two states:\n     * - 'shown'\n     * - 'hidden'\n     *\n     * @listens Player#loadstart\n     */\n    toggleDisplay() {\n      if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\n        this.hide();\n      } else {\n        this.show();\n      }\n    }\n\n    /**\n     * Create the {@link Component}'s DOM element.\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-text-track-display'\n      }, {\n        'translate': 'yes',\n        'aria-live': 'off',\n        'aria-atomic': 'true'\n      });\n    }\n\n    /**\n     * Clear all displayed {@link TextTrack}s.\n     */\n    clearDisplay() {\n      if (typeof window.WebVTT === 'function') {\n        window.WebVTT.processCues(window, [], this.el_);\n      }\n    }\n\n    /**\n     * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\n     * a {@link Player#fullscreenchange} is fired.\n     *\n     * @listens Player#texttrackchange\n     * @listens Player#fullscreenchange\n     */\n    updateDisplay() {\n      const tracks = this.player_.textTracks();\n      const allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n      this.clearDisplay();\n      if (allowMultipleShowingTracks) {\n        const showingTracks = [];\n        for (let i = 0; i < tracks.length; ++i) {\n          const track = tracks[i];\n          if (track.mode !== 'showing') {\n            continue;\n          }\n          showingTracks.push(track);\n        }\n        this.updateForTrack(showingTracks);\n        return;\n      }\n\n      //  Track display prioritization model: if multiple tracks are 'showing',\n      //  display the first 'subtitles' or 'captions' track which is 'showing',\n      //  otherwise display the first 'descriptions' track which is 'showing'\n\n      let descriptionsTrack = null;\n      let captionsSubtitlesTrack = null;\n      let i = tracks.length;\n      while (i--) {\n        const track = tracks[i];\n        if (track.mode === 'showing') {\n          if (track.kind === 'descriptions') {\n            descriptionsTrack = track;\n          } else {\n            captionsSubtitlesTrack = track;\n          }\n        }\n      }\n      if (captionsSubtitlesTrack) {\n        if (this.getAttribute('aria-live') !== 'off') {\n          this.setAttribute('aria-live', 'off');\n        }\n        this.updateForTrack(captionsSubtitlesTrack);\n      } else if (descriptionsTrack) {\n        if (this.getAttribute('aria-live') !== 'assertive') {\n          this.setAttribute('aria-live', 'assertive');\n        }\n        this.updateForTrack(descriptionsTrack);\n      }\n      if (!window.CSS.supports('inset', '10px')) {\n        const textTrackDisplay = this.el_;\n        const vjsTextTrackCues = textTrackDisplay.querySelectorAll('.vjs-text-track-cue');\n        const controlBarHeight = this.player_.controlBar.el_.getBoundingClientRect().height;\n        const playerHeight = this.player_.el_.getBoundingClientRect().height;\n\n        // Clear inline style before getting actual height of textTrackDisplay\n        textTrackDisplay.style = '';\n\n        // textrack style updates, this styles are required to be inline\n        tryUpdateStyle(textTrackDisplay, 'position', 'relative');\n        tryUpdateStyle(textTrackDisplay, 'height', playerHeight - controlBarHeight + 'px');\n        tryUpdateStyle(textTrackDisplay, 'top', 'unset');\n        if (IS_SMART_TV) {\n          tryUpdateStyle(textTrackDisplay, 'bottom', playerHeight + 'px');\n        } else {\n          tryUpdateStyle(textTrackDisplay, 'bottom', '0px');\n        }\n\n        // vjsTextTrackCue style updates\n        if (vjsTextTrackCues.length > 0) {\n          vjsTextTrackCues.forEach(vjsTextTrackCue => {\n            // verify if inset styles are inline\n            if (vjsTextTrackCue.style.inset) {\n              const insetStyles = vjsTextTrackCue.style.inset.split(' ');\n\n              // expected value is always 3\n              if (insetStyles.length === 3) {\n                Object.assign(vjsTextTrackCue.style, {\n                  top: insetStyles[0],\n                  right: insetStyles[1],\n                  bottom: insetStyles[2],\n                  left: 'unset'\n                });\n              }\n            }\n          });\n        }\n      }\n    }\n\n    /**\n     * Updates the displayed TextTrack to be sure it overlays the video when a either\n     * a {@link Player#texttrackchange} or a {@link Player#fullscreenchange} is fired.\n     */\n    updateDisplayOverlay() {\n      // inset-inline and inset-block are not supprted on old chrome, but these are\n      // only likely to be used on TV devices\n      if (!this.player_.videoHeight() || !window.CSS.supports('inset-inline: 10px')) {\n        return;\n      }\n      const playerWidth = this.player_.currentWidth();\n      const playerHeight = this.player_.currentHeight();\n      const playerAspectRatio = playerWidth / playerHeight;\n      const videoAspectRatio = this.player_.videoWidth() / this.player_.videoHeight();\n      let insetInlineMatch = 0;\n      let insetBlockMatch = 0;\n      if (Math.abs(playerAspectRatio - videoAspectRatio) > 0.1) {\n        if (playerAspectRatio > videoAspectRatio) {\n          insetInlineMatch = Math.round((playerWidth - playerHeight * videoAspectRatio) / 2);\n        } else {\n          insetBlockMatch = Math.round((playerHeight - playerWidth / videoAspectRatio) / 2);\n        }\n      }\n      tryUpdateStyle(this.el_, 'insetInline', getCSSPositionValue(insetInlineMatch));\n      tryUpdateStyle(this.el_, 'insetBlock', getCSSPositionValue(insetBlockMatch));\n    }\n\n    /**\n     * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\n     *\n     * @param {TextTrack} track\n     *        Text track object containing active cues to style.\n     */\n    updateDisplayState(track) {\n      const overrides = this.player_.textTrackSettings.getValues();\n      const cues = track.activeCues;\n      let i = cues.length;\n      while (i--) {\n        const cue = cues[i];\n        if (!cue) {\n          continue;\n        }\n        const cueDiv = cue.displayState;\n        if (overrides.color) {\n          cueDiv.firstChild.style.color = overrides.color;\n        }\n        if (overrides.textOpacity) {\n          tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\n        }\n        if (overrides.backgroundColor) {\n          cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n        }\n        if (overrides.backgroundOpacity) {\n          tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\n        }\n        if (overrides.windowColor) {\n          if (overrides.windowOpacity) {\n            tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\n          } else {\n            cueDiv.style.backgroundColor = overrides.windowColor;\n          }\n        }\n        if (overrides.edgeStyle) {\n          if (overrides.edgeStyle === 'dropshadow') {\n            cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n          } else if (overrides.edgeStyle === 'raised') {\n            cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n          } else if (overrides.edgeStyle === 'depressed') {\n            cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n          } else if (overrides.edgeStyle === 'uniform') {\n            cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n          }\n        }\n        if (overrides.fontPercent && overrides.fontPercent !== 1) {\n          const fontSize = window.parseFloat(cueDiv.style.fontSize);\n          cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\n          cueDiv.style.height = 'auto';\n          cueDiv.style.top = 'auto';\n        }\n        if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n          if (overrides.fontFamily === 'small-caps') {\n            cueDiv.firstChild.style.fontVariant = 'small-caps';\n          } else {\n            cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n          }\n        }\n      }\n    }\n\n    /**\n     * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\n     *\n     * @param {TextTrack|TextTrack[]} tracks\n     *        Text track object or text track array to be added to the list.\n     */\n    updateForTrack(tracks) {\n      if (!Array.isArray(tracks)) {\n        tracks = [tracks];\n      }\n      if (typeof window.WebVTT !== 'function' || tracks.every(track => {\n        return !track.activeCues;\n      })) {\n        return;\n      }\n      const cues = [];\n\n      // push all active track cues\n      for (let i = 0; i < tracks.length; ++i) {\n        const track = tracks[i];\n        for (let j = 0; j < track.activeCues.length; ++j) {\n          cues.push(track.activeCues[j]);\n        }\n      }\n\n      // removes all cues before it processes new ones\n      window.WebVTT.processCues(window, cues, this.el_);\n\n      // add unique class to each language text track & add settings styling if necessary\n      for (let i = 0; i < tracks.length; ++i) {\n        const track = tracks[i];\n        for (let j = 0; j < track.activeCues.length; ++j) {\n          const cueEl = track.activeCues[j].displayState;\n          addClass(cueEl, 'vjs-text-track-cue', 'vjs-text-track-cue-' + (track.language ? track.language : i));\n          if (track.language) {\n            setAttribute(cueEl, 'lang', track.language);\n          }\n        }\n        if (this.player_.textTrackSettings) {\n          this.updateDisplayState(track);\n        }\n      }\n    }\n  }\n  Component$1.registerComponent('TextTrackDisplay', TextTrackDisplay);\n\n  /**\n   * @file loading-spinner.js\n   */\n\n  /**\n   * A loading spinner for use during waiting/loading events.\n   *\n   * @extends Component\n   */\n  class LoadingSpinner extends Component$1 {\n    /**\n     * Create the `LoadingSpinner`s DOM element.\n     *\n     * @return {Element}\n     *         The dom element that gets created.\n     */\n    createEl() {\n      const isAudio = this.player_.isAudio();\n      const playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n      const controlText = createEl('span', {\n        className: 'vjs-control-text',\n        textContent: this.localize('{1} is loading.', [playerType])\n      });\n      const el = super.createEl('div', {\n        className: 'vjs-loading-spinner',\n        dir: 'ltr'\n      });\n      el.appendChild(controlText);\n      return el;\n    }\n\n    /**\n     * Update control text on languagechange\n     */\n    handleLanguagechange() {\n      this.$('.vjs-control-text').textContent = this.localize('{1} is loading.', [this.player_.isAudio() ? 'Audio Player' : 'Video Player']);\n    }\n  }\n  Component$1.registerComponent('LoadingSpinner', LoadingSpinner);\n\n  /**\n   * @file button.js\n   */\n\n  /**\n   * Base class for all buttons.\n   *\n   * @extends ClickableComponent\n   */\n  class Button extends ClickableComponent {\n    /**\n     * Create the `Button`s DOM element.\n     *\n     * @param {string} [tag=\"button\"]\n     *        The element's node type. This argument is IGNORED: no matter what\n     *        is passed, it will always create a `button` element.\n     *\n     * @param {Object} [props={}]\n     *        An object of properties that should be set on the element.\n     *\n     * @param {Object} [attributes={}]\n     *        An object of attributes that should be set on the element.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl(tag, props = {}, attributes = {}) {\n      tag = 'button';\n      props = Object.assign({\n        className: this.buildCSSClass()\n      }, props);\n\n      // Add attributes for button element\n      attributes = Object.assign({\n        // Necessary since the default button type is \"submit\"\n        type: 'button'\n      }, attributes);\n      const el = createEl(tag, props, attributes);\n      if (!this.player_.options_.experimentalSvgIcons) {\n        el.appendChild(createEl('span', {\n          className: 'vjs-icon-placeholder'\n        }, {\n          'aria-hidden': true\n        }));\n      }\n      this.createControlTextEl(el);\n      return el;\n    }\n\n    /**\n     * Add a child `Component` inside of this `Button`.\n     *\n     * @param {string|Component} child\n     *        The name or instance of a child to add.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of options that will get passed to children of\n     *        the child.\n     *\n     * @return {Component}\n     *         The `Component` that gets added as a child. When using a string the\n     *         `Component` will get created by this process.\n     *\n     * @deprecated since version 5\n     */\n    addChild(child, options = {}) {\n      const className = this.constructor.name;\n      log$1.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n      // Avoid the error message generated by ClickableComponent's addChild method\n      return Component$1.prototype.addChild.call(this, child, options);\n    }\n\n    /**\n     * Enable the `Button` element so that it can be activated or clicked. Use this with\n     * {@link Button#disable}.\n     */\n    enable() {\n      super.enable();\n      this.el_.removeAttribute('disabled');\n    }\n\n    /**\n     * Disable the `Button` element so that it cannot be activated or clicked. Use this with\n     * {@link Button#enable}.\n     */\n    disable() {\n      super.disable();\n      this.el_.setAttribute('disabled', 'disabled');\n    }\n\n    /**\n     * This gets called when a `Button` has focus and `keydown` is triggered via a key\n     * press.\n     *\n     * @param {KeyboardEvent} event\n     *        The event that caused this function to get called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      // Ignore Space or Enter key operation, which is handled by the browser for\n      // a button - though not for its super class, ClickableComponent. Also,\n      // prevent the event from propagating through the DOM and triggering Player\n      // hotkeys. We do not preventDefault here because we _want_ the browser to\n      // handle it.\n      if (event.key === ' ' || event.key === 'Enter') {\n        event.stopPropagation();\n        return;\n      }\n\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n  Component$1.registerComponent('Button', Button);\n\n  /**\n   * @file big-play-button.js\n   */\n\n  /**\n   * The initial play button that shows before the video has played. The hiding of the\n   * `BigPlayButton` get done via CSS and `Player` states.\n   *\n   * @extends Button\n   */\n  class BigPlayButton extends Button {\n    constructor(player, options) {\n      super(player, options);\n      this.mouseused_ = false;\n      this.setIcon('play');\n      this.on('mousedown', e => this.handleMouseDown(e));\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object. Always returns 'vjs-big-play-button'.\n     */\n    buildCSSClass() {\n      return 'vjs-big-play-button';\n    }\n\n    /**\n     * This gets called when a `BigPlayButton` \"clicked\". See {@link ClickableComponent}\n     * for more detailed information on what a click can be.\n     *\n     * @param {KeyboardEvent|MouseEvent|TouchEvent} event\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      const playPromise = this.player_.play();\n\n      // exit early if clicked via the mouse\n      if (this.mouseused_ && 'clientX' in event && 'clientY' in event) {\n        silencePromise(playPromise);\n        if (this.player_.tech(true)) {\n          this.player_.tech(true).focus();\n        }\n        return;\n      }\n      const cb = this.player_.getChild('controlBar');\n      const playToggle = cb && cb.getChild('playToggle');\n      if (!playToggle) {\n        this.player_.tech(true).focus();\n        return;\n      }\n      const playFocus = () => playToggle.focus();\n      if (isPromise(playPromise)) {\n        playPromise.then(playFocus, () => {});\n      } else {\n        this.setTimeout(playFocus, 1);\n      }\n    }\n\n    /**\n     * Event handler that is called when a `BigPlayButton` receives a\n     * `keydown` event.\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      this.mouseused_ = false;\n      super.handleKeyDown(event);\n    }\n\n    /**\n     * Handle `mousedown` events on the `BigPlayButton`.\n     *\n     * @param {MouseEvent} event\n     *        `mousedown` or `touchstart` event that triggered this function\n     *\n     * @listens mousedown\n     */\n    handleMouseDown(event) {\n      this.mouseused_ = true;\n    }\n  }\n\n  /**\n   * The text that should display over the `BigPlayButton`s controls. Added to for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  BigPlayButton.prototype.controlText_ = 'Play Video';\n  Component$1.registerComponent('BigPlayButton', BigPlayButton);\n\n  /**\n   * @file close-button.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * The `CloseButton` is a `{@link Button}` that fires a `close` event when\n   * it gets clicked.\n   *\n   * @extends Button\n   */\n  class CloseButton extends Button {\n    /**\n    * Creates an instance of the this class.\n    *\n    * @param  {Player} player\n    *         The `Player` that this class should be attached to.\n    *\n    * @param  {Object} [options]\n    *         The key/value store of player options.\n    */\n    constructor(player, options) {\n      super(player, options);\n      this.setIcon('cancel');\n      this.controlText(options && options.controlText || this.localize('Close'));\n    }\n\n    /**\n    * Builds the default DOM `className`.\n    *\n    * @return {string}\n    *         The DOM `className` for this object.\n    */\n    buildCSSClass() {\n      return `vjs-close-button ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * This gets called when a `CloseButton` gets clicked. See\n     * {@link ClickableComponent#handleClick} for more information on when\n     * this will be triggered\n     *\n     * @param {Event} event\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     * @fires CloseButton#close\n     */\n    handleClick(event) {\n      /**\n       * Triggered when the a `CloseButton` is clicked.\n       *\n       * @event CloseButton#close\n       * @type {Event}\n       *\n       * @property {boolean} [bubbles=false]\n       *           set to false so that the close event does not\n       *           bubble up to parents if there is no listener\n       */\n      this.trigger({\n        type: 'close',\n        bubbles: false\n      });\n    }\n    /**\n     * Event handler that is called when a `CloseButton` receives a\n     * `keydown` event.\n     *\n     * By default, if the key is Esc, it will trigger a `click` event.\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      // Esc button will trigger `click` event\n      if (event.key === 'Escape') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.trigger('click');\n      } else {\n        // Pass keypress handling up for unsupported keys\n        super.handleKeyDown(event);\n      }\n    }\n  }\n  Component$1.registerComponent('CloseButton', CloseButton);\n\n  /**\n   * @file play-toggle.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * Button to toggle between play and pause.\n   *\n   * @extends Button\n   */\n  class PlayToggle extends Button {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n\n      // show or hide replay icon\n      options.replay = options.replay === undefined || options.replay;\n      this.setIcon('play');\n      this.on(player, 'play', e => this.handlePlay(e));\n      this.on(player, 'pause', e => this.handlePause(e));\n      if (options.replay) {\n        this.on(player, 'ended', e => this.handleEnded(e));\n      }\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-play-control ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * This gets called when an `PlayToggle` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      if (this.player_.paused()) {\n        silencePromise(this.player_.play());\n      } else {\n        this.player_.pause();\n      }\n    }\n\n    /**\n     * This gets called once after the video has ended and the user seeks so that\n     * we can change the replay button back to a play button.\n     *\n     * @param {Event} [event]\n     *        The event that caused this function to run.\n     *\n     * @listens Player#seeked\n     */\n    handleSeeked(event) {\n      this.removeClass('vjs-ended');\n      if (this.player_.paused()) {\n        this.handlePause(event);\n      } else {\n        this.handlePlay(event);\n      }\n    }\n\n    /**\n     * Add the vjs-playing class to the element so it can change appearance.\n     *\n     * @param {Event} [event]\n     *        The event that caused this function to run.\n     *\n     * @listens Player#play\n     */\n    handlePlay(event) {\n      this.removeClass('vjs-ended', 'vjs-paused');\n      this.addClass('vjs-playing');\n      // change the button text to \"Pause\"\n      this.setIcon('pause');\n      this.controlText('Pause');\n    }\n\n    /**\n     * Add the vjs-paused class to the element so it can change appearance.\n     *\n     * @param {Event} [event]\n     *        The event that caused this function to run.\n     *\n     * @listens Player#pause\n     */\n    handlePause(event) {\n      this.removeClass('vjs-playing');\n      this.addClass('vjs-paused');\n      // change the button text to \"Play\"\n      this.setIcon('play');\n      this.controlText('Play');\n    }\n\n    /**\n     * Add the vjs-ended class to the element so it can change appearance\n     *\n     * @param {Event} [event]\n     *        The event that caused this function to run.\n     *\n     * @listens Player#ended\n     */\n    handleEnded(event) {\n      this.removeClass('vjs-playing');\n      this.addClass('vjs-ended');\n      // change the button text to \"Replay\"\n      this.setIcon('replay');\n      this.controlText('Replay');\n\n      // on the next seek remove the replay button\n      this.one(this.player_, 'seeked', e => this.handleSeeked(e));\n    }\n  }\n\n  /**\n   * The text that should display over the `PlayToggle`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  PlayToggle.prototype.controlText_ = 'Play';\n  Component$1.registerComponent('PlayToggle', PlayToggle);\n\n  /**\n   * @file time-display.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * Displays time information about the video\n   *\n   * @extends Component\n   */\n  class TimeDisplay extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.on(player, ['timeupdate', 'ended', 'seeking'], e => this.update(e));\n      this.updateTextNode_();\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const className = this.buildCSSClass();\n      const el = super.createEl('div', {\n        className: `${className} vjs-time-control vjs-control`\n      });\n      const span = createEl('span', {\n        className: 'vjs-control-text',\n        textContent: `${this.localize(this.labelText_)}\\u00a0`\n      }, {\n        role: 'presentation'\n      });\n      el.appendChild(span);\n      this.contentEl_ = createEl('span', {\n        className: `${className}-display`\n      }, {\n        // span elements have no implicit role, but some screen readers (notably VoiceOver)\n        // treat them as a break between items in the DOM when using arrow keys\n        // (or left-to-right swipes on iOS) to read contents of a page. Using\n        // role='presentation' causes VoiceOver to NOT treat this span as a break.\n        role: 'presentation'\n      });\n      el.appendChild(this.contentEl_);\n      return el;\n    }\n    dispose() {\n      this.contentEl_ = null;\n      this.textNode_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Updates the displayed time according to the `updateContent` function which is defined in the child class.\n     *\n     * @param {Event} [event]\n     *          The `timeupdate`, `ended` or `seeking` (if enableSmoothSeeking is true) event that caused this function to be called.\n     */\n    update(event) {\n      if (!this.player_.options_.enableSmoothSeeking && event.type === 'seeking') {\n        return;\n      }\n      this.updateContent(event);\n    }\n\n    /**\n     * Updates the time display text node with a new time\n     *\n     * @param {number} [time=0] the time to update to\n     *\n     * @private\n     */\n    updateTextNode_(time = 0) {\n      time = formatTime(time);\n      if (this.formattedTime_ === time) {\n        return;\n      }\n      this.formattedTime_ = time;\n      this.requestNamedAnimationFrame('TimeDisplay#updateTextNode_', () => {\n        if (!this.contentEl_) {\n          return;\n        }\n        let oldNode = this.textNode_;\n        if (oldNode && this.contentEl_.firstChild !== oldNode) {\n          oldNode = null;\n          log$1.warn('TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.');\n        }\n        this.textNode_ = document.createTextNode(this.formattedTime_);\n        if (!this.textNode_) {\n          return;\n        }\n        if (oldNode) {\n          this.contentEl_.replaceChild(this.textNode_, oldNode);\n        } else {\n          this.contentEl_.appendChild(this.textNode_);\n        }\n      });\n    }\n\n    /**\n     * To be filled out in the child class, should update the displayed time\n     * in accordance with the fact that the current time has changed.\n     *\n     * @param {Event} [event]\n     *        The `timeupdate`  event that caused this to run.\n     *\n     * @listens Player#timeupdate\n     */\n    updateContent(event) {}\n  }\n\n  /**\n   * The text that is added to the `TimeDisplay` for screen reader users.\n   *\n   * @type {string}\n   * @private\n   */\n  TimeDisplay.prototype.labelText_ = 'Time';\n\n  /**\n   * The text that should display over the `TimeDisplay`s controls. Added to for localization.\n   *\n   * @type {string}\n   * @protected\n   *\n   * @deprecated in v7; controlText_ is not used in non-active display Components\n   */\n  TimeDisplay.prototype.controlText_ = 'Time';\n  Component$1.registerComponent('TimeDisplay', TimeDisplay);\n\n  /**\n   * @file current-time-display.js\n   */\n\n  /**\n   * Displays the current time\n   *\n   * @extends Component\n   */\n  class CurrentTimeDisplay extends TimeDisplay {\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return 'vjs-current-time';\n    }\n\n    /**\n     * Update current time display\n     *\n     * @param {Event} [event]\n     *        The `timeupdate` event that caused this function to run.\n     *\n     * @listens Player#timeupdate\n     */\n    updateContent(event) {\n      // Allows for smooth scrubbing, when player can't keep up.\n      let time;\n      if (this.player_.ended()) {\n        time = this.player_.duration();\n      } else {\n        time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n      }\n      this.updateTextNode_(time);\n    }\n  }\n\n  /**\n   * The text that is added to the `CurrentTimeDisplay` for screen reader users.\n   *\n   * @type {string}\n   * @private\n   */\n  CurrentTimeDisplay.prototype.labelText_ = 'Current Time';\n\n  /**\n   * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\n   *\n   * @type {string}\n   * @protected\n   *\n   * @deprecated in v7; controlText_ is not used in non-active display Components\n   */\n  CurrentTimeDisplay.prototype.controlText_ = 'Current Time';\n  Component$1.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\n\n  /**\n   * @file duration-display.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * Displays the duration\n   *\n   * @extends Component\n   */\n  class DurationDisplay extends TimeDisplay {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      const updateContent = e => this.updateContent(e);\n\n      // we do not want to/need to throttle duration changes,\n      // as they should always display the changed duration as\n      // it has changed\n      this.on(player, 'durationchange', updateContent);\n\n      // Listen to loadstart because the player duration is reset when a new media element is loaded,\n      // but the durationchange on the user agent will not fire.\n      // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n      this.on(player, 'loadstart', updateContent);\n\n      // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\n      // listeners could have broken dependent applications/libraries. These\n      // can likely be removed for 7.0.\n      this.on(player, 'loadedmetadata', updateContent);\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return 'vjs-duration';\n    }\n\n    /**\n     * Update duration time display.\n     *\n     * @param {Event} [event]\n     *        The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\n     *        this function to be called.\n     *\n     * @listens Player#durationchange\n     * @listens Player#timeupdate\n     * @listens Player#loadedmetadata\n     */\n    updateContent(event) {\n      const duration = this.player_.duration();\n      this.updateTextNode_(duration);\n    }\n  }\n\n  /**\n   * The text that is added to the `DurationDisplay` for screen reader users.\n   *\n   * @type {string}\n   * @private\n   */\n  DurationDisplay.prototype.labelText_ = 'Duration';\n\n  /**\n   * The text that should display over the `DurationDisplay`s controls. Added to for localization.\n   *\n   * @type {string}\n   * @protected\n   *\n   * @deprecated in v7; controlText_ is not used in non-active display Components\n   */\n  DurationDisplay.prototype.controlText_ = 'Duration';\n  Component$1.registerComponent('DurationDisplay', DurationDisplay);\n\n  /**\n   * @file time-divider.js\n   */\n\n  /**\n   * The separator between the current time and duration.\n   * Can be hidden if it's not needed in the design.\n   *\n   * @extends Component\n   */\n  class TimeDivider extends Component$1 {\n    /**\n     * Create the component's DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl('div', {\n        className: 'vjs-time-control vjs-time-divider'\n      }, {\n        // this element and its contents can be hidden from assistive techs since\n        // it is made extraneous by the announcement of the control text\n        // for the current time and duration displays\n        'aria-hidden': true\n      });\n      const div = super.createEl('div');\n      const span = super.createEl('span', {\n        textContent: '/'\n      });\n      div.appendChild(span);\n      el.appendChild(div);\n      return el;\n    }\n  }\n  Component$1.registerComponent('TimeDivider', TimeDivider);\n\n  /**\n   * @file remaining-time-display.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * Displays the time left in the video\n   *\n   * @extends Component\n   */\n  class RemainingTimeDisplay extends TimeDisplay {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.on(player, 'durationchange', e => this.updateContent(e));\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return 'vjs-remaining-time';\n    }\n\n    /**\n     * Create the `Component`'s DOM element with the \"minus\" character prepend to the time\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl();\n      if (this.options_.displayNegative !== false) {\n        el.insertBefore(createEl('span', {}, {\n          'aria-hidden': true\n        }, '-'), this.contentEl_);\n      }\n      return el;\n    }\n\n    /**\n     * Update remaining time display.\n     *\n     * @param {Event} [event]\n     *        The `timeupdate` or `durationchange` event that caused this to run.\n     *\n     * @listens Player#timeupdate\n     * @listens Player#durationchange\n     */\n    updateContent(event) {\n      if (typeof this.player_.duration() !== 'number') {\n        return;\n      }\n      let time;\n\n      // @deprecated We should only use remainingTimeDisplay\n      // as of video.js 7\n      if (this.player_.ended()) {\n        time = 0;\n      } else if (this.player_.remainingTimeDisplay) {\n        time = this.player_.remainingTimeDisplay();\n      } else {\n        time = this.player_.remainingTime();\n      }\n      this.updateTextNode_(time);\n    }\n  }\n\n  /**\n   * The text that is added to the `RemainingTimeDisplay` for screen reader users.\n   *\n   * @type {string}\n   * @private\n   */\n  RemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\n\n  /**\n   * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\n   *\n   * @type {string}\n   * @protected\n   *\n   * @deprecated in v7; controlText_ is not used in non-active display Components\n   */\n  RemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\n  Component$1.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\n\n  /**\n   * @file live-display.js\n   */\n\n  /** @import Player from './player' */\n\n  // TODO - Future make it click to snap to live\n\n  /**\n   * Displays the live indicator when duration is Infinity.\n   *\n   * @extends Component\n   */\n  class LiveDisplay extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.updateShowing();\n      this.on(this.player(), 'durationchange', e => this.updateShowing(e));\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl('div', {\n        className: 'vjs-live-control vjs-control'\n      });\n      this.contentEl_ = createEl('div', {\n        className: 'vjs-live-display'\n      }, {\n        'aria-live': 'off'\n      });\n      this.contentEl_.appendChild(createEl('span', {\n        className: 'vjs-control-text',\n        textContent: `${this.localize('Stream Type')}\\u00a0`\n      }));\n      this.contentEl_.appendChild(document.createTextNode(this.localize('LIVE')));\n      el.appendChild(this.contentEl_);\n      return el;\n    }\n    dispose() {\n      this.contentEl_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\n     * it accordingly\n     *\n     * @param {Event} [event]\n     *        The {@link Player#durationchange} event that caused this function to run.\n     *\n     * @listens Player#durationchange\n     */\n    updateShowing(event) {\n      if (this.player().duration() === Infinity) {\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n  }\n  Component$1.registerComponent('LiveDisplay', LiveDisplay);\n\n  /**\n   * @file seek-to-live.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * Displays the live indicator when duration is Infinity.\n   *\n   * @extends Component\n   */\n  class SeekToLive extends Button {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.updateLiveEdgeStatus();\n      if (this.player_.liveTracker) {\n        this.updateLiveEdgeStatusHandler_ = e => this.updateLiveEdgeStatus(e);\n        this.on(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n      }\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl('button', {\n        className: 'vjs-seek-to-live-control vjs-control'\n      });\n      this.setIcon('circle', el);\n      this.textEl_ = createEl('span', {\n        className: 'vjs-seek-to-live-text',\n        textContent: this.localize('LIVE')\n      }, {\n        'aria-hidden': 'true'\n      });\n      el.appendChild(this.textEl_);\n      return el;\n    }\n\n    /**\n     * Update the state of this button if we are at the live edge\n     * or not\n     */\n    updateLiveEdgeStatus() {\n      // default to live edge\n      if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\n        this.setAttribute('aria-disabled', true);\n        this.addClass('vjs-at-live-edge');\n        this.controlText('Seek to live, currently playing live');\n      } else {\n        this.setAttribute('aria-disabled', false);\n        this.removeClass('vjs-at-live-edge');\n        this.controlText('Seek to live, currently behind live');\n      }\n    }\n\n    /**\n     * On click bring us as near to the live point as possible.\n     * This requires that we wait for the next `live-seekable-change`\n     * event which will happen every segment length seconds.\n     */\n    handleClick() {\n      this.player_.liveTracker.seekToLiveEdge();\n    }\n\n    /**\n     * Dispose of the element and stop tracking\n     */\n    dispose() {\n      if (this.player_.liveTracker) {\n        this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n      }\n      this.textEl_ = null;\n      super.dispose();\n    }\n  }\n  /**\n   * The text that should display over the `SeekToLive`s control. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  SeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\n  Component$1.registerComponent('SeekToLive', SeekToLive);\n\n  /**\n   * @file num.js\n   * @module num\n   */\n\n  /**\n   * Keep a number between a min and a max value\n   *\n   * @param {number} number\n   *        The number to clamp\n   *\n   * @param {number} min\n   *        The minimum value\n   * @param {number} max\n   *        The maximum value\n   *\n   * @return {number}\n   *         the clamped number\n   */\n  function clamp(number, min, max) {\n    number = Number(number);\n    return Math.min(max, Math.max(min, isNaN(number) ? min : number));\n  }\n\n  var Num = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    clamp: clamp\n  });\n\n  /**\n   * @file slider.js\n   */\n\n  /** @import Player from '../player' */\n\n  /**\n   * The base functionality for a slider. Can be vertical or horizontal.\n   * For instance the volume bar or the seek bar on a video is a slider.\n   *\n   * @extends Component\n   */\n  class Slider extends Component$1 {\n    /**\n    * Create an instance of this class\n    *\n    * @param {Player} player\n    *        The `Player` that this class should be attached to.\n    *\n    * @param {Object} [options]\n    *        The key/value store of player options.\n    */\n    constructor(player, options) {\n      super(player, options);\n      this.handleMouseDown_ = e => this.handleMouseDown(e);\n      this.handleMouseUp_ = e => this.handleMouseUp(e);\n      this.handleKeyDown_ = e => this.handleKeyDown(e);\n      this.handleClick_ = e => this.handleClick(e);\n      this.handleMouseMove_ = e => this.handleMouseMove(e);\n      this.update_ = e => this.update(e);\n\n      // Set property names to bar to match with the child Slider class is looking for\n      this.bar = this.getChild(this.options_.barName);\n\n      // Set a horizontal or vertical class on the slider depending on the slider type\n      this.vertical(!!this.options_.vertical);\n      this.enable();\n    }\n\n    /**\n     * Are controls are currently enabled for this slider or not.\n     *\n     * @return {boolean}\n     *         true if controls are enabled, false otherwise\n     */\n    enabled() {\n      return this.enabled_;\n    }\n\n    /**\n     * Enable controls for this slider if they are disabled\n     */\n    enable() {\n      if (this.enabled()) {\n        return;\n      }\n      this.on('mousedown', this.handleMouseDown_);\n      this.on('touchstart', this.handleMouseDown_);\n      this.on('keydown', this.handleKeyDown_);\n      this.on('click', this.handleClick_);\n\n      // TODO: deprecated, controlsvisible does not seem to be fired\n      this.on(this.player_, 'controlsvisible', this.update);\n      if (this.playerEvent) {\n        this.on(this.player_, this.playerEvent, this.update);\n      }\n      this.removeClass('disabled');\n      this.setAttribute('tabindex', 0);\n      this.enabled_ = true;\n    }\n\n    /**\n     * Disable controls for this slider if they are enabled\n     */\n    disable() {\n      if (!this.enabled()) {\n        return;\n      }\n      const doc = this.bar.el_.ownerDocument;\n      this.off('mousedown', this.handleMouseDown_);\n      this.off('touchstart', this.handleMouseDown_);\n      this.off('keydown', this.handleKeyDown_);\n      this.off('click', this.handleClick_);\n      this.off(this.player_, 'controlsvisible', this.update_);\n      this.off(doc, 'mousemove', this.handleMouseMove_);\n      this.off(doc, 'mouseup', this.handleMouseUp_);\n      this.off(doc, 'touchmove', this.handleMouseMove_);\n      this.off(doc, 'touchend', this.handleMouseUp_);\n      this.removeAttribute('tabindex');\n      this.addClass('disabled');\n      if (this.playerEvent) {\n        this.off(this.player_, this.playerEvent, this.update);\n      }\n      this.enabled_ = false;\n    }\n\n    /**\n     * Create the `Slider`s DOM element.\n     *\n     * @param {string} type\n     *        Type of element to create.\n     *\n     * @param {Object} [props={}]\n     *        List of properties in Object form.\n     *\n     * @param {Object} [attributes={}]\n     *        list of attributes in Object form.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl(type, props = {}, attributes = {}) {\n      // Add the slider element class to all sub classes\n      props.className = props.className + ' vjs-slider';\n      props = Object.assign({\n        tabIndex: 0\n      }, props);\n      attributes = Object.assign({\n        'role': 'slider',\n        'aria-valuenow': 0,\n        'aria-valuemin': 0,\n        'aria-valuemax': 100\n      }, attributes);\n      return super.createEl(type, props, attributes);\n    }\n\n    /**\n     * Handle `mousedown` or `touchstart` events on the `Slider`.\n     *\n     * @param {MouseEvent} event\n     *        `mousedown` or `touchstart` event that triggered this function\n     *\n     * @listens mousedown\n     * @listens touchstart\n     * @fires Slider#slideractive\n     */\n    handleMouseDown(event) {\n      const doc = this.bar.el_.ownerDocument;\n      if (event.type === 'mousedown') {\n        event.preventDefault();\n      }\n      // Do not call preventDefault() on touchstart in Chrome\n      // to avoid console warnings. Use a 'touch-action: none' style\n      // instead to prevent unintended scrolling.\n      // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n      if (event.type === 'touchstart' && !IS_CHROME) {\n        event.preventDefault();\n      }\n      blockTextSelection();\n      this.addClass('vjs-sliding');\n      /**\n       * Triggered when the slider is in an active state\n       *\n       * @event Slider#slideractive\n       * @type {MouseEvent}\n       */\n      this.trigger('slideractive');\n      this.on(doc, 'mousemove', this.handleMouseMove_);\n      this.on(doc, 'mouseup', this.handleMouseUp_);\n      this.on(doc, 'touchmove', this.handleMouseMove_);\n      this.on(doc, 'touchend', this.handleMouseUp_);\n      this.handleMouseMove(event, true);\n    }\n\n    /**\n     * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\n     * The `mousemove` and `touchmove` events will only only trigger this function during\n     * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\n     * {@link Slider#handleMouseUp}.\n     *\n     * @param {MouseEvent} event\n     *        `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\n     *        this function\n     * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false.\n     *\n     * @listens mousemove\n     * @listens touchmove\n     */\n    handleMouseMove(event) {}\n\n    /**\n     * Handle `mouseup` or `touchend` events on the `Slider`.\n     *\n     * @param {MouseEvent} event\n     *        `mouseup` or `touchend` event that triggered this function.\n     *\n     * @listens touchend\n     * @listens mouseup\n     * @fires Slider#sliderinactive\n     */\n    handleMouseUp(event) {\n      const doc = this.bar.el_.ownerDocument;\n      unblockTextSelection();\n      this.removeClass('vjs-sliding');\n      /**\n       * Triggered when the slider is no longer in an active state.\n       *\n       * @event Slider#sliderinactive\n       * @type {Event}\n       */\n      this.trigger('sliderinactive');\n      this.off(doc, 'mousemove', this.handleMouseMove_);\n      this.off(doc, 'mouseup', this.handleMouseUp_);\n      this.off(doc, 'touchmove', this.handleMouseMove_);\n      this.off(doc, 'touchend', this.handleMouseUp_);\n      this.update();\n    }\n\n    /**\n     * Update the progress bar of the `Slider`.\n     *\n     * @return {number}\n     *          The percentage of progress the progress bar represents as a\n     *          number from 0 to 1.\n     */\n    update() {\n      // In VolumeBar init we have a setTimeout for update that pops and update\n      // to the end of the execution stack. The player is destroyed before then\n      // update will cause an error\n      // If there's no bar...\n      if (!this.el_ || !this.bar) {\n        return;\n      }\n\n      // clamp progress between 0 and 1\n      // and only round to four decimal places, as we round to two below\n      const progress = this.getProgress();\n      if (progress === this.progress_) {\n        return progress;\n      }\n      this.progress_ = progress;\n      this.requestNamedAnimationFrame('Slider#update', () => {\n        // Set the new bar width or height\n        const sizeKey = this.vertical() ? 'height' : 'width';\n\n        // Convert to a percentage for css value\n        this.bar.el().style[sizeKey] = (progress * 100).toFixed(2) + '%';\n      });\n      return progress;\n    }\n\n    /**\n     * Get the percentage of the bar that should be filled\n     * but clamped and rounded.\n     *\n     * @return {number}\n     *         percentage filled that the slider is\n     */\n    getProgress() {\n      return Number(clamp(this.getPercent(), 0, 1).toFixed(4));\n    }\n\n    /**\n     * Calculate distance for slider\n     *\n     * @param {Event} event\n     *        The event that caused this function to run.\n     *\n     * @return {number}\n     *         The current position of the Slider.\n     *         - position.x for vertical `Slider`s\n     *         - position.y for horizontal `Slider`s\n     */\n    calculateDistance(event) {\n      const position = getPointerPosition(this.el_, event);\n      if (this.vertical()) {\n        return position.y;\n      }\n      return position.x;\n    }\n\n    /**\n     * Handle a `keydown` event on the `Slider`. Watches for left, right, up, and down\n     * arrow keys. This function will only be called when the slider has focus. See\n     * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\n     *\n     * @param {KeyboardEvent} event\n     *        the `keydown` event that caused this function to run.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      const spatialNavOptions = this.options_.playerOptions.spatialNavigation;\n      const spatialNavEnabled = spatialNavOptions && spatialNavOptions.enabled;\n      const horizontalSeek = spatialNavOptions && spatialNavOptions.horizontalSeek;\n      if (spatialNavEnabled) {\n        if (horizontalSeek && event.key === 'ArrowLeft' || !horizontalSeek && event.key === 'ArrowDown') {\n          event.preventDefault();\n          event.stopPropagation();\n          this.stepBack();\n        } else if (horizontalSeek && event.key === 'ArrowRight' || !horizontalSeek && event.key === 'ArrowUp') {\n          event.preventDefault();\n          event.stopPropagation();\n          this.stepForward();\n        } else {\n          super.handleKeyDown(event);\n        }\n\n        // Left and Down Arrows\n      } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepBack();\n\n        // Up and Right Arrows\n      } else if (event.key === 'ArrowUp' || event.key === 'ArrowRight') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepForward();\n      } else {\n        // Pass keydown handling up for unsupported keys\n        super.handleKeyDown(event);\n      }\n    }\n\n    /**\n     * Listener for click events on slider, used to prevent clicks\n     *   from bubbling up to parent elements like button menus.\n     *\n     * @param {Object} event\n     *        Event that caused this object to run\n     */\n    handleClick(event) {\n      event.stopPropagation();\n      event.preventDefault();\n    }\n\n    /**\n     * Get/set if slider is horizontal for vertical\n     *\n     * @param {boolean} [bool]\n     *        - true if slider is vertical,\n     *        - false is horizontal\n     *\n     * @return {boolean}\n     *         - true if slider is vertical, and getting\n     *         - false if the slider is horizontal, and getting\n     */\n    vertical(bool) {\n      if (bool === undefined) {\n        return this.vertical_ || false;\n      }\n      this.vertical_ = !!bool;\n      if (this.vertical_) {\n        this.addClass('vjs-slider-vertical');\n      } else {\n        this.addClass('vjs-slider-horizontal');\n      }\n    }\n  }\n  Component$1.registerComponent('Slider', Slider);\n\n  /**\n   * @file load-progress-bar.js\n   */\n\n  /** @import Player from '../../player' */\n\n  // get the percent width of a time compared to the total end\n  const percentify = (time, end) => clamp(time / end * 100, 0, 100).toFixed(2) + '%';\n\n  /**\n   * Shows loading progress\n   *\n   * @extends Component\n   */\n  class LoadProgressBar extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.partEls_ = [];\n      this.on(player, 'progress', e => this.update(e));\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl('div', {\n        className: 'vjs-load-progress'\n      });\n      const wrapper = createEl('span', {\n        className: 'vjs-control-text'\n      });\n      const loadedText = createEl('span', {\n        textContent: this.localize('Loaded')\n      });\n      const separator = document.createTextNode(': ');\n      this.percentageEl_ = createEl('span', {\n        className: 'vjs-control-text-loaded-percentage',\n        textContent: '0%'\n      });\n      el.appendChild(wrapper);\n      wrapper.appendChild(loadedText);\n      wrapper.appendChild(separator);\n      wrapper.appendChild(this.percentageEl_);\n      return el;\n    }\n    dispose() {\n      this.partEls_ = null;\n      this.percentageEl_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Update progress bar\n     *\n     * @param {Event} [event]\n     *        The `progress` event that caused this function to run.\n     *\n     * @listens Player#progress\n     */\n    update(event) {\n      this.requestNamedAnimationFrame('LoadProgressBar#update', () => {\n        const liveTracker = this.player_.liveTracker;\n        const buffered = this.player_.buffered();\n        const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n        const bufferedEnd = this.player_.bufferedEnd();\n        const children = this.partEls_;\n        const percent = percentify(bufferedEnd, duration);\n        if (this.percent_ !== percent) {\n          // update the width of the progress bar\n          this.el_.style.width = percent;\n          // update the control-text\n          textContent(this.percentageEl_, percent);\n          this.percent_ = percent;\n        }\n\n        // add child elements to represent the individual buffered time ranges\n        for (let i = 0; i < buffered.length; i++) {\n          const start = buffered.start(i);\n          const end = buffered.end(i);\n          let part = children[i];\n          if (!part) {\n            part = this.el_.appendChild(createEl());\n            children[i] = part;\n          }\n\n          //  only update if changed\n          if (part.dataset.start === start && part.dataset.end === end) {\n            continue;\n          }\n          part.dataset.start = start;\n          part.dataset.end = end;\n\n          // set the percent based on the width of the progress bar (bufferedEnd)\n          part.style.left = percentify(start, bufferedEnd);\n          part.style.width = percentify(end - start, bufferedEnd);\n        }\n\n        // remove unused buffered range elements\n        for (let i = children.length; i > buffered.length; i--) {\n          this.el_.removeChild(children[i - 1]);\n        }\n        children.length = buffered.length;\n      });\n    }\n  }\n  Component$1.registerComponent('LoadProgressBar', LoadProgressBar);\n\n  /**\n   * @file time-tooltip.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * Time tooltips display a time above the progress bar.\n   *\n   * @extends Component\n   */\n  class TimeTooltip extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The {@link Player} that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n    }\n\n    /**\n     * Create the time tooltip DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-time-tooltip'\n      }, {\n        'aria-hidden': 'true'\n      });\n    }\n\n    /**\n     * Updates the position of the time tooltip relative to the `SeekBar`.\n     *\n     * @param {Object} seekBarRect\n     *        The `ClientRect` for the {@link SeekBar} element.\n     *\n     * @param {number} seekBarPoint\n     *        A number from 0 to 1, representing a horizontal reference point\n     *        from the left edge of the {@link SeekBar}\n     */\n    update(seekBarRect, seekBarPoint, content) {\n      const tooltipRect = findPosition(this.el_);\n      const playerRect = getBoundingClientRect(this.player_.el());\n      const seekBarPointPx = seekBarRect.width * seekBarPoint;\n\n      // do nothing if either rect isn't available\n      // for example, if the player isn't in the DOM for testing\n      if (!playerRect || !tooltipRect) {\n        return;\n      }\n\n      // This is the space left of the `seekBarPoint` available within the bounds\n      // of the player. We calculate any gap between the left edge of the player\n      // and the left edge of the `SeekBar` and add the number of pixels in the\n      // `SeekBar` before hitting the `seekBarPoint`\n      let spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx;\n\n      // This is the space right of the `seekBarPoint` available within the bounds\n      // of the player. We calculate the number of pixels from the `seekBarPoint`\n      // to the right edge of the `SeekBar` and add to that any gap between the\n      // right edge of the `SeekBar` and the player.\n      let spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right);\n\n      // spaceRightOfPoint is always NaN for mouse time display\n      // because the seekbarRect does not have a right property. This causes\n      // the mouse tool tip to be truncated when it's close to the right edge of the player.\n      // In such cases, we ignore the `playerRect.right - seekBarRect.right` value when calculating.\n      // For the sake of consistency, we ignore seekBarRect.left - playerRect.left for the left edge.\n      if (!spaceRightOfPoint) {\n        spaceRightOfPoint = seekBarRect.width - seekBarPointPx;\n        spaceLeftOfPoint = seekBarPointPx;\n      }\n      // This is the number of pixels by which the tooltip will need to be pulled\n      // further to the right to center it over the `seekBarPoint`.\n      let pullTooltipBy = tooltipRect.width / 2;\n\n      // Adjust the `pullTooltipBy` distance to the left or right depending on\n      // the results of the space calculations above.\n      if (spaceLeftOfPoint < pullTooltipBy) {\n        pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n      } else if (spaceRightOfPoint < pullTooltipBy) {\n        pullTooltipBy = spaceRightOfPoint;\n      }\n\n      // Due to the imprecision of decimal/ratio based calculations and varying\n      // rounding behaviors, there are cases where the spacing adjustment is off\n      // by a pixel or two. This adds insurance to these calculations.\n      if (pullTooltipBy < 0) {\n        pullTooltipBy = 0;\n      } else if (pullTooltipBy > tooltipRect.width) {\n        pullTooltipBy = tooltipRect.width;\n      }\n\n      // prevent small width fluctuations within 0.4px from\n      // changing the value below.\n      // This really helps for live to prevent the play\n      // progress time tooltip from jittering\n      pullTooltipBy = Math.round(pullTooltipBy);\n      this.el_.style.right = `-${pullTooltipBy}px`;\n      this.write(content);\n    }\n\n    /**\n     * Write the time to the tooltip DOM element.\n     *\n     * @param {string} content\n     *        The formatted time for the tooltip.\n     */\n    write(content) {\n      textContent(this.el_, content);\n    }\n\n    /**\n     * Updates the position of the time tooltip relative to the `SeekBar`.\n     *\n     * @param {Object} seekBarRect\n     *        The `ClientRect` for the {@link SeekBar} element.\n     *\n     * @param {number} seekBarPoint\n     *        A number from 0 to 1, representing a horizontal reference point\n     *        from the left edge of the {@link SeekBar}\n     *\n     * @param {number} time\n     *        The time to update the tooltip to, not used during live playback\n     *\n     * @param {Function} cb\n     *        A function that will be called during the request animation frame\n     *        for tooltips that need to do additional animations from the default\n     */\n    updateTime(seekBarRect, seekBarPoint, time, cb) {\n      this.requestNamedAnimationFrame('TimeTooltip#updateTime', () => {\n        let content;\n        const duration = this.player_.duration();\n        if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n          const liveWindow = this.player_.liveTracker.liveWindow();\n          const secondsBehind = liveWindow - seekBarPoint * liveWindow;\n          content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n        } else {\n          content = formatTime(time, duration);\n        }\n        this.update(seekBarRect, seekBarPoint, content);\n        if (cb) {\n          cb();\n        }\n      });\n    }\n  }\n  Component$1.registerComponent('TimeTooltip', TimeTooltip);\n\n  /**\n   * @file play-progress-bar.js\n   */\n\n  /**\n   * Used by {@link SeekBar} to display media playback progress as part of the\n   * {@link ProgressControl}.\n   *\n   * @extends Component\n   */\n  class PlayProgressBar extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The {@link Player} that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.setIcon('circle');\n      this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n    }\n\n    /**\n     * Create the the DOM element for this class.\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-play-progress vjs-slider-bar'\n      }, {\n        'aria-hidden': 'true'\n      });\n    }\n\n    /**\n     * Enqueues updates to its own DOM as well as the DOM of its\n     * {@link TimeTooltip} child.\n     *\n     * @param {Object} seekBarRect\n     *        The `ClientRect` for the {@link SeekBar} element.\n     *\n     * @param {number} seekBarPoint\n     *        A number from 0 to 1, representing a horizontal reference point\n     *        from the left edge of the {@link SeekBar}\n     */\n    update(seekBarRect, seekBarPoint) {\n      const timeTooltip = this.getChild('timeTooltip');\n      if (!timeTooltip) {\n        return;\n      }\n      const time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n      timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n    }\n  }\n\n  /**\n   * Default options for {@link PlayProgressBar}.\n   *\n   * @type {Object}\n   * @private\n   */\n  PlayProgressBar.prototype.options_ = {\n    children: []\n  };\n\n  // Time tooltips should not be added to a player on mobile devices\n  if (!IS_IOS && !IS_ANDROID) {\n    PlayProgressBar.prototype.options_.children.push('timeTooltip');\n  }\n  Component$1.registerComponent('PlayProgressBar', PlayProgressBar);\n\n  /**\n   * @file mouse-time-display.js\n   */\n\n  /**\n   * The {@link MouseTimeDisplay} component tracks mouse movement over the\n   * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\n   * indicating the time which is represented by a given point in the\n   * {@link ProgressControl}.\n   *\n   * @extends Component\n   */\n  class MouseTimeDisplay extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The {@link Player} that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n    }\n\n    /**\n     * Create the DOM element for this class.\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-mouse-display'\n      });\n    }\n\n    /**\n     * Enqueues updates to its own DOM as well as the DOM of its\n     * {@link TimeTooltip} child.\n     *\n     * @param {Object} seekBarRect\n     *        The `ClientRect` for the {@link SeekBar} element.\n     *\n     * @param {number} seekBarPoint\n     *        A number from 0 to 1, representing a horizontal reference point\n     *        from the left edge of the {@link SeekBar}\n     */\n    update(seekBarRect, seekBarPoint) {\n      const time = seekBarPoint * this.player_.duration();\n      this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, () => {\n        this.el_.style.left = `${seekBarRect.width * seekBarPoint}px`;\n      });\n    }\n  }\n\n  /**\n   * Default options for `MouseTimeDisplay`\n   *\n   * @type {Object}\n   * @private\n   */\n  MouseTimeDisplay.prototype.options_ = {\n    children: ['timeTooltip']\n  };\n  Component$1.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\n\n  /**\n   * @file seek-bar.js\n   */\n\n  /**\n   * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\n   * as its `bar`.\n   *\n   * @extends Slider\n   */\n  class SeekBar extends Slider {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     * @param {number} [options.stepSeconds=5]\n     *        The number of seconds to increment on keyboard control\n     * @param {number} [options.pageMultiplier=12]\n     *        The multiplier of stepSeconds that PgUp/PgDown move the timeline.\n     */\n    constructor(player, options) {\n      options = merge$2(SeekBar.prototype.options_, options);\n\n      // Avoid mutating the prototype's `children` array by creating a copy\n      options.children = [...options.children];\n      const shouldDisableSeekWhileScrubbingOnMobile = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID);\n\n      // Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`\n      if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbingOnMobile) {\n        options.children.splice(1, 0, 'mouseTimeDisplay');\n      }\n      super(player, options);\n      this.shouldDisableSeekWhileScrubbingOnMobile_ = shouldDisableSeekWhileScrubbingOnMobile;\n      this.pendingSeekTime_ = null;\n      this.setEventHandlers_();\n    }\n\n    /**\n     * Sets the event handlers\n     *\n     * @private\n     */\n    setEventHandlers_() {\n      this.update_ = bind_(this, this.update);\n      this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\n      this.on(this.player_, ['durationchange', 'timeupdate'], this.update);\n      this.on(this.player_, ['ended'], this.update_);\n      if (this.player_.liveTracker) {\n        this.on(this.player_.liveTracker, 'liveedgechange', this.update);\n      }\n\n      // when playing, let's ensure we smoothly update the play progress bar\n      // via an interval\n      this.updateInterval = null;\n      this.enableIntervalHandler_ = e => this.enableInterval_(e);\n      this.disableIntervalHandler_ = e => this.disableInterval_(e);\n      this.on(this.player_, ['playing'], this.enableIntervalHandler_);\n      this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_);\n\n      // we don't need to update the play progress if the document is hidden,\n      // also, this causes the CPU to spike and eventually crash the page on IE11.\n      if ('hidden' in document && 'visibilityState' in document) {\n        this.on(document, 'visibilitychange', this.toggleVisibility_);\n      }\n    }\n    toggleVisibility_(e) {\n      if (document.visibilityState === 'hidden') {\n        this.cancelNamedAnimationFrame('SeekBar#update');\n        this.cancelNamedAnimationFrame('Slider#update');\n        this.disableInterval_(e);\n      } else {\n        if (!this.player_.ended() && !this.player_.paused()) {\n          this.enableInterval_();\n        }\n\n        // we just switched back to the page and someone may be looking, so, update ASAP\n        this.update();\n      }\n    }\n    enableInterval_() {\n      if (this.updateInterval) {\n        return;\n      }\n      this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\n    }\n    disableInterval_(e) {\n      if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e && e.type !== 'ended') {\n        return;\n      }\n      if (!this.updateInterval) {\n        return;\n      }\n      this.clearInterval(this.updateInterval);\n      this.updateInterval = null;\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-progress-holder'\n      }, {\n        'aria-label': this.localize('Progress Bar')\n      });\n    }\n\n    /**\n     * This function updates the play progress bar and accessibility\n     * attributes to whatever is passed in.\n     *\n     * @param {Event} [event]\n     *        The `timeupdate` or `ended` event that caused this to run.\n     *\n     * @listens Player#timeupdate\n     *\n     * @return {number}\n     *          The current percent at a number from 0-1\n     */\n    update(event) {\n      // ignore updates while the tab is hidden\n      if (document.visibilityState === 'hidden') {\n        return;\n      }\n      const percent = super.update();\n      this.requestNamedAnimationFrame('SeekBar#update', () => {\n        const currentTime = this.player_.ended() ? this.player_.duration() : this.getCurrentTime_();\n        const liveTracker = this.player_.liveTracker;\n        let duration = this.player_.duration();\n        if (liveTracker && liveTracker.isLive()) {\n          duration = this.player_.liveTracker.liveCurrentTime();\n        }\n        if (this.percent_ !== percent) {\n          // machine readable value of progress bar (percentage complete)\n          this.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\n          this.percent_ = percent;\n        }\n        if (this.currentTime_ !== currentTime || this.duration_ !== duration) {\n          // human readable value of progress bar (time complete)\n          this.el_.setAttribute('aria-valuetext', this.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\n          this.currentTime_ = currentTime;\n          this.duration_ = duration;\n        }\n\n        // update the progress bar time tooltip with the current time\n        if (this.bar) {\n          this.bar.update(getBoundingClientRect(this.el()), this.getProgress());\n        }\n      });\n      return percent;\n    }\n\n    /**\n     * Prevent liveThreshold from causing seeks to seem like they\n     * are not happening from a user perspective.\n     *\n     * @param {number} ct\n     *        current time to seek to\n     */\n    userSeek_(ct) {\n      if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n        this.player_.liveTracker.nextSeekedFromUser();\n      }\n      this.player_.currentTime(ct);\n    }\n\n    /**\n     * Get the value of current time but allows for smooth scrubbing,\n     * when player can't keep up.\n     *\n     * @return {number}\n     *         The current time value to display\n     *\n     * @private\n     */\n    getCurrentTime_() {\n      return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    }\n\n    /**\n     * Get the percentage of media played so far.\n     *\n     * @return {number}\n     *         The percentage of media played so far (0 to 1).\n     */\n    getPercent() {\n      // If we have a pending seek time, we are scrubbing on mobile and should set the slider percent\n      // to reflect the current scrub location.\n      if (this.pendingSeekTime_) {\n        return this.pendingSeekTime_ / this.player_.duration();\n      }\n      const currentTime = this.getCurrentTime_();\n      let percent;\n      const liveTracker = this.player_.liveTracker;\n      if (liveTracker && liveTracker.isLive()) {\n        percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow();\n\n        // prevent the percent from changing at the live edge\n        if (liveTracker.atLiveEdge()) {\n          percent = 1;\n        }\n      } else {\n        percent = currentTime / this.player_.duration();\n      }\n      return percent;\n    }\n\n    /**\n     * Handle mouse down on seek bar\n     *\n     * @param {MouseEvent} event\n     *        The `mousedown` event that caused this to run.\n     *\n     * @listens mousedown\n     */\n    handleMouseDown(event) {\n      if (!isSingleLeftClick(event)) {\n        return;\n      }\n\n      // Stop event propagation to prevent double fire in progress-control.js\n      event.stopPropagation();\n      this.videoWasPlaying = !this.player_.paused();\n\n      // Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.\n      // In that case, playback should continue while the player scrubs to a new location.\n      if (!this.shouldDisableSeekWhileScrubbingOnMobile_) {\n        this.player_.pause();\n      }\n      super.handleMouseDown(event);\n    }\n\n    /**\n     * Handle mouse move on seek bar\n     *\n     * @param {MouseEvent} event\n     *        The `mousemove` event that caused this to run.\n     * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false\n     *\n     * @listens mousemove\n     */\n    handleMouseMove(event, mouseDown = false) {\n      if (!isSingleLeftClick(event) || isNaN(this.player_.duration())) {\n        return;\n      }\n      if (!mouseDown && !this.player_.scrubbing()) {\n        this.player_.scrubbing(true);\n      }\n      let newTime;\n      const distance = this.calculateDistance(event);\n      const liveTracker = this.player_.liveTracker;\n      if (!liveTracker || !liveTracker.isLive()) {\n        newTime = distance * this.player_.duration();\n\n        // Don't let video end while scrubbing.\n        if (newTime === this.player_.duration()) {\n          newTime = newTime - 0.1;\n        }\n      } else {\n        if (distance >= 0.99) {\n          liveTracker.seekToLiveEdge();\n          return;\n        }\n        const seekableStart = liveTracker.seekableStart();\n        const seekableEnd = liveTracker.liveCurrentTime();\n        newTime = seekableStart + distance * liveTracker.liveWindow();\n\n        // Don't let video end while scrubbing.\n        if (newTime >= seekableEnd) {\n          newTime = seekableEnd;\n        }\n\n        // Compensate for precision differences so that currentTime is not less\n        // than seekable start\n        if (newTime <= seekableStart) {\n          newTime = seekableStart + 0.1;\n        }\n\n        // On android seekableEnd can be Infinity sometimes,\n        // this will cause newTime to be Infinity, which is\n        // not a valid currentTime.\n        if (newTime === Infinity) {\n          return;\n        }\n      }\n\n      // if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'\n      if (this.shouldDisableSeekWhileScrubbingOnMobile_) {\n        this.pendingSeekTime_ = newTime;\n      } else {\n        this.userSeek_(newTime);\n      }\n      if (this.player_.options_.enableSmoothSeeking) {\n        this.update();\n      }\n    }\n    enable() {\n      super.enable();\n      const mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n      if (!mouseTimeDisplay) {\n        return;\n      }\n      mouseTimeDisplay.show();\n    }\n    disable() {\n      super.disable();\n      const mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n      if (!mouseTimeDisplay) {\n        return;\n      }\n      mouseTimeDisplay.hide();\n    }\n\n    /**\n     * Handle mouse up on seek bar\n     *\n     * @param {MouseEvent} event\n     *        The `mouseup` event that caused this to run.\n     *\n     * @listens mouseup\n     */\n    handleMouseUp(event) {\n      super.handleMouseUp(event);\n\n      // Stop event propagation to prevent double fire in progress-control.js\n      if (event) {\n        event.stopPropagation();\n      }\n      this.player_.scrubbing(false);\n\n      // If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.\n      if (this.pendingSeekTime_) {\n        this.userSeek_(this.pendingSeekTime_);\n        this.pendingSeekTime_ = null;\n      }\n\n      /**\n       * Trigger timeupdate because we're done seeking and the time has changed.\n       * This is particularly useful for if the player is paused to time the time displays.\n       *\n       * @event Tech#timeupdate\n       * @type {Event}\n       */\n      this.player_.trigger({\n        type: 'timeupdate',\n        target: this,\n        manuallyTriggered: true\n      });\n      if (this.videoWasPlaying) {\n        silencePromise(this.player_.play());\n      } else {\n        // We're done seeking and the time has changed.\n        // If the player is paused, make sure we display the correct time on the seek bar.\n        this.update_();\n      }\n    }\n\n    /**\n     * Move more quickly fast forward for keyboard-only users\n     */\n    stepForward() {\n      this.userSeek_(this.player_.currentTime() + this.options().stepSeconds);\n    }\n\n    /**\n     * Move more quickly rewind for keyboard-only users\n     */\n    stepBack() {\n      this.userSeek_(this.player_.currentTime() - this.options().stepSeconds);\n    }\n\n    /**\n     * Toggles the playback state of the player\n     * This gets called when enter or space is used on the seekbar\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called\n     *\n     */\n    handleAction(event) {\n      if (this.player_.paused()) {\n        this.player_.play();\n      } else {\n        this.player_.pause();\n      }\n    }\n\n    /**\n     * Called when this SeekBar has focus and a key gets pressed down.\n     * Supports the following keys:\n     *\n     *   Space or Enter key fire a click event\n     *   Home key moves to start of the timeline\n     *   End key moves to end of the timeline\n     *   Digit \"0\" through \"9\" keys move to 0%, 10% ... 80%, 90% of the timeline\n     *   PageDown key moves back a larger step than ArrowDown\n     *   PageUp key moves forward a large step\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      const liveTracker = this.player_.liveTracker;\n      if (event.key === ' ' || event.key === 'Enter') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.handleAction(event);\n      } else if (event.key === 'Home') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.userSeek_(0);\n      } else if (event.key === 'End') {\n        event.preventDefault();\n        event.stopPropagation();\n        if (liveTracker && liveTracker.isLive()) {\n          this.userSeek_(liveTracker.liveCurrentTime());\n        } else {\n          this.userSeek_(this.player_.duration());\n        }\n      } else if (/^[0-9]$/.test(event.key)) {\n        event.preventDefault();\n        event.stopPropagation();\n        const gotoFraction = parseInt(event.key, 10) * 0.1;\n        if (liveTracker && liveTracker.isLive()) {\n          this.userSeek_(liveTracker.seekableStart() + liveTracker.liveWindow() * gotoFraction);\n        } else {\n          this.userSeek_(this.player_.duration() * gotoFraction);\n        }\n      } else if (event.key === 'PageDown') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.userSeek_(this.player_.currentTime() - this.options().stepSeconds * this.options().pageMultiplier);\n      } else if (event.key === 'PageUp') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.userSeek_(this.player_.currentTime() + this.options().stepSeconds * this.options().pageMultiplier);\n      } else {\n        // Pass keydown handling up for unsupported keys\n        super.handleKeyDown(event);\n      }\n    }\n    dispose() {\n      this.disableInterval_();\n      this.off(this.player_, ['durationchange', 'timeupdate'], this.update);\n      this.off(this.player_, ['ended'], this.update_);\n      if (this.player_.liveTracker) {\n        this.off(this.player_.liveTracker, 'liveedgechange', this.update);\n      }\n      this.off(this.player_, ['playing'], this.enableIntervalHandler_);\n      this.off(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_);\n\n      // we don't need to update the play progress if the document is hidden,\n      // also, this causes the CPU to spike and eventually crash the page on IE11.\n      if ('hidden' in document && 'visibilityState' in document) {\n        this.off(document, 'visibilitychange', this.toggleVisibility_);\n      }\n      super.dispose();\n    }\n  }\n\n  /**\n   * Default options for the `SeekBar`\n   *\n   * @type {Object}\n   * @private\n   */\n  SeekBar.prototype.options_ = {\n    children: ['loadProgressBar', 'playProgressBar'],\n    barName: 'playProgressBar',\n    stepSeconds: 5,\n    pageMultiplier: 12\n  };\n  Component$1.registerComponent('SeekBar', SeekBar);\n\n  /**\n   * @file progress-control.js\n   */\n\n  /**\n   * The Progress Control component contains the seek bar, load progress,\n   * and play progress.\n   *\n   * @extends Component\n   */\n  class ProgressControl extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.handleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n      this.throttledHandleMouseSeek = throttle(bind_(this, this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n      this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n      this.handleMouseDownHandler_ = e => this.handleMouseDown(e);\n      this.enable();\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-progress-control vjs-control'\n      });\n    }\n\n    /**\n     * When the mouse moves over the `ProgressControl`, the pointer position\n     * gets passed down to the `MouseTimeDisplay` component.\n     *\n     * @param {Event} event\n     *        The `mousemove` event that caused this function to run.\n     *\n     * @listen mousemove\n     */\n    handleMouseMove(event) {\n      const seekBar = this.getChild('seekBar');\n      if (!seekBar) {\n        return;\n      }\n      const playProgressBar = seekBar.getChild('playProgressBar');\n      const mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n      if (!playProgressBar && !mouseTimeDisplay) {\n        return;\n      }\n      const seekBarEl = seekBar.el();\n      const seekBarRect = findPosition(seekBarEl);\n      let seekBarPoint = getPointerPosition(seekBarEl, event).x;\n\n      // The default skin has a gap on either side of the `SeekBar`. This means\n      // that it's possible to trigger this behavior outside the boundaries of\n      // the `SeekBar`. This ensures we stay within it at all times.\n      seekBarPoint = clamp(seekBarPoint, 0, 1);\n      if (mouseTimeDisplay) {\n        mouseTimeDisplay.update(seekBarRect, seekBarPoint);\n      }\n      if (playProgressBar) {\n        playProgressBar.update(seekBarRect, seekBar.getProgress());\n      }\n    }\n\n    /**\n     * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\n     *\n     * @method ProgressControl#throttledHandleMouseSeek\n     * @param {Event} event\n     *        The `mousemove` event that caused this function to run.\n     *\n     * @listen mousemove\n     * @listen touchmove\n     */\n\n    /**\n     * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\n     *\n     * @param {Event} event\n     *        `mousedown` or `touchstart` event that triggered this function\n     *\n     * @listens mousemove\n     * @listens touchmove\n     */\n    handleMouseSeek(event) {\n      const seekBar = this.getChild('seekBar');\n      if (seekBar) {\n        seekBar.handleMouseMove(event);\n      }\n    }\n\n    /**\n     * Are controls are currently enabled for this progress control.\n     *\n     * @return {boolean}\n     *         true if controls are enabled, false otherwise\n     */\n    enabled() {\n      return this.enabled_;\n    }\n\n    /**\n     * Disable all controls on the progress control and its children\n     */\n    disable() {\n      this.children().forEach(child => child.disable && child.disable());\n      if (!this.enabled()) {\n        return;\n      }\n      this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n      this.off(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);\n      this.removeListenersAddedOnMousedownAndTouchstart();\n      this.addClass('disabled');\n      this.enabled_ = false;\n\n      // Restore normal playback state if controls are disabled while scrubbing\n      if (this.player_.scrubbing()) {\n        const seekBar = this.getChild('seekBar');\n        this.player_.scrubbing(false);\n        if (seekBar.videoWasPlaying) {\n          silencePromise(this.player_.play());\n        }\n      }\n    }\n\n    /**\n     * Enable all controls on the progress control and its children\n     */\n    enable() {\n      this.children().forEach(child => child.enable && child.enable());\n      if (this.enabled()) {\n        return;\n      }\n      this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n      this.on(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);\n      this.removeClass('disabled');\n      this.enabled_ = true;\n    }\n\n    /**\n     * Cleanup listeners after the user finishes interacting with the progress controls\n     */\n    removeListenersAddedOnMousedownAndTouchstart() {\n      const doc = this.el_.ownerDocument;\n      this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\n      this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\n      this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n      this.off(doc, 'touchend', this.handleMouseUpHandler_);\n    }\n\n    /**\n     * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\n     *\n     * @param {Event} event\n     *        `mousedown` or `touchstart` event that triggered this function\n     *\n     * @listens mousedown\n     * @listens touchstart\n     */\n    handleMouseDown(event) {\n      const doc = this.el_.ownerDocument;\n      const seekBar = this.getChild('seekBar');\n      if (seekBar) {\n        seekBar.handleMouseDown(event);\n      }\n      this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\n      this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\n      this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n      this.on(doc, 'touchend', this.handleMouseUpHandler_);\n    }\n\n    /**\n     * Handle `mouseup` or `touchend` events on the `ProgressControl`.\n     *\n     * @param {Event} event\n     *        `mouseup` or `touchend` event that triggered this function.\n     *\n     * @listens touchend\n     * @listens mouseup\n     */\n    handleMouseUp(event) {\n      const seekBar = this.getChild('seekBar');\n      if (seekBar) {\n        seekBar.handleMouseUp(event);\n      }\n      this.removeListenersAddedOnMousedownAndTouchstart();\n    }\n  }\n\n  /**\n   * Default options for `ProgressControl`\n   *\n   * @type {Object}\n   * @private\n   */\n  ProgressControl.prototype.options_ = {\n    children: ['seekBar']\n  };\n  Component$1.registerComponent('ProgressControl', ProgressControl);\n\n  /**\n   * @file picture-in-picture-toggle.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * Toggle Picture-in-Picture mode\n   *\n   * @extends Button\n   */\n  class PictureInPictureToggle extends Button {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @listens Player#enterpictureinpicture\n     * @listens Player#leavepictureinpicture\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.setIcon('picture-in-picture-enter');\n      this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], e => this.handlePictureInPictureChange(e));\n      this.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], e => this.handlePictureInPictureEnabledChange(e));\n      this.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], () => this.handlePictureInPictureAudioModeChange());\n\n      // TODO: Deactivate button on player emptied event.\n      this.disable();\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Displays or hides the button depending on the audio mode detection.\n     * Exits picture-in-picture if it is enabled when switching to audio mode.\n     */\n    handlePictureInPictureAudioModeChange() {\n      // This audio detection will not detect HLS or DASH audio-only streams because there was no reliable way to detect them at the time\n      const isSourceAudio = this.player_.currentType().substring(0, 5) === 'audio';\n      const isAudioMode = isSourceAudio || this.player_.audioPosterMode() || this.player_.audioOnlyMode();\n      if (!isAudioMode) {\n        this.show();\n        return;\n      }\n      if (this.player_.isInPictureInPicture()) {\n        this.player_.exitPictureInPicture();\n      }\n      this.hide();\n    }\n\n    /**\n     * Enables or disables button based on availability of a Picture-In-Picture mode.\n     *\n     * Enabled if\n     * - `player.options().enableDocumentPictureInPicture` is true and\n     *   window.documentPictureInPicture is available; or\n     * - `player.disablePictureInPicture()` is false and\n     *   element.requestPictureInPicture is available\n     */\n    handlePictureInPictureEnabledChange() {\n      if (document.pictureInPictureEnabled && this.player_.disablePictureInPicture() === false || this.player_.options_.enableDocumentPictureInPicture && 'documentPictureInPicture' in window) {\n        this.enable();\n      } else {\n        this.disable();\n      }\n    }\n\n    /**\n     * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\n     *\n     * @param {Event} [event]\n     *        The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\n     *        called.\n     *\n     * @listens Player#enterpictureinpicture\n     * @listens Player#leavepictureinpicture\n     */\n    handlePictureInPictureChange(event) {\n      if (this.player_.isInPictureInPicture()) {\n        this.setIcon('picture-in-picture-exit');\n        this.controlText('Exit Picture-in-Picture');\n      } else {\n        this.setIcon('picture-in-picture-enter');\n        this.controlText('Picture-in-Picture');\n      }\n      this.handlePictureInPictureEnabledChange();\n    }\n\n    /**\n     * This gets called when an `PictureInPictureToggle` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      if (!this.player_.isInPictureInPicture()) {\n        this.player_.requestPictureInPicture();\n      } else {\n        this.player_.exitPictureInPicture();\n      }\n    }\n\n    /**\n     * Show the `Component`s element if it is hidden by removing the\n     * 'vjs-hidden' class name from it only in browsers that support the Picture-in-Picture API.\n     */\n    show() {\n      // Does not allow to display the pictureInPictureToggle in browsers that do not support the Picture-in-Picture API, e.g. Firefox.\n      if (typeof document.exitPictureInPicture !== 'function') {\n        return;\n      }\n      super.show();\n    }\n  }\n\n  /**\n   * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  PictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\n  Component$1.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\n\n  /**\n   * @file fullscreen-toggle.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * Toggle fullscreen video\n   *\n   * @extends Button\n   */\n  class FullscreenToggle extends Button {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.setIcon('fullscreen-enter');\n      this.on(player, 'fullscreenchange', e => this.handleFullscreenChange(e));\n      if (document[player.fsApi_.fullscreenEnabled] === false) {\n        this.disable();\n      }\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Handles fullscreenchange on the player and change control text accordingly.\n     *\n     * @param {Event} [event]\n     *        The {@link Player#fullscreenchange} event that caused this function to be\n     *        called.\n     *\n     * @listens Player#fullscreenchange\n     */\n    handleFullscreenChange(event) {\n      if (this.player_.isFullscreen()) {\n        this.controlText('Exit Fullscreen');\n        this.setIcon('fullscreen-exit');\n      } else {\n        this.controlText('Fullscreen');\n        this.setIcon('fullscreen-enter');\n      }\n    }\n\n    /**\n     * This gets called when an `FullscreenToggle` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      if (!this.player_.isFullscreen()) {\n        this.player_.requestFullscreen();\n      } else {\n        this.player_.exitFullscreen();\n      }\n    }\n  }\n\n  /**\n   * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  FullscreenToggle.prototype.controlText_ = 'Fullscreen';\n  Component$1.registerComponent('FullscreenToggle', FullscreenToggle);\n\n  /** @import Component from '../../component' */\n  /** @import Player from '../../player' */\n\n  /**\n   * Check if volume control is supported and if it isn't hide the\n   * `Component` that was passed  using the `vjs-hidden` class.\n   *\n   * @param {Component} self\n   *        The component that should be hidden if volume is unsupported\n   *\n   * @param {Player} player\n   *        A reference to the player\n   *\n   * @private\n   */\n  const checkVolumeSupport = function (self, player) {\n    // hide volume controls when they're not supported by the current tech\n    if (player.tech_ && !player.tech_.featuresVolumeControl) {\n      self.addClass('vjs-hidden');\n    }\n    self.on(player, 'loadstart', function () {\n      if (!player.tech_.featuresVolumeControl) {\n        self.addClass('vjs-hidden');\n      } else {\n        self.removeClass('vjs-hidden');\n      }\n    });\n  };\n\n  /**\n   * @file volume-level.js\n   */\n\n  /**\n   * Shows volume level\n   *\n   * @extends Component\n   */\n  class VolumeLevel extends Component$1 {\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl('div', {\n        className: 'vjs-volume-level'\n      });\n      this.setIcon('circle', el);\n      el.appendChild(super.createEl('span', {\n        className: 'vjs-control-text'\n      }));\n      return el;\n    }\n  }\n  Component$1.registerComponent('VolumeLevel', VolumeLevel);\n\n  /**\n   * @file volume-level-tooltip.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * Volume level tooltips display a volume above or side by side the volume bar.\n   *\n   * @extends Component\n   */\n  class VolumeLevelTooltip extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The {@link Player} that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n    }\n\n    /**\n     * Create the volume tooltip DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-volume-tooltip'\n      }, {\n        'aria-hidden': 'true'\n      });\n    }\n\n    /**\n     * Updates the position of the tooltip relative to the `VolumeBar` and\n     * its content text.\n     *\n     * @param {Object} rangeBarRect\n     *        The `ClientRect` for the {@link VolumeBar} element.\n     *\n     * @param {number} rangeBarPoint\n     *        A number from 0 to 1, representing a horizontal/vertical reference point\n     *        from the left edge of the {@link VolumeBar}\n     *\n     * @param {boolean} vertical\n     *        Referees to the Volume control position\n     *        in the control bar{@link VolumeControl}\n     *\n     */\n    update(rangeBarRect, rangeBarPoint, vertical, content) {\n      if (!vertical) {\n        const tooltipRect = getBoundingClientRect(this.el_);\n        const playerRect = getBoundingClientRect(this.player_.el());\n        const volumeBarPointPx = rangeBarRect.width * rangeBarPoint;\n        if (!playerRect || !tooltipRect) {\n          return;\n        }\n        const spaceLeftOfPoint = rangeBarRect.left - playerRect.left + volumeBarPointPx;\n        const spaceRightOfPoint = rangeBarRect.width - volumeBarPointPx + (playerRect.right - rangeBarRect.right);\n        let pullTooltipBy = tooltipRect.width / 2;\n        if (spaceLeftOfPoint < pullTooltipBy) {\n          pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n        } else if (spaceRightOfPoint < pullTooltipBy) {\n          pullTooltipBy = spaceRightOfPoint;\n        }\n        if (pullTooltipBy < 0) {\n          pullTooltipBy = 0;\n        } else if (pullTooltipBy > tooltipRect.width) {\n          pullTooltipBy = tooltipRect.width;\n        }\n        this.el_.style.right = `-${pullTooltipBy}px`;\n      }\n      this.write(`${content}%`);\n    }\n\n    /**\n     * Write the volume to the tooltip DOM element.\n     *\n     * @param {string} content\n     *        The formatted volume for the tooltip.\n     */\n    write(content) {\n      textContent(this.el_, content);\n    }\n\n    /**\n     * Updates the position of the volume tooltip relative to the `VolumeBar`.\n     *\n     * @param {Object} rangeBarRect\n     *        The `ClientRect` for the {@link VolumeBar} element.\n     *\n     * @param {number} rangeBarPoint\n     *        A number from 0 to 1, representing a horizontal/vertical reference point\n     *        from the left edge of the {@link VolumeBar}\n     *\n     * @param {boolean} vertical\n     *        Referees to the Volume control position\n     *        in the control bar{@link VolumeControl}\n     *\n     * @param {number} volume\n     *        The volume level to update the tooltip to\n     *\n     * @param {Function} cb\n     *        A function that will be called during the request animation frame\n     *        for tooltips that need to do additional animations from the default\n     */\n    updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) {\n      this.requestNamedAnimationFrame('VolumeLevelTooltip#updateVolume', () => {\n        this.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0));\n        if (cb) {\n          cb();\n        }\n      });\n    }\n  }\n  Component$1.registerComponent('VolumeLevelTooltip', VolumeLevelTooltip);\n\n  /**\n   * @file mouse-volume-level-display.js\n   */\n\n  /**\n   * The {@link MouseVolumeLevelDisplay} component tracks mouse movement over the\n   * {@link VolumeControl}. It displays an indicator and a {@link VolumeLevelTooltip}\n   * indicating the volume level which is represented by a given point in the\n   * {@link VolumeBar}.\n   *\n   * @extends Component\n   */\n  class MouseVolumeLevelDisplay extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The {@link Player} that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n    }\n\n    /**\n     * Create the DOM element for this class.\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-mouse-display'\n      });\n    }\n\n    /**\n     * Enquires updates to its own DOM as well as the DOM of its\n     * {@link VolumeLevelTooltip} child.\n     *\n     * @param {Object} rangeBarRect\n     *        The `ClientRect` for the {@link VolumeBar} element.\n     *\n     * @param {number} rangeBarPoint\n     *        A number from 0 to 1, representing a horizontal/vertical reference point\n     *        from the left edge of the {@link VolumeBar}\n     *\n     * @param {boolean} vertical\n     *        Referees to the Volume control position\n     *        in the control bar{@link VolumeControl}\n     *\n     */\n    update(rangeBarRect, rangeBarPoint, vertical) {\n      const volume = 100 * rangeBarPoint;\n      this.getChild('volumeLevelTooltip').updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, () => {\n        if (vertical) {\n          this.el_.style.bottom = `${rangeBarRect.height * rangeBarPoint}px`;\n        } else {\n          this.el_.style.left = `${rangeBarRect.width * rangeBarPoint}px`;\n        }\n      });\n    }\n  }\n\n  /**\n   * Default options for `MouseVolumeLevelDisplay`\n   *\n   * @type {Object}\n   * @private\n   */\n  MouseVolumeLevelDisplay.prototype.options_ = {\n    children: ['volumeLevelTooltip']\n  };\n  Component$1.registerComponent('MouseVolumeLevelDisplay', MouseVolumeLevelDisplay);\n\n  /**\n   * @file volume-bar.js\n   */\n\n  /**\n   * The bar that contains the volume level and can be clicked on to adjust the level\n   *\n   * @extends Slider\n   */\n  class VolumeBar extends Slider {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.on('slideractive', e => this.updateLastVolume_(e));\n      this.on(player, 'volumechange', e => this.updateARIAAttributes(e));\n      player.ready(() => this.updateARIAAttributes());\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-volume-bar vjs-slider-bar'\n      }, {\n        'aria-label': this.localize('Volume Level'),\n        'aria-live': 'polite'\n      });\n    }\n\n    /**\n     * Handle mouse down on volume bar\n     *\n     * @param {Event} event\n     *        The `mousedown` event that caused this to run.\n     *\n     * @listens mousedown\n     */\n    handleMouseDown(event) {\n      if (!isSingleLeftClick(event)) {\n        return;\n      }\n      super.handleMouseDown(event);\n    }\n\n    /**\n     * Handle movement events on the {@link VolumeMenuButton}.\n     *\n     * @param {Event} event\n     *        The event that caused this function to run.\n     *\n     * @listens mousemove\n     */\n    handleMouseMove(event) {\n      const mouseVolumeLevelDisplay = this.getChild('mouseVolumeLevelDisplay');\n      if (mouseVolumeLevelDisplay) {\n        const volumeBarEl = this.el();\n        const volumeBarRect = getBoundingClientRect(volumeBarEl);\n        const vertical = this.vertical();\n        let volumeBarPoint = getPointerPosition(volumeBarEl, event);\n        volumeBarPoint = vertical ? volumeBarPoint.y : volumeBarPoint.x;\n        // The default skin has a gap on either side of the `VolumeBar`. This means\n        // that it's possible to trigger this behavior outside the boundaries of\n        // the `VolumeBar`. This ensures we stay within it at all times.\n        volumeBarPoint = clamp(volumeBarPoint, 0, 1);\n        mouseVolumeLevelDisplay.update(volumeBarRect, volumeBarPoint, vertical);\n      }\n      if (!isSingleLeftClick(event)) {\n        return;\n      }\n      this.checkMuted();\n      this.player_.volume(this.calculateDistance(event));\n    }\n\n    /**\n     * If the player is muted unmute it.\n     */\n    checkMuted() {\n      if (this.player_.muted()) {\n        this.player_.muted(false);\n      }\n    }\n\n    /**\n     * Get percent of volume level\n     *\n     * @return {number}\n     *         Volume level percent as a decimal number.\n     */\n    getPercent() {\n      if (this.player_.muted()) {\n        return 0;\n      }\n      return this.player_.volume();\n    }\n\n    /**\n     * Increase volume level for keyboard users\n     */\n    stepForward() {\n      this.checkMuted();\n      this.player_.volume(this.player_.volume() + 0.1);\n    }\n\n    /**\n     * Decrease volume level for keyboard users\n     */\n    stepBack() {\n      this.checkMuted();\n      this.player_.volume(this.player_.volume() - 0.1);\n    }\n\n    /**\n     * Update ARIA accessibility attributes\n     *\n     * @param {Event} [event]\n     *        The `volumechange` event that caused this function to run.\n     *\n     * @listens Player#volumechange\n     */\n    updateARIAAttributes(event) {\n      const ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\n      this.el_.setAttribute('aria-valuenow', ariaValue);\n      this.el_.setAttribute('aria-valuetext', ariaValue + '%');\n    }\n\n    /**\n     * Returns the current value of the player volume as a percentage\n     *\n     * @private\n     */\n    volumeAsPercentage_() {\n      return Math.round(this.player_.volume() * 100);\n    }\n\n    /**\n     * When user starts dragging the VolumeBar, store the volume and listen for\n     * the end of the drag. When the drag ends, if the volume was set to zero,\n     * set lastVolume to the stored volume.\n     *\n     * @listens slideractive\n     * @private\n     */\n    updateLastVolume_() {\n      const volumeBeforeDrag = this.player_.volume();\n      this.one('sliderinactive', () => {\n        if (this.player_.volume() === 0) {\n          this.player_.lastVolume_(volumeBeforeDrag);\n        }\n      });\n    }\n  }\n\n  /**\n   * Default options for the `VolumeBar`\n   *\n   * @type {Object}\n   * @private\n   */\n  VolumeBar.prototype.options_ = {\n    children: ['volumeLevel'],\n    barName: 'volumeLevel'\n  };\n\n  // MouseVolumeLevelDisplay tooltip should not be added to a player on mobile devices\n  if (!IS_IOS && !IS_ANDROID) {\n    VolumeBar.prototype.options_.children.splice(0, 0, 'mouseVolumeLevelDisplay');\n  }\n\n  /**\n   * Call the update event for this Slider when this event happens on the player.\n   *\n   * @type {string}\n   */\n  VolumeBar.prototype.playerEvent = 'volumechange';\n  Component$1.registerComponent('VolumeBar', VolumeBar);\n\n  /**\n   * @file volume-control.js\n   */\n\n  /**\n   * The component for controlling the volume level\n   *\n   * @extends Component\n   */\n  class VolumeControl extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     */\n    constructor(player, options = {}) {\n      options.vertical = options.vertical || false;\n\n      // Pass the vertical option down to the VolumeBar if\n      // the VolumeBar is turned on.\n      if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\n        options.volumeBar = options.volumeBar || {};\n        options.volumeBar.vertical = options.vertical;\n      }\n      super(player, options);\n\n      // hide this control if volume support is missing\n      checkVolumeSupport(this, player);\n      this.throttledHandleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n      this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n      this.on('mousedown', e => this.handleMouseDown(e));\n      this.on('touchstart', e => this.handleMouseDown(e));\n      this.on('mousemove', e => this.handleMouseMove(e));\n\n      // while the slider is active (the mouse has been pressed down and\n      // is dragging) or in focus we do not want to hide the VolumeBar\n      this.on(this.volumeBar, ['focus', 'slideractive'], () => {\n        this.volumeBar.addClass('vjs-slider-active');\n        this.addClass('vjs-slider-active');\n        this.trigger('slideractive');\n      });\n      this.on(this.volumeBar, ['blur', 'sliderinactive'], () => {\n        this.volumeBar.removeClass('vjs-slider-active');\n        this.removeClass('vjs-slider-active');\n        this.trigger('sliderinactive');\n      });\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      let orientationClass = 'vjs-volume-horizontal';\n      if (this.options_.vertical) {\n        orientationClass = 'vjs-volume-vertical';\n      }\n      return super.createEl('div', {\n        className: `vjs-volume-control vjs-control ${orientationClass}`\n      });\n    }\n\n    /**\n     * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n     *\n     * @param {Event} event\n     *        `mousedown` or `touchstart` event that triggered this function\n     *\n     * @listens mousedown\n     * @listens touchstart\n     */\n    handleMouseDown(event) {\n      const doc = this.el_.ownerDocument;\n      this.on(doc, 'mousemove', this.throttledHandleMouseMove);\n      this.on(doc, 'touchmove', this.throttledHandleMouseMove);\n      this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n      this.on(doc, 'touchend', this.handleMouseUpHandler_);\n    }\n\n    /**\n     * Handle `mouseup` or `touchend` events on the `VolumeControl`.\n     *\n     * @param {Event} event\n     *        `mouseup` or `touchend` event that triggered this function.\n     *\n     * @listens touchend\n     * @listens mouseup\n     */\n    handleMouseUp(event) {\n      const doc = this.el_.ownerDocument;\n      this.off(doc, 'mousemove', this.throttledHandleMouseMove);\n      this.off(doc, 'touchmove', this.throttledHandleMouseMove);\n      this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n      this.off(doc, 'touchend', this.handleMouseUpHandler_);\n    }\n\n    /**\n     * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n     *\n     * @param {Event} event\n     *        `mousedown` or `touchstart` event that triggered this function\n     *\n     * @listens mousedown\n     * @listens touchstart\n     */\n    handleMouseMove(event) {\n      this.volumeBar.handleMouseMove(event);\n    }\n  }\n\n  /**\n   * Default options for the `VolumeControl`\n   *\n   * @type {Object}\n   * @private\n   */\n  VolumeControl.prototype.options_ = {\n    children: ['volumeBar']\n  };\n  Component$1.registerComponent('VolumeControl', VolumeControl);\n\n  /** @import Component from '../../component' */\n  /** @import Player from '../../player' */\n\n  /**\n   * Check if muting volume is supported and if it isn't hide the mute toggle\n   * button.\n   *\n   * @param {Component} self\n   *        A reference to the mute toggle button\n   *\n   * @param {Player} player\n   *        A reference to the player\n   *\n   * @private\n   */\n  const checkMuteSupport = function (self, player) {\n    // hide mute toggle button if it's not supported by the current tech\n    if (player.tech_ && !player.tech_.featuresMuteControl) {\n      self.addClass('vjs-hidden');\n    }\n    self.on(player, 'loadstart', function () {\n      if (!player.tech_.featuresMuteControl) {\n        self.addClass('vjs-hidden');\n      } else {\n        self.removeClass('vjs-hidden');\n      }\n    });\n  };\n\n  /**\n   * @file mute-toggle.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * A button component for muting the audio.\n   *\n   * @extends Button\n   */\n  class MuteToggle extends Button {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n\n      // hide this control if volume support is missing\n      checkMuteSupport(this, player);\n      this.on(player, ['loadstart', 'volumechange'], e => this.update(e));\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-mute-control ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * This gets called when an `MuteToggle` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      const vol = this.player_.volume();\n      const lastVolume = this.player_.lastVolume_();\n      if (vol === 0) {\n        const volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\n        this.player_.volume(volumeToSet);\n        this.player_.muted(false);\n      } else {\n        this.player_.muted(this.player_.muted() ? false : true);\n      }\n    }\n\n    /**\n     * Update the `MuteToggle` button based on the state of `volume` and `muted`\n     * on the player.\n     *\n     * @param {Event} [event]\n     *        The {@link Player#loadstart} event if this function was called\n     *        through an event.\n     *\n     * @listens Player#loadstart\n     * @listens Player#volumechange\n     */\n    update(event) {\n      this.updateIcon_();\n      this.updateControlText_();\n    }\n\n    /**\n     * Update the appearance of the `MuteToggle` icon.\n     *\n     * Possible states (given `level` variable below):\n     * - 0: crossed out\n     * - 1: zero bars of volume\n     * - 2: one bar of volume\n     * - 3: two bars of volume\n     *\n     * @private\n     */\n    updateIcon_() {\n      const vol = this.player_.volume();\n      let level = 3;\n      this.setIcon('volume-high');\n\n      // in iOS when a player is loaded with muted attribute\n      // and volume is changed with a native mute button\n      // we want to make sure muted state is updated\n      if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\n        this.player_.muted(this.player_.tech_.el_.muted);\n      }\n      if (vol === 0 || this.player_.muted()) {\n        this.setIcon('volume-mute');\n        level = 0;\n      } else if (vol < 0.33) {\n        this.setIcon('volume-low');\n        level = 1;\n      } else if (vol < 0.67) {\n        this.setIcon('volume-medium');\n        level = 2;\n      }\n      removeClass(this.el_, [0, 1, 2, 3].reduce((str, i) => str + `${i ? ' ' : ''}vjs-vol-${i}`, ''));\n      addClass(this.el_, `vjs-vol-${level}`);\n    }\n\n    /**\n     * If `muted` has changed on the player, update the control text\n     * (`title` attribute on `vjs-mute-control` element and content of\n     * `vjs-control-text` element).\n     *\n     * @private\n     */\n    updateControlText_() {\n      const soundOff = this.player_.muted() || this.player_.volume() === 0;\n      const text = soundOff ? 'Unmute' : 'Mute';\n      if (this.controlText() !== text) {\n        this.controlText(text);\n      }\n    }\n  }\n\n  /**\n   * The text that should display over the `MuteToggle`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  MuteToggle.prototype.controlText_ = 'Mute';\n  Component$1.registerComponent('MuteToggle', MuteToggle);\n\n  /**\n   * @file volume-control.js\n   */\n\n  /**\n   * A Component to contain the MuteToggle and VolumeControl so that\n   * they can work together.\n   *\n   * @extends Component\n   */\n  class VolumePanel extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     */\n    constructor(player, options = {}) {\n      if (typeof options.inline !== 'undefined') {\n        options.inline = options.inline;\n      } else {\n        options.inline = true;\n      }\n\n      // pass the inline option down to the VolumeControl as vertical if\n      // the VolumeControl is on.\n      if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\n        options.volumeControl = options.volumeControl || {};\n        options.volumeControl.vertical = !options.inline;\n      }\n      super(player, options);\n\n      // this handler is used by mouse handler methods below\n      this.handleKeyPressHandler_ = e => this.handleKeyPress(e);\n      this.on(player, ['loadstart'], e => this.volumePanelState_(e));\n      this.on(this.muteToggle, 'keyup', e => this.handleKeyPress(e));\n      this.on(this.volumeControl, 'keyup', e => this.handleVolumeControlKeyUp(e));\n      this.on('keydown', e => this.handleKeyPress(e));\n      this.on('mouseover', e => this.handleMouseOver(e));\n      this.on('mouseout', e => this.handleMouseOut(e));\n\n      // while the slider is active (the mouse has been pressed down and\n      // is dragging) we do not want to hide the VolumeBar\n      this.on(this.volumeControl, ['slideractive'], this.sliderActive_);\n      this.on(this.volumeControl, ['sliderinactive'], this.sliderInactive_);\n    }\n\n    /**\n     * Add vjs-slider-active class to the VolumePanel\n     *\n     * @listens VolumeControl#slideractive\n     * @private\n     */\n    sliderActive_() {\n      this.addClass('vjs-slider-active');\n    }\n\n    /**\n     * Removes vjs-slider-active class to the VolumePanel\n     *\n     * @listens VolumeControl#sliderinactive\n     * @private\n     */\n    sliderInactive_() {\n      this.removeClass('vjs-slider-active');\n    }\n\n    /**\n     * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\n     * depending on MuteToggle and VolumeControl state\n     *\n     * @listens Player#loadstart\n     * @private\n     */\n    volumePanelState_() {\n      // hide volume panel if neither volume control or mute toggle\n      // are displayed\n      if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\n        this.addClass('vjs-hidden');\n      }\n\n      // if only mute toggle is visible we don't want\n      // volume panel expanding when hovered or active\n      if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\n        this.addClass('vjs-mute-toggle-only');\n      }\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      let orientationClass = 'vjs-volume-panel-horizontal';\n      if (!this.options_.inline) {\n        orientationClass = 'vjs-volume-panel-vertical';\n      }\n      return super.createEl('div', {\n        className: `vjs-volume-panel vjs-control ${orientationClass}`\n      });\n    }\n\n    /**\n     * Dispose of the `volume-panel` and all child components.\n     */\n    dispose() {\n      this.handleMouseOut();\n      super.dispose();\n    }\n\n    /**\n     * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\n     * the volume panel and sets focus on `MuteToggle`.\n     *\n     * @param {Event} event\n     *        The `keyup` event that caused this function to be called.\n     *\n     * @listens keyup\n     */\n    handleVolumeControlKeyUp(event) {\n      if (event.key === 'Escape') {\n        this.muteToggle.focus();\n      }\n    }\n\n    /**\n     * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\n     * Turns on listening for `mouseover` event. When they happen it\n     * calls `this.handleMouseOver`.\n     *\n     * @param {Event} event\n     *        The `mouseover` event that caused this function to be called.\n     *\n     * @listens mouseover\n     */\n    handleMouseOver(event) {\n      this.addClass('vjs-hover');\n      on(document, 'keyup', this.handleKeyPressHandler_);\n    }\n\n    /**\n     * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\n     * Turns on listening for `mouseout` event. When they happen it\n     * calls `this.handleMouseOut`.\n     *\n     * @param {Event} event\n     *        The `mouseout` event that caused this function to be called.\n     *\n     * @listens mouseout\n     */\n    handleMouseOut(event) {\n      this.removeClass('vjs-hover');\n      off(document, 'keyup', this.handleKeyPressHandler_);\n    }\n\n    /**\n     * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\n     * looking for ESC, which hides the `VolumeControl`.\n     *\n     * @param {Event} event\n     *        The keypress that triggered this event.\n     *\n     * @listens keydown | keyup\n     */\n    handleKeyPress(event) {\n      if (event.key === 'Escape') {\n        this.handleMouseOut();\n      }\n    }\n  }\n\n  /**\n   * Default options for the `VolumeControl`\n   *\n   * @type {Object}\n   * @private\n   */\n  VolumePanel.prototype.options_ = {\n    children: ['muteToggle', 'volumeControl']\n  };\n  Component$1.registerComponent('VolumePanel', VolumePanel);\n\n  /**\n   * Button to skip forward a configurable amount of time\n   * through a video. Renders in the control bar.\n   *\n   * e.g. options: {controlBar: {skipButtons: forward: 5}}\n   *\n   * @extends Button\n   */\n  class SkipForward extends Button {\n    constructor(player, options) {\n      super(player, options);\n      this.validOptions = [5, 10, 30];\n      this.skipTime = this.getSkipForwardTime();\n      if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n        this.setIcon(`forward-${this.skipTime}`);\n        this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime.toLocaleString(player.language())]));\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n    getSkipForwardTime() {\n      const playerOptions = this.options_.playerOptions;\n      return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.forward;\n    }\n    buildCSSClass() {\n      return `vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * On click, skips forward in the duration/seekable range by a configurable amount of seconds.\n     * If the time left in the duration/seekable range is less than the configured 'skip forward' time,\n     * skips to end of duration/seekable range.\n     *\n     * Handle a click on a `SkipForward` button\n     *\n     * @param {EventTarget~Event} event\n     *        The `click` event that caused this function\n     *        to be called\n     */\n    handleClick(event) {\n      if (isNaN(this.player_.duration())) {\n        return;\n      }\n      const currentVideoTime = this.player_.currentTime();\n      const liveTracker = this.player_.liveTracker;\n      const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n      let newTime;\n      if (currentVideoTime + this.skipTime <= duration) {\n        newTime = currentVideoTime + this.skipTime;\n      } else {\n        newTime = duration;\n      }\n      this.player_.currentTime(newTime);\n    }\n\n    /**\n     * Update control text on languagechange\n     */\n    handleLanguagechange() {\n      this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));\n    }\n  }\n  SkipForward.prototype.controlText_ = 'Skip Forward';\n  Component$1.registerComponent('SkipForward', SkipForward);\n\n  /**\n   * Button to skip backward a configurable amount of time\n   * through a video. Renders in the control bar.\n   *\n   *  * e.g. options: {controlBar: {skipButtons: backward: 5}}\n   *\n   * @extends Button\n   */\n  class SkipBackward extends Button {\n    constructor(player, options) {\n      super(player, options);\n      this.validOptions = [5, 10, 30];\n      this.skipTime = this.getSkipBackwardTime();\n      if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n        this.setIcon(`replay-${this.skipTime}`);\n        this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime.toLocaleString(player.language())]));\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n    getSkipBackwardTime() {\n      const playerOptions = this.options_.playerOptions;\n      return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.backward;\n    }\n    buildCSSClass() {\n      return `vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * On click, skips backward in the video by a configurable amount of seconds.\n     * If the current time in the video is less than the configured 'skip backward' time,\n     * skips to beginning of video or seekable range.\n     *\n     * Handle a click on a `SkipBackward` button\n     *\n     * @param {EventTarget~Event} event\n     *        The `click` event that caused this function\n     *        to be called\n     */\n    handleClick(event) {\n      const currentVideoTime = this.player_.currentTime();\n      const liveTracker = this.player_.liveTracker;\n      const seekableStart = liveTracker && liveTracker.isLive() && liveTracker.seekableStart();\n      let newTime;\n      if (seekableStart && currentVideoTime - this.skipTime <= seekableStart) {\n        newTime = seekableStart;\n      } else if (currentVideoTime >= this.skipTime) {\n        newTime = currentVideoTime - this.skipTime;\n      } else {\n        newTime = 0;\n      }\n      this.player_.currentTime(newTime);\n    }\n\n    /**\n     * Update control text on languagechange\n     */\n    handleLanguagechange() {\n      this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));\n    }\n  }\n  SkipBackward.prototype.controlText_ = 'Skip Backward';\n  Component$1.registerComponent('SkipBackward', SkipBackward);\n\n  /**\n   * @file menu.js\n   */\n\n  /** @import Player from '../player' */\n\n  /**\n   * The Menu component is used to build popup menus, including subtitle and\n   * captions selection menus.\n   *\n   * @extends Component\n   */\n  class Menu extends Component$1 {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Player} player\n     *        the player that this component should attach to\n     *\n     * @param {Object} [options]\n     *        Object of option names and values\n     *\n     */\n    constructor(player, options) {\n      super(player, options);\n      if (options) {\n        this.menuButton_ = options.menuButton;\n      }\n      this.focusedChild_ = -1;\n      this.on('keydown', e => this.handleKeyDown(e));\n\n      // All the menu item instances share the same blur handler provided by the menu container.\n      this.boundHandleBlur_ = e => this.handleBlur(e);\n      this.boundHandleTapClick_ = e => this.handleTapClick(e);\n    }\n\n    /**\n     * Add event listeners to the {@link MenuItem}.\n     *\n     * @param {Object} component\n     *        The instance of the `MenuItem` to add listeners to.\n     *\n     */\n    addEventListenerForItem(component) {\n      if (!(component instanceof Component$1)) {\n        return;\n      }\n      this.on(component, 'blur', this.boundHandleBlur_);\n      this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\n    }\n\n    /**\n     * Remove event listeners from the {@link MenuItem}.\n     *\n     * @param {Object} component\n     *        The instance of the `MenuItem` to remove listeners.\n     *\n     */\n    removeEventListenerForItem(component) {\n      if (!(component instanceof Component$1)) {\n        return;\n      }\n      this.off(component, 'blur', this.boundHandleBlur_);\n      this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\n    }\n\n    /**\n     * This method will be called indirectly when the component has been added\n     * before the component adds to the new menu instance by `addItem`.\n     * In this case, the original menu instance will remove the component\n     * by calling `removeChild`.\n     *\n     * @param {Object} component\n     *        The instance of the `MenuItem`\n     */\n    removeChild(component) {\n      if (typeof component === 'string') {\n        component = this.getChild(component);\n      }\n      this.removeEventListenerForItem(component);\n      super.removeChild(component);\n    }\n\n    /**\n     * Add a {@link MenuItem} to the menu.\n     *\n     * @param {Object|string} component\n     *        The name or instance of the `MenuItem` to add.\n     *\n     */\n    addItem(component) {\n      const childComponent = this.addChild(component);\n      if (childComponent) {\n        this.addEventListenerForItem(childComponent);\n      }\n    }\n\n    /**\n     * Create the `Menu`s DOM element.\n     *\n     * @return {Element}\n     *         the element that was created\n     */\n    createEl() {\n      const contentElType = this.options_.contentElType || 'ul';\n      this.contentEl_ = createEl(contentElType, {\n        className: 'vjs-menu-content'\n      });\n      this.contentEl_.setAttribute('role', 'menu');\n      const el = super.createEl('div', {\n        append: this.contentEl_,\n        className: 'vjs-menu'\n      });\n      el.appendChild(this.contentEl_);\n\n      // Prevent clicks from bubbling up. Needed for Menu Buttons,\n      // where a click on the parent is significant\n      on(el, 'click', function (event) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      });\n      return el;\n    }\n    dispose() {\n      this.contentEl_ = null;\n      this.boundHandleBlur_ = null;\n      this.boundHandleTapClick_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Called when a `MenuItem` loses focus.\n     *\n     * @param {Event} event\n     *        The `blur` event that caused this function to be called.\n     *\n     * @listens blur\n     */\n    handleBlur(event) {\n      const relatedTarget = event.relatedTarget || document.activeElement;\n\n      // Close menu popup when a user clicks outside the menu\n      if (!this.children().some(element => {\n        return element.el() === relatedTarget;\n      })) {\n        const btn = this.menuButton_;\n        if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\n          btn.unpressButton();\n        }\n      }\n    }\n\n    /**\n     * Called when a `MenuItem` gets clicked or tapped.\n     *\n     * @param {Event} event\n     *        The `click` or `tap` event that caused this function to be called.\n     *\n     * @listens click,tap\n     */\n    handleTapClick(event) {\n      // Unpress the associated MenuButton, and move focus back to it\n      if (this.menuButton_) {\n        this.menuButton_.unpressButton();\n        const childComponents = this.children();\n        if (!Array.isArray(childComponents)) {\n          return;\n        }\n        const foundComponent = childComponents.filter(component => component.el() === event.target)[0];\n        if (!foundComponent) {\n          return;\n        }\n\n        // don't focus menu button if item is a caption settings item\n        // because focus will move elsewhere\n        if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\n          this.menuButton_.focus();\n        }\n      }\n    }\n\n    /**\n     * Handle a `keydown` event on this menu. This listener is added in the constructor.\n     *\n     * @param {KeyboardEvent} event\n     *        A `keydown` event that happened on the menu.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      // Left and Down Arrows\n      if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepForward();\n\n        // Up and Right Arrows\n      } else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepBack();\n      }\n    }\n\n    /**\n     * Move to next (lower) menu item for keyboard users.\n     */\n    stepForward() {\n      let stepChild = 0;\n      if (this.focusedChild_ !== undefined) {\n        stepChild = this.focusedChild_ + 1;\n      }\n      this.focus(stepChild);\n    }\n\n    /**\n     * Move to previous (higher) menu item for keyboard users.\n     */\n    stepBack() {\n      let stepChild = 0;\n      if (this.focusedChild_ !== undefined) {\n        stepChild = this.focusedChild_ - 1;\n      }\n      this.focus(stepChild);\n    }\n\n    /**\n     * Set focus on a {@link MenuItem} in the `Menu`.\n     *\n     * @param {Object|string} [item=0]\n     *        Index of child item set focus on.\n     */\n    focus(item = 0) {\n      const children = this.children().slice();\n      const haveTitle = children.length && children[0].hasClass('vjs-menu-title');\n      if (haveTitle) {\n        children.shift();\n      }\n      if (children.length > 0) {\n        if (item < 0) {\n          item = 0;\n        } else if (item >= children.length) {\n          item = children.length - 1;\n        }\n        this.focusedChild_ = item;\n        children[item].el_.focus();\n      }\n    }\n  }\n  Component$1.registerComponent('Menu', Menu);\n\n  /**\n   * @file menu-button.js\n   */\n\n  /** @import Player from '../player' */\n\n  /**\n   * A `MenuButton` class for any popup {@link Menu}.\n   *\n   * @extends Component\n   */\n  class MenuButton extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n      this.menuButton_ = new Button(player, options);\n      this.menuButton_.controlText(this.controlText_);\n      this.menuButton_.el_.setAttribute('aria-haspopup', 'true');\n\n      // Add buildCSSClass values to the button, not the wrapper\n      const buttonClass = Button.prototype.buildCSSClass();\n      this.menuButton_.el_.className = this.buildCSSClass() + ' ' + buttonClass;\n      this.menuButton_.removeClass('vjs-control');\n      this.addChild(this.menuButton_);\n      this.update();\n      this.enabled_ = true;\n      const handleClick = e => this.handleClick(e);\n      this.handleMenuKeyUp_ = e => this.handleMenuKeyUp(e);\n      this.on(this.menuButton_, 'tap', handleClick);\n      this.on(this.menuButton_, 'click', handleClick);\n      this.on(this.menuButton_, 'keydown', e => this.handleKeyDown(e));\n      this.on(this.menuButton_, 'mouseenter', () => {\n        this.addClass('vjs-hover');\n        this.menu.show();\n        on(document, 'keyup', this.handleMenuKeyUp_);\n      });\n      this.on('mouseleave', e => this.handleMouseLeave(e));\n      this.on('keydown', e => this.handleSubmenuKeyDown(e));\n    }\n\n    /**\n     * Update the menu based on the current state of its items.\n     */\n    update() {\n      const menu = this.createMenu();\n      if (this.menu) {\n        this.menu.dispose();\n        this.removeChild(this.menu);\n      }\n      this.menu = menu;\n      this.addChild(menu);\n\n      /**\n       * Track the state of the menu button\n       *\n       * @type {Boolean}\n       * @private\n       */\n      this.buttonPressed_ = false;\n      this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n      if (this.items && this.items.length <= this.hideThreshold_) {\n        this.hide();\n        this.menu.contentEl_.removeAttribute('role');\n      } else {\n        this.show();\n        this.menu.contentEl_.setAttribute('role', 'menu');\n      }\n    }\n\n    /**\n     * Create the menu and add all items to it.\n     *\n     * @return {Menu}\n     *         The constructed menu\n     */\n    createMenu() {\n      const menu = new Menu(this.player_, {\n        menuButton: this\n      });\n\n      /**\n       * Hide the menu if the number of items is less than or equal to this threshold. This defaults\n       * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\n       * it here because every time we run `createMenu` we need to reset the value.\n       *\n       * @protected\n       * @type {Number}\n       */\n      this.hideThreshold_ = 0;\n\n      // Add a title list item to the top\n      if (this.options_.title) {\n        const titleEl = createEl('li', {\n          className: 'vjs-menu-title',\n          textContent: toTitleCase$1(this.options_.title),\n          tabIndex: -1\n        });\n        const titleComponent = new Component$1(this.player_, {\n          el: titleEl\n        });\n        menu.addItem(titleComponent);\n      }\n      this.items = this.createItems();\n      if (this.items) {\n        // Add menu items to the menu\n        for (let i = 0; i < this.items.length; i++) {\n          menu.addItem(this.items[i]);\n        }\n      }\n      return menu;\n    }\n\n    /**\n     * Create the list of menu items. Specific to each subclass.\n     *\n     * @abstract\n     */\n    createItems() {}\n\n    /**\n     * Create the `MenuButtons`s DOM element.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: this.buildWrapperCSSClass()\n      }, {});\n    }\n\n    /**\n     * Overwrites the `setIcon` method from `Component`.\n     * In this case, we want the icon to be appended to the menuButton.\n     *\n     * @param {string} name\n     *         The icon name to be added.\n     */\n    setIcon(name) {\n      super.setIcon(name, this.menuButton_.el_);\n    }\n\n    /**\n     * Allow sub components to stack CSS class names for the wrapper element\n     *\n     * @return {string}\n     *         The constructed wrapper DOM `className`\n     */\n    buildWrapperCSSClass() {\n      let menuButtonClass = 'vjs-menu-button';\n\n      // If the inline option is passed, we want to use different styles altogether.\n      if (this.options_.inline === true) {\n        menuButtonClass += '-inline';\n      } else {\n        menuButtonClass += '-popup';\n      }\n\n      // TODO: Fix the CSS so that this isn't necessary\n      const buttonClass = Button.prototype.buildCSSClass();\n      return `vjs-menu-button ${menuButtonClass} ${buttonClass} ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      let menuButtonClass = 'vjs-menu-button';\n\n      // If the inline option is passed, we want to use different styles altogether.\n      if (this.options_.inline === true) {\n        menuButtonClass += '-inline';\n      } else {\n        menuButtonClass += '-popup';\n      }\n      return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Get or set the localized control text that will be used for accessibility.\n     *\n     * > NOTE: This will come from the internal `menuButton_` element.\n     *\n     * @param {string} [text]\n     *        Control text for element.\n     *\n     * @param {Element} [el=this.menuButton_.el()]\n     *        Element to set the title on.\n     *\n     * @return {string}\n     *         - The control text when getting\n     */\n    controlText(text, el = this.menuButton_.el()) {\n      return this.menuButton_.controlText(text, el);\n    }\n\n    /**\n     * Dispose of the `menu-button` and all child components.\n     */\n    dispose() {\n      this.handleMouseLeave();\n      super.dispose();\n    }\n\n    /**\n     * Handle a click on a `MenuButton`.\n     * See {@link ClickableComponent#handleClick} for instances where this is called.\n     *\n     * @param {Event} event\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      if (this.buttonPressed_) {\n        this.unpressButton();\n      } else {\n        this.pressButton();\n      }\n    }\n\n    /**\n     * Handle `mouseleave` for `MenuButton`.\n     *\n     * @param {Event} event\n     *        The `mouseleave` event that caused this function to be called.\n     *\n     * @listens mouseleave\n     */\n    handleMouseLeave(event) {\n      this.removeClass('vjs-hover');\n      off(document, 'keyup', this.handleMenuKeyUp_);\n    }\n\n    /**\n     * Set the focus to the actual button, not to this element\n     */\n    focus() {\n      this.menuButton_.focus();\n    }\n\n    /**\n     * Remove the focus from the actual button, not this element\n     */\n    blur() {\n      this.menuButton_.blur();\n    }\n\n    /**\n     * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\n     * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n     *\n     * @param {Event} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      // Escape or Tab unpress the 'button'\n      if (event.key === 'Escape' || event.key === 'Tab') {\n        if (this.buttonPressed_) {\n          this.unpressButton();\n        }\n\n        // Don't preventDefault for Tab key - we still want to lose focus\n        if (!event.key === 'Tab') {\n          event.preventDefault();\n          // Set focus back to the menu button's button\n          this.menuButton_.focus();\n        }\n        // Up Arrow or Down Arrow also 'press' the button to open the menu\n      } else if (event.key === 'Up' || event.key === 'Down' && !(this.player_.options_.playerOptions.spatialNavigation && this.player_.options_.playerOptions.spatialNavigation.enabled)) {\n        if (!this.buttonPressed_) {\n          event.preventDefault();\n          this.pressButton();\n        }\n      }\n    }\n\n    /**\n     * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\n     * the constructor.\n     *\n     * @param {Event} event\n     *        Key press event\n     *\n     * @listens keyup\n     */\n    handleMenuKeyUp(event) {\n      // Escape hides popup menu\n      if (event.key === 'Escape' || event.key === 'Tab') {\n        this.removeClass('vjs-hover');\n      }\n    }\n\n    /**\n     * This method name now delegates to `handleSubmenuKeyDown`. This means\n     * anyone calling `handleSubmenuKeyPress` will not see their method calls\n     * stop working.\n     *\n     * @param {Event} event\n     *        The event that caused this function to be called.\n     */\n    handleSubmenuKeyPress(event) {\n      this.handleSubmenuKeyDown(event);\n    }\n\n    /**\n     * Handle a `keydown` event on a sub-menu. The listener for this is added in\n     * the constructor.\n     *\n     * @param {Event} event\n     *        Key press event\n     *\n     * @listens keydown\n     */\n    handleSubmenuKeyDown(event) {\n      // Escape or Tab unpress the 'button'\n      if (event.key === 'Escape' || event.key === 'Tab') {\n        if (this.buttonPressed_) {\n          this.unpressButton();\n        }\n        // Don't preventDefault for Tab key - we still want to lose focus\n        if (!event.key === 'Tab') {\n          event.preventDefault();\n          // Set focus back to the menu button's button\n          this.menuButton_.focus();\n        }\n      }\n    }\n\n    /**\n     * Put the current `MenuButton` into a pressed state.\n     */\n    pressButton() {\n      if (this.enabled_) {\n        this.buttonPressed_ = true;\n        this.menu.show();\n        this.menu.lockShowing();\n        this.menuButton_.el_.setAttribute('aria-expanded', 'true');\n\n        // set the focus into the submenu, except on iOS where it is resulting in\n        // undesired scrolling behavior when the player is in an iframe\n        if (IS_IOS && isInFrame()) {\n          // Return early so that the menu isn't focused\n          return;\n        }\n        this.menu.focus();\n      }\n    }\n\n    /**\n     * Take the current `MenuButton` out of a pressed state.\n     */\n    unpressButton() {\n      if (this.enabled_) {\n        this.buttonPressed_ = false;\n        this.menu.unlockShowing();\n        this.menu.hide();\n        this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n      }\n    }\n\n    /**\n     * Disable the `MenuButton`. Don't allow it to be clicked.\n     */\n    disable() {\n      this.unpressButton();\n      this.enabled_ = false;\n      this.addClass('vjs-disabled');\n      this.menuButton_.disable();\n    }\n\n    /**\n     * Enable the `MenuButton`. Allow it to be clicked.\n     */\n    enable() {\n      this.enabled_ = true;\n      this.removeClass('vjs-disabled');\n      this.menuButton_.enable();\n    }\n  }\n  Component$1.registerComponent('MenuButton', MenuButton);\n\n  /**\n   * @file track-button.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * The base class for buttons that toggle specific  track types (e.g. subtitles).\n   *\n   * @extends MenuButton\n   */\n  class TrackButton extends MenuButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      const tracks = options.tracks;\n      super(player, options);\n      if (this.items.length <= 1) {\n        this.hide();\n      }\n      if (!tracks) {\n        return;\n      }\n      const updateHandler = bind_(this, this.update);\n      tracks.addEventListener('removetrack', updateHandler);\n      tracks.addEventListener('addtrack', updateHandler);\n      tracks.addEventListener('labelchange', updateHandler);\n      this.player_.on('ready', updateHandler);\n      this.player_.on('dispose', function () {\n        tracks.removeEventListener('removetrack', updateHandler);\n        tracks.removeEventListener('addtrack', updateHandler);\n        tracks.removeEventListener('labelchange', updateHandler);\n      });\n    }\n  }\n  Component$1.registerComponent('TrackButton', TrackButton);\n\n  /**\n   * @file menu-item.js\n   */\n\n  /** @import Player from '../player' */\n\n  /**\n   * The component for a menu item. `<li>`\n   *\n   * @extends ClickableComponent\n   */\n  class MenuItem extends ClickableComponent {\n    /**\n     * Creates an instance of the this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     *\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.selectable = options.selectable;\n      this.isSelected_ = options.selected || false;\n      this.multiSelectable = options.multiSelectable;\n      this.selected(this.isSelected_);\n      if (this.selectable) {\n        if (this.multiSelectable) {\n          this.el_.setAttribute('role', 'menuitemcheckbox');\n        } else {\n          this.el_.setAttribute('role', 'menuitemradio');\n        }\n      } else {\n        this.el_.setAttribute('role', 'menuitem');\n      }\n    }\n\n    /**\n     * Create the `MenuItem's DOM element\n     *\n     * @param {string} [type=li]\n     *        Element's node type, not actually used, always set to `li`.\n     *\n     * @param {Object} [props={}]\n     *        An object of properties that should be set on the element\n     *\n     * @param {Object} [attrs={}]\n     *        An object of attributes that should be set on the element\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl(type, props, attrs) {\n      // The control is textual, not just an icon\n      this.nonIconControl = true;\n      const el = super.createEl('li', Object.assign({\n        className: 'vjs-menu-item',\n        tabIndex: -1\n      }, props), attrs);\n\n      // swap icon with menu item text.\n      const menuItemEl = createEl('span', {\n        className: 'vjs-menu-item-text',\n        textContent: this.localize(this.options_.label)\n      });\n\n      // If using SVG icons, the element with vjs-icon-placeholder will be added separately.\n      if (this.player_.options_.experimentalSvgIcons) {\n        el.appendChild(menuItemEl);\n      } else {\n        el.replaceChild(menuItemEl, el.querySelector('.vjs-icon-placeholder'));\n      }\n      return el;\n    }\n\n    /**\n     * Ignore keys which are used by the menu, but pass any other ones up. See\n     * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      if (!['Tab', 'Escape', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'].includes(event.key)) {\n        // Pass keydown handling up for unused keys\n        super.handleKeyDown(event);\n      }\n    }\n\n    /**\n     * Any click on a `MenuItem` puts it into the selected state.\n     * See {@link ClickableComponent#handleClick} for instances where this is called.\n     *\n     * @param {Event} event\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      this.selected(true);\n    }\n\n    /**\n     * Set the state for this menu item as selected or not.\n     *\n     * @param {boolean} selected\n     *        if the menu item is selected or not\n     */\n    selected(selected) {\n      if (this.selectable) {\n        if (selected) {\n          this.addClass('vjs-selected');\n          this.el_.setAttribute('aria-checked', 'true');\n          // aria-checked isn't fully supported by browsers/screen readers,\n          // so indicate selected state to screen reader in the control text.\n          this.controlText(', selected');\n          this.isSelected_ = true;\n        } else {\n          this.removeClass('vjs-selected');\n          this.el_.setAttribute('aria-checked', 'false');\n          // Indicate un-selected state to screen reader\n          this.controlText('');\n          this.isSelected_ = false;\n        }\n      }\n    }\n  }\n  Component$1.registerComponent('MenuItem', MenuItem);\n\n  /**\n   * @file text-track-menu-item.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The specific menu item type for selecting a language within a text track kind\n   *\n   * @extends MenuItem\n   */\n  class TextTrackMenuItem extends MenuItem {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      const track = options.track;\n      const tracks = player.textTracks();\n\n      // Modify options for parent MenuItem class's init.\n      options.label = track.label || track.language || 'Unknown';\n      options.selected = track.mode === 'showing';\n      super(player, options);\n      this.track = track;\n      // Determine the relevant kind(s) of tracks for this component and filter\n      // out empty kinds.\n      this.kinds = (options.kinds || [options.kind || this.track.kind]).filter(Boolean);\n      const changeHandler = (...args) => {\n        this.handleTracksChange.apply(this, args);\n      };\n      const selectedLanguageChangeHandler = (...args) => {\n        this.handleSelectedLanguageChange.apply(this, args);\n      };\n      player.on(['loadstart', 'texttrackchange'], changeHandler);\n      tracks.addEventListener('change', changeHandler);\n      tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n      this.on('dispose', function () {\n        player.off(['loadstart', 'texttrackchange'], changeHandler);\n        tracks.removeEventListener('change', changeHandler);\n        tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n      });\n\n      // iOS7 doesn't dispatch change events to TextTrackLists when an\n      // associated track's mode changes. Without something like\n      // Object.observe() (also not present on iOS7), it's not\n      // possible to detect changes to the mode attribute and polyfill\n      // the change event. As a poor substitute, we manually dispatch\n      // change events whenever the controls modify the mode.\n      if (tracks.onchange === undefined) {\n        let event;\n        this.on(['tap', 'click'], function () {\n          if (typeof window.Event !== 'object') {\n            // Android 2.3 throws an Illegal Constructor error for window.Event\n            try {\n              event = new window.Event('change');\n            } catch (err) {\n              // continue regardless of error\n            }\n          }\n          if (!event) {\n            event = document.createEvent('Event');\n            event.initEvent('change', true, true);\n          }\n          tracks.dispatchEvent(event);\n        });\n      }\n\n      // set the default state based on current tracks\n      this.handleTracksChange();\n    }\n\n    /**\n     * This gets called when an `TextTrackMenuItem` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} event\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      const referenceTrack = this.track;\n      const tracks = this.player_.textTracks();\n      super.handleClick(event);\n      if (!tracks) {\n        return;\n      }\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\n\n        // If the track from the text tracks list is not of the right kind,\n        // skip it. We do not want to affect tracks of incompatible kind(s).\n        if (this.kinds.indexOf(track.kind) === -1) {\n          continue;\n        }\n\n        // If this text track is the component's track and it is not showing,\n        // set it to showing.\n        if (track === referenceTrack) {\n          if (track.mode !== 'showing') {\n            track.mode = 'showing';\n          }\n\n          // If this text track is not the component's track and it is not\n          // disabled, set it to disabled.\n        } else if (track.mode !== 'disabled') {\n          track.mode = 'disabled';\n        }\n      }\n    }\n\n    /**\n     * Handle text track list change\n     *\n     * @param {Event} event\n     *        The `change` event that caused this function to be called.\n     *\n     * @listens TextTrackList#change\n     */\n    handleTracksChange(event) {\n      const shouldBeSelected = this.track.mode === 'showing';\n\n      // Prevent redundant selected() calls because they may cause\n      // screen readers to read the appended control text unnecessarily\n      if (shouldBeSelected !== this.isSelected_) {\n        this.selected(shouldBeSelected);\n      }\n    }\n    handleSelectedLanguageChange(event) {\n      if (this.track.mode === 'showing') {\n        const selectedLanguage = this.player_.cache_.selectedLanguage;\n\n        // Don't replace the kind of track across the same language\n        if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\n          return;\n        }\n        this.player_.cache_.selectedLanguage = {\n          enabled: true,\n          language: this.track.language,\n          kind: this.track.kind\n        };\n      }\n    }\n    dispose() {\n      // remove reference to track object on dispose\n      this.track = null;\n      super.dispose();\n    }\n  }\n  Component$1.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\n\n  /**\n   * @file off-text-track-menu-item.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * A special menu item for turning off a specific type of text track\n   *\n   * @extends TextTrackMenuItem\n   */\n  class OffTextTrackMenuItem extends TextTrackMenuItem {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      // Create pseudo track info\n      // Requires options['kind']\n      options.track = {\n        player,\n        // it is no longer necessary to store `kind` or `kinds` on the track itself\n        // since they are now stored in the `kinds` property of all instances of\n        // TextTrackMenuItem, but this will remain for backwards compatibility\n        kind: options.kind,\n        kinds: options.kinds,\n        default: false,\n        mode: 'disabled'\n      };\n      if (!options.kinds) {\n        options.kinds = [options.kind];\n      }\n      if (options.label) {\n        options.track.label = options.label;\n      } else {\n        options.track.label = options.kinds.join(' and ') + ' off';\n      }\n\n      // MenuItem is selectable\n      options.selectable = true;\n      // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n      options.multiSelectable = false;\n      super(player, options);\n    }\n\n    /**\n     * Handle text track change\n     *\n     * @param {Event} event\n     *        The event that caused this function to run\n     */\n    handleTracksChange(event) {\n      const tracks = this.player().textTracks();\n      let shouldBeSelected = true;\n      for (let i = 0, l = tracks.length; i < l; i++) {\n        const track = tracks[i];\n        if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\n          shouldBeSelected = false;\n          break;\n        }\n      }\n\n      // Prevent redundant selected() calls because they may cause\n      // screen readers to read the appended control text unnecessarily\n      if (shouldBeSelected !== this.isSelected_) {\n        this.selected(shouldBeSelected);\n      }\n    }\n    handleSelectedLanguageChange(event) {\n      const tracks = this.player().textTracks();\n      let allHidden = true;\n      for (let i = 0, l = tracks.length; i < l; i++) {\n        const track = tracks[i];\n        if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\n          allHidden = false;\n          break;\n        }\n      }\n      if (allHidden) {\n        this.player_.cache_.selectedLanguage = {\n          enabled: false\n        };\n      }\n    }\n\n    /**\n     * Update control text and label on languagechange\n     */\n    handleLanguagechange() {\n      this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.label);\n      super.handleLanguagechange();\n    }\n  }\n  Component$1.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\n\n  /**\n   * @file text-track-button.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The base class for buttons that toggle specific text track types (e.g. subtitles)\n   *\n   * @extends MenuButton\n   */\n  class TextTrackButton extends TrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     */\n    constructor(player, options = {}) {\n      options.tracks = player.textTracks();\n      super(player, options);\n    }\n\n    /**\n     * Create a menu item for each text track\n     *\n     * @param {TextTrackMenuItem[]} [items=[]]\n     *        Existing array of items to use during creation\n     *\n     * @return {TextTrackMenuItem[]}\n     *         Array of menu items that were created\n     */\n    createItems(items = [], TrackMenuItem = TextTrackMenuItem) {\n      // Label is an override for the [track] off label\n      // USed to localise captions/subtitles\n      let label;\n      if (this.label_) {\n        label = `${this.label_} off`;\n      }\n      // Add an OFF menu item to turn all tracks off\n      items.push(new OffTextTrackMenuItem(this.player_, {\n        kinds: this.kinds_,\n        kind: this.kind_,\n        label\n      }));\n      this.hideThreshold_ += 1;\n      const tracks = this.player_.textTracks();\n      if (!Array.isArray(this.kinds_)) {\n        this.kinds_ = [this.kind_];\n      }\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\n\n        // only add tracks that are of an appropriate kind and have a label\n        if (this.kinds_.indexOf(track.kind) > -1) {\n          const item = new TrackMenuItem(this.player_, {\n            track,\n            kinds: this.kinds_,\n            kind: this.kind_,\n            // MenuItem is selectable\n            selectable: true,\n            // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n            multiSelectable: false\n          });\n          item.addClass(`vjs-${track.kind}-menu-item`);\n          items.push(item);\n        }\n      }\n      return items;\n    }\n  }\n  Component$1.registerComponent('TextTrackButton', TextTrackButton);\n\n  /**\n   * @file chapters-track-menu-item.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The chapter track menu item\n   *\n   * @extends MenuItem\n   */\n  class ChaptersTrackMenuItem extends MenuItem {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      const track = options.track;\n      const cue = options.cue;\n      const currentTime = player.currentTime();\n\n      // Modify options for parent MenuItem class's init.\n      options.selectable = true;\n      options.multiSelectable = false;\n      options.label = cue.text;\n      options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\n      super(player, options);\n      this.track = track;\n      this.cue = cue;\n    }\n\n    /**\n     * This gets called when an `ChaptersTrackMenuItem` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      super.handleClick();\n      this.player_.currentTime(this.cue.startTime);\n    }\n  }\n  Component$1.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\n\n  /**\n   * @file chapters-button.js\n   */\n\n  /** @import Player from '../../player' */\n  /** @import Menu from '../../menu/menu' */\n  /** @import TextTrack from '../../tracks/text-track' */\n  /** @import TextTrackMenuItem from '../text-track-controls/text-track-menu-item' */\n\n  /**\n   * The button component for toggling and selecting chapters\n   * Chapters act much differently than other text tracks\n   * Cues are navigation vs. other tracks of alternative languages\n   *\n   * @extends TextTrackButton\n   */\n  class ChaptersButton extends TextTrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function to call when this function is ready.\n     */\n    constructor(player, options, ready) {\n      super(player, options, ready);\n      this.setIcon('chapters');\n      this.selectCurrentItem_ = () => {\n        this.items.forEach(item => {\n          item.selected(this.track_.activeCues[0] === item.cue);\n        });\n      };\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-chapters-button ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-chapters-button ${super.buildWrapperCSSClass()}`;\n    }\n\n    /**\n     * Update the menu based on the current state of its items.\n     *\n     * @param {Event} [event]\n     *        An event that triggered this function to run.\n     *\n     * @listens TextTrackList#addtrack\n     * @listens TextTrackList#removetrack\n     * @listens TextTrackList#change\n     */\n    update(event) {\n      if (event && event.track && event.track.kind !== 'chapters') {\n        return;\n      }\n      const track = this.findChaptersTrack();\n      if (track !== this.track_) {\n        this.setTrack(track);\n        super.update();\n      } else if (!this.items || track && track.cues && track.cues.length !== this.items.length) {\n        // Update the menu initially or if the number of cues has changed since set\n        super.update();\n      }\n    }\n\n    /**\n     * Set the currently selected track for the chapters button.\n     *\n     * @param {TextTrack} track\n     *        The new track to select. Nothing will change if this is the currently selected\n     *        track.\n     */\n    setTrack(track) {\n      if (this.track_ === track) {\n        return;\n      }\n      if (!this.updateHandler_) {\n        this.updateHandler_ = this.update.bind(this);\n      }\n\n      // here this.track_ refers to the old track instance\n      if (this.track_) {\n        const remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n        if (remoteTextTrackEl) {\n          remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\n        }\n        this.track_.removeEventListener('cuechange', this.selectCurrentItem_);\n        this.track_ = null;\n      }\n      this.track_ = track;\n\n      // here this.track_ refers to the new track instance\n      if (this.track_) {\n        this.track_.mode = 'hidden';\n        const remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n        if (remoteTextTrackEl) {\n          remoteTextTrackEl.addEventListener('load', this.updateHandler_);\n        }\n        this.track_.addEventListener('cuechange', this.selectCurrentItem_);\n      }\n    }\n\n    /**\n     * Find the track object that is currently in use by this ChaptersButton\n     *\n     * @return {TextTrack|undefined}\n     *         The current track or undefined if none was found.\n     */\n    findChaptersTrack() {\n      const tracks = this.player_.textTracks() || [];\n      for (let i = tracks.length - 1; i >= 0; i--) {\n        // We will always choose the last track as our chaptersTrack\n        const track = tracks[i];\n        if (track.kind === this.kind_) {\n          return track;\n        }\n      }\n    }\n\n    /**\n     * Get the caption for the ChaptersButton based on the track label. This will also\n     * use the current tracks localized kind as a fallback if a label does not exist.\n     *\n     * @return {string}\n     *         The tracks current label or the localized track kind.\n     */\n    getMenuCaption() {\n      if (this.track_ && this.track_.label) {\n        return this.track_.label;\n      }\n      return this.localize(toTitleCase$1(this.kind_));\n    }\n\n    /**\n     * Create menu from chapter track\n     *\n     * @return {Menu}\n     *         New menu for the chapter buttons\n     */\n    createMenu() {\n      this.options_.title = this.getMenuCaption();\n      return super.createMenu();\n    }\n\n    /**\n     * Create a menu item for each text track\n     *\n     * @return  {TextTrackMenuItem[]}\n     *         Array of menu items\n     */\n    createItems() {\n      const items = [];\n      if (!this.track_) {\n        return items;\n      }\n      const cues = this.track_.cues;\n      if (!cues) {\n        return items;\n      }\n      for (let i = 0, l = cues.length; i < l; i++) {\n        const cue = cues[i];\n        const mi = new ChaptersTrackMenuItem(this.player_, {\n          track: this.track_,\n          cue\n        });\n        items.push(mi);\n      }\n      return items;\n    }\n  }\n\n  /**\n   * `kind` of TextTrack to look for to associate it with this menu.\n   *\n   * @type {string}\n   * @private\n   */\n  ChaptersButton.prototype.kind_ = 'chapters';\n\n  /**\n   * The text that should display over the `ChaptersButton`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  ChaptersButton.prototype.controlText_ = 'Chapters';\n  Component$1.registerComponent('ChaptersButton', ChaptersButton);\n\n  /**\n   * @file descriptions-button.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The button component for toggling and selecting descriptions\n   *\n   * @extends TextTrackButton\n   */\n  class DescriptionsButton extends TextTrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function to call when this component is ready.\n     */\n    constructor(player, options, ready) {\n      super(player, options, ready);\n      this.setIcon('audio-description');\n      const tracks = player.textTracks();\n      const changeHandler = bind_(this, this.handleTracksChange);\n      tracks.addEventListener('change', changeHandler);\n      this.on('dispose', function () {\n        tracks.removeEventListener('change', changeHandler);\n      });\n    }\n\n    /**\n     * Handle text track change\n     *\n     * @param {Event} event\n     *        The event that caused this function to run\n     *\n     * @listens TextTrackList#change\n     */\n    handleTracksChange(event) {\n      const tracks = this.player().textTracks();\n      let disabled = false;\n\n      // Check whether a track of a different kind is showing\n      for (let i = 0, l = tracks.length; i < l; i++) {\n        const track = tracks[i];\n        if (track.kind !== this.kind_ && track.mode === 'showing') {\n          disabled = true;\n          break;\n        }\n      }\n\n      // If another track is showing, disable this menu button\n      if (disabled) {\n        this.disable();\n      } else {\n        this.enable();\n      }\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-descriptions-button ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-descriptions-button ${super.buildWrapperCSSClass()}`;\n    }\n  }\n\n  /**\n   * `kind` of TextTrack to look for to associate it with this menu.\n   *\n   * @type {string}\n   * @private\n   */\n  DescriptionsButton.prototype.kind_ = 'descriptions';\n\n  /**\n   * The text that should display over the `DescriptionsButton`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  DescriptionsButton.prototype.controlText_ = 'Descriptions';\n  Component$1.registerComponent('DescriptionsButton', DescriptionsButton);\n\n  /**\n   * @file subtitles-button.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The button component for toggling and selecting subtitles\n   *\n   * @extends TextTrackButton\n   */\n  class SubtitlesButton extends TextTrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function to call when this component is ready.\n     */\n    constructor(player, options, ready) {\n      super(player, options, ready);\n      this.setIcon('subtitles');\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-subtitles-button ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-subtitles-button ${super.buildWrapperCSSClass()}`;\n    }\n  }\n\n  /**\n   * `kind` of TextTrack to look for to associate it with this menu.\n   *\n   * @type {string}\n   * @private\n   */\n  SubtitlesButton.prototype.kind_ = 'subtitles';\n\n  /**\n   * The text that should display over the `SubtitlesButton`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  SubtitlesButton.prototype.controlText_ = 'Subtitles';\n  Component$1.registerComponent('SubtitlesButton', SubtitlesButton);\n\n  /**\n   * @file caption-settings-menu-item.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The menu item for caption track settings menu\n   *\n   * @extends TextTrackMenuItem\n   */\n  class CaptionSettingsMenuItem extends TextTrackMenuItem {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      options.track = {\n        player,\n        kind: options.kind,\n        label: options.kind + ' settings',\n        selectable: false,\n        default: false,\n        mode: 'disabled'\n      };\n\n      // CaptionSettingsMenuItem has no concept of 'selected'\n      options.selectable = false;\n      options.name = 'CaptionSettingsMenuItem';\n      super(player, options);\n      this.addClass('vjs-texttrack-settings');\n      this.controlText(', opens ' + options.kind + ' settings dialog');\n    }\n\n    /**\n     * This gets called when an `CaptionSettingsMenuItem` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      this.player().getChild('textTrackSettings').open();\n    }\n\n    /**\n     * Update control text and label on languagechange\n     */\n    handleLanguagechange() {\n      this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.kind + ' settings');\n      super.handleLanguagechange();\n    }\n  }\n  Component$1.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\n\n  /**\n   * @file captions-button.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The button component for toggling and selecting captions\n   *\n   * @extends TextTrackButton\n   */\n  class CaptionsButton extends TextTrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function to call when this component is ready.\n     */\n    constructor(player, options, ready) {\n      super(player, options, ready);\n      this.setIcon('captions');\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-captions-button ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-captions-button ${super.buildWrapperCSSClass()}`;\n    }\n\n    /**\n     * Create caption menu items\n     *\n     * @return {CaptionSettingsMenuItem[]}\n     *         The array of current menu items.\n     */\n    createItems() {\n      const items = [];\n      if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n        items.push(new CaptionSettingsMenuItem(this.player_, {\n          kind: this.kind_\n        }));\n        this.hideThreshold_ += 1;\n      }\n      return super.createItems(items);\n    }\n  }\n\n  /**\n   * `kind` of TextTrack to look for to associate it with this menu.\n   *\n   * @type {string}\n   * @private\n   */\n  CaptionsButton.prototype.kind_ = 'captions';\n\n  /**\n   * The text that should display over the `CaptionsButton`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  CaptionsButton.prototype.controlText_ = 'Captions';\n  Component$1.registerComponent('CaptionsButton', CaptionsButton);\n\n  /**\n   * @file subs-caps-menu-item.js\n   */\n\n  /**\n   * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\n   * in the SubsCapsMenu.\n   *\n   * @extends TextTrackMenuItem\n   */\n  class SubsCapsMenuItem extends TextTrackMenuItem {\n    createEl(type, props, attrs) {\n      const el = super.createEl(type, props, attrs);\n      const parentSpan = el.querySelector('.vjs-menu-item-text');\n      if (this.options_.track.kind === 'captions') {\n        if (this.player_.options_.experimentalSvgIcons) {\n          this.setIcon('captions', el);\n        } else {\n          parentSpan.appendChild(createEl('span', {\n            className: 'vjs-icon-placeholder'\n          }, {\n            'aria-hidden': true\n          }));\n        }\n        parentSpan.appendChild(createEl('span', {\n          className: 'vjs-control-text',\n          // space added as the text will visually flow with the\n          // label\n          textContent: ` ${this.localize('Captions')}`\n        }));\n      }\n      return el;\n    }\n  }\n  Component$1.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\n\n  /**\n   * @file sub-caps-button.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The button component for toggling and selecting captions and/or subtitles\n   *\n   * @extends TextTrackButton\n   */\n  class SubsCapsButton extends TextTrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {Function} [ready]\n     *        The function to call when this component is ready.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n\n      // Although North America uses \"captions\" in most cases for\n      // \"captions and subtitles\" other locales use \"subtitles\"\n      this.label_ = 'subtitles';\n      this.setIcon('subtitles');\n      if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(this.player_.language_) > -1) {\n        this.label_ = 'captions';\n        this.setIcon('captions');\n      }\n      this.menuButton_.controlText(toTitleCase$1(this.label_));\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-subs-caps-button ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-subs-caps-button ${super.buildWrapperCSSClass()}`;\n    }\n\n    /**\n     * Create caption/subtitles menu items\n     *\n     * @return {CaptionSettingsMenuItem[]}\n     *         The array of current menu items.\n     */\n    createItems() {\n      let items = [];\n      if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n        items.push(new CaptionSettingsMenuItem(this.player_, {\n          kind: this.label_\n        }));\n        this.hideThreshold_ += 1;\n      }\n      items = super.createItems(items, SubsCapsMenuItem);\n      return items;\n    }\n  }\n\n  /**\n   * `kind`s of TextTrack to look for to associate it with this menu.\n   *\n   * @type {array}\n   * @private\n   */\n  SubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\n\n  /**\n   * The text that should display over the `SubsCapsButton`s controls.\n   *\n   *\n   * @type {string}\n   * @protected\n   */\n  SubsCapsButton.prototype.controlText_ = 'Subtitles';\n  Component$1.registerComponent('SubsCapsButton', SubsCapsButton);\n\n  /**\n   * @file audio-track-menu-item.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * An {@link AudioTrack} {@link MenuItem}\n   *\n   * @extends MenuItem\n   */\n  class AudioTrackMenuItem extends MenuItem {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      const track = options.track;\n      const tracks = player.audioTracks();\n\n      // Modify options for parent MenuItem class's init.\n      options.label = track.label || track.language || 'Unknown';\n      options.selected = track.enabled;\n      super(player, options);\n      this.track = track;\n      this.addClass(`vjs-${track.kind}-menu-item`);\n      const changeHandler = (...args) => {\n        this.handleTracksChange.apply(this, args);\n      };\n      tracks.addEventListener('change', changeHandler);\n      this.on('dispose', () => {\n        tracks.removeEventListener('change', changeHandler);\n      });\n    }\n    createEl(type, props, attrs) {\n      const el = super.createEl(type, props, attrs);\n      const parentSpan = el.querySelector('.vjs-menu-item-text');\n      if (['main-desc', 'descriptions'].indexOf(this.options_.track.kind) >= 0) {\n        parentSpan.appendChild(createEl('span', {\n          className: 'vjs-icon-placeholder'\n        }, {\n          'aria-hidden': true\n        }));\n        parentSpan.appendChild(createEl('span', {\n          className: 'vjs-control-text',\n          textContent: ' ' + this.localize('Descriptions')\n        }));\n      }\n      return el;\n    }\n\n    /**\n     * This gets called when an `AudioTrackMenuItem is \"clicked\". See {@link ClickableComponent}\n     * for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      super.handleClick(event);\n\n      // the audio track list will automatically toggle other tracks\n      // off for us.\n      this.track.enabled = true;\n\n      // when native audio tracks are used, we want to make sure that other tracks are turned off\n      if (this.player_.tech_.featuresNativeAudioTracks) {\n        const tracks = this.player_.audioTracks();\n        for (let i = 0; i < tracks.length; i++) {\n          const track = tracks[i];\n\n          // skip the current track since we enabled it above\n          if (track === this.track) {\n            continue;\n          }\n          track.enabled = track === this.track;\n        }\n      }\n    }\n\n    /**\n     * Handle any {@link AudioTrack} change.\n     *\n     * @param {Event} [event]\n     *        The {@link AudioTrackList#change} event that caused this to run.\n     *\n     * @listens AudioTrackList#change\n     */\n    handleTracksChange(event) {\n      this.selected(this.track.enabled);\n    }\n  }\n  Component$1.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\n\n  /**\n   * @file audio-track-button.js\n   */\n\n  /**\n   * The base class for buttons that toggle specific {@link AudioTrack} types.\n   *\n   * @extends TrackButton\n   */\n  class AudioTrackButton extends TrackButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options={}]\n     *        The key/value store of player options.\n     */\n    constructor(player, options = {}) {\n      options.tracks = player.audioTracks();\n      super(player, options);\n      this.setIcon('audio');\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-audio-button ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-audio-button ${super.buildWrapperCSSClass()}`;\n    }\n\n    /**\n     * Create a menu item for each audio track\n     *\n     * @param {AudioTrackMenuItem[]} [items=[]]\n     *        An array of existing menu items to use.\n     *\n     * @return {AudioTrackMenuItem[]}\n     *         An array of menu items\n     */\n    createItems(items = []) {\n      // if there's only one audio track, there no point in showing it\n      this.hideThreshold_ = 1;\n      const tracks = this.player_.audioTracks();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\n        items.push(new AudioTrackMenuItem(this.player_, {\n          track,\n          // MenuItem is selectable\n          selectable: true,\n          // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n          multiSelectable: false\n        }));\n      }\n      return items;\n    }\n  }\n\n  /**\n   * The text that should display over the `AudioTrackButton`s controls. Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  AudioTrackButton.prototype.controlText_ = 'Audio Track';\n  Component$1.registerComponent('AudioTrackButton', AudioTrackButton);\n\n  /**\n   * @file playback-rate-menu-item.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The specific menu item type for selecting a playback rate.\n   *\n   * @extends MenuItem\n   */\n  class PlaybackRateMenuItem extends MenuItem {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      const label = options.rate;\n      const rate = parseFloat(label, 10);\n\n      // Modify options for parent MenuItem class's init.\n      options.label = label;\n      options.selected = rate === player.playbackRate();\n      options.selectable = true;\n      options.multiSelectable = false;\n      super(player, options);\n      this.label = label;\n      this.rate = rate;\n      this.on(player, 'ratechange', e => this.update(e));\n    }\n\n    /**\n     * This gets called when an `PlaybackRateMenuItem` is \"clicked\". See\n     * {@link ClickableComponent} for more detailed information on what a click can be.\n     *\n     * @param {Event} [event]\n     *        The `keydown`, `tap`, or `click` event that caused this function to be\n     *        called.\n     *\n     * @listens tap\n     * @listens click\n     */\n    handleClick(event) {\n      super.handleClick();\n      this.player().playbackRate(this.rate);\n    }\n\n    /**\n     * Update the PlaybackRateMenuItem when the playbackrate changes.\n     *\n     * @param {Event} [event]\n     *        The `ratechange` event that caused this function to run.\n     *\n     * @listens Player#ratechange\n     */\n    update(event) {\n      this.selected(this.player().playbackRate() === this.rate);\n    }\n  }\n\n  /**\n   * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\n   *\n   * @type {string}\n   * @private\n   */\n  PlaybackRateMenuItem.prototype.contentElType = 'button';\n  Component$1.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\n\n  /**\n   * @file playback-rate-menu-button.js\n   */\n\n  /** @import Player from '../../player' */\n\n  /**\n   * The component for controlling the playback rate.\n   *\n   * @extends MenuButton\n   */\n  class PlaybackRateMenuButton extends MenuButton {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.menuButton_.el_.setAttribute('aria-describedby', this.labelElId_);\n      this.updateVisibility();\n      this.updateLabel();\n      this.on(player, 'loadstart', e => this.updateVisibility(e));\n      this.on(player, 'ratechange', e => this.updateLabel(e));\n      this.on(player, 'playbackrateschange', e => this.handlePlaybackRateschange(e));\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      const el = super.createEl();\n      this.labelElId_ = 'vjs-playback-rate-value-label-' + this.id_;\n      this.labelEl_ = createEl('div', {\n        className: 'vjs-playback-rate-value',\n        id: this.labelElId_,\n        textContent: '1x'\n      });\n      el.appendChild(this.labelEl_);\n      return el;\n    }\n    dispose() {\n      this.labelEl_ = null;\n      super.dispose();\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-playback-rate ${super.buildCSSClass()}`;\n    }\n    buildWrapperCSSClass() {\n      return `vjs-playback-rate ${super.buildWrapperCSSClass()}`;\n    }\n\n    /**\n     * Create the list of menu items. Specific to each subclass.\n     *\n     */\n    createItems() {\n      const rates = this.playbackRates();\n      const items = [];\n      for (let i = rates.length - 1; i >= 0; i--) {\n        items.push(new PlaybackRateMenuItem(this.player(), {\n          rate: rates[i] + 'x'\n        }));\n      }\n      return items;\n    }\n\n    /**\n     * On playbackrateschange, update the menu to account for the new items.\n     *\n     * @listens Player#playbackrateschange\n     */\n    handlePlaybackRateschange(event) {\n      this.update();\n    }\n\n    /**\n     * Get possible playback rates\n     *\n     * @return {Array}\n     *         All possible playback rates\n     */\n    playbackRates() {\n      const player = this.player();\n      return player.playbackRates && player.playbackRates() || [];\n    }\n\n    /**\n     * Get whether playback rates is supported by the tech\n     * and an array of playback rates exists\n     *\n     * @return {boolean}\n     *         Whether changing playback rate is supported\n     */\n    playbackRateSupported() {\n      return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\n    }\n\n    /**\n     * Hide playback rate controls when they're no playback rate options to select\n     *\n     * @param {Event} [event]\n     *        The event that caused this function to run.\n     *\n     * @listens Player#loadstart\n     */\n    updateVisibility(event) {\n      if (this.playbackRateSupported()) {\n        this.removeClass('vjs-hidden');\n      } else {\n        this.addClass('vjs-hidden');\n      }\n    }\n\n    /**\n     * Update button label when rate changed\n     *\n     * @param {Event} [event]\n     *        The event that caused this function to run.\n     *\n     * @listens Player#ratechange\n     */\n    updateLabel(event) {\n      if (this.playbackRateSupported()) {\n        this.labelEl_.textContent = this.player().playbackRate() + 'x';\n      }\n    }\n  }\n\n  /**\n   * The text that should display over the `PlaybackRateMenuButton`s controls.\n   *\n   * Added for localization.\n   *\n   * @type {string}\n   * @protected\n   */\n  PlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n  Component$1.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\n\n  /**\n   * @file spacer.js\n   */\n\n  /**\n   * Just an empty spacer element that can be used as an append point for plugins, etc.\n   * Also can be used to create space between elements when necessary.\n   *\n   * @extends Component\n   */\n  class Spacer extends Component$1 {\n    /**\n    * Builds the default DOM `className`.\n    *\n    * @return {string}\n    *         The DOM `className` for this object.\n    */\n    buildCSSClass() {\n      return `vjs-spacer ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl(tag = 'div', props = {}, attributes = {}) {\n      if (!props.className) {\n        props.className = this.buildCSSClass();\n      }\n      return super.createEl(tag, props, attributes);\n    }\n  }\n  Component$1.registerComponent('Spacer', Spacer);\n\n  /**\n   * @file custom-control-spacer.js\n   */\n\n  /**\n   * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n   *\n   * @extends Spacer\n   */\n  class CustomControlSpacer extends Spacer {\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     */\n    buildCSSClass() {\n      return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: this.buildCSSClass(),\n        // No-flex/table-cell mode requires there be some content\n        // in the cell to fill the remaining space of the table.\n        textContent: '\\u00a0'\n      });\n    }\n  }\n  Component$1.registerComponent('CustomControlSpacer', CustomControlSpacer);\n\n  /**\n   * @file control-bar.js\n   */\n\n  /**\n   * Container of main controls.\n   *\n   * @extends Component\n   */\n  class ControlBar extends Component$1 {\n    /**\n     * Create the `Component`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      return super.createEl('div', {\n        className: 'vjs-control-bar',\n        dir: 'ltr'\n      });\n    }\n  }\n\n  /**\n   * Default options for `ControlBar`\n   *\n   * @type {Object}\n   * @private\n   */\n  ControlBar.prototype.options_ = {\n    children: ['playToggle', 'skipBackward', 'skipForward', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'pictureInPictureToggle', 'fullscreenToggle']\n  };\n  Component$1.registerComponent('ControlBar', ControlBar);\n\n  /**\n   * @file error-display.js\n   */\n\n  /** @import Player from './player' */\n\n  /**\n   * A display that indicates an error has occurred. This means that the video\n   * is unplayable.\n   *\n   * @extends ModalDialog\n   */\n  class ErrorDisplay extends ModalDialog {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param  {Player} player\n     *         The `Player` that this class should be attached to.\n     *\n     * @param  {Object} [options]\n     *         The key/value store of player options.\n     */\n    constructor(player, options) {\n      super(player, options);\n      this.on(player, 'error', e => {\n        this.open(e);\n      });\n    }\n\n    /**\n     * Builds the default DOM `className`.\n     *\n     * @return {string}\n     *         The DOM `className` for this object.\n     *\n     * @deprecated Since version 5.\n     */\n    buildCSSClass() {\n      return `vjs-error-display ${super.buildCSSClass()}`;\n    }\n\n    /**\n     * Gets the localized error message based on the `Player`s error.\n     *\n     * @return {string}\n     *         The `Player`s error message localized or an empty string.\n     */\n    content() {\n      const error = this.player().error();\n      return error ? this.localize(error.message) : '';\n    }\n  }\n\n  /**\n   * The default options for an `ErrorDisplay`.\n   *\n   * @private\n   */\n  ErrorDisplay.prototype.options_ = Object.assign({}, ModalDialog.prototype.options_, {\n    pauseOnOpen: false,\n    fillAlways: true,\n    temporary: false,\n    uncloseable: true\n  });\n  Component$1.registerComponent('ErrorDisplay', ErrorDisplay);\n\n  /** @import Player from './player' */\n  /** @import { ContentDescriptor } from  '../utils/dom' */\n\n  /**\n   * Creates DOM element of 'select' & its options.\n   *\n   * @extends Component\n   */\n  class TextTrackSelect extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {ContentDescriptor} [options.content=undefined]\n     *        Provide customized content for this modal.\n     *\n     * @param {string} [options.legendId]\n     *        A text with part of an string to create atribute of aria-labelledby.\n     *\n     * @param {string} [options.id]\n     *        A text with part of an string to create atribute of aria-labelledby.\n     *\n     * @param {Array} [options.SelectOptions]\n     *        Array that contains the value & textContent of for each of the\n     *        options elements.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n      this.el_.setAttribute('aria-labelledby', this.selectLabelledbyIds);\n    }\n\n    /**\n     * Create the `TextTrackSelect`'s DOM element\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      this.selectLabelledbyIds = [this.options_.legendId, this.options_.labelId].join(' ').trim();\n\n      // Create select & inner options\n      const selectoptions = createEl('select', {\n        id: this.options_.id\n      }, {}, this.options_.SelectOptions.map(optionText => {\n        // Constructs an id for the <option>.\n        // For the colour settings that have two <selects> with a <label> each, generates an id based off the label value\n        // For font size/family and edge style with one <select> and no <label>, generates an id with a guid\n        const optionId = (this.options_.labelId ? this.options_.labelId : `vjs-track-option-${newGUID()}`) + '-' + optionText[1].replace(/\\W+/g, '');\n        const option = createEl('option', {\n          id: optionId,\n          value: this.localize(optionText[0]),\n          textContent: this.localize(optionText[1])\n        });\n        option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);\n        return option;\n      }));\n      return selectoptions;\n    }\n  }\n  Component$1.registerComponent('TextTrackSelect', TextTrackSelect);\n\n  /** @import Player from './player' */\n  /** @import { ContentDescriptor } from '../utils/dom' */\n\n  /**\n   * Creates fieldset section of 'TextTrackSettings'.\n   * Manganes two versions of fieldsets, one for type of 'colors'\n   * & the other for 'font', Component adds diferent DOM elements\n   * to that fieldset  depending on the type.\n   *\n   * @extends Component\n   */\n  class TextTrackFieldset extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {ContentDescriptor} [options.content=undefined]\n     *        Provide customized content for this modal.\n     *\n     * @param {string} [options.legendId]\n     *        A text with part of an string to create atribute of aria-labelledby.\n     *        It passes to 'TextTrackSelect'.\n     *\n     * @param {string} [options.id]\n     *        A text with part of an string to create atribute of aria-labelledby.\n     *        It passes to 'TextTrackSelect'.\n     *\n     * @param {string} [options.legendText]\n     *        A text to use as the text content of the legend element.\n     *\n     * @param {Array} [options.selects]\n     *        Array that contains the selects that are use to create 'selects'\n     *        components.\n     *\n     * @param {Array} [options.SelectOptions]\n     *        Array that contains the value & textContent of for each of the\n     *        options elements, it passes to 'TextTrackSelect'.\n     *\n     * @param {string} [options.type]\n     *        Conditions if some DOM elements will be added to the fieldset\n     *        component.\n     *\n     * @param {Object} [options.selectConfigs]\n     *        Object with the following properties that are the selects configurations:\n     *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n     *        fontPercent, textOpacity, windowColor, windowOpacity.\n     *        These properties are use to configure the 'TextTrackSelect' Component.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n\n      // Add Components & DOM Elements\n      const legendElement = createEl('legend', {\n        textContent: this.localize(this.options_.legendText),\n        id: this.options_.legendId\n      });\n      this.el().appendChild(legendElement);\n      const selects = this.options_.selects;\n\n      // Iterate array of selects to create 'selects' components\n      for (const i of selects) {\n        const selectConfig = this.options_.selectConfigs[i];\n        const selectClassName = selectConfig.className;\n        const id = selectConfig.id.replace('%s', this.options_.id_);\n        let span = null;\n        const guid = `vjs_select_${newGUID()}`;\n\n        // Conditionally create span to add on the component\n        if (this.options_.type === 'colors') {\n          span = createEl('span', {\n            className: selectClassName\n          });\n          const label = createEl('label', {\n            id,\n            className: 'vjs-label',\n            textContent: this.localize(selectConfig.label)\n          });\n          label.setAttribute('for', guid);\n          span.appendChild(label);\n        }\n        const textTrackSelect = new TextTrackSelect(player, {\n          SelectOptions: selectConfig.options,\n          legendId: this.options_.legendId,\n          id: guid,\n          labelId: id\n        });\n        this.addChild(textTrackSelect);\n\n        // Conditionally append to 'select' component to conditionally created span\n        if (this.options_.type === 'colors') {\n          span.appendChild(textTrackSelect.el());\n          this.el().appendChild(span);\n        }\n      }\n    }\n\n    /**\n     * Create the `TextTrackFieldset`'s DOM element\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      const el = createEl('fieldset', {\n        // Prefixing classes of elements within a player with \"vjs-\"\n        // is a convention used in Video.js.\n        className: this.options_.className\n      });\n      return el;\n    }\n  }\n  Component$1.registerComponent('TextTrackFieldset', TextTrackFieldset);\n\n  /** @import Player from './player' */\n  /** @import { ContentDescriptor } from  '../utils/dom' */\n\n  /**\n   * The component 'TextTrackSettingsColors' displays a set of 'fieldsets'\n   * using the component 'TextTrackFieldset'.\n   *\n   * @extends Component\n   */\n  class TextTrackSettingsColors extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {ContentDescriptor} [options.content=undefined]\n     *        Provide customized content for this modal.\n     *\n     * @param {Array} [options.fieldSets]\n     *        Array that contains the configurations for the selects.\n     *\n     * @param {Object} [options.selectConfigs]\n     *        Object with the following properties that are the select confugations:\n     *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n     *        fontPercent, textOpacity, windowColor, windowOpacity.\n     *        it passes to 'TextTrackFieldset'.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n      const id_ = this.options_.textTrackComponentid;\n\n      // createElFgColor_\n      const ElFgColorFieldset = new TextTrackFieldset(player, {\n        id_,\n        legendId: `captions-text-legend-${id_}`,\n        legendText: this.localize('Text'),\n        className: 'vjs-fg vjs-track-setting',\n        selects: this.options_.fieldSets[0],\n        selectConfigs: this.options_.selectConfigs,\n        type: 'colors'\n      });\n      this.addChild(ElFgColorFieldset);\n\n      // createElBgColor_\n      const ElBgColorFieldset = new TextTrackFieldset(player, {\n        id_,\n        legendId: `captions-background-${id_}`,\n        legendText: this.localize('Text Background'),\n        className: 'vjs-bg vjs-track-setting',\n        selects: this.options_.fieldSets[1],\n        selectConfigs: this.options_.selectConfigs,\n        type: 'colors'\n      });\n      this.addChild(ElBgColorFieldset);\n\n      // createElWinColor_\n      const ElWinColorFieldset = new TextTrackFieldset(player, {\n        id_,\n        legendId: `captions-window-${id_}`,\n        legendText: this.localize('Caption Area Background'),\n        className: 'vjs-window vjs-track-setting',\n        selects: this.options_.fieldSets[2],\n        selectConfigs: this.options_.selectConfigs,\n        type: 'colors'\n      });\n      this.addChild(ElWinColorFieldset);\n    }\n\n    /**\n     * Create the `TextTrackSettingsColors`'s DOM element\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      const el = createEl('div', {\n        className: 'vjs-track-settings-colors'\n      });\n      return el;\n    }\n  }\n  Component$1.registerComponent('TextTrackSettingsColors', TextTrackSettingsColors);\n\n  /** @import Player from './player' */\n  /** @import { ContentDescriptor } from  '../utils/dom' */\n\n  /**\n   * The component 'TextTrackSettingsFont' displays a set of 'fieldsets'\n   * using the component 'TextTrackFieldset'.\n   *\n   * @extends Component\n   */\n  class TextTrackSettingsFont extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {ContentDescriptor} [options.content=undefined]\n     *        Provide customized content for this modal.\n     *\n     * @param {Array} [options.fieldSets]\n     *        Array that contains the configurations for the selects.\n     *\n     * @param {Object} [options.selectConfigs]\n     *        Object with the following properties that are the select confugations:\n     *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n     *        fontPercent, textOpacity, windowColor, windowOpacity.\n     *        it passes to 'TextTrackFieldset'.\n     */\n    constructor(player, options = {}) {\n      super(player, options);\n      const id_ = this.options_.textTrackComponentid;\n      const ElFgColorFieldset = new TextTrackFieldset(player, {\n        id_,\n        legendId: `captions-font-size-${id_}`,\n        legendText: 'Font Size',\n        className: 'vjs-font-percent vjs-track-setting',\n        selects: this.options_.fieldSets[0],\n        selectConfigs: this.options_.selectConfigs,\n        type: 'font'\n      });\n      this.addChild(ElFgColorFieldset);\n      const ElBgColorFieldset = new TextTrackFieldset(player, {\n        id_,\n        legendId: `captions-edge-style-${id_}`,\n        legendText: this.localize('Text Edge Style'),\n        className: 'vjs-edge-style vjs-track-setting',\n        selects: this.options_.fieldSets[1],\n        selectConfigs: this.options_.selectConfigs,\n        type: 'font'\n      });\n      this.addChild(ElBgColorFieldset);\n      const ElWinColorFieldset = new TextTrackFieldset(player, {\n        id_,\n        legendId: `captions-font-family-${id_}`,\n        legendText: this.localize('Font Family'),\n        className: 'vjs-font-family vjs-track-setting',\n        selects: this.options_.fieldSets[2],\n        selectConfigs: this.options_.selectConfigs,\n        type: 'font'\n      });\n      this.addChild(ElWinColorFieldset);\n    }\n\n    /**\n     * Create the `TextTrackSettingsFont`'s DOM element\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      const el = createEl('div', {\n        className: 'vjs-track-settings-font'\n      });\n      return el;\n    }\n  }\n  Component$1.registerComponent('TextTrackSettingsFont', TextTrackSettingsFont);\n\n  /**\n   * Buttons of reset & done that modal 'TextTrackSettings'\n   * uses as part of its content.\n   *\n   * 'Reset': Resets all settings on 'TextTrackSettings'.\n   * 'Done': Closes 'TextTrackSettings' modal.\n   *\n   * @extends Component\n   */\n  class TrackSettingsControls extends Component$1 {\n    constructor(player, options = {}) {\n      super(player, options);\n\n      // Create DOM elements\n      const defaultsDescription = this.localize('restore all settings to the default values');\n      const resetButton = new Button(player, {\n        controlText: defaultsDescription,\n        className: 'vjs-default-button'\n      });\n      resetButton.el().classList.remove('vjs-control', 'vjs-button');\n      resetButton.el().textContent = this.localize('Reset');\n      this.addChild(resetButton);\n      const doneButton = new Button(player, {\n        controlText: defaultsDescription,\n        className: 'vjs-done-button'\n      });\n\n      // Remove unrequired style classes\n      doneButton.el().classList.remove('vjs-control', 'vjs-button');\n      doneButton.el().textContent = this.localize('Done');\n      this.addChild(doneButton);\n    }\n\n    /**\n     * Create the `TrackSettingsControls`'s DOM element\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      const el = createEl('div', {\n        className: 'vjs-track-settings-controls'\n      });\n      return el;\n    }\n  }\n  Component$1.registerComponent('TrackSettingsControls', TrackSettingsControls);\n\n  /**\n   * @file text-track-settings.js\n   */\n\n  /** @import Player from '../player' */\n\n  const LOCAL_STORAGE_KEY$1 = 'vjs-text-track-settings';\n  const COLOR_BLACK = ['#000', 'Black'];\n  const COLOR_BLUE = ['#00F', 'Blue'];\n  const COLOR_CYAN = ['#0FF', 'Cyan'];\n  const COLOR_GREEN = ['#0F0', 'Green'];\n  const COLOR_MAGENTA = ['#F0F', 'Magenta'];\n  const COLOR_RED = ['#F00', 'Red'];\n  const COLOR_WHITE = ['#FFF', 'White'];\n  const COLOR_YELLOW = ['#FF0', 'Yellow'];\n  const OPACITY_OPAQUE = ['1', 'Opaque'];\n  const OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\n  const OPACITY_TRANS = ['0', 'Transparent'];\n\n  // Configuration for the various <select> elements in the DOM of this component.\n  //\n  // Possible keys include:\n  //\n  // `default`:\n  //   The default option index. Only needs to be provided if not zero.\n  // `parser`:\n  //   A function which is used to parse the value from the selected option in\n  //   a customized way.\n  // `selector`:\n  //   The selector used to find the associated <select> element.\n  const selectConfigs = {\n    backgroundColor: {\n      selector: '.vjs-bg-color > select',\n      id: 'captions-background-color-%s',\n      label: 'Color',\n      options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN],\n      className: 'vjs-bg-color'\n    },\n    backgroundOpacity: {\n      selector: '.vjs-bg-opacity > select',\n      id: 'captions-background-opacity-%s',\n      label: 'Opacity',\n      options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS],\n      className: 'vjs-bg-opacity vjs-opacity'\n    },\n    color: {\n      selector: '.vjs-text-color > select',\n      id: 'captions-foreground-color-%s',\n      label: 'Color',\n      options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN],\n      className: 'vjs-text-color'\n    },\n    edgeStyle: {\n      selector: '.vjs-edge-style > select',\n      id: '',\n      label: 'Text Edge Style',\n      options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Drop shadow']]\n    },\n    fontFamily: {\n      selector: '.vjs-font-family > select',\n      id: '',\n      label: 'Font Family',\n      options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\n    },\n    fontPercent: {\n      selector: '.vjs-font-percent > select',\n      id: '',\n      label: 'Font Size',\n      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%']],\n      default: 2,\n      parser: v => v === '1.00' ? null : Number(v)\n    },\n    textOpacity: {\n      selector: '.vjs-text-opacity > select',\n      id: 'captions-foreground-opacity-%s',\n      label: 'Opacity',\n      options: [OPACITY_OPAQUE, OPACITY_SEMI],\n      className: 'vjs-text-opacity vjs-opacity'\n    },\n    // Options for this object are defined below.\n    windowColor: {\n      selector: '.vjs-window-color > select',\n      id: 'captions-window-color-%s',\n      label: 'Color',\n      className: 'vjs-window-color'\n    },\n    // Options for this object are defined below.\n    windowOpacity: {\n      selector: '.vjs-window-opacity > select',\n      id: 'captions-window-opacity-%s',\n      label: 'Opacity',\n      options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE],\n      className: 'vjs-window-opacity vjs-opacity'\n    }\n  };\n  selectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\n\n  /**\n   * Get the actual value of an option.\n   *\n   * @param  {string} value\n   *         The value to get\n   *\n   * @param  {Function} [parser]\n   *         Optional function to adjust the value.\n   *\n   * @return {*}\n   *         - Will be `undefined` if no value exists\n   *         - Will be `undefined` if the given value is \"none\".\n   *         - Will be the actual value otherwise.\n   *\n   * @private\n   */\n  function parseOptionValue(value, parser) {\n    if (parser) {\n      value = parser(value);\n    }\n    if (value && value !== 'none') {\n      return value;\n    }\n  }\n\n  /**\n   * Gets the value of the selected <option> element within a <select> element.\n   *\n   * @param  {Element} el\n   *         the element to look in\n   *\n   * @param  {Function} [parser]\n   *         Optional function to adjust the value.\n   *\n   * @return {*}\n   *         - Will be `undefined` if no value exists\n   *         - Will be `undefined` if the given value is \"none\".\n   *         - Will be the actual value otherwise.\n   *\n   * @private\n   */\n  function getSelectedOptionValue(el, parser) {\n    const value = el.options[el.options.selectedIndex].value;\n    return parseOptionValue(value, parser);\n  }\n\n  /**\n   * Sets the selected <option> element within a <select> element based on a\n   * given value.\n   *\n   * @param {Element} el\n   *        The element to look in.\n   *\n   * @param {string} value\n   *        the property to look on.\n   *\n   * @param {Function} [parser]\n   *        Optional function to adjust the value before comparing.\n   *\n   * @private\n   */\n  function setSelectedOption(el, value, parser) {\n    if (!value) {\n      return;\n    }\n    for (let i = 0; i < el.options.length; i++) {\n      if (parseOptionValue(el.options[i].value, parser) === value) {\n        el.selectedIndex = i;\n        break;\n      }\n    }\n  }\n\n  /**\n   * Manipulate Text Tracks settings.\n   *\n   * @extends ModalDialog\n   */\n  class TextTrackSettings extends ModalDialog {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *         The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *         The key/value store of player options.\n     */\n    constructor(player, options) {\n      options.temporary = false;\n      super(player, options);\n      this.updateDisplay = this.updateDisplay.bind(this);\n\n      // fill the modal and pretend we have opened it\n      this.fill();\n      this.hasBeenOpened_ = this.hasBeenFilled_ = true;\n      this.renderModalComponents(player);\n      this.endDialog = createEl('p', {\n        className: 'vjs-control-text',\n        textContent: this.localize('End of dialog window.')\n      });\n      this.el().appendChild(this.endDialog);\n      this.setDefaults();\n\n      // Grab `persistTextTrackSettings` from the player options if not passed in child options\n      if (options.persistTextTrackSettings === undefined) {\n        this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n      }\n      this.bindFunctionsToSelectsAndButtons();\n      if (this.options_.persistTextTrackSettings) {\n        this.restoreSettings();\n      }\n    }\n    renderModalComponents(player) {\n      const textTrackSettingsColors = new TextTrackSettingsColors(player, {\n        textTrackComponentid: this.id_,\n        selectConfigs,\n        fieldSets: [['color', 'textOpacity'], ['backgroundColor', 'backgroundOpacity'], ['windowColor', 'windowOpacity']]\n      });\n      this.addChild(textTrackSettingsColors);\n      const textTrackSettingsFont = new TextTrackSettingsFont(player, {\n        textTrackComponentid: this.id_,\n        selectConfigs,\n        fieldSets: [['fontPercent'], ['edgeStyle'], ['fontFamily']]\n      });\n      this.addChild(textTrackSettingsFont);\n      const trackSettingsControls = new TrackSettingsControls(player);\n      this.addChild(trackSettingsControls);\n    }\n    bindFunctionsToSelectsAndButtons() {\n      this.on(this.$('.vjs-done-button'), ['click', 'tap'], () => {\n        this.saveSettings();\n        this.close();\n      });\n      this.on(this.$('.vjs-default-button'), ['click', 'tap'], () => {\n        this.setDefaults();\n        this.updateDisplay();\n      });\n      each(selectConfigs, config => {\n        this.on(this.$(config.selector), 'change', this.updateDisplay);\n      });\n    }\n    dispose() {\n      this.endDialog = null;\n      super.dispose();\n    }\n    label() {\n      return this.localize('Caption Settings Dialog');\n    }\n    description() {\n      return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n    }\n    buildCSSClass() {\n      return super.buildCSSClass() + ' vjs-text-track-settings';\n    }\n\n    /**\n     * Gets an object of text track settings (or null).\n     *\n     * @return {Object}\n     *         An object with config values parsed from the DOM or localStorage.\n     */\n    getValues() {\n      return reduce(selectConfigs, (accum, config, key) => {\n        const value = getSelectedOptionValue(this.$(config.selector), config.parser);\n        if (value !== undefined) {\n          accum[key] = value;\n        }\n        return accum;\n      }, {});\n    }\n\n    /**\n     * Sets text track settings from an object of values.\n     *\n     * @param {Object} values\n     *        An object with config values parsed from the DOM or localStorage.\n     */\n    setValues(values) {\n      each(selectConfigs, (config, key) => {\n        setSelectedOption(this.$(config.selector), values[key], config.parser);\n      });\n    }\n\n    /**\n     * Sets all `<select>` elements to their default values.\n     */\n    setDefaults() {\n      each(selectConfigs, config => {\n        const index = config.hasOwnProperty('default') ? config.default : 0;\n        this.$(config.selector).selectedIndex = index;\n      });\n    }\n\n    /**\n     * Restore texttrack settings from localStorage\n     */\n    restoreSettings() {\n      let values;\n      try {\n        values = JSON.parse(window.localStorage.getItem(LOCAL_STORAGE_KEY$1));\n      } catch (err) {\n        log$1.warn(err);\n      }\n      if (values) {\n        this.setValues(values);\n      }\n    }\n\n    /**\n     * Save text track settings to localStorage\n     */\n    saveSettings() {\n      if (!this.options_.persistTextTrackSettings) {\n        return;\n      }\n      const values = this.getValues();\n      try {\n        if (Object.keys(values).length) {\n          window.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(values));\n        } else {\n          window.localStorage.removeItem(LOCAL_STORAGE_KEY$1);\n        }\n      } catch (err) {\n        log$1.warn(err);\n      }\n    }\n\n    /**\n     * Update display of text track settings\n     */\n    updateDisplay() {\n      const ttDisplay = this.player_.getChild('textTrackDisplay');\n      if (ttDisplay) {\n        ttDisplay.updateDisplay();\n      }\n    }\n\n    /**\n     * Repopulate dialog with new localizations on languagechange\n     */\n    handleLanguagechange() {\n      this.fill();\n      this.renderModalComponents(this.player_);\n      this.bindFunctionsToSelectsAndButtons();\n    }\n  }\n  Component$1.registerComponent('TextTrackSettings', TextTrackSettings);\n\n  /**\n   * @file resize-manager.js\n   */\n\n  /**\n   * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\n   *\n   * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\n   *\n   * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\n   * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\n   *\n   * @example <caption>How to disable the resize manager</caption>\n   * const player = videojs('#vid', {\n   *   resizeManager: false\n   * });\n   *\n   * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\n   *\n   * @extends Component\n   */\n  class ResizeManager extends Component$1 {\n    /**\n     * Create the ResizeManager.\n     *\n     * @param {Object} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of ResizeManager options.\n     *\n     * @param {Object} [options.ResizeObserver]\n     *        A polyfill for ResizeObserver can be passed in here.\n     *        If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\n     */\n    constructor(player, options) {\n      let RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || window.ResizeObserver;\n\n      // if `null` was passed, we want to disable the ResizeObserver\n      if (options.ResizeObserver === null) {\n        RESIZE_OBSERVER_AVAILABLE = false;\n      }\n\n      // Only create an element when ResizeObserver isn't available\n      const options_ = merge$2({\n        createEl: !RESIZE_OBSERVER_AVAILABLE,\n        reportTouchActivity: false\n      }, options);\n      super(player, options_);\n      this.ResizeObserver = options.ResizeObserver || window.ResizeObserver;\n      this.loadListener_ = null;\n      this.resizeObserver_ = null;\n      this.debouncedHandler_ = debounce$1(() => {\n        this.resizeHandler();\n      }, 100, false, this);\n      if (RESIZE_OBSERVER_AVAILABLE) {\n        this.resizeObserver_ = new this.ResizeObserver(this.debouncedHandler_);\n        this.resizeObserver_.observe(player.el());\n      } else {\n        this.loadListener_ = () => {\n          if (!this.el_ || !this.el_.contentWindow) {\n            return;\n          }\n          const debouncedHandler_ = this.debouncedHandler_;\n          let unloadListener_ = this.unloadListener_ = function () {\n            off(this, 'resize', debouncedHandler_);\n            off(this, 'unload', unloadListener_);\n            unloadListener_ = null;\n          };\n\n          // safari and edge can unload the iframe before resizemanager dispose\n          // we have to dispose of event handlers correctly before that happens\n          on(this.el_.contentWindow, 'unload', unloadListener_);\n          on(this.el_.contentWindow, 'resize', debouncedHandler_);\n        };\n        this.one('load', this.loadListener_);\n      }\n    }\n    createEl() {\n      return super.createEl('iframe', {\n        className: 'vjs-resize-manager',\n        tabIndex: -1,\n        title: this.localize('No content')\n      }, {\n        'aria-hidden': 'true'\n      });\n    }\n\n    /**\n     * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\n     *\n     * @fires Player#playerresize\n     */\n    resizeHandler() {\n      /**\n       * Called when the player size has changed\n       *\n       * @event Player#playerresize\n       * @type {Event}\n       */\n      // make sure player is still around to trigger\n      // prevents this from causing an error after dispose\n      if (!this.player_ || !this.player_.trigger) {\n        return;\n      }\n      this.player_.trigger('playerresize');\n    }\n    dispose() {\n      if (this.debouncedHandler_) {\n        this.debouncedHandler_.cancel();\n      }\n      if (this.resizeObserver_) {\n        if (this.player_.el()) {\n          this.resizeObserver_.unobserve(this.player_.el());\n        }\n        this.resizeObserver_.disconnect();\n      }\n      if (this.loadListener_) {\n        this.off('load', this.loadListener_);\n      }\n      if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\n        this.unloadListener_.call(this.el_.contentWindow);\n      }\n      this.ResizeObserver = null;\n      this.resizeObserver = null;\n      this.debouncedHandler_ = null;\n      this.loadListener_ = null;\n      super.dispose();\n    }\n  }\n  Component$1.registerComponent('ResizeManager', ResizeManager);\n\n  /** @import Player from './player' */\n\n  const defaults$1 = {\n    trackingThreshold: 20,\n    liveTolerance: 15\n  };\n\n  /*\n    track when we are at the live edge, and other helpers for live playback */\n\n  /**\n   * A class for checking live current time and determining when the player\n   * is at or behind the live edge.\n   */\n  class LiveTracker extends Component$1 {\n    /**\n     * Creates an instance of this class.\n     *\n     * @param {Player} player\n     *        The `Player` that this class should be attached to.\n     *\n     * @param {Object} [options]\n     *        The key/value store of player options.\n     *\n     * @param {number} [options.trackingThreshold=20]\n     *        Number of seconds of live window (seekableEnd - seekableStart) that\n     *        media needs to have before the liveui will be shown.\n     *\n     * @param {number} [options.liveTolerance=15]\n     *        Number of seconds behind live that we have to be\n     *        before we will be considered non-live. Note that this will only\n     *        be used when playing at the live edge. This allows large seekable end\n     *        changes to not effect whether we are live or not.\n     */\n    constructor(player, options) {\n      // LiveTracker does not need an element\n      const options_ = merge$2(defaults$1, options, {\n        createEl: false\n      });\n      super(player, options_);\n      this.trackLiveHandler_ = () => this.trackLive_();\n      this.handlePlay_ = e => this.handlePlay(e);\n      this.handleFirstTimeupdate_ = e => this.handleFirstTimeupdate(e);\n      this.handleSeeked_ = e => this.handleSeeked(e);\n      this.seekToLiveEdge_ = e => this.seekToLiveEdge(e);\n      this.reset_();\n      this.on(this.player_, 'durationchange', e => this.handleDurationchange(e));\n      // we should try to toggle tracking on canplay as native playback engines, like Safari\n      // may not have the proper values for things like seekableEnd until then\n      this.on(this.player_, 'canplay', () => this.toggleTracking());\n    }\n\n    /**\n     * all the functionality for tracking when seek end changes\n     * and for tracking how far past seek end we should be\n     */\n    trackLive_() {\n      const seekable = this.player_.seekable();\n\n      // skip undefined seekable\n      if (!seekable || !seekable.length) {\n        return;\n      }\n      const newTime = Number(window.performance.now().toFixed(4));\n      const deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\n      this.lastTime_ = newTime;\n      this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\n      const liveCurrentTime = this.liveCurrentTime();\n      const currentTime = this.player_.currentTime();\n\n      // we are behind live if any are true\n      // 1. the player is paused\n      // 2. the user seeked to a location 2 seconds away from live\n      // 3. the difference between live and current time is greater\n      //    liveTolerance which defaults to 15s\n      let isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance;\n\n      // we cannot be behind if\n      // 1. until we have not seen a timeupdate yet\n      // 2. liveCurrentTime is Infinity, which happens on Android and Native Safari\n      if (!this.timeupdateSeen_ || liveCurrentTime === Infinity) {\n        isBehind = false;\n      }\n      if (isBehind !== this.behindLiveEdge_) {\n        this.behindLiveEdge_ = isBehind;\n        this.trigger('liveedgechange');\n      }\n    }\n\n    /**\n     * handle a durationchange event on the player\n     * and start/stop tracking accordingly.\n     */\n    handleDurationchange() {\n      this.toggleTracking();\n    }\n\n    /**\n     * start/stop tracking\n     */\n    toggleTracking() {\n      if (this.player_.duration() === Infinity && this.liveWindow() >= this.options_.trackingThreshold) {\n        if (this.player_.options_.liveui) {\n          this.player_.addClass('vjs-liveui');\n        }\n        this.startTracking();\n      } else {\n        this.player_.removeClass('vjs-liveui');\n        this.stopTracking();\n      }\n    }\n\n    /**\n     * start tracking live playback\n     */\n    startTracking() {\n      if (this.isTracking()) {\n        return;\n      }\n\n      // If we haven't seen a timeupdate, we need to check whether playback\n      // began before this component started tracking. This can happen commonly\n      // when using autoplay.\n      if (!this.timeupdateSeen_) {\n        this.timeupdateSeen_ = this.player_.hasStarted();\n      }\n      this.trackingInterval_ = this.setInterval(this.trackLiveHandler_, UPDATE_REFRESH_INTERVAL);\n      this.trackLive_();\n      this.on(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n      if (!this.timeupdateSeen_) {\n        this.one(this.player_, 'play', this.handlePlay_);\n        this.one(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n      } else {\n        this.on(this.player_, 'seeked', this.handleSeeked_);\n      }\n    }\n\n    /**\n     * handle the first timeupdate on the player if it wasn't already playing\n     * when live tracker started tracking.\n     */\n    handleFirstTimeupdate() {\n      this.timeupdateSeen_ = true;\n      this.on(this.player_, 'seeked', this.handleSeeked_);\n    }\n\n    /**\n     * Keep track of what time a seek starts, and listen for seeked\n     * to find where a seek ends.\n     */\n    handleSeeked() {\n      const timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime());\n      this.seekedBehindLive_ = this.nextSeekedFromUser_ && timeDiff > 2;\n      this.nextSeekedFromUser_ = false;\n      this.trackLive_();\n    }\n\n    /**\n     * handle the first play on the player, and make sure that we seek\n     * right to the live edge.\n     */\n    handlePlay() {\n      this.one(this.player_, 'timeupdate', this.seekToLiveEdge_);\n    }\n\n    /**\n     * Stop tracking, and set all internal variables to\n     * their initial value.\n     */\n    reset_() {\n      this.lastTime_ = -1;\n      this.pastSeekEnd_ = 0;\n      this.lastSeekEnd_ = -1;\n      this.behindLiveEdge_ = true;\n      this.timeupdateSeen_ = false;\n      this.seekedBehindLive_ = false;\n      this.nextSeekedFromUser_ = false;\n      this.clearInterval(this.trackingInterval_);\n      this.trackingInterval_ = null;\n      this.off(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n      this.off(this.player_, 'seeked', this.handleSeeked_);\n      this.off(this.player_, 'play', this.handlePlay_);\n      this.off(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n      this.off(this.player_, 'timeupdate', this.seekToLiveEdge_);\n    }\n\n    /**\n     * The next seeked event is from the user. Meaning that any seek\n     * > 2s behind live will be considered behind live for real and\n     * liveTolerance will be ignored.\n     */\n    nextSeekedFromUser() {\n      this.nextSeekedFromUser_ = true;\n    }\n\n    /**\n     * stop tracking live playback\n     */\n    stopTracking() {\n      if (!this.isTracking()) {\n        return;\n      }\n      this.reset_();\n      this.trigger('liveedgechange');\n    }\n\n    /**\n     * A helper to get the player seekable end\n     * so that we don't have to null check everywhere\n     *\n     * @return {number}\n     *         The furthest seekable end or Infinity.\n     */\n    seekableEnd() {\n      const seekable = this.player_.seekable();\n      const seekableEnds = [];\n      let i = seekable ? seekable.length : 0;\n      while (i--) {\n        seekableEnds.push(seekable.end(i));\n      }\n\n      // grab the furthest seekable end after sorting, or if there are none\n      // default to Infinity\n      return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\n    }\n\n    /**\n     * A helper to get the player seekable start\n     * so that we don't have to null check everywhere\n     *\n     * @return {number}\n     *         The earliest seekable start or 0.\n     */\n    seekableStart() {\n      const seekable = this.player_.seekable();\n      const seekableStarts = [];\n      let i = seekable ? seekable.length : 0;\n      while (i--) {\n        seekableStarts.push(seekable.start(i));\n      }\n\n      // grab the first seekable start after sorting, or if there are none\n      // default to 0\n      return seekableStarts.length ? seekableStarts.sort()[0] : 0;\n    }\n\n    /**\n     * Get the live time window aka\n     * the amount of time between seekable start and\n     * live current time.\n     *\n     * @return {number}\n     *         The amount of seconds that are seekable in\n     *         the live video.\n     */\n    liveWindow() {\n      const liveCurrentTime = this.liveCurrentTime();\n\n      // if liveCurrenTime is Infinity then we don't have a liveWindow at all\n      if (liveCurrentTime === Infinity) {\n        return 0;\n      }\n      return liveCurrentTime - this.seekableStart();\n    }\n\n    /**\n     * Determines if the player is live, only checks if this component\n     * is tracking live playback or not\n     *\n     * @return {boolean}\n     *         Whether liveTracker is tracking\n     */\n    isLive() {\n      return this.isTracking();\n    }\n\n    /**\n     * Determines if currentTime is at the live edge and won't fall behind\n     * on each seekableendchange\n     *\n     * @return {boolean}\n     *         Whether playback is at the live edge\n     */\n    atLiveEdge() {\n      return !this.behindLiveEdge();\n    }\n\n    /**\n     * get what we expect the live current time to be\n     *\n     * @return {number}\n     *         The expected live current time\n     */\n    liveCurrentTime() {\n      return this.pastSeekEnd() + this.seekableEnd();\n    }\n\n    /**\n     * The number of seconds that have occurred after seekable end\n     * changed. This will be reset to 0 once seekable end changes.\n     *\n     * @return {number}\n     *         Seconds past the current seekable end\n     */\n    pastSeekEnd() {\n      const seekableEnd = this.seekableEnd();\n      if (this.lastSeekEnd_ !== -1 && seekableEnd !== this.lastSeekEnd_) {\n        this.pastSeekEnd_ = 0;\n      }\n      this.lastSeekEnd_ = seekableEnd;\n      return this.pastSeekEnd_;\n    }\n\n    /**\n     * If we are currently behind the live edge, aka currentTime will be\n     * behind on a seekableendchange\n     *\n     * @return {boolean}\n     *         If we are behind the live edge\n     */\n    behindLiveEdge() {\n      return this.behindLiveEdge_;\n    }\n\n    /**\n     * Whether live tracker is currently tracking or not.\n     */\n    isTracking() {\n      return typeof this.trackingInterval_ === 'number';\n    }\n\n    /**\n     * Seek to the live edge if we are behind the live edge\n     */\n    seekToLiveEdge() {\n      this.seekedBehindLive_ = false;\n      if (this.atLiveEdge()) {\n        return;\n      }\n      this.nextSeekedFromUser_ = false;\n      this.player_.currentTime(this.liveCurrentTime());\n    }\n\n    /**\n     * Dispose of liveTracker\n     */\n    dispose() {\n      this.stopTracking();\n      super.dispose();\n    }\n  }\n  Component$1.registerComponent('LiveTracker', LiveTracker);\n\n  /**\n   * Displays an element over the player which contains an optional title and\n   * description for the current content.\n   *\n   * Much of the code for this component originated in the now obsolete\n   * videojs-dock plugin: https://github.com/brightcove/videojs-dock/\n   *\n   * @extends Component\n   */\n  class TitleBar extends Component$1 {\n    constructor(player, options) {\n      super(player, options);\n      this.on('statechanged', e => this.updateDom_());\n      this.updateDom_();\n    }\n\n    /**\n     * Create the `TitleBar`'s DOM element\n     *\n     * @return {Element}\n     *         The element that was created.\n     */\n    createEl() {\n      this.els = {\n        title: createEl('div', {\n          className: 'vjs-title-bar-title',\n          id: `vjs-title-bar-title-${newGUID()}`\n        }),\n        description: createEl('div', {\n          className: 'vjs-title-bar-description',\n          id: `vjs-title-bar-description-${newGUID()}`\n        })\n      };\n      return createEl('div', {\n        className: 'vjs-title-bar'\n      }, {}, values$1(this.els));\n    }\n\n    /**\n     * Updates the DOM based on the component's state object.\n     */\n    updateDom_() {\n      const tech = this.player_.tech_;\n      const techEl = tech && tech.el_;\n      const techAriaAttrs = {\n        title: 'aria-labelledby',\n        description: 'aria-describedby'\n      };\n      ['title', 'description'].forEach(k => {\n        const value = this.state[k];\n        const el = this.els[k];\n        const techAriaAttr = techAriaAttrs[k];\n        emptyEl(el);\n        if (value) {\n          textContent(el, value);\n        }\n\n        // If there is a tech element available, update its ARIA attributes\n        // according to whether a title and/or description have been provided.\n        if (techEl) {\n          techEl.removeAttribute(techAriaAttr);\n          if (value) {\n            techEl.setAttribute(techAriaAttr, el.id);\n          }\n        }\n      });\n      if (this.state.title || this.state.description) {\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n\n    /**\n     * Update the contents of the title bar component with new title and\n     * description text.\n     *\n     * If both title and description are missing, the title bar will be hidden.\n     *\n     * If either title or description are present, the title bar will be visible.\n     *\n     * NOTE: Any previously set value will be preserved. To unset a previously\n     * set value, you must pass an empty string or null.\n     *\n     * For example:\n     *\n     * ```\n     * update({title: 'foo', description: 'bar'}) // title: 'foo', description: 'bar'\n     * update({description: 'bar2'}) // title: 'foo', description: 'bar2'\n     * update({title: ''}) // title: '', description: 'bar2'\n     * update({title: 'foo', description: null}) // title: 'foo', description: null\n     * ```\n     *\n     * @param  {Object} [options={}]\n     *         An options object. When empty, the title bar will be hidden.\n     *\n     * @param  {string} [options.title]\n     *         A title to display in the title bar.\n     *\n     * @param  {string} [options.description]\n     *         A description to display in the title bar.\n     */\n    update(options) {\n      this.setState(options);\n    }\n\n    /**\n     * Dispose the component.\n     */\n    dispose() {\n      const tech = this.player_.tech_;\n      const techEl = tech && tech.el_;\n      if (techEl) {\n        techEl.removeAttribute('aria-labelledby');\n        techEl.removeAttribute('aria-describedby');\n      }\n      super.dispose();\n      this.els = null;\n    }\n  }\n  Component$1.registerComponent('TitleBar', TitleBar);\n\n  /** @import Player from './player' */\n\n  /**\n   * @typedef {object} TransientButtonOptions\n   * @property {string} [controlText] Control text, usually visible for these buttons\n   * @property {number} [initialDisplay=4000] Time in ms that button should initially remain visible\n   * @property {Array<'top'|'neartop'|'bottom'|'left'|'right'>} [position] Array of position strings to add basic styles for positioning\n   * @property {string} [className] Class(es) to add\n   * @property {boolean} [takeFocus=false] Whether element sohuld take focus when shown\n   * @property {Function} [clickHandler] Function called on button activation\n   */\n\n  /** @type {TransientButtonOptions} */\n  const defaults = {\n    initialDisplay: 4000,\n    position: [],\n    takeFocus: false\n  };\n\n  /**\n   * A floating transient button.\n   * It's recommended to insert these buttons _before_ the control bar with the this argument to `addChild`\n   * for a logical tab order.\n   *\n   * @example\n   * ```\n   * player.addChild(\n   *   'TransientButton',\n   *   options,\n   *   player.children().indexOf(player.getChild(\"ControlBar\"))\n   * )\n   * ```\n   *\n   * @extends Button\n   */\n  class TransientButton extends Button {\n    /**\n     * TransientButton constructor\n     *\n     * @param {Player} player The button's player\n     * @param {TransientButtonOptions} options Options for the transient button\n     */\n    constructor(player, options) {\n      options = merge$2(defaults, options);\n      super(player, options);\n      this.controlText(options.controlText);\n      this.hide();\n\n      // When shown, the float button will be visible even if the user is inactive.\n      // Clear this if there is any interaction.\n      this.on(this.player_, ['useractive', 'userinactive'], e => {\n        this.removeClass('force-display');\n      });\n    }\n\n    /**\n     * Return CSS class including position classes\n     *\n     * @return {string} CSS class list\n     */\n    buildCSSClass() {\n      return `vjs-transient-button focus-visible ${this.options_.position.map(c => `vjs-${c}`).join(' ')}`;\n    }\n\n    /**\n     * Create the button element\n     *\n     * @return {HTMLButtonElement} The button element\n     */\n    createEl() {\n      /** @type HTMLButtonElement */\n      const el = createEl('button', {}, {\n        type: 'button',\n        class: this.buildCSSClass()\n      }, createEl('span'));\n      this.controlTextEl_ = el.querySelector('span');\n      return el;\n    }\n\n    /**\n     * Show the button. The button will remain visible for the `initialDisplay` time, default 4s,\n     * and when there is user activity.\n     */\n    show() {\n      super.show();\n      this.addClass('force-display');\n      if (this.options_.takeFocus) {\n        this.el().focus({\n          preventScroll: true\n        });\n      }\n      this.forceDisplayTimeout = this.player_.setTimeout(() => {\n        this.removeClass('force-display');\n      }, this.options_.initialDisplay);\n    }\n\n    /**\n     * Hide the display, even if during the `initialDisplay` time.\n     */\n    hide() {\n      this.removeClass('force-display');\n      super.hide();\n    }\n\n    /**\n     * Dispose the component\n     */\n    dispose() {\n      this.player_.clearTimeout(this.forceDisplayTimeout);\n      super.dispose();\n    }\n  }\n  Component$1.registerComponent('TransientButton', TransientButton);\n\n  /** @import Html5 from './html5' */\n\n  /**\n   * This function is used to fire a sourceset when there is something\n   * similar to `mediaEl.load()` being called. It will try to find the source via\n   * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\n   * with the source that was found or empty string if we cannot know. If it cannot\n   * find a source then `sourceset` will not be fired.\n   *\n   * @param {Html5} tech\n   *        The tech object that sourceset was setup on\n   *\n   * @return {boolean}\n   *         returns false if the sourceset was not fired and true otherwise.\n   */\n  const sourcesetLoad = tech => {\n    const el = tech.el();\n\n    // if `el.src` is set, that source will be loaded.\n    if (el.hasAttribute('src')) {\n      tech.triggerSourceset(el.src);\n      return true;\n    }\n\n    /**\n     * Since there isn't a src property on the media element, source elements will be used for\n     * implementing the source selection algorithm. This happens asynchronously and\n     * for most cases were there is more than one source we cannot tell what source will\n     * be loaded, without re-implementing the source selection algorithm. At this time we are not\n     * going to do that. There are three special cases that we do handle here though:\n     *\n     * 1. If there are no sources, do not fire `sourceset`.\n     * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\n     * 3. If there is more than one `<source>` but all of them have the same `src` url.\n     *    That will be our src.\n     */\n    const sources = tech.$$('source');\n    const srcUrls = [];\n    let src = '';\n\n    // if there are no sources, do not fire sourceset\n    if (!sources.length) {\n      return false;\n    }\n\n    // only count valid/non-duplicate source elements\n    for (let i = 0; i < sources.length; i++) {\n      const url = sources[i].src;\n      if (url && srcUrls.indexOf(url) === -1) {\n        srcUrls.push(url);\n      }\n    }\n\n    // there were no valid sources\n    if (!srcUrls.length) {\n      return false;\n    }\n\n    // there is only one valid source element url\n    // use that\n    if (srcUrls.length === 1) {\n      src = srcUrls[0];\n    }\n    tech.triggerSourceset(src);\n    return true;\n  };\n\n  /**\n   * our implementation of an `innerHTML` descriptor for browsers\n   * that do not have one.\n   */\n  const innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n    get() {\n      return this.cloneNode(true).innerHTML;\n    },\n    set(v) {\n      // make a dummy node to use innerHTML on\n      const dummy = document.createElement(this.nodeName.toLowerCase());\n\n      // set innerHTML to the value provided\n      dummy.innerHTML = v;\n\n      // make a document fragment to hold the nodes from dummy\n      const docFrag = document.createDocumentFragment();\n\n      // copy all of the nodes created by the innerHTML on dummy\n      // to the document fragment\n      while (dummy.childNodes.length) {\n        docFrag.appendChild(dummy.childNodes[0]);\n      }\n\n      // remove content\n      this.innerText = '';\n\n      // now we add all of that html in one by appending the\n      // document fragment. This is how innerHTML does it.\n      window.Element.prototype.appendChild.call(this, docFrag);\n\n      // then return the result that innerHTML's setter would\n      return this.innerHTML;\n    }\n  });\n\n  /**\n   * Get a property descriptor given a list of priorities and the\n   * property to get.\n   */\n  const getDescriptor = (priority, prop) => {\n    let descriptor = {};\n    for (let i = 0; i < priority.length; i++) {\n      descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\n      if (descriptor && descriptor.set && descriptor.get) {\n        break;\n      }\n    }\n    descriptor.enumerable = true;\n    descriptor.configurable = true;\n    return descriptor;\n  };\n  const getInnerHTMLDescriptor = tech => getDescriptor([tech.el(), window.HTMLMediaElement.prototype, window.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\n\n  /**\n   * Patches browser internal functions so that we can tell synchronously\n   * if a `<source>` was appended to the media element. For some reason this\n   * causes a `sourceset` if the the media element is ready and has no source.\n   * This happens when:\n   * - The page has just loaded and the media element does not have a source.\n   * - The media element was emptied of all sources, then `load()` was called.\n   *\n   * It does this by patching the following functions/properties when they are supported:\n   *\n   * - `append()` - can be used to add a `<source>` element to the media element\n   * - `appendChild()` - can be used to add a `<source>` element to the media element\n   * - `insertAdjacentHTML()` -  can be used to add a `<source>` element to the media element\n   * - `innerHTML` -  can be used to add a `<source>` element to the media element\n   *\n   * @param {Html5} tech\n   *        The tech object that sourceset is being setup on.\n   */\n  const firstSourceWatch = function (tech) {\n    const el = tech.el();\n\n    // make sure firstSourceWatch isn't setup twice.\n    if (el.resetSourceWatch_) {\n      return;\n    }\n    const old = {};\n    const innerDescriptor = getInnerHTMLDescriptor(tech);\n    const appendWrapper = appendFn => (...args) => {\n      const retval = appendFn.apply(el, args);\n      sourcesetLoad(tech);\n      return retval;\n    };\n    ['append', 'appendChild', 'insertAdjacentHTML'].forEach(k => {\n      if (!el[k]) {\n        return;\n      }\n\n      // store the old function\n      old[k] = el[k];\n\n      // call the old function with a sourceset if a source\n      // was loaded\n      el[k] = appendWrapper(old[k]);\n    });\n    Object.defineProperty(el, 'innerHTML', merge$2(innerDescriptor, {\n      set: appendWrapper(innerDescriptor.set)\n    }));\n    el.resetSourceWatch_ = () => {\n      el.resetSourceWatch_ = null;\n      Object.keys(old).forEach(k => {\n        el[k] = old[k];\n      });\n      Object.defineProperty(el, 'innerHTML', innerDescriptor);\n    };\n\n    // on the first sourceset, we need to revert our changes\n    tech.one('sourceset', el.resetSourceWatch_);\n  };\n\n  /**\n   * our implementation of a `src` descriptor for browsers\n   * that do not have one\n   */\n  const srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n    get() {\n      if (this.hasAttribute('src')) {\n        return getAbsoluteURL(window.Element.prototype.getAttribute.call(this, 'src'));\n      }\n      return '';\n    },\n    set(v) {\n      window.Element.prototype.setAttribute.call(this, 'src', v);\n      return v;\n    }\n  });\n  const getSrcDescriptor = tech => getDescriptor([tech.el(), window.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\n\n  /**\n   * setup `sourceset` handling on the `Html5` tech. This function\n   * patches the following element properties/functions:\n   *\n   * - `src` - to determine when `src` is set\n   * - `setAttribute()` - to determine when `src` is set\n   * - `load()` - this re-triggers the source selection algorithm, and can\n   *              cause a sourceset.\n   *\n   * If there is no source when we are adding `sourceset` support or during a `load()`\n   * we also patch the functions listed in `firstSourceWatch`.\n   *\n   * @param {Html5} tech\n   *        The tech to patch\n   */\n  const setupSourceset = function (tech) {\n    if (!tech.featuresSourceset) {\n      return;\n    }\n    const el = tech.el();\n\n    // make sure sourceset isn't setup twice.\n    if (el.resetSourceset_) {\n      return;\n    }\n    const srcDescriptor = getSrcDescriptor(tech);\n    const oldSetAttribute = el.setAttribute;\n    const oldLoad = el.load;\n    Object.defineProperty(el, 'src', merge$2(srcDescriptor, {\n      set: v => {\n        const retval = srcDescriptor.set.call(el, v);\n\n        // we use the getter here to get the actual value set on src\n        tech.triggerSourceset(el.src);\n        return retval;\n      }\n    }));\n    el.setAttribute = (n, v) => {\n      const retval = oldSetAttribute.call(el, n, v);\n      if (/src/i.test(n)) {\n        tech.triggerSourceset(el.src);\n      }\n      return retval;\n    };\n    el.load = () => {\n      const retval = oldLoad.call(el);\n\n      // if load was called, but there was no source to fire\n      // sourceset on. We have to watch for a source append\n      // as that can trigger a `sourceset` when the media element\n      // has no source\n      if (!sourcesetLoad(tech)) {\n        tech.triggerSourceset('');\n        firstSourceWatch(tech);\n      }\n      return retval;\n    };\n    if (el.currentSrc) {\n      tech.triggerSourceset(el.currentSrc);\n    } else if (!sourcesetLoad(tech)) {\n      firstSourceWatch(tech);\n    }\n    el.resetSourceset_ = () => {\n      el.resetSourceset_ = null;\n      el.load = oldLoad;\n      el.setAttribute = oldSetAttribute;\n      Object.defineProperty(el, 'src', srcDescriptor);\n      if (el.resetSourceWatch_) {\n        el.resetSourceWatch_();\n      }\n    };\n  };\n\n  /**\n   * @file html5.js\n   */\n\n  /**\n   * HTML5 Media Controller - Wrapper for HTML5 Media API\n   *\n   * @mixes Tech~SourceHandlerAdditions\n   * @extends Tech\n   */\n  class Html5 extends Tech {\n    /**\n    * Create an instance of this Tech.\n    *\n    * @param {Object} [options]\n    *        The key/value store of player options.\n    *\n    * @param {Function} [ready]\n    *        Callback function to call when the `HTML5` Tech is ready.\n    */\n    constructor(options, ready) {\n      super(options, ready);\n      const source = options.source;\n      let crossoriginTracks = false;\n      this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.el_.tagName === 'VIDEO';\n\n      // Set the source if one is provided\n      // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n      // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n      // anyway so the error gets fired.\n      if (source && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n        this.setSource(source);\n      } else {\n        this.handleLateInit_(this.el_);\n      }\n\n      // setup sourceset after late sourceset/init\n      if (options.enableSourceset) {\n        this.setupSourcesetHandling_();\n      }\n      this.isScrubbing_ = false;\n      if (this.el_.hasChildNodes()) {\n        const nodes = this.el_.childNodes;\n        let nodesLength = nodes.length;\n        const removeNodes = [];\n        while (nodesLength--) {\n          const node = nodes[nodesLength];\n          const nodeName = node.nodeName.toLowerCase();\n          if (nodeName === 'track') {\n            if (!this.featuresNativeTextTracks) {\n              // Empty video tag tracks so the built-in player doesn't use them also.\n              // This may not be fast enough to stop HTML5 browsers from reading the tags\n              // so we'll need to turn off any default tracks if we're manually doing\n              // captions and subtitles. videoElement.textTracks\n              removeNodes.push(node);\n            } else {\n              // store HTMLTrackElement and TextTrack to remote list\n              this.remoteTextTrackEls().addTrackElement_(node);\n              this.remoteTextTracks().addTrack(node.track);\n              this.textTracks().addTrack(node.track);\n              if (!crossoriginTracks && !this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n                crossoriginTracks = true;\n              }\n            }\n          }\n        }\n        for (let i = 0; i < removeNodes.length; i++) {\n          this.el_.removeChild(removeNodes[i]);\n        }\n      }\n      this.proxyNativeTracks_();\n      if (this.featuresNativeTextTracks && crossoriginTracks) {\n        log$1.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\'t used.\\n' + 'This may prevent text tracks from loading.');\n      }\n\n      // prevent iOS Safari from disabling metadata text tracks during native playback\n      this.restoreMetadataTracksInIOSNativePlayer_();\n\n      // Determine if native controls should be used\n      // Our goal should be to get the custom controls on mobile solid everywhere\n      // so we can remove this all together. Right now this will block custom\n      // controls on touch enabled laptops like the Chrome Pixel\n      if ((TOUCH_ENABLED || IS_IPHONE) && options.nativeControlsForTouch === true) {\n        this.setControls(true);\n      }\n\n      // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n      // into a `fullscreenchange` event\n      this.proxyWebkitFullscreen_();\n      this.triggerReady();\n    }\n\n    /**\n     * Dispose of `HTML5` media element and remove all tracks.\n     */\n    dispose() {\n      if (this.el_ && this.el_.resetSourceset_) {\n        this.el_.resetSourceset_();\n      }\n      Html5.disposeMediaElement(this.el_);\n      this.options_ = null;\n\n      // tech will handle clearing of the emulated track list\n      super.dispose();\n    }\n\n    /**\n     * Modify the media element so that we can detect when\n     * the source is changed. Fires `sourceset` just after the source has changed\n     */\n    setupSourcesetHandling_() {\n      setupSourceset(this);\n    }\n\n    /**\n     * When a captions track is enabled in the iOS Safari native player, all other\n     * tracks are disabled (including metadata tracks), which nulls all of their\n     * associated cue points. This will restore metadata tracks to their pre-fullscreen\n     * state in those cases so that cue points are not needlessly lost.\n     *\n     * @private\n     */\n    restoreMetadataTracksInIOSNativePlayer_() {\n      const textTracks = this.textTracks();\n      let metadataTracksPreFullscreenState;\n\n      // captures a snapshot of every metadata track's current state\n      const takeMetadataTrackSnapshot = () => {\n        metadataTracksPreFullscreenState = [];\n        for (let i = 0; i < textTracks.length; i++) {\n          const track = textTracks[i];\n          if (track.kind === 'metadata') {\n            metadataTracksPreFullscreenState.push({\n              track,\n              storedMode: track.mode\n            });\n          }\n        }\n      };\n\n      // snapshot each metadata track's initial state, and update the snapshot\n      // each time there is a track 'change' event\n      takeMetadataTrackSnapshot();\n      textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n      this.on('dispose', () => textTracks.removeEventListener('change', takeMetadataTrackSnapshot));\n      const restoreTrackMode = () => {\n        for (let i = 0; i < metadataTracksPreFullscreenState.length; i++) {\n          const storedTrack = metadataTracksPreFullscreenState[i];\n          if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\n            storedTrack.track.mode = storedTrack.storedMode;\n          }\n        }\n        // we only want this handler to be executed on the first 'change' event\n        textTracks.removeEventListener('change', restoreTrackMode);\n      };\n\n      // when we enter fullscreen playback, stop updating the snapshot and\n      // restore all track modes to their pre-fullscreen state\n      this.on('webkitbeginfullscreen', () => {\n        textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n\n        // remove the listener before adding it just in case it wasn't previously removed\n        textTracks.removeEventListener('change', restoreTrackMode);\n        textTracks.addEventListener('change', restoreTrackMode);\n      });\n\n      // start updating the snapshot again after leaving fullscreen\n      this.on('webkitendfullscreen', () => {\n        // remove the listener before adding it just in case it wasn't previously removed\n        textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n        textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n\n        // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\n        textTracks.removeEventListener('change', restoreTrackMode);\n      });\n    }\n\n    /**\n     * Attempt to force override of tracks for the given type\n     *\n     * @param {string} type - Track type to override, possible values include 'Audio',\n     * 'Video', and 'Text'.\n     * @param {boolean} override - If set to true native audio/video will be overridden,\n     * otherwise native audio/video will potentially be used.\n     * @private\n     */\n    overrideNative_(type, override) {\n      // If there is no behavioral change don't add/remove listeners\n      if (override !== this[`featuresNative${type}Tracks`]) {\n        return;\n      }\n      const lowerCaseType = type.toLowerCase();\n      if (this[`${lowerCaseType}TracksListeners_`]) {\n        Object.keys(this[`${lowerCaseType}TracksListeners_`]).forEach(eventName => {\n          const elTracks = this.el()[`${lowerCaseType}Tracks`];\n          elTracks.removeEventListener(eventName, this[`${lowerCaseType}TracksListeners_`][eventName]);\n        });\n      }\n      this[`featuresNative${type}Tracks`] = !override;\n      this[`${lowerCaseType}TracksListeners_`] = null;\n      this.proxyNativeTracksForType_(lowerCaseType);\n    }\n\n    /**\n     * Attempt to force override of native audio tracks.\n     *\n     * @param {boolean} override - If set to true native audio will be overridden,\n     * otherwise native audio will potentially be used.\n     */\n    overrideNativeAudioTracks(override) {\n      this.overrideNative_('Audio', override);\n    }\n\n    /**\n     * Attempt to force override of native video tracks.\n     *\n     * @param {boolean} override - If set to true native video will be overridden,\n     * otherwise native video will potentially be used.\n     */\n    overrideNativeVideoTracks(override) {\n      this.overrideNative_('Video', override);\n    }\n\n    /**\n     * Proxy native track list events for the given type to our track\n     * lists if the browser we are playing in supports that type of track list.\n     *\n     * @param {string} name - Track type; values include 'audio', 'video', and 'text'\n     * @private\n     */\n    proxyNativeTracksForType_(name) {\n      const props = NORMAL[name];\n      const elTracks = this.el()[props.getterName];\n      const techTracks = this[props.getterName]();\n      if (!this[`featuresNative${props.capitalName}Tracks`] || !elTracks || !elTracks.addEventListener) {\n        return;\n      }\n      const listeners = {\n        change: e => {\n          const event = {\n            type: 'change',\n            target: techTracks,\n            currentTarget: techTracks,\n            srcElement: techTracks\n          };\n          techTracks.trigger(event);\n\n          // if we are a text track change event, we should also notify the\n          // remote text track list. This can potentially cause a false positive\n          // if we were to get a change event on a non-remote track and\n          // we triggered the event on the remote text track list which doesn't\n          // contain that track. However, best practices mean looping through the\n          // list of tracks and searching for the appropriate mode value, so,\n          // this shouldn't pose an issue\n          if (name === 'text') {\n            this[REMOTE.remoteText.getterName]().trigger(event);\n          }\n        },\n        addtrack(e) {\n          techTracks.addTrack(e.track);\n        },\n        removetrack(e) {\n          techTracks.removeTrack(e.track);\n        }\n      };\n      const removeOldTracks = function () {\n        const removeTracks = [];\n        for (let i = 0; i < techTracks.length; i++) {\n          let found = false;\n          for (let j = 0; j < elTracks.length; j++) {\n            if (elTracks[j] === techTracks[i]) {\n              found = true;\n              break;\n            }\n          }\n          if (!found) {\n            removeTracks.push(techTracks[i]);\n          }\n        }\n        while (removeTracks.length) {\n          techTracks.removeTrack(removeTracks.shift());\n        }\n      };\n      this[props.getterName + 'Listeners_'] = listeners;\n      Object.keys(listeners).forEach(eventName => {\n        const listener = listeners[eventName];\n        elTracks.addEventListener(eventName, listener);\n        this.on('dispose', e => elTracks.removeEventListener(eventName, listener));\n      });\n\n      // Remove (native) tracks that are not used anymore\n      this.on('loadstart', removeOldTracks);\n      this.on('dispose', e => this.off('loadstart', removeOldTracks));\n    }\n\n    /**\n     * Proxy all native track list events to our track lists if the browser we are playing\n     * in supports that type of track list.\n     *\n     * @private\n     */\n    proxyNativeTracks_() {\n      NORMAL.names.forEach(name => {\n        this.proxyNativeTracksForType_(name);\n      });\n    }\n\n    /**\n     * Create the `Html5` Tech's DOM element.\n     *\n     * @return {Element}\n     *         The element that gets created.\n     */\n    createEl() {\n      let el = this.options_.tag;\n\n      // Check if this browser supports moving the element into the box.\n      // On the iPhone video will break if you move the element,\n      // So we have to create a brand new element.\n      // If we ingested the player div, we do not need to move the media element.\n      if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\n        // If the original tag is still there, clone and remove it.\n        if (el) {\n          const clone = el.cloneNode(true);\n          if (el.parentNode) {\n            el.parentNode.insertBefore(clone, el);\n          }\n          Html5.disposeMediaElement(el);\n          el = clone;\n        } else {\n          el = document.createElement('video');\n\n          // determine if native controls should be used\n          const tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n          const attributes = merge$2({}, tagAttributes);\n          if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n            delete attributes.controls;\n          }\n          setAttributes(el, Object.assign(attributes, {\n            id: this.options_.techId,\n            class: 'vjs-tech'\n          }));\n        }\n        el.playerId = this.options_.playerId;\n      }\n      if (typeof this.options_.preload !== 'undefined') {\n        setAttribute(el, 'preload', this.options_.preload);\n      }\n      if (this.options_.disablePictureInPicture !== undefined) {\n        el.disablePictureInPicture = this.options_.disablePictureInPicture;\n      }\n\n      // Update specific tag settings, in case they were overridden\n      // `autoplay` has to be *last* so that `muted` and `playsinline` are present\n      // when iOS/Safari or other browsers attempt to autoplay.\n      const settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n      for (let i = 0; i < settingsAttrs.length; i++) {\n        const attr = settingsAttrs[i];\n        const value = this.options_[attr];\n        if (typeof value !== 'undefined') {\n          if (value) {\n            setAttribute(el, attr, attr);\n          } else {\n            removeAttribute(el, attr);\n          }\n          el[attr] = value;\n        }\n      }\n      return el;\n    }\n\n    /**\n     * This will be triggered if the loadstart event has already fired, before videojs was\n     * ready. Two known examples of when this can happen are:\n     * 1. If we're loading the playback object after it has started loading\n     * 2. The media is already playing the (often with autoplay on) then\n     *\n     * This function will fire another loadstart so that videojs can catchup.\n     *\n     * @fires Tech#loadstart\n     *\n     * @return {undefined}\n     *         returns nothing.\n     */\n    handleLateInit_(el) {\n      if (el.networkState === 0 || el.networkState === 3) {\n        // The video element hasn't started loading the source yet\n        // or didn't find a source\n        return;\n      }\n      if (el.readyState === 0) {\n        // NetworkState is set synchronously BUT loadstart is fired at the\n        // end of the current stack, usually before setInterval(fn, 0).\n        // So at this point we know loadstart may have already fired or is\n        // about to fire, and either way the player hasn't seen it yet.\n        // We don't want to fire loadstart prematurely here and cause a\n        // double loadstart so we'll wait and see if it happens between now\n        // and the next loop, and fire it if not.\n        // HOWEVER, we also want to make sure it fires before loadedmetadata\n        // which could also happen between now and the next loop, so we'll\n        // watch for that also.\n        let loadstartFired = false;\n        const setLoadstartFired = function () {\n          loadstartFired = true;\n        };\n        this.on('loadstart', setLoadstartFired);\n        const triggerLoadstart = function () {\n          // We did miss the original loadstart. Make sure the player\n          // sees loadstart before loadedmetadata\n          if (!loadstartFired) {\n            this.trigger('loadstart');\n          }\n        };\n        this.on('loadedmetadata', triggerLoadstart);\n        this.ready(function () {\n          this.off('loadstart', setLoadstartFired);\n          this.off('loadedmetadata', triggerLoadstart);\n          if (!loadstartFired) {\n            // We did miss the original native loadstart. Fire it now.\n            this.trigger('loadstart');\n          }\n        });\n        return;\n      }\n\n      // From here on we know that loadstart already fired and we missed it.\n      // The other readyState events aren't as much of a problem if we double\n      // them, so not going to go to as much trouble as loadstart to prevent\n      // that unless we find reason to.\n      const eventsToTrigger = ['loadstart'];\n\n      // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n      eventsToTrigger.push('loadedmetadata');\n\n      // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n      if (el.readyState >= 2) {\n        eventsToTrigger.push('loadeddata');\n      }\n\n      // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n      if (el.readyState >= 3) {\n        eventsToTrigger.push('canplay');\n      }\n\n      // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n      if (el.readyState >= 4) {\n        eventsToTrigger.push('canplaythrough');\n      }\n\n      // We still need to give the player time to add event listeners\n      this.ready(function () {\n        eventsToTrigger.forEach(function (type) {\n          this.trigger(type);\n        }, this);\n      });\n    }\n\n    /**\n     * Set whether we are scrubbing or not.\n     * This is used to decide whether we should use `fastSeek` or not.\n     * `fastSeek` is used to provide trick play on Safari browsers.\n     *\n     * @param {boolean} isScrubbing\n     *                  - true for we are currently scrubbing\n     *                  - false for we are no longer scrubbing\n     */\n    setScrubbing(isScrubbing) {\n      this.isScrubbing_ = isScrubbing;\n    }\n\n    /**\n     * Get whether we are scrubbing or not.\n     *\n     * @return {boolean} isScrubbing\n     *                  - true for we are currently scrubbing\n     *                  - false for we are no longer scrubbing\n     */\n    scrubbing() {\n      return this.isScrubbing_;\n    }\n\n    /**\n     * Set current time for the `HTML5` tech.\n     *\n     * @param {number} seconds\n     *        Set the current time of the media to this.\n     */\n    setCurrentTime(seconds) {\n      try {\n        if (this.isScrubbing_ && this.el_.fastSeek && IS_ANY_SAFARI) {\n          this.el_.fastSeek(seconds);\n        } else {\n          this.el_.currentTime = seconds;\n        }\n      } catch (e) {\n        log$1(e, 'Video is not ready. (Video.js)');\n        // this.warning(VideoJS.warnings.videoNotReady);\n      }\n    }\n\n    /**\n     * Get the current duration of the HTML5 media element.\n     *\n     * @return {number}\n     *         The duration of the media or 0 if there is no duration.\n     */\n    duration() {\n      // Android Chrome will report duration as Infinity for VOD HLS until after\n      // playback has started, which triggers the live display erroneously.\n      // Return NaN if playback has not started and trigger a durationupdate once\n      // the duration can be reliably known.\n      if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\n        // Wait for the first `timeupdate` with currentTime > 0 - there may be\n        // several with 0\n        const checkProgress = () => {\n          if (this.el_.currentTime > 0) {\n            // Trigger durationchange for genuinely live video\n            if (this.el_.duration === Infinity) {\n              this.trigger('durationchange');\n            }\n            this.off('timeupdate', checkProgress);\n          }\n        };\n        this.on('timeupdate', checkProgress);\n        return NaN;\n      }\n      return this.el_.duration || NaN;\n    }\n\n    /**\n     * Get the current width of the HTML5 media element.\n     *\n     * @return {number}\n     *         The width of the HTML5 media element.\n     */\n    width() {\n      return this.el_.offsetWidth;\n    }\n\n    /**\n     * Get the current height of the HTML5 media element.\n     *\n     * @return {number}\n     *         The height of the HTML5 media element.\n     */\n    height() {\n      return this.el_.offsetHeight;\n    }\n\n    /**\n     * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\n     * `fullscreenchange` event.\n     *\n     * @private\n     * @fires fullscreenchange\n     * @listens webkitendfullscreen\n     * @listens webkitbeginfullscreen\n     * @listens webkitbeginfullscreen\n     */\n    proxyWebkitFullscreen_() {\n      if (!('webkitDisplayingFullscreen' in this.el_)) {\n        return;\n      }\n      const endFn = function () {\n        this.trigger('fullscreenchange', {\n          isFullscreen: false\n        });\n        // Safari will sometimes set controls on the videoelement when existing fullscreen.\n        if (this.el_.controls && !this.options_.nativeControlsForTouch && this.controls()) {\n          this.el_.controls = false;\n        }\n      };\n      const beginFn = function () {\n        if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\n          this.one('webkitendfullscreen', endFn);\n          this.trigger('fullscreenchange', {\n            isFullscreen: true,\n            // set a flag in case another tech triggers fullscreenchange\n            nativeIOSFullscreen: true\n          });\n        }\n      };\n      this.on('webkitbeginfullscreen', beginFn);\n      this.on('dispose', () => {\n        this.off('webkitbeginfullscreen', beginFn);\n        this.off('webkitendfullscreen', endFn);\n      });\n    }\n\n    /**\n     * Check if fullscreen is supported on the video el.\n     *\n     * @return {boolean}\n     *         - True if fullscreen is supported.\n     *         - False if fullscreen is not supported.\n     */\n    supportsFullScreen() {\n      return typeof this.el_.webkitEnterFullScreen === 'function';\n    }\n\n    /**\n     * Request that the `HTML5` Tech enter fullscreen.\n     */\n    enterFullScreen() {\n      const video = this.el_;\n      if (video.paused && video.networkState <= video.HAVE_METADATA) {\n        // attempt to prime the video element for programmatic access\n        // this isn't necessary on the desktop but shouldn't hurt\n        silencePromise(this.el_.play());\n\n        // playing and pausing synchronously during the transition to fullscreen\n        // can get iOS ~6.1 devices into a play/pause loop\n        this.setTimeout(function () {\n          video.pause();\n          try {\n            video.webkitEnterFullScreen();\n          } catch (e) {\n            this.trigger('fullscreenerror', e);\n          }\n        }, 0);\n      } else {\n        try {\n          video.webkitEnterFullScreen();\n        } catch (e) {\n          this.trigger('fullscreenerror', e);\n        }\n      }\n    }\n\n    /**\n     * Request that the `HTML5` Tech exit fullscreen.\n     */\n    exitFullScreen() {\n      if (!this.el_.webkitDisplayingFullscreen) {\n        this.trigger('fullscreenerror', new Error('The video is not fullscreen'));\n        return;\n      }\n      this.el_.webkitExitFullScreen();\n    }\n\n    /**\n     * Create a floating video window always on top of other windows so that users may\n     * continue consuming media while they interact with other content sites, or\n     * applications on their device.\n     *\n     * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n     *\n     * @return {Promise}\n     *         A promise with a Picture-in-Picture window.\n     */\n    requestPictureInPicture() {\n      return this.el_.requestPictureInPicture();\n    }\n\n    /**\n     * Native requestVideoFrameCallback if supported by browser/tech, or fallback\n     * Don't use rVCF on Safari when DRM is playing, as it doesn't fire\n     * Needs to be checked later than the constructor\n     * This will be a false positive for clear sources loaded after a Fairplay source\n     *\n     * @param {function} cb function to call\n     * @return {number} id of request\n     */\n    requestVideoFrameCallback(cb) {\n      if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n        return this.el_.requestVideoFrameCallback(cb);\n      }\n      return super.requestVideoFrameCallback(cb);\n    }\n\n    /**\n     * Native or fallback requestVideoFrameCallback\n     *\n     * @param {number} id request id to cancel\n     */\n    cancelVideoFrameCallback(id) {\n      if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n        this.el_.cancelVideoFrameCallback(id);\n      } else {\n        super.cancelVideoFrameCallback(id);\n      }\n    }\n\n    /**\n     * A getter/setter for the `Html5` Tech's source object.\n     * > Note: Please use {@link Html5#setSource}\n     *\n     * @param {Tech~SourceObject} [src]\n     *        The source object you want to set on the `HTML5` techs element.\n     *\n     * @return {Tech~SourceObject|undefined}\n     *         - The current source object when a source is not passed in.\n     *         - undefined when setting\n     *\n     * @deprecated Since version 5.\n     */\n    src(src) {\n      if (src === undefined) {\n        return this.el_.src;\n      }\n\n      // Setting src through `src` instead of `setSrc` will be deprecated\n      this.setSrc(src);\n    }\n\n    /**\n     * Add a <source> element to the <video> element.\n     *\n     * @param {string} srcUrl\n     *        The URL of the video source.\n     *\n     * @param {string} [mimeType]\n     *        The MIME type of the video source. Optional but recommended.\n     *\n     * @return {boolean}\n     *         Returns true if the source element was successfully added, false otherwise.\n     */\n    addSourceElement(srcUrl, mimeType) {\n      if (!srcUrl) {\n        log$1.error('Invalid source URL.');\n        return false;\n      }\n      const sourceAttributes = {\n        src: srcUrl\n      };\n      if (mimeType) {\n        sourceAttributes.type = mimeType;\n      }\n      const sourceElement = createEl('source', {}, sourceAttributes);\n      this.el_.appendChild(sourceElement);\n      return true;\n    }\n\n    /**\n     * Remove a <source> element from the <video> element by its URL.\n     *\n     * @param {string} srcUrl\n     *        The URL of the source to remove.\n     *\n     * @return {boolean}\n     *         Returns true if the source element was successfully removed, false otherwise.\n     */\n    removeSourceElement(srcUrl) {\n      if (!srcUrl) {\n        log$1.error('Source URL is required to remove the source element.');\n        return false;\n      }\n      const sourceElements = this.el_.querySelectorAll('source');\n      for (const sourceElement of sourceElements) {\n        if (sourceElement.src === srcUrl) {\n          this.el_.removeChild(sourceElement);\n          return true;\n        }\n      }\n      log$1.warn(`No matching source element found with src: ${srcUrl}`);\n      return false;\n    }\n\n    /**\n     * Reset the tech by removing all sources and then calling\n     * {@link Html5.resetMediaElement}.\n     */\n    reset() {\n      Html5.resetMediaElement(this.el_);\n    }\n\n    /**\n     * Get the current source on the `HTML5` Tech. Falls back to returning the source from\n     * the HTML5 media element.\n     *\n     * @return {Tech~SourceObject}\n     *         The current source object from the HTML5 tech. With a fallback to the\n     *         elements source.\n     */\n    currentSrc() {\n      if (this.currentSource_) {\n        return this.currentSource_.src;\n      }\n      return this.el_.currentSrc;\n    }\n\n    /**\n     * Set controls attribute for the HTML5 media Element.\n     *\n     * @param {string} val\n     *        Value to set the controls attribute to\n     */\n    setControls(val) {\n      this.el_.controls = !!val;\n    }\n\n    /**\n     * Create and returns a remote {@link TextTrack} object.\n     *\n     * @param {string} kind\n     *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n     *\n     * @param {string} [label]\n     *        Label to identify the text track\n     *\n     * @param {string} [language]\n     *        Two letter language abbreviation\n     *\n     * @return {TextTrack}\n     *         The TextTrack that gets created.\n     */\n    addTextTrack(kind, label, language) {\n      if (!this.featuresNativeTextTracks) {\n        return super.addTextTrack(kind, label, language);\n      }\n      return this.el_.addTextTrack(kind, label, language);\n    }\n\n    /**\n     * Creates either native TextTrack or an emulated TextTrack depending\n     * on the value of `featuresNativeTextTracks`\n     *\n     * @param {Object} options\n     *        The object should contain the options to initialize the TextTrack with.\n     *\n     * @param {string} [options.kind]\n     *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n     *\n     * @param {string} [options.label]\n     *        Label to identify the text track\n     *\n     * @param {string} [options.language]\n     *        Two letter language abbreviation.\n     *\n     * @param {boolean} [options.default]\n     *        Default this track to on.\n     *\n     * @param {string} [options.id]\n     *        The internal id to assign this track.\n     *\n     * @param {string} [options.src]\n     *        A source url for the track.\n     *\n     * @return {HTMLTrackElement}\n     *         The track element that gets created.\n     */\n    createRemoteTextTrack(options) {\n      if (!this.featuresNativeTextTracks) {\n        return super.createRemoteTextTrack(options);\n      }\n      const htmlTrackElement = document.createElement('track');\n      if (options.kind) {\n        htmlTrackElement.kind = options.kind;\n      }\n      if (options.label) {\n        htmlTrackElement.label = options.label;\n      }\n      if (options.language || options.srclang) {\n        htmlTrackElement.srclang = options.language || options.srclang;\n      }\n      if (options.default) {\n        htmlTrackElement.default = options.default;\n      }\n      if (options.id) {\n        htmlTrackElement.id = options.id;\n      }\n      if (options.src) {\n        htmlTrackElement.src = options.src;\n      }\n      return htmlTrackElement;\n    }\n\n    /**\n     * Creates a remote text track object and returns an html track element.\n     *\n     * @param {Object} options The object should contain values for\n     * kind, language, label, and src (location of the WebVTT file)\n     * @param {boolean} [manualCleanup=false] if set to true, the TextTrack\n     * will not be removed from the TextTrackList and HtmlTrackElementList\n     * after a source change\n     * @return {HTMLTrackElement} An Html Track Element.\n     * This can be an emulated {@link HTMLTrackElement} or a native one.\n     *\n     */\n    addRemoteTextTrack(options, manualCleanup) {\n      const htmlTrackElement = super.addRemoteTextTrack(options, manualCleanup);\n      if (this.featuresNativeTextTracks) {\n        this.el().appendChild(htmlTrackElement);\n      }\n      return htmlTrackElement;\n    }\n\n    /**\n     * Remove remote `TextTrack` from `TextTrackList` object\n     *\n     * @param {TextTrack} track\n     *        `TextTrack` object to remove\n     */\n    removeRemoteTextTrack(track) {\n      super.removeRemoteTextTrack(track);\n      if (this.featuresNativeTextTracks) {\n        const tracks = this.$$('track');\n        let i = tracks.length;\n        while (i--) {\n          if (track === tracks[i] || track === tracks[i].track) {\n            this.el().removeChild(tracks[i]);\n          }\n        }\n      }\n    }\n\n    /**\n     * Gets available media playback quality metrics as specified by the W3C's Media\n     * Playback Quality API.\n     *\n     * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n     *\n     * @return {Object}\n     *         An object with supported media playback quality metrics\n     */\n    getVideoPlaybackQuality() {\n      if (typeof this.el().getVideoPlaybackQuality === 'function') {\n        return this.el().getVideoPlaybackQuality();\n      }\n      const videoPlaybackQuality = {};\n      if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\n        videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\n        videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\n      }\n      if (window.performance) {\n        videoPlaybackQuality.creationTime = window.performance.now();\n      }\n      return videoPlaybackQuality;\n    }\n  }\n\n  /* HTML5 Support Testing ---------------------------------------------------- */\n\n  /**\n   * Element for testing browser HTML5 media capabilities\n   *\n   * @type {Element}\n   * @constant\n   * @private\n   */\n  defineLazyProperty(Html5, 'TEST_VID', function () {\n    if (!isReal()) {\n      return;\n    }\n    const video = document.createElement('video');\n    const track = document.createElement('track');\n    track.kind = 'captions';\n    track.srclang = 'en';\n    track.label = 'English';\n    video.appendChild(track);\n    return video;\n  });\n\n  /**\n   * Check if HTML5 media is supported by this browser/device.\n   *\n   * @return {boolean}\n   *         - True if HTML5 media is supported.\n   *         - False if HTML5 media is not supported.\n   */\n  Html5.isSupported = function () {\n    // IE with no Media Player is a LIAR! (#984)\n    try {\n      Html5.TEST_VID.volume = 0.5;\n    } catch (e) {\n      return false;\n    }\n    return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\n  };\n\n  /**\n   * Check if the tech can support the given type\n   *\n   * @param {string} type\n   *        The mimetype to check\n   * @return {string} 'probably', 'maybe', or '' (empty string)\n   */\n  Html5.canPlayType = function (type) {\n    return Html5.TEST_VID.canPlayType(type);\n  };\n\n  /**\n   * Check if the tech can support the given source\n   *\n   * @param {Object} srcObj\n   *        The source object\n   * @param {Object} options\n   *        The options passed to the tech\n   * @return {string} 'probably', 'maybe', or '' (empty string)\n   */\n  Html5.canPlaySource = function (srcObj, options) {\n    return Html5.canPlayType(srcObj.type);\n  };\n\n  /**\n   * Check if the volume can be changed in this browser/device.\n   * Volume cannot be changed in a lot of mobile devices.\n   * Specifically, it can't be changed from 1 on iOS.\n   *\n   * @return {boolean}\n   *         - True if volume can be controlled\n   *         - False otherwise\n   */\n  Html5.canControlVolume = function () {\n    // IE will error if Windows Media Player not installed #3315\n    try {\n      const volume = Html5.TEST_VID.volume;\n      Html5.TEST_VID.volume = volume / 2 + 0.1;\n      const canControl = volume !== Html5.TEST_VID.volume;\n\n      // With the introduction of iOS 15, there are cases where the volume is read as\n      // changed but reverts back to its original state at the start of the next tick.\n      // To determine whether volume can be controlled on iOS,\n      // a timeout is set and the volume is checked asynchronously.\n      // Since `features` doesn't currently work asynchronously, the value is manually set.\n      if (canControl && IS_IOS) {\n        window.setTimeout(() => {\n          if (Html5 && Html5.prototype) {\n            Html5.prototype.featuresVolumeControl = volume !== Html5.TEST_VID.volume;\n          }\n        });\n\n        // default iOS to false, which will be updated in the timeout above.\n        return false;\n      }\n      return canControl;\n    } catch (e) {\n      return false;\n    }\n  };\n\n  /**\n   * Check if the volume can be muted in this browser/device.\n   * Some devices, e.g. iOS, don't allow changing volume\n   * but permits muting/unmuting.\n   *\n   * @return {boolean}\n   *      - True if volume can be muted\n   *      - False otherwise\n   */\n  Html5.canMuteVolume = function () {\n    try {\n      const muted = Html5.TEST_VID.muted;\n\n      // in some versions of iOS muted property doesn't always\n      // work, so we want to set both property and attribute\n      Html5.TEST_VID.muted = !muted;\n      if (Html5.TEST_VID.muted) {\n        setAttribute(Html5.TEST_VID, 'muted', 'muted');\n      } else {\n        removeAttribute(Html5.TEST_VID, 'muted', 'muted');\n      }\n      return muted !== Html5.TEST_VID.muted;\n    } catch (e) {\n      return false;\n    }\n  };\n\n  /**\n   * Check if the playback rate can be changed in this browser/device.\n   *\n   * @return {boolean}\n   *         - True if playback rate can be controlled\n   *         - False otherwise\n   */\n  Html5.canControlPlaybackRate = function () {\n    // Playback rate API is implemented in Android Chrome, but doesn't do anything\n    // https://github.com/videojs/video.js/issues/3180\n    if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\n      return false;\n    }\n    // IE will error if Windows Media Player not installed #3315\n    try {\n      const playbackRate = Html5.TEST_VID.playbackRate;\n      Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\n      return playbackRate !== Html5.TEST_VID.playbackRate;\n    } catch (e) {\n      return false;\n    }\n  };\n\n  /**\n   * Check if we can override a video/audio elements attributes, with\n   * Object.defineProperty.\n   *\n   * @return {boolean}\n   *         - True if builtin attributes can be overridden\n   *         - False otherwise\n   */\n  Html5.canOverrideAttributes = function () {\n    // if we cannot overwrite the src/innerHTML property, there is no support\n    // iOS 7 safari for instance cannot do this.\n    try {\n      const noop = () => {};\n      Object.defineProperty(document.createElement('video'), 'src', {\n        get: noop,\n        set: noop\n      });\n      Object.defineProperty(document.createElement('audio'), 'src', {\n        get: noop,\n        set: noop\n      });\n      Object.defineProperty(document.createElement('video'), 'innerHTML', {\n        get: noop,\n        set: noop\n      });\n      Object.defineProperty(document.createElement('audio'), 'innerHTML', {\n        get: noop,\n        set: noop\n      });\n    } catch (e) {\n      return false;\n    }\n    return true;\n  };\n\n  /**\n   * Check to see if native `TextTrack`s are supported by this browser/device.\n   *\n   * @return {boolean}\n   *         - True if native `TextTrack`s are supported.\n   *         - False otherwise\n   */\n  Html5.supportsNativeTextTracks = function () {\n    return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\n  };\n\n  /**\n   * Check to see if native `VideoTrack`s are supported by this browser/device\n   *\n   * @return {boolean}\n   *        - True if native `VideoTrack`s are supported.\n   *        - False otherwise\n   */\n  Html5.supportsNativeVideoTracks = function () {\n    return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\n  };\n\n  /**\n   * Check to see if native `AudioTrack`s are supported by this browser/device\n   *\n   * @return {boolean}\n   *        - True if native `AudioTrack`s are supported.\n   *        - False otherwise\n   */\n  Html5.supportsNativeAudioTracks = function () {\n    return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\n  };\n\n  /**\n   * An array of events available on the Html5 tech.\n   *\n   * @private\n   * @type {Array}\n   */\n  Html5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\n\n  /**\n   * Boolean indicating whether the `Tech` supports volume control.\n   *\n   * @type {boolean}\n   * @default {@link Html5.canControlVolume}\n   */\n  /**\n   * Boolean indicating whether the `Tech` supports muting volume.\n   *\n   * @type {boolean}\n   * @default {@link Html5.canMuteVolume}\n   */\n\n  /**\n   * Boolean indicating whether the `Tech` supports changing the speed at which the media\n   * plays. Examples:\n   *   - Set player to play 2x (twice) as fast\n   *   - Set player to play 0.5x (half) as fast\n   *\n   * @type {boolean}\n   * @default {@link Html5.canControlPlaybackRate}\n   */\n\n  /**\n   * Boolean indicating whether the `Tech` supports the `sourceset` event.\n   *\n   * @type {boolean}\n   * @default\n   */\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\n   *\n   * @type {boolean}\n   * @default {@link Html5.supportsNativeTextTracks}\n   */\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\n   *\n   * @type {boolean}\n   * @default {@link Html5.supportsNativeVideoTracks}\n   */\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\n   *\n   * @type {boolean}\n   * @default {@link Html5.supportsNativeAudioTracks}\n   */\n  [['featuresMuteControl', 'canMuteVolume'], ['featuresPlaybackRate', 'canControlPlaybackRate'], ['featuresSourceset', 'canOverrideAttributes'], ['featuresNativeTextTracks', 'supportsNativeTextTracks'], ['featuresNativeVideoTracks', 'supportsNativeVideoTracks'], ['featuresNativeAudioTracks', 'supportsNativeAudioTracks']].forEach(function ([key, fn]) {\n    defineLazyProperty(Html5.prototype, key, () => Html5[fn](), true);\n  });\n  Html5.prototype.featuresVolumeControl = Html5.canControlVolume();\n\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports the media element\n   * moving in the DOM. iOS breaks if you move the media element, so this is set this to\n   * false there. Everywhere else this should be true.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Html5.prototype.movingMediaElementInDOM = !IS_IOS;\n\n  // TODO: Previous comment: No longer appears to be used. Can probably be removed.\n  //       Is this true?\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\n   * when going into fullscreen.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Html5.prototype.featuresFullscreenResize = true;\n\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports the progress event.\n   * If this is false, manual `progress` events will be triggered instead.\n   *\n   * @type {boolean}\n   * @default\n   */\n  Html5.prototype.featuresProgressEvents = true;\n\n  /**\n   * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\n   * If this is false, manual `timeupdate` events will be triggered instead.\n   *\n   * @default\n   */\n  Html5.prototype.featuresTimeupdateEvents = true;\n\n  /**\n   * Whether the HTML5 el supports `requestVideoFrameCallback`\n   *\n   * @type {boolean}\n   */\n  Html5.prototype.featuresVideoFrameCallback = !!(Html5.TEST_VID && Html5.TEST_VID.requestVideoFrameCallback);\n  Html5.disposeMediaElement = function (el) {\n    if (!el) {\n      return;\n    }\n    if (el.parentNode) {\n      el.parentNode.removeChild(el);\n    }\n\n    // remove any child track or source nodes to prevent their loading\n    while (el.hasChildNodes()) {\n      el.removeChild(el.firstChild);\n    }\n\n    // remove any src reference. not setting `src=''` because that causes a warning\n    // in firefox\n    el.removeAttribute('src');\n\n    // force the media element to update its loading state by calling load()\n    // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n    if (typeof el.load === 'function') {\n      // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n      (function () {\n        try {\n          el.load();\n        } catch (e) {\n          // not supported\n        }\n      })();\n    }\n  };\n  Html5.resetMediaElement = function (el) {\n    if (!el) {\n      return;\n    }\n    const sources = el.querySelectorAll('source');\n    let i = sources.length;\n    while (i--) {\n      el.removeChild(sources[i]);\n    }\n\n    // remove any src reference.\n    // not setting `src=''` because that throws an error\n    el.removeAttribute('src');\n    if (typeof el.load === 'function') {\n      // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n      (function () {\n        try {\n          el.load();\n        } catch (e) {\n          // satisfy linter\n        }\n      })();\n    }\n  };\n\n  /* Native HTML5 element property wrapping ----------------------------------- */\n  // Wrap native boolean attributes with getters that check both property and attribute\n  // The list is as followed:\n  // muted, defaultMuted, autoplay, controls, loop, playsinline\n  [\n  /**\n   * Get the value of `muted` from the media element. `muted` indicates\n   * that the volume for the media should be set to silent. This does not actually change\n   * the `volume` attribute.\n   *\n   * @method Html5#muted\n   * @return {boolean}\n   *         - True if the value of `volume` should be ignored and the audio set to silent.\n   *         - False if the value of `volume` should be used.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n   */\n  'muted',\n  /**\n   * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\n   * whether the media should start muted or not. Only changes the default state of the\n   * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\n   * current state.\n   *\n   * @method Html5#defaultMuted\n   * @return {boolean}\n   *         - The value of `defaultMuted` from the media element.\n   *         - True indicates that the media should start muted.\n   *         - False indicates that the media should not start muted\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n   */\n  'defaultMuted',\n  /**\n   * Get the value of `autoplay` from the media element. `autoplay` indicates\n   * that the media should start to play as soon as the page is ready.\n   *\n   * @method Html5#autoplay\n   * @return {boolean}\n   *         - The value of `autoplay` from the media element.\n   *         - True indicates that the media should start as soon as the page loads.\n   *         - False indicates that the media should not start as soon as the page loads.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n   */\n  'autoplay',\n  /**\n   * Get the value of `controls` from the media element. `controls` indicates\n   * whether the native media controls should be shown or hidden.\n   *\n   * @method Html5#controls\n   * @return {boolean}\n   *         - The value of `controls` from the media element.\n   *         - True indicates that native controls should be showing.\n   *         - False indicates that native controls should be hidden.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\n   */\n  'controls',\n  /**\n   * Get the value of `loop` from the media element. `loop` indicates\n   * that the media should return to the start of the media and continue playing once\n   * it reaches the end.\n   *\n   * @method Html5#loop\n   * @return {boolean}\n   *         - The value of `loop` from the media element.\n   *         - True indicates that playback should seek back to start once\n   *           the end of a media is reached.\n   *         - False indicates that playback should not loop back to the start when the\n   *           end of the media is reached.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n   */\n  'loop',\n  /**\n   * Get the value of `playsinline` from the media element. `playsinline` indicates\n   * to the browser that non-fullscreen playback is preferred when fullscreen\n   * playback is the native default, such as in iOS Safari.\n   *\n   * @method Html5#playsinline\n   * @return {boolean}\n   *         - The value of `playsinline` from the media element.\n   *         - True indicates that the media should play inline.\n   *         - False indicates that the media should not play inline.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n   */\n  'playsinline'].forEach(function (prop) {\n    Html5.prototype[prop] = function () {\n      return this.el_[prop] || this.el_.hasAttribute(prop);\n    };\n  });\n\n  // Wrap native boolean attributes with setters that set both property and attribute\n  // The list is as followed:\n  // setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\n  // setControls is special-cased above\n  [\n  /**\n   * Set the value of `muted` on the media element. `muted` indicates that the current\n   * audio level should be silent.\n   *\n   * @method Html5#setMuted\n   * @param {boolean} muted\n   *        - True if the audio should be set to silent\n   *        - False otherwise\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n   */\n  'muted',\n  /**\n   * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\n   * audio level should be silent, but will only effect the muted level on initial playback..\n   *\n   * @method Html5.prototype.setDefaultMuted\n   * @param {boolean} defaultMuted\n   *        - True if the audio should be set to silent\n   *        - False otherwise\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n   */\n  'defaultMuted',\n  /**\n   * Set the value of `autoplay` on the media element. `autoplay` indicates\n   * that the media should start to play as soon as the page is ready.\n   *\n   * @method Html5#setAutoplay\n   * @param {boolean} autoplay\n   *         - True indicates that the media should start as soon as the page loads.\n   *         - False indicates that the media should not start as soon as the page loads.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n   */\n  'autoplay',\n  /**\n   * Set the value of `loop` on the media element. `loop` indicates\n   * that the media should return to the start of the media and continue playing once\n   * it reaches the end.\n   *\n   * @method Html5#setLoop\n   * @param {boolean} loop\n   *         - True indicates that playback should seek back to start once\n   *           the end of a media is reached.\n   *         - False indicates that playback should not loop back to the start when the\n   *           end of the media is reached.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n   */\n  'loop',\n  /**\n   * Set the value of `playsinline` from the media element. `playsinline` indicates\n   * to the browser that non-fullscreen playback is preferred when fullscreen\n   * playback is the native default, such as in iOS Safari.\n   *\n   * @method Html5#setPlaysinline\n   * @param {boolean} playsinline\n   *         - True indicates that the media should play inline.\n   *         - False indicates that the media should not play inline.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n   */\n  'playsinline'].forEach(function (prop) {\n    Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n      this.el_[prop] = v;\n      if (v) {\n        this.el_.setAttribute(prop, prop);\n      } else {\n        this.el_.removeAttribute(prop);\n      }\n    };\n  });\n\n  // Wrap native properties with a getter\n  // The list is as followed\n  // paused, currentTime, buffered, volume, poster, preload, error, seeking\n  // seekable, ended, playbackRate, defaultPlaybackRate, disablePictureInPicture\n  // played, networkState, readyState, videoWidth, videoHeight, crossOrigin\n  [\n  /**\n   * Get the value of `paused` from the media element. `paused` indicates whether the media element\n   * is currently paused or not.\n   *\n   * @method Html5#paused\n   * @return {boolean}\n   *         The value of `paused` from the media element.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\n   */\n  'paused',\n  /**\n   * Get the value of `currentTime` from the media element. `currentTime` indicates\n   * the current second that the media is at in playback.\n   *\n   * @method Html5#currentTime\n   * @return {number}\n   *         The value of `currentTime` from the media element.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\n   */\n  'currentTime',\n  /**\n   * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\n   * object that represents the parts of the media that are already downloaded and\n   * available for playback.\n   *\n   * @method Html5#buffered\n   * @return {TimeRange}\n   *         The value of `buffered` from the media element.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\n   */\n  'buffered',\n  /**\n   * Get the value of `volume` from the media element. `volume` indicates\n   * the current playback volume of audio for a media. `volume` will be a value from 0\n   * (silent) to 1 (loudest and default).\n   *\n   * @method Html5#volume\n   * @return {number}\n   *         The value of `volume` from the media element. Value will be between 0-1.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n   */\n  'volume',\n  /**\n   * Get the value of `poster` from the media element. `poster` indicates\n   * that the url of an image file that can/will be shown when no media data is available.\n   *\n   * @method Html5#poster\n   * @return {string}\n   *         The value of `poster` from the media element. Value will be a url to an\n   *         image.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\n   */\n  'poster',\n  /**\n   * Get the value of `preload` from the media element. `preload` indicates\n   * what should download before the media is interacted with. It can have the following\n   * values:\n   * - none: nothing should be downloaded\n   * - metadata: poster and the first few frames of the media may be downloaded to get\n   *   media dimensions and other metadata\n   * - auto: allow the media and metadata for the media to be downloaded before\n   *    interaction\n   *\n   * @method Html5#preload\n   * @return {string}\n   *         The value of `preload` from the media element. Will be 'none', 'metadata',\n   *         or 'auto'.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n   */\n  'preload',\n  /**\n   * Get the value of the `error` from the media element. `error` indicates any\n   * MediaError that may have occurred during playback. If error returns null there is no\n   * current error.\n   *\n   * @method Html5#error\n   * @return {MediaError|null}\n   *         The value of `error` from the media element. Will be `MediaError` if there\n   *         is a current error and null otherwise.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\n   */\n  'error',\n  /**\n   * Get the value of `seeking` from the media element. `seeking` indicates whether the\n   * media is currently seeking to a new position or not.\n   *\n   * @method Html5#seeking\n   * @return {boolean}\n   *         - The value of `seeking` from the media element.\n   *         - True indicates that the media is currently seeking to a new position.\n   *         - False indicates that the media is not seeking to a new position at this time.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\n   */\n  'seeking',\n  /**\n   * Get the value of `seekable` from the media element. `seekable` returns a\n   * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\n   *\n   * @method Html5#seekable\n   * @return {TimeRange}\n   *         The value of `seekable` from the media element. A `TimeRange` object\n   *         indicating the current ranges of time that can be seeked to.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\n   */\n  'seekable',\n  /**\n   * Get the value of `ended` from the media element. `ended` indicates whether\n   * the media has reached the end or not.\n   *\n   * @method Html5#ended\n   * @return {boolean}\n   *         - The value of `ended` from the media element.\n   *         - True indicates that the media has ended.\n   *         - False indicates that the media has not ended.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\n   */\n  'ended',\n  /**\n   * Get the value of `playbackRate` from the media element. `playbackRate` indicates\n   * the rate at which the media is currently playing back. Examples:\n   *   - if playbackRate is set to 2, media will play twice as fast.\n   *   - if playbackRate is set to 0.5, media will play half as fast.\n   *\n   * @method Html5#playbackRate\n   * @return {number}\n   *         The value of `playbackRate` from the media element. A number indicating\n   *         the current playback speed of the media, where 1 is normal speed.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n   */\n  'playbackRate',\n  /**\n   * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\n   * the rate at which the media is currently playing back. This value will not indicate the current\n   * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\n   *\n   * Examples:\n   *   - if defaultPlaybackRate is set to 2, media will play twice as fast.\n   *   - if defaultPlaybackRate is set to 0.5, media will play half as fast.\n   *\n   * @method Html5.prototype.defaultPlaybackRate\n   * @return {number}\n   *         The value of `defaultPlaybackRate` from the media element. A number indicating\n   *         the current playback speed of the media, where 1 is normal speed.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n   */\n  'defaultPlaybackRate',\n  /**\n   * Get the value of 'disablePictureInPicture' from the video element.\n   *\n   * @method Html5#disablePictureInPicture\n   * @return {boolean} value\n   *         - The value of `disablePictureInPicture` from the video element.\n   *         - True indicates that the video can't be played in Picture-In-Picture mode\n   *         - False indicates that the video can be played in Picture-In-Picture mode\n   *\n   * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n   */\n  'disablePictureInPicture',\n  /**\n   * Get the value of `played` from the media element. `played` returns a `TimeRange`\n   * object representing points in the media timeline that have been played.\n   *\n   * @method Html5#played\n   * @return {TimeRange}\n   *         The value of `played` from the media element. A `TimeRange` object indicating\n   *         the ranges of time that have been played.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\n   */\n  'played',\n  /**\n   * Get the value of `networkState` from the media element. `networkState` indicates\n   * the current network state. It returns an enumeration from the following list:\n   * - 0: NETWORK_EMPTY\n   * - 1: NETWORK_IDLE\n   * - 2: NETWORK_LOADING\n   * - 3: NETWORK_NO_SOURCE\n   *\n   * @method Html5#networkState\n   * @return {number}\n   *         The value of `networkState` from the media element. This will be a number\n   *         from the list in the description.\n   *\n   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\n   */\n  'networkState',\n  /**\n   * Get the value of `readyState` from the media element. `readyState` indicates\n   * the current state of the media element. It returns an enumeration from the\n   * following list:\n   * - 0: HAVE_NOTHING\n   * - 1: HAVE_METADATA\n   * - 2: HAVE_CURRENT_DATA\n   * - 3: HAVE_FUTURE_DATA\n   * - 4: HAVE_ENOUGH_DATA\n   *\n   * @method Html5#readyState\n   * @return {number}\n   *         The value of `readyState` from the media element. This will be a number\n   *         from the list in the description.\n   *\n   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\n   */\n  'readyState',\n  /**\n   * Get the value of `videoWidth` from the video element. `videoWidth` indicates\n   * the current width of the video in css pixels.\n   *\n   * @method Html5#videoWidth\n   * @return {number}\n   *         The value of `videoWidth` from the video element. This will be a number\n   *         in css pixels.\n   *\n   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n   */\n  'videoWidth',\n  /**\n   * Get the value of `videoHeight` from the video element. `videoHeight` indicates\n   * the current height of the video in css pixels.\n   *\n   * @method Html5#videoHeight\n   * @return {number}\n   *         The value of `videoHeight` from the video element. This will be a number\n   *         in css pixels.\n   *\n   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n   */\n  'videoHeight',\n  /**\n   * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates\n   * to the browser that should sent the cookies along with the requests for the\n   * different assets/playlists\n   *\n   * @method Html5#crossOrigin\n   * @return {string}\n   *         - anonymous indicates that the media should not sent cookies.\n   *         - use-credentials indicates that the media should sent cookies along the requests.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n   */\n  'crossOrigin'].forEach(function (prop) {\n    Html5.prototype[prop] = function () {\n      return this.el_[prop];\n    };\n  });\n\n  // Wrap native properties with a setter in this format:\n  // set + toTitleCase(name)\n  // The list is as follows:\n  // setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate,\n  // setDisablePictureInPicture, setCrossOrigin\n  [\n  /**\n   * Set the value of `volume` on the media element. `volume` indicates the current\n   * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\n   * so on.\n   *\n   * @method Html5#setVolume\n   * @param {number} percentAsDecimal\n   *        The volume percent as a decimal. Valid range is from 0-1.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n   */\n  'volume',\n  /**\n   * Set the value of `src` on the media element. `src` indicates the current\n   * {@link Tech~SourceObject} for the media.\n   *\n   * @method Html5#setSrc\n   * @param {Tech~SourceObject} src\n   *        The source object to set as the current source.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\n   */\n  'src',\n  /**\n   * Set the value of `poster` on the media element. `poster` is the url to\n   * an image file that can/will be shown when no media data is available.\n   *\n   * @method Html5#setPoster\n   * @param {string} poster\n   *        The url to an image that should be used as the `poster` for the media\n   *        element.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\n   */\n  'poster',\n  /**\n   * Set the value of `preload` on the media element. `preload` indicates\n   * what should download before the media is interacted with. It can have the following\n   * values:\n   * - none: nothing should be downloaded\n   * - metadata: poster and the first few frames of the media may be downloaded to get\n   *   media dimensions and other metadata\n   * - auto: allow the media and metadata for the media to be downloaded before\n   *    interaction\n   *\n   * @method Html5#setPreload\n   * @param {string} preload\n   *         The value of `preload` to set on the media element. Must be 'none', 'metadata',\n   *         or 'auto'.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n   */\n  'preload',\n  /**\n   * Set the value of `playbackRate` on the media element. `playbackRate` indicates\n   * the rate at which the media should play back. Examples:\n   *   - if playbackRate is set to 2, media will play twice as fast.\n   *   - if playbackRate is set to 0.5, media will play half as fast.\n   *\n   * @method Html5#setPlaybackRate\n   * @return {number}\n   *         The value of `playbackRate` from the media element. A number indicating\n   *         the current playback speed of the media, where 1 is normal speed.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n   */\n  'playbackRate',\n  /**\n   * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\n   * the rate at which the media should play back upon initial startup. Changing this value\n   * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\n   *\n   * Example Values:\n   *   - if playbackRate is set to 2, media will play twice as fast.\n   *   - if playbackRate is set to 0.5, media will play half as fast.\n   *\n   * @method Html5.prototype.setDefaultPlaybackRate\n   * @return {number}\n   *         The value of `defaultPlaybackRate` from the media element. A number indicating\n   *         the current playback speed of the media, where 1 is normal speed.\n   *\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\n   */\n  'defaultPlaybackRate',\n  /**\n   * Prevents the browser from suggesting a Picture-in-Picture context menu\n   * or to request Picture-in-Picture automatically in some cases.\n   *\n   * @method Html5#setDisablePictureInPicture\n   * @param {boolean} value\n   *         The true value will disable Picture-in-Picture mode.\n   *\n   * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n   */\n  'disablePictureInPicture',\n  /**\n   * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates\n   * to the browser that should sent the cookies along with the requests for the\n   * different assets/playlists\n   *\n   * @method Html5#setCrossOrigin\n   * @param {string} crossOrigin\n   *         - anonymous indicates that the media should not sent cookies.\n   *         - use-credentials indicates that the media should sent cookies along the requests.\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n   */\n  'crossOrigin'].forEach(function (prop) {\n    Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n      this.el_[prop] = v;\n    };\n  });\n\n  // wrap native functions with a function\n  // The list is as follows:\n  // pause, load, play\n  [\n  /**\n   * A wrapper around the media elements `pause` function. This will call the `HTML5`\n   * media elements `pause` function.\n   *\n   * @method Html5#pause\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\n   */\n  'pause',\n  /**\n   * A wrapper around the media elements `load` function. This will call the `HTML5`s\n   * media element `load` function.\n   *\n   * @method Html5#load\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\n   */\n  'load',\n  /**\n   * A wrapper around the media elements `play` function. This will call the `HTML5`s\n   * media element `play` function.\n   *\n   * @method Html5#play\n   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\n   */\n  'play'].forEach(function (prop) {\n    Html5.prototype[prop] = function () {\n      return this.el_[prop]();\n    };\n  });\n  Tech.withSourceHandlers(Html5);\n\n  /**\n   * Native source handler for Html5, simply passes the source to the media element.\n   *\n   * @property {Tech~SourceObject} source\n   *        The source object\n   *\n   * @property {Html5} tech\n   *        The instance of the HTML5 tech.\n   */\n  Html5.nativeSourceHandler = {};\n\n  /**\n   * Check if the media element can play the given mime type.\n   *\n   * @param {string} type\n   *        The mimetype to check\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n  Html5.nativeSourceHandler.canPlayType = function (type) {\n    // IE without MediaPlayer throws an error (#519)\n    try {\n      return Html5.TEST_VID.canPlayType(type);\n    } catch (e) {\n      return '';\n    }\n  };\n\n  /**\n   * Check if the media element can handle a source natively.\n   *\n   * @param {Tech~SourceObject} source\n   *         The source object\n   *\n   * @param {Object} [options]\n   *         Options to be passed to the tech.\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string).\n   */\n  Html5.nativeSourceHandler.canHandleSource = function (source, options) {\n    // If a type was provided we should rely on that\n    if (source.type) {\n      return Html5.nativeSourceHandler.canPlayType(source.type);\n\n      // If no type, fall back to checking 'video/[EXTENSION]'\n    } else if (source.src) {\n      const ext = getFileExtension(source.src);\n      return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n    }\n    return '';\n  };\n\n  /**\n   * Pass the source to the native media element.\n   *\n   * @param {Tech~SourceObject} source\n   *        The source object\n   *\n   * @param {Html5} tech\n   *        The instance of the Html5 tech\n   *\n   * @param {Object} [options]\n   *        The options to pass to the source\n   */\n  Html5.nativeSourceHandler.handleSource = function (source, tech, options) {\n    tech.setSrc(source.src);\n  };\n\n  /**\n   * A noop for the native dispose function, as cleanup is not needed.\n   */\n  Html5.nativeSourceHandler.dispose = function () {};\n\n  // Register the native source handler\n  Html5.registerSourceHandler(Html5.nativeSourceHandler);\n  Tech.registerTech('Html5', Html5);\n\n  /**\n   * @file player.js\n   */\n\n  /** @import { TimeRange } from './utils/time' */\n  /** @import HtmlTrackElement from './tracks/html-track-element' */\n\n  /**\n   * @callback PlayerReadyCallback\n   * @this     {Player}\n   * @returns  {void}\n   */\n\n  // The following tech events are simply re-triggered\n  // on the player when they happen\n  const TECH_EVENTS_RETRIGGER = [\n  /**\n   * Fired while the user agent is downloading media data.\n   *\n   * @event Player#progress\n   * @type {Event}\n   */\n  /**\n   * Retrigger the `progress` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechProgress_\n   * @fires Player#progress\n   * @listens Tech#progress\n   */\n  'progress',\n  /**\n   * Fires when the loading of an audio/video is aborted.\n   *\n   * @event Player#abort\n   * @type {Event}\n   */\n  /**\n   * Retrigger the `abort` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechAbort_\n   * @fires Player#abort\n   * @listens Tech#abort\n   */\n  'abort',\n  /**\n   * Fires when the browser is intentionally not getting media data.\n   *\n   * @event Player#suspend\n   * @type {Event}\n   */\n  /**\n   * Retrigger the `suspend` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechSuspend_\n   * @fires Player#suspend\n   * @listens Tech#suspend\n   */\n  'suspend',\n  /**\n   * Fires when the current playlist is empty.\n   *\n   * @event Player#emptied\n   * @type {Event}\n   */\n  /**\n   * Retrigger the `emptied` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechEmptied_\n   * @fires Player#emptied\n   * @listens Tech#emptied\n   */\n  'emptied',\n  /**\n   * Fires when the browser is trying to get media data, but data is not available.\n   *\n   * @event Player#stalled\n   * @type {Event}\n   */\n  /**\n   * Retrigger the `stalled` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechStalled_\n   * @fires Player#stalled\n   * @listens Tech#stalled\n   */\n  'stalled',\n  /**\n   * Fires when the browser has loaded meta data for the audio/video.\n   *\n   * @event Player#loadedmetadata\n   * @type {Event}\n   */\n  /**\n   * Retrigger the `loadedmetadata` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechLoadedmetadata_\n   * @fires Player#loadedmetadata\n   * @listens Tech#loadedmetadata\n   */\n  'loadedmetadata',\n  /**\n   * Fires when the browser has loaded the current frame of the audio/video.\n   *\n   * @event Player#loadeddata\n   * @type {event}\n   */\n  /**\n   * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechLoaddeddata_\n   * @fires Player#loadeddata\n   * @listens Tech#loadeddata\n   */\n  'loadeddata',\n  /**\n   * Fires when the current playback position has changed.\n   *\n   * @event Player#timeupdate\n   * @type {event}\n   */\n  /**\n   * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechTimeUpdate_\n   * @fires Player#timeupdate\n   * @listens Tech#timeupdate\n   */\n  'timeupdate',\n  /**\n   * Fires when the video's intrinsic dimensions change\n   *\n   * @event Player#resize\n   * @type {event}\n   */\n  /**\n   * Retrigger the `resize` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechResize_\n   * @fires Player#resize\n   * @listens Tech#resize\n   */\n  'resize',\n  /**\n   * Fires when the volume has been changed\n   *\n   * @event Player#volumechange\n   * @type {event}\n   */\n  /**\n   * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechVolumechange_\n   * @fires Player#volumechange\n   * @listens Tech#volumechange\n   */\n  'volumechange',\n  /**\n   * Fires when the text track has been changed\n   *\n   * @event Player#texttrackchange\n   * @type {event}\n   */\n  /**\n   * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\n   *\n   * @private\n   * @method Player#handleTechTexttrackchange_\n   * @fires Player#texttrackchange\n   * @listens Tech#texttrackchange\n   */\n  'texttrackchange'];\n\n  // events to queue when playback rate is zero\n  // this is a hash for the sole purpose of mapping non-camel-cased event names\n  // to camel-cased function names\n  const TECH_EVENTS_QUEUE = {\n    canplay: 'CanPlay',\n    canplaythrough: 'CanPlayThrough',\n    playing: 'Playing',\n    seeked: 'Seeked'\n  };\n  const BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\n  const BREAKPOINT_CLASSES = {};\n\n  // grep: vjs-layout-tiny\n  // grep: vjs-layout-x-small\n  // grep: vjs-layout-small\n  // grep: vjs-layout-medium\n  // grep: vjs-layout-large\n  // grep: vjs-layout-x-large\n  // grep: vjs-layout-huge\n  BREAKPOINT_ORDER.forEach(k => {\n    const v = k.charAt(0) === 'x' ? `x-${k.substring(1)}` : k;\n    BREAKPOINT_CLASSES[k] = `vjs-layout-${v}`;\n  });\n  const DEFAULT_BREAKPOINTS = {\n    tiny: 210,\n    xsmall: 320,\n    small: 425,\n    medium: 768,\n    large: 1440,\n    xlarge: 2560,\n    huge: Infinity\n  };\n\n  /**\n   * An instance of the `Player` class is created when any of the Video.js setup methods\n   * are used to initialize a video.\n   *\n   * After an instance has been created it can be accessed globally in three ways:\n   * 1. By calling `videojs.getPlayer('example_video_1');`\n   * 2. By calling `videojs('example_video_1');` (not recommended)\n   * 2. By using it directly via `videojs.players.example_video_1;`\n   *\n   * @extends Component\n   * @global\n   */\n  class Player extends Component$1 {\n    /**\n     * Create an instance of this class.\n     *\n     * @param {Element} tag\n     *        The original video DOM element used for configuring options.\n     *\n     * @param {Object} [options]\n     *        Object of option names and values.\n     *\n     * @param {PlayerReadyCallback} [ready]\n     *        Ready callback function.\n     */\n    constructor(tag, options, ready) {\n      // Make sure tag ID exists\n      // also here.. probably better\n      tag.id = tag.id || options.id || `vjs_video_${newGUID()}`;\n\n      // Set Options\n      // The options argument overrides options set in the video tag\n      // which overrides globally set options.\n      // This latter part coincides with the load order\n      // (tag must exist before Player)\n      options = Object.assign(Player.getTagSettings(tag), options);\n\n      // Delay the initialization of children because we need to set up\n      // player properties first, and can't use `this` before `super()`\n      options.initChildren = false;\n\n      // Same with creating the element\n      options.createEl = false;\n\n      // don't auto mixin the evented mixin\n      options.evented = false;\n\n      // we don't want the player to report touch activity on itself\n      // see enableTouchActivity in Component\n      options.reportTouchActivity = false;\n\n      // If language is not set, get the closest lang attribute\n      if (!options.language) {\n        const closest = tag.closest('[lang]');\n        if (closest) {\n          options.language = closest.getAttribute('lang');\n        }\n      }\n\n      // Run base component initializing with new options\n      super(null, options, ready);\n\n      // Create bound methods for document listeners.\n      this.boundDocumentFullscreenChange_ = e => this.documentFullscreenChange_(e);\n      this.boundFullWindowOnEscKey_ = e => this.fullWindowOnEscKey(e);\n      this.boundUpdateStyleEl_ = e => this.updateStyleEl_(e);\n      this.boundApplyInitTime_ = e => this.applyInitTime_(e);\n      this.boundUpdateCurrentBreakpoint_ = e => this.updateCurrentBreakpoint_(e);\n      this.boundHandleTechClick_ = e => this.handleTechClick_(e);\n      this.boundHandleTechDoubleClick_ = e => this.handleTechDoubleClick_(e);\n      this.boundHandleTechTouchStart_ = e => this.handleTechTouchStart_(e);\n      this.boundHandleTechTouchMove_ = e => this.handleTechTouchMove_(e);\n      this.boundHandleTechTouchEnd_ = e => this.handleTechTouchEnd_(e);\n      this.boundHandleTechTap_ = e => this.handleTechTap_(e);\n      this.boundUpdatePlayerHeightOnAudioOnlyMode_ = e => this.updatePlayerHeightOnAudioOnlyMode_(e);\n\n      // default isFullscreen_ to false\n      this.isFullscreen_ = false;\n\n      // create logger\n      this.log = createLogger(this.id_);\n\n      // Hold our own reference to fullscreen api so it can be mocked in tests\n      this.fsApi_ = FullscreenApi;\n\n      // Tracks when a tech changes the poster\n      this.isPosterFromTech_ = false;\n\n      // Holds callback info that gets queued when playback rate is zero\n      // and a seek is happening\n      this.queuedCallbacks_ = [];\n\n      // Turn off API access because we're loading a new tech that might load asynchronously\n      this.isReady_ = false;\n\n      // Init state hasStarted_\n      this.hasStarted_ = false;\n\n      // Init state userActive_\n      this.userActive_ = false;\n\n      // Init debugEnabled_\n      this.debugEnabled_ = false;\n\n      // Init state audioOnlyMode_\n      this.audioOnlyMode_ = false;\n\n      // Init state audioPosterMode_\n      this.audioPosterMode_ = false;\n\n      // Init state audioOnlyCache_\n      this.audioOnlyCache_ = {\n        controlBarHeight: null,\n        playerHeight: null,\n        hiddenChildren: []\n      };\n\n      // if the global option object was accidentally blown away by\n      // someone, bail early with an informative error\n      if (!this.options_ || !this.options_.techOrder || !this.options_.techOrder.length) {\n        throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\n      }\n\n      // Store the original tag used to set options\n      this.tag = tag;\n\n      // Store the tag attributes used to restore html5 element\n      this.tagAttributes = tag && getAttributes(tag);\n\n      // Update current language\n      this.language(this.options_.language);\n\n      // Update Supported Languages\n      if (options.languages) {\n        // Normalise player option languages to lowercase\n        const languagesToLower = {};\n        Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n          languagesToLower[name.toLowerCase()] = options.languages[name];\n        });\n        this.languages_ = languagesToLower;\n      } else {\n        this.languages_ = Player.prototype.options_.languages;\n      }\n      this.resetCache_();\n\n      // Set poster\n      /** @type string */\n      this.poster_ = options.poster || '';\n\n      // Set controls\n      /** @type {boolean} */\n      this.controls_ = !!options.controls;\n\n      // Original tag settings stored in options\n      // now remove immediately so native controls don't flash.\n      // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n      tag.controls = false;\n      tag.removeAttribute('controls');\n      this.changingSrc_ = false;\n      this.playCallbacks_ = [];\n      this.playTerminatedQueue_ = [];\n\n      // the attribute overrides the option\n      if (tag.hasAttribute('autoplay')) {\n        this.autoplay(true);\n      } else {\n        // otherwise use the setter to validate and\n        // set the correct value.\n        this.autoplay(this.options_.autoplay);\n      }\n\n      // check plugins\n      if (options.plugins) {\n        Object.keys(options.plugins).forEach(name => {\n          if (typeof this[name] !== 'function') {\n            throw new Error(`plugin \"${name}\" does not exist`);\n          }\n        });\n      }\n\n      /*\n       * Store the internal state of scrubbing\n       *\n       * @private\n       * @return {Boolean} True if the user is scrubbing\n       */\n      this.scrubbing_ = false;\n      this.el_ = this.createEl();\n\n      // Make this an evented object and use `el_` as its event bus.\n      evented(this, {\n        eventBusKey: 'el_'\n      });\n\n      // listen to document and player fullscreenchange handlers so we receive those events\n      // before a user can receive them so we can update isFullscreen appropriately.\n      // make sure that we listen to fullscreenchange events before everything else to make sure that\n      // our isFullscreen method is updated properly for internal components as well as external.\n      if (this.fsApi_.requestFullscreen) {\n        on(document, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n        this.on(this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n      }\n      if (this.fluid_) {\n        this.on(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n      }\n      // We also want to pass the original player options to each component and plugin\n      // as well so they don't need to reach back into the player for options later.\n      // We also need to do another copy of this.options_ so we don't end up with\n      // an infinite loop.\n      const playerOptionsCopy = merge$2(this.options_);\n\n      // Load plugins\n      if (options.plugins) {\n        Object.keys(options.plugins).forEach(name => {\n          this[name](options.plugins[name]);\n        });\n      }\n\n      // Enable debug mode to fire debugon event for all plugins.\n      if (options.debug) {\n        this.debug(true);\n      }\n      this.options_.playerOptions = playerOptionsCopy;\n      this.middleware_ = [];\n      this.playbackRates(options.playbackRates);\n      if (options.experimentalSvgIcons) {\n        // Add SVG Sprite to the DOM\n        const parser = new window.DOMParser();\n        const parsedSVG = parser.parseFromString(icons, 'image/svg+xml');\n        const errorNode = parsedSVG.querySelector('parsererror');\n        if (errorNode) {\n          log$1.warn('Failed to load SVG Icons. Falling back to Font Icons.');\n          this.options_.experimentalSvgIcons = null;\n        } else {\n          const sprite = parsedSVG.documentElement;\n          sprite.style.display = 'none';\n          this.el_.appendChild(sprite);\n          this.addClass('vjs-svg-icons-enabled');\n        }\n      }\n      this.initChildren();\n\n      // Set isAudio based on whether or not an audio tag was used\n      this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n      // Update controls className. Can't do this when the controls are initially\n      // set because the element doesn't exist yet.\n      if (this.controls()) {\n        this.addClass('vjs-controls-enabled');\n      } else {\n        this.addClass('vjs-controls-disabled');\n      }\n\n      // Set ARIA label and region role depending on player type\n      this.el_.setAttribute('role', 'region');\n      if (this.isAudio()) {\n        this.el_.setAttribute('aria-label', this.localize('Audio Player'));\n      } else {\n        this.el_.setAttribute('aria-label', this.localize('Video Player'));\n      }\n      if (this.isAudio()) {\n        this.addClass('vjs-audio');\n      }\n\n      // Check if spatial navigation is enabled in the options.\n      // If enabled, instantiate the SpatialNavigation class.\n      if (options.spatialNavigation && options.spatialNavigation.enabled) {\n        this.spatialNavigation = new SpatialNavigation(this);\n        this.addClass('vjs-spatial-navigation-enabled');\n      }\n\n      // TODO: Make this smarter. Toggle user state between touching/mousing\n      // using events, since devices can have both touch and mouse events.\n      // TODO: Make this check be performed again when the window switches between monitors\n      // (See https://github.com/videojs/video.js/issues/5683)\n      if (TOUCH_ENABLED) {\n        this.addClass('vjs-touch-enabled');\n      }\n\n      // iOS Safari has broken hover handling\n      if (!IS_IOS) {\n        this.addClass('vjs-workinghover');\n      }\n\n      // Make player easily findable by ID\n      Player.players[this.id_] = this;\n\n      // Add a major version class to aid css in plugins\n      const majorVersion = version$5.split('.')[0];\n      this.addClass(`vjs-v${majorVersion}`);\n\n      // When the player is first initialized, trigger activity so components\n      // like the control bar show themselves if needed\n      this.userActive(true);\n      this.reportUserActivity();\n      this.one('play', e => this.listenForUserActivity_(e));\n      this.on('keydown', e => this.handleKeyDown(e));\n      this.on('languagechange', e => this.handleLanguagechange(e));\n      this.breakpoints(this.options_.breakpoints);\n      this.responsive(this.options_.responsive);\n\n      // Calling both the audio mode methods after the player is fully\n      // setup to be able to listen to the events triggered by them\n      this.on('ready', () => {\n        // Calling the audioPosterMode method first so that\n        // the audioOnlyMode can take precedence when both options are set to true\n        this.audioPosterMode(this.options_.audioPosterMode);\n        this.audioOnlyMode(this.options_.audioOnlyMode);\n      });\n    }\n\n    /**\n     * Destroys the video player and does any necessary cleanup.\n     *\n     * This is especially helpful if you are dynamically adding and removing videos\n     * to/from the DOM.\n     *\n     * @fires Player#dispose\n     */\n    dispose() {\n      /**\n       * Called when the player is being disposed of.\n       *\n       * @event Player#dispose\n       * @type {Event}\n       */\n      this.trigger('dispose');\n      // prevent dispose from being called twice\n      this.off('dispose');\n\n      // Make sure all player-specific document listeners are unbound. This is\n      off(document, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n      off(document, 'keydown', this.boundFullWindowOnEscKey_);\n      if (this.styleEl_ && this.styleEl_.parentNode) {\n        this.styleEl_.parentNode.removeChild(this.styleEl_);\n        this.styleEl_ = null;\n      }\n\n      // Kill reference to this player\n      Player.players[this.id_] = null;\n      if (this.tag && this.tag.player) {\n        this.tag.player = null;\n      }\n      if (this.el_ && this.el_.player) {\n        this.el_.player = null;\n      }\n      if (this.tech_) {\n        this.tech_.dispose();\n        this.isPosterFromTech_ = false;\n        this.poster_ = '';\n      }\n      if (this.playerElIngest_) {\n        this.playerElIngest_ = null;\n      }\n      if (this.tag) {\n        this.tag = null;\n      }\n      clearCacheForPlayer(this);\n\n      // remove all event handlers for track lists\n      // all tracks and track listeners are removed on\n      // tech dispose\n      ALL.names.forEach(name => {\n        const props = ALL[name];\n        const list = this[props.getterName]();\n\n        // if it is not a native list\n        // we have to manually remove event listeners\n        if (list && list.off) {\n          list.off();\n        }\n      });\n\n      // the actual .el_ is removed here, or replaced if\n      super.dispose({\n        restoreEl: this.options_.restoreEl\n      });\n    }\n\n    /**\n     * Create the `Player`'s DOM element.\n     *\n     * @return {Element}\n     *         The DOM element that gets created.\n     */\n    createEl() {\n      let tag = this.tag;\n      let el;\n      let playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n      const divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n      if (playerElIngest) {\n        el = this.el_ = tag.parentNode;\n      } else if (!divEmbed) {\n        el = this.el_ = super.createEl('div');\n      }\n\n      // Copy over all the attributes from the tag, including ID and class\n      // ID will now reference player box, not the video tag\n      const attrs = getAttributes(tag);\n      if (divEmbed) {\n        el = this.el_ = tag;\n        tag = this.tag = document.createElement('video');\n        while (el.children.length) {\n          tag.appendChild(el.firstChild);\n        }\n        if (!hasClass(el, 'video-js')) {\n          addClass(el, 'video-js');\n        }\n        el.appendChild(tag);\n        playerElIngest = this.playerElIngest_ = el;\n        // move properties over from our custom `video-js` element\n        // to our new `video` element. This will move things like\n        // `src` or `controls` that were set via js before the player\n        // was initialized.\n        Object.keys(el).forEach(k => {\n          try {\n            tag[k] = el[k];\n          } catch (e) {\n            // we got a a property like outerHTML which we can't actually copy, ignore it\n          }\n        });\n      }\n\n      // set tabindex to -1 to remove the video element from the focus order\n      tag.setAttribute('tabindex', '-1');\n      attrs.tabindex = '-1';\n\n      // Workaround for #4583 on Chrome (on Windows) with JAWS.\n      // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\n      // Note that we can't detect if JAWS is being used, but this ARIA attribute\n      // doesn't change behavior of Chrome if JAWS is not being used\n      if (IS_CHROME && IS_WINDOWS) {\n        tag.setAttribute('role', 'application');\n        attrs.role = 'application';\n      }\n\n      // Remove width/height attrs from tag so CSS can make it 100% width/height\n      tag.removeAttribute('width');\n      tag.removeAttribute('height');\n      if ('width' in attrs) {\n        delete attrs.width;\n      }\n      if ('height' in attrs) {\n        delete attrs.height;\n      }\n      Object.getOwnPropertyNames(attrs).forEach(function (attr) {\n        // don't copy over the class attribute to the player element when we're in a div embed\n        // the class is already set up properly in the divEmbed case\n        // and we want to make sure that the `video-js` class doesn't get lost\n        if (!(divEmbed && attr === 'class')) {\n          el.setAttribute(attr, attrs[attr]);\n        }\n        if (divEmbed) {\n          tag.setAttribute(attr, attrs[attr]);\n        }\n      });\n\n      // Update tag id/class for use as HTML5 playback tech\n      // Might think we should do this after embedding in container so .vjs-tech class\n      // doesn't flash 100% width/height, but class only applies with .video-js parent\n      tag.playerId = tag.id;\n      tag.id += '_html5_api';\n      tag.className = 'vjs-tech';\n\n      // Make player findable on elements\n      tag.player = el.player = this;\n      // Default state of video is paused\n      this.addClass('vjs-paused');\n      const deviceClassNames = ['IS_SMART_TV', 'IS_TIZEN', 'IS_WEBOS', 'IS_ANDROID', 'IS_IPAD', 'IS_IPHONE', 'IS_CHROMECAST_RECEIVER'].filter(key => browser[key]).map(key => {\n        return 'vjs-device-' + key.substring(3).toLowerCase().replace(/\\_/g, '-');\n      });\n      this.addClass(...deviceClassNames);\n\n      // Add a style element in the player that we'll use to set the width/height\n      // of the player in a way that's still overridable by CSS, just like the\n      // video element\n      if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n        this.styleEl_ = createStyleElement('vjs-styles-dimensions');\n        const defaultsStyleEl = $('.vjs-styles-defaults');\n        const head = $('head');\n        head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n      }\n      this.fill_ = false;\n      this.fluid_ = false;\n\n      // Pass in the width/height/aspectRatio options which will update the style el\n      this.width(this.options_.width);\n      this.height(this.options_.height);\n      this.fill(this.options_.fill);\n      this.fluid(this.options_.fluid);\n      this.aspectRatio(this.options_.aspectRatio);\n      // support both crossOrigin and crossorigin to reduce confusion and issues around the name\n      this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin);\n\n      // Hide any links within the video/audio tag,\n      // because IE doesn't hide them completely from screen readers.\n      const links = tag.getElementsByTagName('a');\n      for (let i = 0; i < links.length; i++) {\n        const linkEl = links.item(i);\n        addClass(linkEl, 'vjs-hidden');\n        linkEl.setAttribute('hidden', 'hidden');\n      }\n\n      // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n      // keep track of the original for later so we can know if the source originally failed\n      tag.initNetworkState_ = tag.networkState;\n\n      // Wrap video tag in div (el/box) container\n      if (tag.parentNode && !playerElIngest) {\n        tag.parentNode.insertBefore(el, tag);\n      }\n\n      // insert the tag as the first child of the player element\n      // then manually add it to the children array so that this.addChild\n      // will work properly for other components\n      //\n      // Breaks iPhone, fixed in HTML5 setup.\n      prependTo(tag, el);\n      this.children_.unshift(tag);\n\n      // Set lang attr on player to ensure CSS :lang() in consistent with player\n      // if it's been set to something different to the doc\n      this.el_.setAttribute('lang', this.language_);\n      this.el_.setAttribute('translate', 'no');\n      this.el_ = el;\n      return el;\n    }\n\n    /**\n     * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this\n     * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n     * behavior.\n     *\n     * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n     *\n     * @param {string|null} [value]\n     *        The value to set the `Player`'s crossOrigin to. If an argument is\n     *        given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.\n     *\n     * @return {string|null|undefined}\n     *         - The current crossOrigin value of the `Player` when getting.\n     *         - undefined when setting\n     */\n    crossOrigin(value) {\n      // `null` can be set to unset a value\n      if (typeof value === 'undefined') {\n        return this.techGet_('crossOrigin');\n      }\n      if (value !== null && value !== 'anonymous' && value !== 'use-credentials') {\n        log$1.warn(`crossOrigin must be null,  \"anonymous\" or \"use-credentials\", given \"${value}\"`);\n        return;\n      }\n      this.techCall_('setCrossOrigin', value);\n      if (this.posterImage) {\n        this.posterImage.crossOrigin(value);\n      }\n      return;\n    }\n\n    /**\n     * A getter/setter for the `Player`'s width. Returns the player's configured value.\n     * To get the current width use `currentWidth()`.\n     *\n     * @param {number|string} [value]\n     *        CSS value to set the `Player`'s width to.\n     *\n     * @return {number|undefined}\n     *         - The current width of the `Player` when getting.\n     *         - Nothing when setting\n     */\n    width(value) {\n      return this.dimension('width', value);\n    }\n\n    /**\n     * A getter/setter for the `Player`'s height. Returns the player's configured value.\n     * To get the current height use `currentheight()`.\n     *\n     * @param {number|string} [value]\n     *        CSS value to set the `Player`'s height to.\n     *\n     * @return {number|undefined}\n     *         - The current height of the `Player` when getting.\n     *         - Nothing when setting\n     */\n    height(value) {\n      return this.dimension('height', value);\n    }\n\n    /**\n     * A getter/setter for the `Player`'s width & height.\n     *\n     * @param {string} dimension\n     *        This string can be:\n     *        - 'width'\n     *        - 'height'\n     *\n     * @param {number|string} [value]\n     *        Value for dimension specified in the first argument.\n     *\n     * @return {number}\n     *         The dimension arguments value when getting (width/height).\n     */\n    dimension(dimension, value) {\n      const privDimension = dimension + '_';\n      if (value === undefined) {\n        return this[privDimension] || 0;\n      }\n      if (value === '' || value === 'auto') {\n        // If an empty string is given, reset the dimension to be automatic\n        this[privDimension] = undefined;\n        this.updateStyleEl_();\n        return;\n      }\n      const parsedVal = parseFloat(value);\n      if (isNaN(parsedVal)) {\n        log$1.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n        return;\n      }\n      this[privDimension] = parsedVal;\n      this.updateStyleEl_();\n    }\n\n    /**\n     * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\n     *\n     * Turning this on will turn off fill mode.\n     *\n     * @param {boolean} [bool]\n     *        - A value of true adds the class.\n     *        - A value of false removes the class.\n     *        - No value will be a getter.\n     *\n     * @return {boolean|undefined}\n     *         - The value of fluid when getting.\n     *         - `undefined` when setting.\n     */\n    fluid(bool) {\n      if (bool === undefined) {\n        return !!this.fluid_;\n      }\n      this.fluid_ = !!bool;\n      if (isEvented(this)) {\n        this.off(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n      }\n      if (bool) {\n        this.addClass('vjs-fluid');\n        this.fill(false);\n        addEventedCallback(this, () => {\n          this.on(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n        });\n      } else {\n        this.removeClass('vjs-fluid');\n      }\n      this.updateStyleEl_();\n    }\n\n    /**\n     * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\n     *\n     * Turning this on will turn off fluid mode.\n     *\n     * @param {boolean} [bool]\n     *        - A value of true adds the class.\n     *        - A value of false removes the class.\n     *        - No value will be a getter.\n     *\n     * @return {boolean|undefined}\n     *         - The value of fluid when getting.\n     *         - `undefined` when setting.\n     */\n    fill(bool) {\n      if (bool === undefined) {\n        return !!this.fill_;\n      }\n      this.fill_ = !!bool;\n      if (bool) {\n        this.addClass('vjs-fill');\n        this.fluid(false);\n      } else {\n        this.removeClass('vjs-fill');\n      }\n    }\n\n    /**\n     * Get/Set the aspect ratio\n     *\n     * @param {string} [ratio]\n     *        Aspect ratio for player\n     *\n     * @return {string|undefined}\n     *         returns the current aspect ratio when getting\n     */\n\n    /**\n     * A getter/setter for the `Player`'s aspect ratio.\n     *\n     * @param {string} [ratio]\n     *        The value to set the `Player`'s aspect ratio to.\n     *\n     * @return {string|undefined}\n     *         - The current aspect ratio of the `Player` when getting.\n     *         - undefined when setting\n     */\n    aspectRatio(ratio) {\n      if (ratio === undefined) {\n        return this.aspectRatio_;\n      }\n\n      // Check for width:height format\n      if (!/^\\d+\\:\\d+$/.test(ratio)) {\n        throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n      }\n      this.aspectRatio_ = ratio;\n\n      // We're assuming if you set an aspect ratio you want fluid mode,\n      // because in fixed mode you could calculate width and height yourself.\n      this.fluid(true);\n      this.updateStyleEl_();\n    }\n\n    /**\n     * Update styles of the `Player` element (height, width and aspect ratio).\n     *\n     * @private\n     * @listens Tech#loadedmetadata\n     */\n    updateStyleEl_() {\n      if (window.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n        const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n        const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n        const techEl = this.tech_ && this.tech_.el();\n        if (techEl) {\n          if (width >= 0) {\n            techEl.width = width;\n          }\n          if (height >= 0) {\n            techEl.height = height;\n          }\n        }\n        return;\n      }\n      let width;\n      let height;\n      let aspectRatio;\n      let idClass;\n\n      // The aspect ratio is either used directly or to calculate width and height.\n      if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n        // Use any aspectRatio that's been specifically set\n        aspectRatio = this.aspectRatio_;\n      } else if (this.videoWidth() > 0) {\n        // Otherwise try to get the aspect ratio from the video metadata\n        aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n      } else {\n        // Or use a default. The video element's is 2:1, but 16:9 is more common.\n        aspectRatio = '16:9';\n      }\n\n      // Get the ratio as a decimal we can use to calculate dimensions\n      const ratioParts = aspectRatio.split(':');\n      const ratioMultiplier = ratioParts[1] / ratioParts[0];\n      if (this.width_ !== undefined) {\n        // Use any width that's been specifically set\n        width = this.width_;\n      } else if (this.height_ !== undefined) {\n        // Or calculate the width from the aspect ratio if a height has been set\n        width = this.height_ / ratioMultiplier;\n      } else {\n        // Or use the video's metadata, or use the video el's default of 300\n        width = this.videoWidth() || 300;\n      }\n      if (this.height_ !== undefined) {\n        // Use any height that's been specifically set\n        height = this.height_;\n      } else {\n        // Otherwise calculate the height from the ratio and the width\n        height = width * ratioMultiplier;\n      }\n\n      // Ensure the CSS class is valid by starting with an alpha character\n      if (/^[^a-zA-Z]/.test(this.id())) {\n        idClass = 'dimensions-' + this.id();\n      } else {\n        idClass = this.id() + '-dimensions';\n      }\n\n      // Ensure the right class is still on the player for the style element\n      this.addClass(idClass);\n      setTextContent(this.styleEl_, `\n      .${idClass} {\n        width: ${width}px;\n        height: ${height}px;\n      }\n\n      .${idClass}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${ratioMultiplier * 100}%;\n      }\n    `);\n    }\n\n    /**\n     * Load/Create an instance of playback {@link Tech} including element\n     * and API methods. Then append the `Tech` element in `Player` as a child.\n     *\n     * @param {string} techName\n     *        name of the playback technology\n     *\n     * @param {string} source\n     *        video source\n     *\n     * @private\n     */\n    loadTech_(techName, source) {\n      // Pause and remove current playback technology\n      if (this.tech_) {\n        this.unloadTech_();\n      }\n      const titleTechName = toTitleCase$1(techName);\n      const camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1);\n\n      // get rid of the HTML5 video tag as soon as we are using another tech\n      if (titleTechName !== 'Html5' && this.tag) {\n        Tech.getTech('Html5').disposeMediaElement(this.tag);\n        this.tag.player = null;\n        this.tag = null;\n      }\n      this.techName_ = titleTechName;\n\n      // Turn off API access because we're loading a new tech that might load asynchronously\n      this.isReady_ = false;\n      let autoplay = this.autoplay();\n\n      // if autoplay is a string (or `true` with normalizeAutoplay: true) we pass false to the tech\n      // because the player is going to handle autoplay on `loadstart`\n      if (typeof this.autoplay() === 'string' || this.autoplay() === true && this.options_.normalizeAutoplay) {\n        autoplay = false;\n      }\n\n      // Grab tech-specific options from player options and add source and parent element to use.\n      const techOptions = {\n        source,\n        autoplay,\n        'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n        'playerId': this.id(),\n        'techId': `${this.id()}_${camelTechName}_api`,\n        'playsinline': this.options_.playsinline,\n        'preload': this.options_.preload,\n        'loop': this.options_.loop,\n        'disablePictureInPicture': this.options_.disablePictureInPicture,\n        'muted': this.options_.muted,\n        'poster': this.poster(),\n        'language': this.language(),\n        'playerElIngest': this.playerElIngest_ || false,\n        'vtt.js': this.options_['vtt.js'],\n        'canOverridePoster': !!this.options_.techCanOverridePoster,\n        'enableSourceset': this.options_.enableSourceset\n      };\n      ALL.names.forEach(name => {\n        const props = ALL[name];\n        techOptions[props.getterName] = this[props.privateName];\n      });\n      Object.assign(techOptions, this.options_[titleTechName]);\n      Object.assign(techOptions, this.options_[camelTechName]);\n      Object.assign(techOptions, this.options_[techName.toLowerCase()]);\n      if (this.tag) {\n        techOptions.tag = this.tag;\n      }\n      if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\n        techOptions.startTime = this.cache_.currentTime;\n      }\n\n      // Initialize tech instance\n      const TechClass = Tech.getTech(techName);\n      if (!TechClass) {\n        throw new Error(`No Tech named '${titleTechName}' exists! '${titleTechName}' should be registered using videojs.registerTech()'`);\n      }\n      this.tech_ = new TechClass(techOptions);\n\n      // player.triggerReady is always async, so don't need this to be async\n      this.tech_.ready(bind_(this, this.handleTechReady_), true);\n      textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n      // Listen to all HTML5-defined events and trigger them on the player\n      TECH_EVENTS_RETRIGGER.forEach(event => {\n        this.on(this.tech_, event, e => this[`handleTech${toTitleCase$1(event)}_`](e));\n      });\n      Object.keys(TECH_EVENTS_QUEUE).forEach(event => {\n        this.on(this.tech_, event, eventObj => {\n          if (this.tech_.playbackRate() === 0 && this.tech_.seeking()) {\n            this.queuedCallbacks_.push({\n              callback: this[`handleTech${TECH_EVENTS_QUEUE[event]}_`].bind(this),\n              event: eventObj\n            });\n            return;\n          }\n          this[`handleTech${TECH_EVENTS_QUEUE[event]}_`](eventObj);\n        });\n      });\n      this.on(this.tech_, 'loadstart', e => this.handleTechLoadStart_(e));\n      this.on(this.tech_, 'sourceset', e => this.handleTechSourceset_(e));\n      this.on(this.tech_, 'waiting', e => this.handleTechWaiting_(e));\n      this.on(this.tech_, 'ended', e => this.handleTechEnded_(e));\n      this.on(this.tech_, 'seeking', e => this.handleTechSeeking_(e));\n      this.on(this.tech_, 'play', e => this.handleTechPlay_(e));\n      this.on(this.tech_, 'pause', e => this.handleTechPause_(e));\n      this.on(this.tech_, 'durationchange', e => this.handleTechDurationChange_(e));\n      this.on(this.tech_, 'fullscreenchange', (e, data) => this.handleTechFullscreenChange_(e, data));\n      this.on(this.tech_, 'fullscreenerror', (e, err) => this.handleTechFullscreenError_(e, err));\n      this.on(this.tech_, 'enterpictureinpicture', e => this.handleTechEnterPictureInPicture_(e));\n      this.on(this.tech_, 'leavepictureinpicture', e => this.handleTechLeavePictureInPicture_(e));\n      this.on(this.tech_, 'error', e => this.handleTechError_(e));\n      this.on(this.tech_, 'posterchange', e => this.handleTechPosterChange_(e));\n      this.on(this.tech_, 'textdata', e => this.handleTechTextData_(e));\n      this.on(this.tech_, 'ratechange', e => this.handleTechRateChange_(e));\n      this.on(this.tech_, 'loadedmetadata', this.boundUpdateStyleEl_);\n      this.usingNativeControls(this.techGet_('controls'));\n      if (this.controls() && !this.usingNativeControls()) {\n        this.addTechControlsListeners_();\n      }\n\n      // Add the tech element in the DOM if it was not already there\n      // Make sure to not insert the original video element if using Html5\n      if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\n        prependTo(this.tech_.el(), this.el());\n      }\n\n      // Get rid of the original video tag reference after the first tech is loaded\n      if (this.tag) {\n        this.tag.player = null;\n        this.tag = null;\n      }\n    }\n\n    /**\n     * Unload and dispose of the current playback {@link Tech}.\n     *\n     * @private\n     */\n    unloadTech_() {\n      // Save the current text tracks so that we can reuse the same text tracks with the next tech\n      ALL.names.forEach(name => {\n        const props = ALL[name];\n        this[props.privateName] = this[props.getterName]();\n      });\n      this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n      this.isReady_ = false;\n      this.tech_.dispose();\n      this.tech_ = false;\n      if (this.isPosterFromTech_) {\n        this.poster_ = '';\n        this.trigger('posterchange');\n      }\n      this.isPosterFromTech_ = false;\n    }\n\n    /**\n     * Return a reference to the current {@link Tech}.\n     * It will print a warning by default about the danger of using the tech directly\n     * but any argument that is passed in will silence the warning.\n     *\n     * @param {*} [safety]\n     *        Anything passed in to silence the warning\n     *\n     * @return {Tech}\n     *         The Tech\n     */\n    tech(safety) {\n      if (safety === undefined) {\n        log$1.warn('Using the tech directly can be dangerous. I hope you know what you\\'re doing.\\n' + 'See https://github.com/videojs/video.js/issues/2617 for more info.\\n');\n      }\n      return this.tech_;\n    }\n\n    /**\n     * An object that contains Video.js version.\n     *\n     * @typedef {Object} PlayerVersion\n     *\n     * @property {string} 'video.js' - Video.js version\n     */\n\n    /**\n     * Returns an object with Video.js version.\n     *\n     * @return {PlayerVersion}\n     *          An object with Video.js version.\n     */\n    version() {\n      return {\n        'video.js': version$5\n      };\n    }\n\n    /**\n     * Set up click and touch listeners for the playback element\n     *\n     * - On desktops: a click on the video itself will toggle playback\n     * - On mobile devices: a click on the video toggles controls\n     *   which is done by toggling the user state between active and\n     *   inactive\n     * - A tap can signal that a user has become active or has become inactive\n     *   e.g. a quick tap on an iPhone movie should reveal the controls. Another\n     *   quick tap should hide them again (signaling the user is in an inactive\n     *   viewing state)\n     * - In addition to this, we still want the user to be considered inactive after\n     *   a few seconds of inactivity.\n     *\n     * > Note: the only part of iOS interaction we can't mimic with this setup\n     * is a touch and hold on the video element counting as activity in order to\n     * keep the controls showing, but that shouldn't be an issue. A touch and hold\n     * on any controls will still keep the user active\n     *\n     * @private\n     */\n    addTechControlsListeners_() {\n      // Make sure to remove all the previous listeners in case we are called multiple times.\n      this.removeTechControlsListeners_();\n      this.on(this.tech_, 'click', this.boundHandleTechClick_);\n      this.on(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n\n      // If the controls were hidden we don't want that to change without a tap event\n      // so we'll check if the controls were already showing before reporting user\n      // activity\n      this.on(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n      this.on(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n      this.on(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n\n      // The tap listener needs to come after the touchend listener because the tap\n      // listener cancels out any reportedUserActivity when setting userActive(false)\n      this.on(this.tech_, 'tap', this.boundHandleTechTap_);\n    }\n\n    /**\n     * Remove the listeners used for click and tap controls. This is needed for\n     * toggling to controls disabled, where a tap/touch should do nothing.\n     *\n     * @private\n     */\n    removeTechControlsListeners_() {\n      // We don't want to just use `this.off()` because there might be other needed\n      // listeners added by techs that extend this.\n      this.off(this.tech_, 'tap', this.boundHandleTechTap_);\n      this.off(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n      this.off(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n      this.off(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n      this.off(this.tech_, 'click', this.boundHandleTechClick_);\n      this.off(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n    }\n\n    /**\n     * Player waits for the tech to be ready\n     *\n     * @private\n     */\n    handleTechReady_() {\n      this.triggerReady();\n\n      // Keep the same volume as before\n      if (this.cache_.volume) {\n        this.techCall_('setVolume', this.cache_.volume);\n      }\n\n      // Look if the tech found a higher resolution poster while loading\n      this.handleTechPosterChange_();\n\n      // Update the duration if available\n      this.handleTechDurationChange_();\n    }\n\n    /**\n     * Retrigger the `loadstart` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#loadstart\n     * @listens Tech#loadstart\n     * @private\n     */\n    handleTechLoadStart_() {\n      // TODO: Update to use `emptied` event instead. See #1277.\n\n      this.removeClass('vjs-ended', 'vjs-seeking');\n\n      // reset the error state\n      this.error(null);\n\n      // Update the duration\n      this.handleTechDurationChange_();\n      if (!this.paused()) {\n        /**\n         * Fired when the user agent begins looking for media data\n         *\n         * @event Player#loadstart\n         * @type {Event}\n         */\n        this.trigger('loadstart');\n      } else {\n        // reset the hasStarted state\n        this.hasStarted(false);\n        this.trigger('loadstart');\n      }\n\n      // autoplay happens after loadstart for the browser,\n      // so we mimic that behavior\n      this.manualAutoplay_(this.autoplay() === true && this.options_.normalizeAutoplay ? 'play' : this.autoplay());\n    }\n\n    /**\n     * Handle autoplay string values, rather than the typical boolean\n     * values that should be handled by the tech. Note that this is not\n     * part of any specification. Valid values and what they do can be\n     * found on the autoplay getter at Player#autoplay()\n     */\n    manualAutoplay_(type) {\n      if (!this.tech_ || typeof type !== 'string') {\n        return;\n      }\n\n      // Save original muted() value, set muted to true, and attempt to play().\n      // On promise rejection, restore muted from saved value\n      const resolveMuted = () => {\n        const previouslyMuted = this.muted();\n        this.muted(true);\n        const restoreMuted = () => {\n          this.muted(previouslyMuted);\n        };\n\n        // restore muted on play terminatation\n        this.playTerminatedQueue_.push(restoreMuted);\n        const mutedPromise = this.play();\n        if (!isPromise(mutedPromise)) {\n          return;\n        }\n        return mutedPromise.catch(err => {\n          restoreMuted();\n          throw new Error(`Rejection at manualAutoplay. Restoring muted value. ${err ? err : ''}`);\n        });\n      };\n      let promise;\n\n      // if muted defaults to true\n      // the only thing we can do is call play\n      if (type === 'any' && !this.muted()) {\n        promise = this.play();\n        if (isPromise(promise)) {\n          promise = promise.catch(resolveMuted);\n        }\n      } else if (type === 'muted' && !this.muted()) {\n        promise = resolveMuted();\n      } else {\n        promise = this.play();\n      }\n      if (!isPromise(promise)) {\n        return;\n      }\n      return promise.then(() => {\n        this.trigger({\n          type: 'autoplay-success',\n          autoplay: type\n        });\n      }).catch(() => {\n        this.trigger({\n          type: 'autoplay-failure',\n          autoplay: type\n        });\n      });\n    }\n\n    /**\n     * Update the internal source caches so that we return the correct source from\n     * `src()`, `currentSource()`, and `currentSources()`.\n     *\n     * > Note: `currentSources` will not be updated if the source that is passed in exists\n     *         in the current `currentSources` cache.\n     *\n     *\n     * @param {Tech~SourceObject} srcObj\n     *        A string or object source to update our caches to.\n     */\n    updateSourceCaches_(srcObj = '') {\n      let src = srcObj;\n      let type = '';\n      if (typeof src !== 'string') {\n        src = srcObj.src;\n        type = srcObj.type;\n      }\n\n      // make sure all the caches are set to default values\n      // to prevent null checking\n      this.cache_.source = this.cache_.source || {};\n      this.cache_.sources = this.cache_.sources || [];\n\n      // try to get the type of the src that was passed in\n      if (src && !type) {\n        type = findMimetype(this, src);\n      }\n\n      // update `currentSource` cache always\n      this.cache_.source = merge$2({}, srcObj, {\n        src,\n        type\n      });\n      const matchingSources = this.cache_.sources.filter(s => s.src && s.src === src);\n      const sourceElSources = [];\n      const sourceEls = this.$$('source');\n      const matchingSourceEls = [];\n      for (let i = 0; i < sourceEls.length; i++) {\n        const sourceObj = getAttributes(sourceEls[i]);\n        sourceElSources.push(sourceObj);\n        if (sourceObj.src && sourceObj.src === src) {\n          matchingSourceEls.push(sourceObj.src);\n        }\n      }\n\n      // if we have matching source els but not matching sources\n      // the current source cache is not up to date\n      if (matchingSourceEls.length && !matchingSources.length) {\n        this.cache_.sources = sourceElSources;\n        // if we don't have matching source or source els set the\n        // sources cache to the `currentSource` cache\n      } else if (!matchingSources.length) {\n        this.cache_.sources = [this.cache_.source];\n      }\n\n      // update the tech `src` cache\n      this.cache_.src = src;\n    }\n\n    /**\n     * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\n     * causing the media element to reload.\n     *\n     * It will fire for the initial source and each subsequent source.\n     * This event is a custom event from Video.js and is triggered by the {@link Tech}.\n     *\n     * The event object for this event contains a `src` property that will contain the source\n     * that was available when the event was triggered. This is generally only necessary if Video.js\n     * is switching techs while the source was being changed.\n     *\n     * It is also fired when `load` is called on the player (or media element)\n     * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\n     * says that the resource selection algorithm needs to be aborted and restarted.\n     * In this case, it is very likely that the `src` property will be set to the\n     * empty string `\"\"` to indicate we do not know what the source will be but\n     * that it is changing.\n     *\n     * *This event is currently still experimental and may change in minor releases.*\n     * __To use this, pass `enableSourceset` option to the player.__\n     *\n     * @event Player#sourceset\n     * @type {Event}\n     * @prop {string} src\n     *                The source url available when the `sourceset` was triggered.\n     *                It will be an empty string if we cannot know what the source is\n     *                but know that the source will change.\n     */\n    /**\n     * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#sourceset\n     * @listens Tech#sourceset\n     * @private\n     */\n    handleTechSourceset_(event) {\n      // only update the source cache when the source\n      // was not updated using the player api\n      if (!this.changingSrc_) {\n        let updateSourceCaches = src => this.updateSourceCaches_(src);\n        const playerSrc = this.currentSource().src;\n        const eventSrc = event.src;\n\n        // if we have a playerSrc that is not a blob, and a tech src that is a blob\n        if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\n          // if both the tech source and the player source were updated we assume\n          // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\n          if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\n            updateSourceCaches = () => {};\n          }\n        }\n\n        // update the source to the initial source right away\n        // in some cases this will be empty string\n        updateSourceCaches(eventSrc);\n\n        // if the `sourceset` `src` was an empty string\n        // wait for a `loadstart` to update the cache to `currentSrc`.\n        // If a sourceset happens before a `loadstart`, we reset the state\n        if (!event.src) {\n          this.tech_.any(['sourceset', 'loadstart'], e => {\n            // if a sourceset happens before a `loadstart` there\n            // is nothing to do as this `handleTechSourceset_`\n            // will be called again and this will be handled there.\n            if (e.type === 'sourceset') {\n              return;\n            }\n            const techSrc = this.techGet_('currentSrc');\n            this.lastSource_.tech = techSrc;\n            this.updateSourceCaches_(techSrc);\n          });\n        }\n      }\n      this.lastSource_ = {\n        player: this.currentSource().src,\n        tech: event.src\n      };\n      this.trigger({\n        src: event.src,\n        type: 'sourceset'\n      });\n    }\n\n    /**\n     * Add/remove the vjs-has-started class\n     *\n     *\n     * @param {boolean} request\n     *        - true: adds the class\n     *        - false: remove the class\n     *\n     * @return {boolean}\n     *         the boolean value of hasStarted_\n     */\n    hasStarted(request) {\n      if (request === undefined) {\n        // act as getter, if we have no request to change\n        return this.hasStarted_;\n      }\n      if (request === this.hasStarted_) {\n        return;\n      }\n      this.hasStarted_ = request;\n      if (this.hasStarted_) {\n        this.addClass('vjs-has-started');\n      } else {\n        this.removeClass('vjs-has-started');\n      }\n    }\n\n    /**\n     * Fired whenever the media begins or resumes playback\n     *\n     * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\n     * @fires Player#play\n     * @listens Tech#play\n     * @private\n     */\n    handleTechPlay_() {\n      this.removeClass('vjs-ended', 'vjs-paused');\n      this.addClass('vjs-playing');\n\n      // hide the poster when the user hits play\n      this.hasStarted(true);\n      /**\n       * Triggered whenever an {@link Tech#play} event happens. Indicates that\n       * playback has started or resumed.\n       *\n       * @event Player#play\n       * @type {Event}\n       */\n      this.trigger('play');\n    }\n\n    /**\n     * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\n     *\n     * If there were any events queued while the playback rate was zero, fire\n     * those events now.\n     *\n     * @private\n     * @method Player#handleTechRateChange_\n     * @fires Player#ratechange\n     * @listens Tech#ratechange\n     */\n    handleTechRateChange_() {\n      if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n        this.queuedCallbacks_.forEach(queued => queued.callback(queued.event));\n        this.queuedCallbacks_ = [];\n      }\n      this.cache_.lastPlaybackRate = this.tech_.playbackRate();\n      /**\n       * Fires when the playing speed of the audio/video is changed\n       *\n       * @event Player#ratechange\n       * @type {event}\n       */\n      this.trigger('ratechange');\n    }\n\n    /**\n     * Retrigger the `waiting` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#waiting\n     * @listens Tech#waiting\n     * @private\n     */\n    handleTechWaiting_() {\n      this.addClass('vjs-waiting');\n      /**\n       * A readyState change on the DOM element has caused playback to stop.\n       *\n       * @event Player#waiting\n       * @type {Event}\n       */\n      this.trigger('waiting');\n\n      // Browsers may emit a timeupdate event after a waiting event. In order to prevent\n      // premature removal of the waiting class, wait for the time to change.\n      const timeWhenWaiting = this.currentTime();\n      const timeUpdateListener = () => {\n        if (timeWhenWaiting !== this.currentTime()) {\n          this.removeClass('vjs-waiting');\n          this.off('timeupdate', timeUpdateListener);\n        }\n      };\n      this.on('timeupdate', timeUpdateListener);\n    }\n\n    /**\n     * Retrigger the `canplay` event that was triggered by the {@link Tech}.\n     * > Note: This is not consistent between browsers. See #1351\n     *\n     * @fires Player#canplay\n     * @listens Tech#canplay\n     * @private\n     */\n    handleTechCanPlay_() {\n      this.removeClass('vjs-waiting');\n      /**\n       * The media has a readyState of HAVE_FUTURE_DATA or greater.\n       *\n       * @event Player#canplay\n       * @type {Event}\n       */\n      this.trigger('canplay');\n    }\n\n    /**\n     * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#canplaythrough\n     * @listens Tech#canplaythrough\n     * @private\n     */\n    handleTechCanPlayThrough_() {\n      this.removeClass('vjs-waiting');\n      /**\n       * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\n       * entire media file can be played without buffering.\n       *\n       * @event Player#canplaythrough\n       * @type {Event}\n       */\n      this.trigger('canplaythrough');\n    }\n\n    /**\n     * Retrigger the `playing` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#playing\n     * @listens Tech#playing\n     * @private\n     */\n    handleTechPlaying_() {\n      this.removeClass('vjs-waiting');\n      /**\n       * The media is no longer blocked from playback, and has started playing.\n       *\n       * @event Player#playing\n       * @type {Event}\n       */\n      this.trigger('playing');\n    }\n\n    /**\n     * Retrigger the `seeking` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#seeking\n     * @listens Tech#seeking\n     * @private\n     */\n    handleTechSeeking_() {\n      this.addClass('vjs-seeking');\n      /**\n       * Fired whenever the player is jumping to a new time\n       *\n       * @event Player#seeking\n       * @type {Event}\n       */\n      this.trigger('seeking');\n    }\n\n    /**\n     * Retrigger the `seeked` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#seeked\n     * @listens Tech#seeked\n     * @private\n     */\n    handleTechSeeked_() {\n      this.removeClass('vjs-seeking', 'vjs-ended');\n      /**\n       * Fired when the player has finished jumping to a new time\n       *\n       * @event Player#seeked\n       * @type {Event}\n       */\n      this.trigger('seeked');\n    }\n\n    /**\n     * Retrigger the `pause` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#pause\n     * @listens Tech#pause\n     * @private\n     */\n    handleTechPause_() {\n      this.removeClass('vjs-playing');\n      this.addClass('vjs-paused');\n      /**\n       * Fired whenever the media has been paused\n       *\n       * @event Player#pause\n       * @type {Event}\n       */\n      this.trigger('pause');\n    }\n\n    /**\n     * Retrigger the `ended` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#ended\n     * @listens Tech#ended\n     * @private\n     */\n    handleTechEnded_() {\n      this.addClass('vjs-ended');\n      this.removeClass('vjs-waiting');\n      if (this.options_.loop) {\n        this.currentTime(0);\n        this.play();\n      } else if (!this.paused()) {\n        this.pause();\n      }\n\n      /**\n       * Fired when the end of the media resource is reached (currentTime == duration)\n       *\n       * @event Player#ended\n       * @type {Event}\n       */\n      this.trigger('ended');\n    }\n\n    /**\n     * Fired when the duration of the media resource is first known or changed\n     *\n     * @listens Tech#durationchange\n     * @private\n     */\n    handleTechDurationChange_() {\n      this.duration(this.techGet_('duration'));\n    }\n\n    /**\n     * Handle a click on the media element to play/pause\n     *\n     * @param {Event} event\n     *        the event that caused this function to trigger\n     *\n     * @listens Tech#click\n     * @private\n     */\n    handleTechClick_(event) {\n      // When controls are disabled a click should not toggle playback because\n      // the click is considered a control\n      if (!this.controls_) {\n        return;\n      }\n      if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.click === undefined || this.options_.userActions.click !== false) {\n        if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.click === 'function') {\n          this.options_.userActions.click.call(this, event);\n        } else if (this.paused()) {\n          silencePromise(this.play());\n        } else {\n          this.pause();\n        }\n      }\n    }\n\n    /**\n     * Handle a double-click on the media element to enter/exit fullscreen,\n     * or exit documentPictureInPicture mode\n     *\n     * @param {Event} event\n     *        the event that caused this function to trigger\n     *\n     * @listens Tech#dblclick\n     * @private\n     */\n    handleTechDoubleClick_(event) {\n      if (!this.controls_) {\n        return;\n      }\n\n      // we do not want to toggle fullscreen state\n      // when double-clicking inside a control bar or a modal\n      const inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), el => el.contains(event.target));\n      if (!inAllowedEls) {\n        /*\n         * options.userActions.doubleClick\n         *\n         * If `undefined` or `true`, double-click toggles fullscreen if controls are present\n         * Set to `false` to disable double-click handling\n         * Set to a function to substitute an external double-click handler\n         */\n        if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\n          if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\n            this.options_.userActions.doubleClick.call(this, event);\n          } else if (this.isInPictureInPicture() && !document.pictureInPictureElement) {\n            // Checking the presence of `window.documentPictureInPicture.window` complicates\n            // tests, checking `document.pictureInPictureElement` also works. It wouldn't\n            // be null in regular picture in picture.\n            // Exit picture in picture mode. This gesture can't trigger pip on the main window.\n            this.exitPictureInPicture();\n          } else if (this.isFullscreen()) {\n            this.exitFullscreen();\n          } else {\n            this.requestFullscreen();\n          }\n        }\n      }\n    }\n\n    /**\n     * Handle a tap on the media element. It will toggle the user\n     * activity state, which hides and shows the controls.\n     *\n     * @listens Tech#tap\n     * @private\n     */\n    handleTechTap_() {\n      this.userActive(!this.userActive());\n    }\n\n    /**\n     * Handle touch to start\n     *\n     * @listens Tech#touchstart\n     * @private\n     */\n    handleTechTouchStart_() {\n      this.userWasActive = this.userActive();\n    }\n\n    /**\n     * Handle touch to move\n     *\n     * @listens Tech#touchmove\n     * @private\n     */\n    handleTechTouchMove_() {\n      if (this.userWasActive) {\n        this.reportUserActivity();\n      }\n    }\n\n    /**\n     * Handle touch to end\n     *\n     * @param {Event} event\n     *        the touchend event that triggered\n     *        this function\n     *\n     * @listens Tech#touchend\n     * @private\n     */\n    handleTechTouchEnd_(event) {\n      // Stop the mouse events from also happening\n      if (event.cancelable) {\n        event.preventDefault();\n      }\n    }\n\n    /**\n     * @private\n     */\n    toggleFullscreenClass_() {\n      if (this.isFullscreen()) {\n        this.addClass('vjs-fullscreen');\n      } else {\n        this.removeClass('vjs-fullscreen');\n      }\n    }\n\n    /**\n     * when the document fschange event triggers it calls this\n     */\n    documentFullscreenChange_(e) {\n      const targetPlayer = e.target.player;\n\n      // if another player was fullscreen\n      // do a null check for targetPlayer because older firefox's would put document as e.target\n      if (targetPlayer && targetPlayer !== this) {\n        return;\n      }\n      const el = this.el();\n      let isFs = document[this.fsApi_.fullscreenElement] === el;\n      if (!isFs && el.matches) {\n        isFs = el.matches(':' + this.fsApi_.fullscreen);\n      }\n      this.isFullscreen(isFs);\n    }\n\n    /**\n     * Handle Tech Fullscreen Change\n     *\n     * @param {Event} event\n     *        the fullscreenchange event that triggered this function\n     *\n     * @param {Object} data\n     *        the data that was sent with the event\n     *\n     * @private\n     * @listens Tech#fullscreenchange\n     * @fires Player#fullscreenchange\n     */\n    handleTechFullscreenChange_(event, data) {\n      if (data) {\n        if (data.nativeIOSFullscreen) {\n          this.addClass('vjs-ios-native-fs');\n          this.tech_.one('webkitendfullscreen', () => {\n            this.removeClass('vjs-ios-native-fs');\n          });\n        }\n        this.isFullscreen(data.isFullscreen);\n      }\n    }\n    handleTechFullscreenError_(event, err) {\n      this.trigger('fullscreenerror', err);\n    }\n\n    /**\n     * @private\n     */\n    togglePictureInPictureClass_() {\n      if (this.isInPictureInPicture()) {\n        this.addClass('vjs-picture-in-picture');\n      } else {\n        this.removeClass('vjs-picture-in-picture');\n      }\n    }\n\n    /**\n     * Handle Tech Enter Picture-in-Picture.\n     *\n     * @param {Event} event\n     *        the enterpictureinpicture event that triggered this function\n     *\n     * @private\n     * @listens Tech#enterpictureinpicture\n     */\n    handleTechEnterPictureInPicture_(event) {\n      this.isInPictureInPicture(true);\n    }\n\n    /**\n     * Handle Tech Leave Picture-in-Picture.\n     *\n     * @param {Event} event\n     *        the leavepictureinpicture event that triggered this function\n     *\n     * @private\n     * @listens Tech#leavepictureinpicture\n     */\n    handleTechLeavePictureInPicture_(event) {\n      this.isInPictureInPicture(false);\n    }\n\n    /**\n     * Fires when an error occurred during the loading of an audio/video.\n     *\n     * @private\n     * @listens Tech#error\n     */\n    handleTechError_() {\n      const error = this.tech_.error();\n      if (error) {\n        this.error(error);\n      }\n    }\n\n    /**\n     * Retrigger the `textdata` event that was triggered by the {@link Tech}.\n     *\n     * @fires Player#textdata\n     * @listens Tech#textdata\n     * @private\n     */\n    handleTechTextData_() {\n      let data = null;\n      if (arguments.length > 1) {\n        data = arguments[1];\n      }\n\n      /**\n       * Fires when we get a textdata event from tech\n       *\n       * @event Player#textdata\n       * @type {Event}\n       */\n      this.trigger('textdata', data);\n    }\n\n    /**\n     * Get object for cached values.\n     *\n     * @return {Object}\n     *         get the current object cache\n     */\n    getCache() {\n      return this.cache_;\n    }\n\n    /**\n     * Resets the internal cache object.\n     *\n     * Using this function outside the player constructor or reset method may\n     * have unintended side-effects.\n     *\n     * @private\n     */\n    resetCache_() {\n      this.cache_ = {\n        // Right now, the currentTime is not _really_ cached because it is always\n        // retrieved from the tech (see: currentTime). However, for completeness,\n        // we set it to zero here to ensure that if we do start actually caching\n        // it, we reset it along with everything else.\n        currentTime: 0,\n        initTime: 0,\n        inactivityTimeout: this.options_.inactivityTimeout,\n        duration: NaN,\n        lastVolume: 1,\n        lastPlaybackRate: this.defaultPlaybackRate(),\n        media: null,\n        src: '',\n        source: {},\n        sources: [],\n        playbackRates: [],\n        volume: 1\n      };\n    }\n\n    /**\n     * Pass values to the playback tech\n     *\n     * @param {string} [method]\n     *        the method to call\n     *\n     * @param {Object} [arg]\n     *        the argument to pass\n     *\n     * @private\n     */\n    techCall_(method, arg) {\n      // If it's not ready yet, call method when it is\n\n      this.ready(function () {\n        if (method in allowedSetters) {\n          return set(this.middleware_, this.tech_, method, arg);\n        } else if (method in allowedMediators) {\n          return mediate(this.middleware_, this.tech_, method, arg);\n        }\n        try {\n          if (this.tech_) {\n            this.tech_[method](arg);\n          }\n        } catch (e) {\n          log$1(e);\n          throw e;\n        }\n      }, true);\n    }\n\n    /**\n     * Mediate attempt to call playback tech method\n     * and return the value of the method called.\n     *\n     * @param {string} method\n     *        Tech method\n     *\n     * @return {*}\n     *         Value returned by the tech method called, undefined if tech\n     *         is not ready or tech method is not present\n     *\n     * @private\n     */\n    techGet_(method) {\n      if (!this.tech_ || !this.tech_.isReady_) {\n        return;\n      }\n      if (method in allowedGetters) {\n        return get(this.middleware_, this.tech_, method);\n      } else if (method in allowedMediators) {\n        return mediate(this.middleware_, this.tech_, method);\n      }\n\n      // Log error when playback tech object is present but method\n      // is undefined or unavailable\n      try {\n        return this.tech_[method]();\n      } catch (e) {\n        // When building additional tech libs, an expected method may not be defined yet\n        if (this.tech_[method] === undefined) {\n          log$1(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n          throw e;\n        }\n\n        // When a method isn't available on the object it throws a TypeError\n        if (e.name === 'TypeError') {\n          log$1(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n          this.tech_.isReady_ = false;\n          throw e;\n        }\n\n        // If error unknown, just log and throw\n        log$1(e);\n        throw e;\n      }\n    }\n\n    /**\n     * Attempt to begin playback at the first opportunity.\n     *\n     * @return {Promise|undefined}\n     *         Returns a promise if the browser supports Promises (or one\n     *         was passed in as an option). This promise will be resolved on\n     *         the return value of play. If this is undefined it will fulfill the\n     *         promise chain otherwise the promise chain will be fulfilled when\n     *         the promise from play is fulfilled.\n     */\n    play() {\n      return new Promise(resolve => {\n        this.play_(resolve);\n      });\n    }\n\n    /**\n     * The actual logic for play, takes a callback that will be resolved on the\n     * return value of play. This allows us to resolve to the play promise if there\n     * is one on modern browsers.\n     *\n     * @private\n     * @param {Function} [callback]\n     *        The callback that should be called when the techs play is actually called\n     */\n    play_(callback = silencePromise) {\n      this.playCallbacks_.push(callback);\n      const isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc()));\n      const isSafariOrIOS = Boolean(IS_ANY_SAFARI || IS_IOS);\n\n      // treat calls to play_ somewhat like the `one` event function\n      if (this.waitToPlay_) {\n        this.off(['ready', 'loadstart'], this.waitToPlay_);\n        this.waitToPlay_ = null;\n      }\n\n      // if the player/tech is not ready or the src itself is not ready\n      // queue up a call to play on `ready` or `loadstart`\n      if (!this.isReady_ || !isSrcReady) {\n        this.waitToPlay_ = e => {\n          this.play_();\n        };\n        this.one(['ready', 'loadstart'], this.waitToPlay_);\n\n        // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\n        // in that case, we need to prime the video element by calling load so it'll be ready in time\n        if (!isSrcReady && isSafariOrIOS) {\n          this.load();\n        }\n        return;\n      }\n\n      // If the player/tech is ready and we have a source, we can attempt playback.\n      const val = this.techGet_('play');\n\n      // For native playback, reset the progress bar if we get a play call from a replay.\n      const isNativeReplay = isSafariOrIOS && this.hasClass('vjs-ended');\n      if (isNativeReplay) {\n        this.resetProgressBar_();\n      }\n      // play was terminated if the returned value is null\n      if (val === null) {\n        this.runPlayTerminatedQueue_();\n      } else {\n        this.runPlayCallbacks_(val);\n      }\n    }\n\n    /**\n     * These functions will be run when if play is terminated. If play\n     * runPlayCallbacks_ is run these function will not be run. This allows us\n     * to differentiate between a terminated play and an actual call to play.\n     */\n    runPlayTerminatedQueue_() {\n      const queue = this.playTerminatedQueue_.slice(0);\n      this.playTerminatedQueue_ = [];\n      queue.forEach(function (q) {\n        q();\n      });\n    }\n\n    /**\n     * When a callback to play is delayed we have to run these\n     * callbacks when play is actually called on the tech. This function\n     * runs the callbacks that were delayed and accepts the return value\n     * from the tech.\n     *\n     * @param {undefined|Promise} val\n     *        The return value from the tech.\n     */\n    runPlayCallbacks_(val) {\n      const callbacks = this.playCallbacks_.slice(0);\n      this.playCallbacks_ = [];\n      // clear play terminatedQueue since we finished a real play\n      this.playTerminatedQueue_ = [];\n      callbacks.forEach(function (cb) {\n        cb(val);\n      });\n    }\n\n    /**\n     * Pause the video playback\n     */\n    pause() {\n      this.techCall_('pause');\n    }\n\n    /**\n     * Check if the player is paused or has yet to play\n     *\n     * @return {boolean}\n     *         - false: if the media is currently playing\n     *         - true: if media is not currently playing\n     */\n    paused() {\n      // The initial state of paused should be true (in Safari it's actually false)\n      return this.techGet_('paused') === false ? false : true;\n    }\n\n    /**\n     * Get a TimeRange object representing the current ranges of time that the user\n     * has played.\n     *\n     * @return {TimeRange}\n     *         A time range object that represents all the increments of time that have\n     *         been played.\n     */\n    played() {\n      return this.techGet_('played') || createTimeRanges$1(0, 0);\n    }\n\n    /**\n     * Sets or returns whether or not the user is \"scrubbing\". Scrubbing is\n     * when the user has clicked the progress bar handle and is\n     * dragging it along the progress bar.\n     *\n     * @param {boolean} [isScrubbing]\n     *        whether the user is or is not scrubbing\n     *\n     * @return {boolean|undefined}\n     *         - The value of scrubbing when getting\n     *         - Nothing when setting\n     */\n    scrubbing(isScrubbing) {\n      if (typeof isScrubbing === 'undefined') {\n        return this.scrubbing_;\n      }\n      this.scrubbing_ = !!isScrubbing;\n      this.techCall_('setScrubbing', this.scrubbing_);\n      if (isScrubbing) {\n        this.addClass('vjs-scrubbing');\n      } else {\n        this.removeClass('vjs-scrubbing');\n      }\n    }\n\n    /**\n     * Get or set the current time (in seconds)\n     *\n     * @param {number|string} [seconds]\n     *        The time to seek to in seconds\n     *\n     * @return {number|undefined}\n     *         - the current time in seconds when getting\n     *         - Nothing when setting\n     */\n    currentTime(seconds) {\n      if (seconds === undefined) {\n        // cache last currentTime and return. default to 0 seconds\n        //\n        // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n        // currentTime when scrubbing, but may not provide much performance benefit after all.\n        // Should be tested. Also something has to read the actual current time or the cache will\n        // never get updated.\n        this.cache_.currentTime = this.techGet_('currentTime') || 0;\n        return this.cache_.currentTime;\n      }\n      if (seconds < 0) {\n        seconds = 0;\n      }\n      if (!this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) {\n        this.cache_.initTime = seconds;\n        this.off('canplay', this.boundApplyInitTime_);\n        this.one('canplay', this.boundApplyInitTime_);\n        return;\n      }\n      this.techCall_('setCurrentTime', seconds);\n      this.cache_.initTime = 0;\n      if (isFinite(seconds)) {\n        this.cache_.currentTime = Number(seconds);\n      }\n    }\n\n    /**\n     * Apply the value of initTime stored in cache as currentTime.\n     *\n     * @private\n     */\n    applyInitTime_() {\n      this.currentTime(this.cache_.initTime);\n    }\n\n    /**\n     * Normally gets the length in time of the video in seconds;\n     * in all but the rarest use cases an argument will NOT be passed to the method\n     *\n     * > **NOTE**: The video must have started loading before the duration can be\n     * known, and depending on preload behaviour may not be known until the video starts\n     * playing.\n     *\n     * @fires Player#durationchange\n     *\n     * @param {number} [seconds]\n     *        The duration of the video to set in seconds\n     *\n     * @return {number|undefined}\n     *         - The duration of the video in seconds when getting\n     *         - Nothing when setting\n     */\n    duration(seconds) {\n      if (seconds === undefined) {\n        // return NaN if the duration is not known\n        return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\n      }\n      seconds = parseFloat(seconds);\n\n      // Standardize on Infinity for signaling video is live\n      if (seconds < 0) {\n        seconds = Infinity;\n      }\n      if (seconds !== this.cache_.duration) {\n        // Cache the last set value for optimized scrubbing\n        this.cache_.duration = seconds;\n        if (seconds === Infinity) {\n          this.addClass('vjs-live');\n        } else {\n          this.removeClass('vjs-live');\n        }\n        if (!isNaN(seconds)) {\n          // Do not fire durationchange unless the duration value is known.\n          // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n          /**\n           * @event Player#durationchange\n           * @type {Event}\n           */\n          this.trigger('durationchange');\n        }\n      }\n    }\n\n    /**\n     * Calculates how much time is left in the video. Not part\n     * of the native video API.\n     *\n     * @return {number}\n     *         The time remaining in seconds\n     */\n    remainingTime() {\n      return this.duration() - this.currentTime();\n    }\n\n    /**\n     * A remaining time function that is intended to be used when\n     * the time is to be displayed directly to the user.\n     *\n     * @return {number}\n     *         The rounded time remaining in seconds\n     */\n    remainingTimeDisplay() {\n      return Math.floor(this.duration()) - Math.floor(this.currentTime());\n    }\n\n    //\n    // Kind of like an array of portions of the video that have been downloaded.\n\n    /**\n     * Get a TimeRange object with an array of the times of the video\n     * that have been downloaded. If you just want the percent of the\n     * video that's been downloaded, use bufferedPercent.\n     *\n     * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\n     *\n     * @return {TimeRange}\n     *         A mock {@link TimeRanges} object (following HTML spec)\n     */\n    buffered() {\n      let buffered = this.techGet_('buffered');\n      if (!buffered || !buffered.length) {\n        buffered = createTimeRanges$1(0, 0);\n      }\n      return buffered;\n    }\n\n    /**\n     * Get the TimeRanges of the media that are currently available\n     * for seeking to.\n     *\n     * @see [Seekable Spec]{@link https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable}\n     *\n     * @return {TimeRange}\n     *         A mock {@link TimeRanges} object (following HTML spec)\n     */\n    seekable() {\n      let seekable = this.techGet_('seekable');\n      if (!seekable || !seekable.length) {\n        seekable = createTimeRanges$1(0, 0);\n      }\n      return seekable;\n    }\n\n    /**\n     * Returns whether the player is in the \"seeking\" state.\n     *\n     * @return {boolean} True if the player is in the seeking state, false if not.\n     */\n    seeking() {\n      return this.techGet_('seeking');\n    }\n\n    /**\n     * Returns whether the player is in the \"ended\" state.\n     *\n     * @return {boolean} True if the player is in the ended state, false if not.\n     */\n    ended() {\n      return this.techGet_('ended');\n    }\n\n    /**\n     * Returns the current state of network activity for the element, from\n     * the codes in the list below.\n     * - NETWORK_EMPTY (numeric value 0)\n     *   The element has not yet been initialised. All attributes are in\n     *   their initial states.\n     * - NETWORK_IDLE (numeric value 1)\n     *   The element's resource selection algorithm is active and has\n     *   selected a resource, but it is not actually using the network at\n     *   this time.\n     * - NETWORK_LOADING (numeric value 2)\n     *   The user agent is actively trying to download data.\n     * - NETWORK_NO_SOURCE (numeric value 3)\n     *   The element's resource selection algorithm is active, but it has\n     *   not yet found a resource to use.\n     *\n     * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n     * @return {number} the current network activity state\n     */\n    networkState() {\n      return this.techGet_('networkState');\n    }\n\n    /**\n     * Returns a value that expresses the current state of the element\n     * with respect to rendering the current playback position, from the\n     * codes in the list below.\n     * - HAVE_NOTHING (numeric value 0)\n     *   No information regarding the media resource is available.\n     * - HAVE_METADATA (numeric value 1)\n     *   Enough of the resource has been obtained that the duration of the\n     *   resource is available.\n     * - HAVE_CURRENT_DATA (numeric value 2)\n     *   Data for the immediate current playback position is available.\n     * - HAVE_FUTURE_DATA (numeric value 3)\n     *   Data for the immediate current playback position is available, as\n     *   well as enough data for the user agent to advance the current\n     *   playback position in the direction of playback.\n     * - HAVE_ENOUGH_DATA (numeric value 4)\n     *   The user agent estimates that enough data is available for\n     *   playback to proceed uninterrupted.\n     *\n     * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n     * @return {number} the current playback rendering state\n     */\n    readyState() {\n      return this.techGet_('readyState');\n    }\n\n    /**\n     * Get the percent (as a decimal) of the video that's been downloaded.\n     * This method is not a part of the native HTML video API.\n     *\n     * @return {number}\n     *         A decimal between 0 and 1 representing the percent\n     *         that is buffered 0 being 0% and 1 being 100%\n     */\n    bufferedPercent() {\n      return bufferedPercent(this.buffered(), this.duration());\n    }\n\n    /**\n     * Get the ending time of the last buffered time range\n     * This is used in the progress bar to encapsulate all time ranges.\n     *\n     * @return {number}\n     *         The end of the last buffered time range\n     */\n    bufferedEnd() {\n      const buffered = this.buffered();\n      const duration = this.duration();\n      let end = buffered.end(buffered.length - 1);\n      if (end > duration) {\n        end = duration;\n      }\n      return end;\n    }\n\n    /**\n     * Get or set the current volume of the media\n     *\n     * @param  {number} [percentAsDecimal]\n     *         The new volume as a decimal percent:\n     *         - 0 is muted/0%/off\n     *         - 1.0 is 100%/full\n     *         - 0.5 is half volume or 50%\n     *\n     * @return {number|undefined}\n     *         The current volume as a percent when getting\n     */\n    volume(percentAsDecimal) {\n      let vol;\n      if (percentAsDecimal !== undefined) {\n        // Force value to between 0 and 1\n        vol = Math.max(0, Math.min(1, percentAsDecimal));\n        this.cache_.volume = vol;\n        this.techCall_('setVolume', vol);\n        if (vol > 0) {\n          this.lastVolume_(vol);\n        }\n        return;\n      }\n\n      // Default to 1 when returning current volume.\n      vol = parseFloat(this.techGet_('volume'));\n      return isNaN(vol) ? 1 : vol;\n    }\n\n    /**\n     * Get the current muted state, or turn mute on or off\n     *\n     * @param {boolean} [muted]\n     *        - true to mute\n     *        - false to unmute\n     *\n     * @return {boolean|undefined}\n     *         - true if mute is on and getting\n     *         - false if mute is off and getting\n     *         - nothing if setting\n     */\n    muted(muted) {\n      if (muted !== undefined) {\n        this.techCall_('setMuted', muted);\n        return;\n      }\n      return this.techGet_('muted') || false;\n    }\n\n    /**\n     * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\n     * indicates the state of muted on initial playback.\n     *\n     * ```js\n     *   var myPlayer = videojs('some-player-id');\n     *\n     *   myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n     *\n     *   // get, should be false\n     *   console.log(myPlayer.defaultMuted());\n     *   // set to true\n     *   myPlayer.defaultMuted(true);\n     *   // get should be true\n     *   console.log(myPlayer.defaultMuted());\n     * ```\n     *\n     * @param {boolean} [defaultMuted]\n     *        - true to mute\n     *        - false to unmute\n     *\n     * @return {boolean|undefined}\n     *         - true if defaultMuted is on and getting\n     *         - false if defaultMuted is off and getting\n     *         - Nothing when setting\n     */\n    defaultMuted(defaultMuted) {\n      if (defaultMuted !== undefined) {\n        this.techCall_('setDefaultMuted', defaultMuted);\n      }\n      return this.techGet_('defaultMuted') || false;\n    }\n\n    /**\n     * Get the last volume, or set it\n     *\n     * @param  {number} [percentAsDecimal]\n     *         The new last volume as a decimal percent:\n     *         - 0 is muted/0%/off\n     *         - 1.0 is 100%/full\n     *         - 0.5 is half volume or 50%\n     *\n     * @return {number|undefined}\n     *         - The current value of lastVolume as a percent when getting\n     *         - Nothing when setting\n     *\n     * @private\n     */\n    lastVolume_(percentAsDecimal) {\n      if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\n        this.cache_.lastVolume = percentAsDecimal;\n        return;\n      }\n      return this.cache_.lastVolume;\n    }\n\n    /**\n     * Check if current tech can support native fullscreen\n     * (e.g. with built in controls like iOS)\n     *\n     * @return {boolean}\n     *         if native fullscreen is supported\n     */\n    supportsFullScreen() {\n      return this.techGet_('supportsFullScreen') || false;\n    }\n\n    /**\n     * Check if the player is in fullscreen mode or tell the player that it\n     * is or is not in fullscreen mode.\n     *\n     * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n     * property and instead document.fullscreenElement is used. But isFullscreen is\n     * still a valuable property for internal player workings.\n     *\n     * @param  {boolean} [isFS]\n     *         Set the players current fullscreen state\n     *\n     * @return {boolean|undefined}\n     *         - true if fullscreen is on and getting\n     *         - false if fullscreen is off and getting\n     *         - Nothing when setting\n     */\n    isFullscreen(isFS) {\n      if (isFS !== undefined) {\n        const oldValue = this.isFullscreen_;\n        this.isFullscreen_ = Boolean(isFS);\n\n        // if we changed fullscreen state and we're in prefixed mode, trigger fullscreenchange\n        // this is the only place where we trigger fullscreenchange events for older browsers\n        // fullWindow mode is treated as a prefixed event and will get a fullscreenchange event as well\n        if (this.isFullscreen_ !== oldValue && this.fsApi_.prefixed) {\n          /**\n             * @event Player#fullscreenchange\n             * @type {Event}\n             */\n          this.trigger('fullscreenchange');\n        }\n        this.toggleFullscreenClass_();\n        return;\n      }\n      return this.isFullscreen_;\n    }\n\n    /**\n     * Increase the size of the video to full screen\n     * In some browsers, full screen is not supported natively, so it enters\n     * \"full window mode\", where the video fills the browser window.\n     * In browsers and devices that support native full screen, sometimes the\n     * browser's default controls will be shown, and not the Video.js custom skin.\n     * This includes most mobile devices (iOS, Android) and older versions of\n     * Safari.\n     *\n     * @param  {Object} [fullscreenOptions]\n     *         Override the player fullscreen options\n     *\n     * @fires Player#fullscreenchange\n     */\n    requestFullscreen(fullscreenOptions) {\n      if (this.isInPictureInPicture()) {\n        this.exitPictureInPicture();\n      }\n      const self = this;\n      return new Promise((resolve, reject) => {\n        function offHandler() {\n          self.off('fullscreenerror', errorHandler);\n          self.off('fullscreenchange', changeHandler);\n        }\n        function changeHandler() {\n          offHandler();\n          resolve();\n        }\n        function errorHandler(e, err) {\n          offHandler();\n          reject(err);\n        }\n        self.one('fullscreenchange', changeHandler);\n        self.one('fullscreenerror', errorHandler);\n        const promise = self.requestFullscreenHelper_(fullscreenOptions);\n        if (promise) {\n          promise.then(offHandler, offHandler);\n          promise.then(resolve, reject);\n        }\n      });\n    }\n    requestFullscreenHelper_(fullscreenOptions) {\n      let fsOptions;\n\n      // Only pass fullscreen options to requestFullscreen in spec-compliant browsers.\n      // Use defaults or player configured option unless passed directly to this method.\n      if (!this.fsApi_.prefixed) {\n        fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\n        if (fullscreenOptions !== undefined) {\n          fsOptions = fullscreenOptions;\n        }\n      }\n\n      // This method works as follows:\n      // 1. if a fullscreen api is available, use it\n      //   1. call requestFullscreen with potential options\n      //   2. if we got a promise from above, use it to update isFullscreen()\n      // 2. otherwise, if the tech supports fullscreen, call `enterFullScreen` on it.\n      //   This is particularly used for iPhone, older iPads, and non-safari browser on iOS.\n      // 3. otherwise, use \"fullWindow\" mode\n      if (this.fsApi_.requestFullscreen) {\n        const promise = this.el_[this.fsApi_.requestFullscreen](fsOptions);\n\n        // Even on browsers with promise support this may not return a promise\n        if (promise) {\n          promise.then(() => this.isFullscreen(true), () => this.isFullscreen(false));\n        }\n        return promise;\n      } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n        // we can't take the video.js controls fullscreen but we can go fullscreen\n        // with native controls\n        this.techCall_('enterFullScreen');\n      } else {\n        // fullscreen isn't supported so we'll just stretch the video element to\n        // fill the viewport\n        this.enterFullWindow();\n      }\n    }\n\n    /**\n     * Return the video to its normal size after having been in full screen mode\n     *\n     * @fires Player#fullscreenchange\n     */\n    exitFullscreen() {\n      const self = this;\n      return new Promise((resolve, reject) => {\n        function offHandler() {\n          self.off('fullscreenerror', errorHandler);\n          self.off('fullscreenchange', changeHandler);\n        }\n        function changeHandler() {\n          offHandler();\n          resolve();\n        }\n        function errorHandler(e, err) {\n          offHandler();\n          reject(err);\n        }\n        self.one('fullscreenchange', changeHandler);\n        self.one('fullscreenerror', errorHandler);\n        const promise = self.exitFullscreenHelper_();\n        if (promise) {\n          promise.then(offHandler, offHandler);\n          // map the promise to our resolve/reject methods\n          promise.then(resolve, reject);\n        }\n      });\n    }\n    exitFullscreenHelper_() {\n      if (this.fsApi_.requestFullscreen) {\n        const promise = document[this.fsApi_.exitFullscreen]();\n\n        // Even on browsers with promise support this may not return a promise\n        if (promise) {\n          // we're splitting the promise here, so, we want to catch the\n          // potential error so that this chain doesn't have unhandled errors\n          silencePromise(promise.then(() => this.isFullscreen(false)));\n        }\n        return promise;\n      } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n        this.techCall_('exitFullScreen');\n      } else {\n        this.exitFullWindow();\n      }\n    }\n\n    /**\n     * When fullscreen isn't supported we can stretch the\n     * video container to as wide as the browser will let us.\n     *\n     * @fires Player#enterFullWindow\n     */\n    enterFullWindow() {\n      this.isFullscreen(true);\n      this.isFullWindow = true;\n\n      // Storing original doc overflow value to return to when fullscreen is off\n      this.docOrigOverflow = document.documentElement.style.overflow;\n\n      // Add listener for esc key to exit fullscreen\n      on(document, 'keydown', this.boundFullWindowOnEscKey_);\n\n      // Hide any scroll bars\n      document.documentElement.style.overflow = 'hidden';\n\n      // Apply fullscreen styles\n      addClass(document.body, 'vjs-full-window');\n\n      /**\n       * @event Player#enterFullWindow\n       * @type {Event}\n       */\n      this.trigger('enterFullWindow');\n    }\n\n    /**\n     * Check for call to either exit full window or\n     * full screen on ESC key\n     *\n     * @param {string} event\n     *        Event to check for key press\n     */\n    fullWindowOnEscKey(event) {\n      if (event.key === 'Escape') {\n        if (this.isFullscreen() === true) {\n          if (!this.isFullWindow) {\n            this.exitFullscreen();\n          } else {\n            this.exitFullWindow();\n          }\n        }\n      }\n    }\n\n    /**\n     * Exit full window\n     *\n     * @fires Player#exitFullWindow\n     */\n    exitFullWindow() {\n      this.isFullscreen(false);\n      this.isFullWindow = false;\n      off(document, 'keydown', this.boundFullWindowOnEscKey_);\n\n      // Unhide scroll bars.\n      document.documentElement.style.overflow = this.docOrigOverflow;\n\n      // Remove fullscreen styles\n      removeClass(document.body, 'vjs-full-window');\n\n      // Resize the box, controller, and poster to original sizes\n      // this.positionAll();\n      /**\n       * @event Player#exitFullWindow\n       * @type {Event}\n       */\n      this.trigger('exitFullWindow');\n    }\n\n    /**\n     * Get or set disable Picture-in-Picture mode.\n     *\n     * @param {boolean} [value]\n     *                  - true will disable Picture-in-Picture mode\n     *                  - false will enable Picture-in-Picture mode\n     */\n    disablePictureInPicture(value) {\n      if (value === undefined) {\n        return this.techGet_('disablePictureInPicture');\n      }\n      this.techCall_('setDisablePictureInPicture', value);\n      this.options_.disablePictureInPicture = value;\n      this.trigger('disablepictureinpicturechanged');\n    }\n\n    /**\n     * Check if the player is in Picture-in-Picture mode or tell the player that it\n     * is or is not in Picture-in-Picture mode.\n     *\n     * @param  {boolean} [isPiP]\n     *         Set the players current Picture-in-Picture state\n     *\n     * @return {boolean|undefined}\n     *         - true if Picture-in-Picture is on and getting\n     *         - false if Picture-in-Picture is off and getting\n     *         - nothing if setting\n     */\n    isInPictureInPicture(isPiP) {\n      if (isPiP !== undefined) {\n        this.isInPictureInPicture_ = !!isPiP;\n        this.togglePictureInPictureClass_();\n        return;\n      }\n      return !!this.isInPictureInPicture_;\n    }\n\n    /**\n     * Create a floating video window always on top of other windows so that users may\n     * continue consuming media while they interact with other content sites, or\n     * applications on their device.\n     *\n     * This can use document picture-in-picture or element picture in picture\n     *\n     * Set `enableDocumentPictureInPicture` to `true` to use docPiP on a supported browser\n     * Else set `disablePictureInPicture` to `false` to disable elPiP on a supported browser\n     *\n     *\n     * @see [Spec]{@link https://w3c.github.io/picture-in-picture/}\n     * @see [Spec]{@link https://wicg.github.io/document-picture-in-picture/}\n     *\n     * @fires Player#enterpictureinpicture\n     *\n     * @return {Promise}\n     *         A promise with a Picture-in-Picture window.\n     */\n    requestPictureInPicture() {\n      if (this.options_.enableDocumentPictureInPicture && window.documentPictureInPicture) {\n        const pipContainer = document.createElement(this.el().tagName);\n        pipContainer.classList = this.el().classList;\n        pipContainer.classList.add('vjs-pip-container');\n        if (this.posterImage) {\n          pipContainer.appendChild(this.posterImage.el().cloneNode(true));\n        }\n        if (this.titleBar) {\n          pipContainer.appendChild(this.titleBar.el().cloneNode(true));\n        }\n        pipContainer.appendChild(createEl('p', {\n          className: 'vjs-pip-text'\n        }, {}, this.localize('Playing in picture-in-picture')));\n        return window.documentPictureInPicture.requestWindow({\n          // The aspect ratio won't be correct, Chrome bug https://crbug.com/1407629\n          width: this.videoWidth(),\n          height: this.videoHeight()\n        }).then(pipWindow => {\n          copyStyleSheetsToWindow(pipWindow);\n          this.el_.parentNode.insertBefore(pipContainer, this.el_);\n          pipWindow.document.body.appendChild(this.el_);\n          pipWindow.document.body.classList.add('vjs-pip-window');\n          this.player_.isInPictureInPicture(true);\n          this.player_.trigger({\n            type: 'enterpictureinpicture',\n            pipWindow\n          });\n\n          // Listen for the PiP closing event to move the video back.\n          pipWindow.addEventListener('pagehide', event => {\n            const pipVideo = event.target.querySelector('.video-js');\n            pipContainer.parentNode.replaceChild(pipVideo, pipContainer);\n            this.player_.isInPictureInPicture(false);\n            this.player_.trigger('leavepictureinpicture');\n          });\n          return pipWindow;\n        });\n      }\n      if ('pictureInPictureEnabled' in document && this.disablePictureInPicture() === false) {\n        /**\n         * This event fires when the player enters picture in picture mode\n         *\n         * @event Player#enterpictureinpicture\n         * @type {Event}\n         */\n        return this.techGet_('requestPictureInPicture');\n      }\n      return Promise.reject('No PiP mode is available');\n    }\n\n    /**\n     * Exit Picture-in-Picture mode.\n     *\n     * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n     *\n     * @fires Player#leavepictureinpicture\n     *\n     * @return {Promise}\n     *         A promise.\n     */\n    exitPictureInPicture() {\n      if (window.documentPictureInPicture && window.documentPictureInPicture.window) {\n        // With documentPictureInPicture, Player#leavepictureinpicture is fired in the pagehide handler\n        window.documentPictureInPicture.window.close();\n        return Promise.resolve();\n      }\n      if ('pictureInPictureEnabled' in document) {\n        /**\n         * This event fires when the player leaves picture in picture mode\n         *\n         * @event Player#leavepictureinpicture\n         * @type {Event}\n         */\n        return document.exitPictureInPicture();\n      }\n    }\n\n    /**\n     * Called when this Player has focus and a key gets pressed down, or when\n     * any Component of this player receives a key press that it doesn't handle.\n     * This allows player-wide hotkeys (either as defined below, or optionally\n     * by an external function).\n     *\n     * @param {KeyboardEvent} event\n     *        The `keydown` event that caused this function to be called.\n     *\n     * @listens keydown\n     */\n    handleKeyDown(event) {\n      const {\n        userActions\n      } = this.options_;\n\n      // Bail out if hotkeys are not configured.\n      if (!userActions || !userActions.hotkeys) {\n        return;\n      }\n\n      // Function that determines whether or not to exclude an element from\n      // hotkeys handling.\n      const excludeElement = el => {\n        const tagName = el.tagName.toLowerCase();\n\n        // The first and easiest test is for `contenteditable` elements.\n        if (el.isContentEditable) {\n          return true;\n        }\n\n        // Inputs matching these types will still trigger hotkey handling as\n        // they are not text inputs.\n        const allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\n        if (tagName === 'input') {\n          return allowedInputTypes.indexOf(el.type) === -1;\n        }\n\n        // The final test is by tag name. These tags will be excluded entirely.\n        const excludedTags = ['textarea'];\n        return excludedTags.indexOf(tagName) !== -1;\n      };\n\n      // Bail out if the user is focused on an interactive form element.\n      if (excludeElement(this.el_.ownerDocument.activeElement)) {\n        return;\n      }\n      if (typeof userActions.hotkeys === 'function') {\n        userActions.hotkeys.call(this, event);\n      } else {\n        this.handleHotkeys(event);\n      }\n    }\n\n    /**\n     * Called when this Player receives a hotkey keydown event.\n     * Supported player-wide hotkeys are:\n     *\n     *   f          - toggle fullscreen\n     *   m          - toggle mute\n     *   k or Space - toggle play/pause\n     *\n     * @param {Event} event\n     *        The `keydown` event that caused this function to be called.\n     */\n    handleHotkeys(event) {\n      const hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {};\n\n      // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n      const {\n        fullscreenKey = keydownEvent => event.key.toLowerCase() === 'f',\n        muteKey = keydownEvent => event.key.toLowerCase() === 'm',\n        playPauseKey = keydownEvent => event.key.toLowerCase() === 'k' || event.key.toLowerCase() === ' '\n      } = hotkeys;\n      if (fullscreenKey.call(this, event)) {\n        event.preventDefault();\n        event.stopPropagation();\n        const FSToggle = Component$1.getComponent('FullscreenToggle');\n        if (document[this.fsApi_.fullscreenEnabled] !== false) {\n          FSToggle.prototype.handleClick.call(this, event);\n        }\n      } else if (muteKey.call(this, event)) {\n        event.preventDefault();\n        event.stopPropagation();\n        const MuteToggle = Component$1.getComponent('MuteToggle');\n        MuteToggle.prototype.handleClick.call(this, event);\n      } else if (playPauseKey.call(this, event)) {\n        event.preventDefault();\n        event.stopPropagation();\n        const PlayToggle = Component$1.getComponent('PlayToggle');\n        PlayToggle.prototype.handleClick.call(this, event);\n      }\n    }\n\n    /**\n     * Check whether the player can play a given mimetype\n     *\n     * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\n     *\n     * @param {string} type\n     *        The mimetype to check\n     *\n     * @return {string}\n     *         'probably', 'maybe', or '' (empty string)\n     */\n    canPlayType(type) {\n      let can;\n\n      // Loop through each playback technology in the options order\n      for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n        const techName = j[i];\n        let tech = Tech.getTech(techName);\n\n        // Support old behavior of techs being registered as components.\n        // Remove once that deprecated behavior is removed.\n        if (!tech) {\n          tech = Component$1.getComponent(techName);\n        }\n\n        // Check if the current tech is defined before continuing\n        if (!tech) {\n          log$1.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n          continue;\n        }\n\n        // Check if the browser supports this technology\n        if (tech.isSupported()) {\n          can = tech.canPlayType(type);\n          if (can) {\n            return can;\n          }\n        }\n      }\n      return '';\n    }\n\n    /**\n     * Select source based on tech-order or source-order\n     * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n     * defaults to tech-order selection\n     *\n     * @param {Array} sources\n     *        The sources for a media asset\n     *\n     * @return {Object|boolean}\n     *         Object of source and tech order or false\n     */\n    selectSource(sources) {\n      // Get only the techs specified in `techOrder` that exist and are supported by the\n      // current platform\n      const techs = this.options_.techOrder.map(techName => {\n        return [techName, Tech.getTech(techName)];\n      }).filter(([techName, tech]) => {\n        // Check if the current tech is defined before continuing\n        if (tech) {\n          // Check if the browser supports this technology\n          return tech.isSupported();\n        }\n        log$1.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n        return false;\n      });\n\n      // Iterate over each `innerArray` element once per `outerArray` element and execute\n      // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n      // that value.\n      const findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n        let found;\n        outerArray.some(outerChoice => {\n          return innerArray.some(innerChoice => {\n            found = tester(outerChoice, innerChoice);\n            if (found) {\n              return true;\n            }\n          });\n        });\n        return found;\n      };\n      let foundSourceAndTech;\n      const flip = fn => (a, b) => fn(b, a);\n      const finder = ([techName, tech], source) => {\n        if (tech.canPlaySource(source, this.options_[techName.toLowerCase()])) {\n          return {\n            source,\n            tech: techName\n          };\n        }\n      };\n\n      // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n      // to select from them based on their priority.\n      if (this.options_.sourceOrder) {\n        // Source-first ordering\n        foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n      } else {\n        // Tech-first ordering\n        foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n      }\n      return foundSourceAndTech || false;\n    }\n\n    /**\n     * Executes source setting and getting logic\n     *\n     * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n     *        A SourceObject, an array of SourceObjects, or a string referencing\n     *        a URL to a media source. It is _highly recommended_ that an object\n     *        or array of objects is used here, so that source selection\n     *        algorithms can take the `type` into account.\n     *\n     *        If not provided, this method acts as a getter.\n     * @param {boolean} [isRetry]\n     *        Indicates whether this is being called internally as a result of a retry\n     *\n     * @return {string|undefined}\n     *         If the `source` argument is missing, returns the current source\n     *         URL. Otherwise, returns nothing/undefined.\n     */\n    handleSrc_(source, isRetry) {\n      // getter usage\n      if (typeof source === 'undefined') {\n        return this.cache_.src || '';\n      }\n\n      // Reset retry behavior for new source\n      if (this.resetRetryOnError_) {\n        this.resetRetryOnError_();\n      }\n\n      // filter out invalid sources and turn our source into\n      // an array of source objects\n      const sources = filterSource(source);\n\n      // if a source was passed in then it is invalid because\n      // it was filtered to a zero length Array. So we have to\n      // show an error\n      if (!sources.length) {\n        this.setTimeout(function () {\n          this.error({\n            code: 4,\n            message: this.options_.notSupportedMessage\n          });\n        }, 0);\n        return;\n      }\n\n      // initial sources\n      this.changingSrc_ = true;\n\n      // Only update the cached source list if we are not retrying a new source after error,\n      // since in that case we want to include the failed source(s) in the cache\n      if (!isRetry) {\n        this.cache_.sources = sources;\n      }\n      this.updateSourceCaches_(sources[0]);\n\n      // middlewareSource is the source after it has been changed by middleware\n      setSource(this, sources[0], (middlewareSource, mws) => {\n        this.middleware_ = mws;\n\n        // since sourceSet is async we have to update the cache again after we select a source since\n        // the source that is selected could be out of order from the cache update above this callback.\n        if (!isRetry) {\n          this.cache_.sources = sources;\n        }\n        this.updateSourceCaches_(middlewareSource);\n        const err = this.src_(middlewareSource);\n        if (err) {\n          if (sources.length > 1) {\n            return this.handleSrc_(sources.slice(1));\n          }\n          this.changingSrc_ = false;\n\n          // We need to wrap this in a timeout to give folks a chance to add error event handlers\n          this.setTimeout(function () {\n            this.error({\n              code: 4,\n              message: this.options_.notSupportedMessage\n            });\n          }, 0);\n\n          // we could not find an appropriate tech, but let's still notify the delegate that this is it\n          // this needs a better comment about why this is needed\n          this.triggerReady();\n          return;\n        }\n        setTech(mws, this.tech_);\n      });\n\n      // Try another available source if this one fails before playback.\n      if (sources.length > 1) {\n        const retry = () => {\n          // Remove the error modal\n          this.error(null);\n          this.handleSrc_(sources.slice(1), true);\n        };\n        const stopListeningForErrors = () => {\n          this.off('error', retry);\n        };\n        this.one('error', retry);\n        this.one('playing', stopListeningForErrors);\n        this.resetRetryOnError_ = () => {\n          this.off('error', retry);\n          this.off('playing', stopListeningForErrors);\n        };\n      }\n    }\n\n    /**\n     * Get or set the video source.\n     *\n     * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n     *        A SourceObject, an array of SourceObjects, or a string referencing\n     *        a URL to a media source. It is _highly recommended_ that an object\n     *        or array of objects is used here, so that source selection\n     *        algorithms can take the `type` into account.\n     *\n     *        If not provided, this method acts as a getter.\n     *\n     * @return {string|undefined}\n     *         If the `source` argument is missing, returns the current source\n     *         URL. Otherwise, returns nothing/undefined.\n     */\n    src(source) {\n      return this.handleSrc_(source, false);\n    }\n\n    /**\n     * Set the source object on the tech, returns a boolean that indicates whether\n     * there is a tech that can play the source or not\n     *\n     * @param {Tech~SourceObject} source\n     *        The source object to set on the Tech\n     *\n     * @return {boolean}\n     *         - True if there is no Tech to playback this source\n     *         - False otherwise\n     *\n     * @private\n     */\n    src_(source) {\n      const sourceTech = this.selectSource([source]);\n      if (!sourceTech) {\n        return true;\n      }\n      if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\n        this.changingSrc_ = true;\n        // load this technology with the chosen source\n        this.loadTech_(sourceTech.tech, sourceTech.source);\n        this.tech_.ready(() => {\n          this.changingSrc_ = false;\n        });\n        return false;\n      }\n\n      // wait until the tech is ready to set the source\n      // and set it synchronously if possible (#2326)\n      this.ready(function () {\n        // The setSource tech method was added with source handlers\n        // so older techs won't support it\n        // We need to check the direct prototype for the case where subclasses\n        // of the tech do not support source handlers\n        if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\n          this.techCall_('setSource', source);\n        } else {\n          this.techCall_('src', source.src);\n        }\n        this.changingSrc_ = false;\n      }, true);\n      return false;\n    }\n\n    /**\n     * Add a <source> element to the <video> element.\n     *\n     * @param {string} srcUrl\n     *        The URL of the video source.\n     *\n     * @param {string} [mimeType]\n     *        The MIME type of the video source. Optional but recommended.\n     *\n     * @return {boolean}\n     *         Returns true if the source element was successfully added, false otherwise.\n     */\n    addSourceElement(srcUrl, mimeType) {\n      if (!this.tech_) {\n        return false;\n      }\n      return this.tech_.addSourceElement(srcUrl, mimeType);\n    }\n\n    /**\n     * Remove a <source> element from the <video> element by its URL.\n     *\n     * @param {string} srcUrl\n     *        The URL of the source to remove.\n     *\n     * @return {boolean}\n     *         Returns true if the source element was successfully removed, false otherwise.\n     */\n    removeSourceElement(srcUrl) {\n      if (!this.tech_) {\n        return false;\n      }\n      return this.tech_.removeSourceElement(srcUrl);\n    }\n\n    /**\n     * Begin loading the src data.\n     */\n    load() {\n      // Workaround to use the load method with the VHS.\n      // Does not cover the case when the load method is called directly from the mediaElement.\n      if (this.tech_ && this.tech_.vhs) {\n        this.src(this.currentSource());\n        return;\n      }\n      this.techCall_('load');\n    }\n\n    /**\n     * Reset the player. Loads the first tech in the techOrder,\n     * removes all the text tracks in the existing `tech`,\n     * and calls `reset` on the `tech`.\n     */\n    reset() {\n      if (this.paused()) {\n        this.doReset_();\n      } else {\n        const playPromise = this.play();\n        silencePromise(playPromise.then(() => this.doReset_()));\n      }\n    }\n    doReset_() {\n      if (this.tech_) {\n        this.tech_.clearTracks('text');\n      }\n      this.removeClass('vjs-playing');\n      this.addClass('vjs-paused');\n      this.resetCache_();\n      this.poster('');\n      this.loadTech_(this.options_.techOrder[0], null);\n      this.techCall_('reset');\n      this.resetControlBarUI_();\n      this.error(null);\n      if (this.titleBar) {\n        this.titleBar.update({\n          title: undefined,\n          description: undefined\n        });\n      }\n      if (isEvented(this)) {\n        this.trigger('playerreset');\n      }\n    }\n\n    /**\n     * Reset Control Bar's UI by calling sub-methods that reset\n     * all of Control Bar's components\n     */\n    resetControlBarUI_() {\n      this.resetProgressBar_();\n      this.resetPlaybackRate_();\n      this.resetVolumeBar_();\n    }\n\n    /**\n     * Reset tech's progress so progress bar is reset in the UI\n     */\n    resetProgressBar_() {\n      this.currentTime(0);\n      const {\n        currentTimeDisplay,\n        durationDisplay,\n        progressControl,\n        remainingTimeDisplay\n      } = this.controlBar || {};\n      const {\n        seekBar\n      } = progressControl || {};\n      if (currentTimeDisplay) {\n        currentTimeDisplay.updateContent();\n      }\n      if (durationDisplay) {\n        durationDisplay.updateContent();\n      }\n      if (remainingTimeDisplay) {\n        remainingTimeDisplay.updateContent();\n      }\n      if (seekBar) {\n        seekBar.update();\n        if (seekBar.loadProgressBar) {\n          seekBar.loadProgressBar.update();\n        }\n      }\n    }\n\n    /**\n     * Reset Playback ratio\n     */\n    resetPlaybackRate_() {\n      this.playbackRate(this.defaultPlaybackRate());\n      this.handleTechRateChange_();\n    }\n\n    /**\n     * Reset Volume bar\n     */\n    resetVolumeBar_() {\n      this.volume(1.0);\n      this.trigger('volumechange');\n    }\n\n    /**\n     * Returns all of the current source objects.\n     *\n     * @return {Tech~SourceObject[]}\n     *         The current source objects\n     */\n    currentSources() {\n      const source = this.currentSource();\n      const sources = [];\n\n      // assume `{}` or `{ src }`\n      if (Object.keys(source).length !== 0) {\n        sources.push(source);\n      }\n      return this.cache_.sources || sources;\n    }\n\n    /**\n     * Returns the current source object.\n     *\n     * @return {Tech~SourceObject}\n     *         The current source object\n     */\n    currentSource() {\n      return this.cache_.source || {};\n    }\n\n    /**\n     * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n     * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\n     *\n     * @return {string}\n     *         The current source\n     */\n    currentSrc() {\n      return this.currentSource() && this.currentSource().src || '';\n    }\n\n    /**\n     * Get the current source type e.g. video/mp4\n     * This can allow you rebuild the current source object so that you could load the same\n     * source and tech later\n     *\n     * @return {string}\n     *         The source MIME type\n     */\n    currentType() {\n      return this.currentSource() && this.currentSource().type || '';\n    }\n\n    /**\n     * Get or set the preload attribute\n     *\n     * @param {'none'|'auto'|'metadata'} [value]\n     *        Preload mode to pass to tech\n     *\n     * @return {string|undefined}\n     *         - The preload attribute value when getting\n     *         - Nothing when setting\n     */\n    preload(value) {\n      if (value !== undefined) {\n        this.techCall_('setPreload', value);\n        this.options_.preload = value;\n        return;\n      }\n      return this.techGet_('preload');\n    }\n\n    /**\n     * Get or set the autoplay option. When this is a boolean it will\n     * modify the attribute on the tech. When this is a string the attribute on\n     * the tech will be removed and `Player` will handle autoplay on loadstarts.\n     *\n     * @param {boolean|'play'|'muted'|'any'} [value]\n     *        - true: autoplay using the browser behavior\n     *        - false: do not autoplay\n     *        - 'play': call play() on every loadstart\n     *        - 'muted': call muted() then play() on every loadstart\n     *        - 'any': call play() on every loadstart. if that fails call muted() then play().\n     *        - *: values other than those listed here will be set `autoplay` to true\n     *\n     * @return {boolean|string|undefined}\n     *         - The current value of autoplay when getting\n     *         - Nothing when setting\n     */\n    autoplay(value) {\n      // getter usage\n      if (value === undefined) {\n        return this.options_.autoplay || false;\n      }\n      let techAutoplay;\n\n      // if the value is a valid string set it to that, or normalize `true` to 'play', if need be\n      if (typeof value === 'string' && /(any|play|muted)/.test(value) || value === true && this.options_.normalizeAutoplay) {\n        this.options_.autoplay = value;\n        this.manualAutoplay_(typeof value === 'string' ? value : 'play');\n        techAutoplay = false;\n\n        // any falsy value sets autoplay to false in the browser,\n        // lets do the same\n      } else if (!value) {\n        this.options_.autoplay = false;\n\n        // any other value (ie truthy) sets autoplay to true\n      } else {\n        this.options_.autoplay = true;\n      }\n      techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay;\n\n      // if we don't have a tech then we do not queue up\n      // a setAutoplay call on tech ready. We do this because the\n      // autoplay option will be passed in the constructor and we\n      // do not need to set it twice\n      if (this.tech_) {\n        this.techCall_('setAutoplay', techAutoplay);\n      }\n    }\n\n    /**\n     * Set or unset the playsinline attribute.\n     * Playsinline tells the browser that non-fullscreen playback is preferred.\n     *\n     * @param {boolean} [value]\n     *        - true means that we should try to play inline by default\n     *        - false means that we should use the browser's default playback mode,\n     *          which in most cases is inline. iOS Safari is a notable exception\n     *          and plays fullscreen by default.\n     *\n     * @return {string|undefined}\n     *         - the current value of playsinline\n     *         - Nothing when setting\n     *\n     * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n     */\n    playsinline(value) {\n      if (value !== undefined) {\n        this.techCall_('setPlaysinline', value);\n        this.options_.playsinline = value;\n      }\n      return this.techGet_('playsinline');\n    }\n\n    /**\n     * Get or set the loop attribute on the video element.\n     *\n     * @param {boolean} [value]\n     *        - true means that we should loop the video\n     *        - false means that we should not loop the video\n     *\n     * @return {boolean|undefined}\n     *         - The current value of loop when getting\n     *         - Nothing when setting\n     */\n    loop(value) {\n      if (value !== undefined) {\n        this.techCall_('setLoop', value);\n        this.options_.loop = value;\n        return;\n      }\n      return this.techGet_('loop');\n    }\n\n    /**\n     * Get or set the poster image source url\n     *\n     * @fires Player#posterchange\n     *\n     * @param {string} [src]\n     *        Poster image source URL\n     *\n     * @return {string|undefined}\n     *         - The current value of poster when getting\n     *         - Nothing when setting\n     */\n    poster(src) {\n      if (src === undefined) {\n        return this.poster_;\n      }\n\n      // The correct way to remove a poster is to set as an empty string\n      // other falsey values will throw errors\n      if (!src) {\n        src = '';\n      }\n      if (src === this.poster_) {\n        return;\n      }\n\n      // update the internal poster variable\n      this.poster_ = src;\n\n      // update the tech's poster\n      this.techCall_('setPoster', src);\n      this.isPosterFromTech_ = false;\n\n      // alert components that the poster has been set\n      /**\n       * This event fires when the poster image is changed on the player.\n       *\n       * @event Player#posterchange\n       * @type {Event}\n       */\n      this.trigger('posterchange');\n    }\n\n    /**\n     * Some techs (e.g. YouTube) can provide a poster source in an\n     * asynchronous way. We want the poster component to use this\n     * poster source so that it covers up the tech's controls.\n     * (YouTube's play button). However we only want to use this\n     * source if the player user hasn't set a poster through\n     * the normal APIs.\n     *\n     * @fires Player#posterchange\n     * @listens Tech#posterchange\n     * @private\n     */\n    handleTechPosterChange_() {\n      if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n        const newPoster = this.tech_.poster() || '';\n        if (newPoster !== this.poster_) {\n          this.poster_ = newPoster;\n          this.isPosterFromTech_ = true;\n\n          // Let components know the poster has changed\n          this.trigger('posterchange');\n        }\n      }\n    }\n\n    /**\n     * Get or set whether or not the controls are showing.\n     *\n     * @fires Player#controlsenabled\n     *\n     * @param {boolean} [bool]\n     *        - true to turn controls on\n     *        - false to turn controls off\n     *\n     * @return {boolean|undefined}\n     *         - The current value of controls when getting\n     *         - Nothing when setting\n     */\n    controls(bool) {\n      if (bool === undefined) {\n        return !!this.controls_;\n      }\n      bool = !!bool;\n\n      // Don't trigger a change event unless it actually changed\n      if (this.controls_ === bool) {\n        return;\n      }\n      this.controls_ = bool;\n      if (this.usingNativeControls()) {\n        this.techCall_('setControls', bool);\n      }\n      if (this.controls_) {\n        this.removeClass('vjs-controls-disabled');\n        this.addClass('vjs-controls-enabled');\n        /**\n         * @event Player#controlsenabled\n         * @type {Event}\n         */\n        this.trigger('controlsenabled');\n        if (!this.usingNativeControls()) {\n          this.addTechControlsListeners_();\n        }\n      } else {\n        this.removeClass('vjs-controls-enabled');\n        this.addClass('vjs-controls-disabled');\n        /**\n         * @event Player#controlsdisabled\n         * @type {Event}\n         */\n        this.trigger('controlsdisabled');\n        if (!this.usingNativeControls()) {\n          this.removeTechControlsListeners_();\n        }\n      }\n    }\n\n    /**\n     * Toggle native controls on/off. Native controls are the controls built into\n     * devices (e.g. default iPhone controls) or other techs\n     * (e.g. Vimeo Controls)\n     * **This should only be set by the current tech, because only the tech knows\n     * if it can support native controls**\n     *\n     * @fires Player#usingnativecontrols\n     * @fires Player#usingcustomcontrols\n     *\n     * @param {boolean} [bool]\n     *        - true to turn native controls on\n     *        - false to turn native controls off\n     *\n     * @return {boolean|undefined}\n     *         - The current value of native controls when getting\n     *         - Nothing when setting\n     */\n    usingNativeControls(bool) {\n      if (bool === undefined) {\n        return !!this.usingNativeControls_;\n      }\n      bool = !!bool;\n\n      // Don't trigger a change event unless it actually changed\n      if (this.usingNativeControls_ === bool) {\n        return;\n      }\n      this.usingNativeControls_ = bool;\n      if (this.usingNativeControls_) {\n        this.addClass('vjs-using-native-controls');\n\n        /**\n         * player is using the native device controls\n         *\n         * @event Player#usingnativecontrols\n         * @type {Event}\n         */\n        this.trigger('usingnativecontrols');\n      } else {\n        this.removeClass('vjs-using-native-controls');\n\n        /**\n         * player is using the custom HTML controls\n         *\n         * @event Player#usingcustomcontrols\n         * @type {Event}\n         */\n        this.trigger('usingcustomcontrols');\n      }\n    }\n\n    /**\n     * Set or get the current MediaError\n     *\n     * @fires Player#error\n     *\n     * @param  {MediaError|string|number} [err]\n     *         A MediaError or a string/number to be turned\n     *         into a MediaError\n     *\n     * @return {MediaError|null|undefined}\n     *         - The current MediaError when getting (or null)\n     *         - Nothing when setting\n     */\n    error(err) {\n      if (err === undefined) {\n        return this.error_ || null;\n      }\n\n      // allow hooks to modify error object\n      hooks('beforeerror').forEach(hookFunction => {\n        const newErr = hookFunction(this, err);\n        if (!(isObject$1(newErr) && !Array.isArray(newErr) || typeof newErr === 'string' || typeof newErr === 'number' || newErr === null)) {\n          this.log.error('please return a value that MediaError expects in beforeerror hooks');\n          return;\n        }\n        err = newErr;\n      });\n\n      // Suppress the first error message for no compatible source until\n      // user interaction\n      if (this.options_.suppressNotSupportedError && err && err.code === 4) {\n        const triggerSuppressedError = function () {\n          this.error(err);\n        };\n        this.options_.suppressNotSupportedError = false;\n        this.any(['click', 'touchstart'], triggerSuppressedError);\n        this.one('loadstart', function () {\n          this.off(['click', 'touchstart'], triggerSuppressedError);\n        });\n        return;\n      }\n\n      // restoring to default\n      if (err === null) {\n        this.error_ = null;\n        this.removeClass('vjs-error');\n        if (this.errorDisplay) {\n          this.errorDisplay.close();\n        }\n        return;\n      }\n      this.error_ = new MediaError(err);\n\n      // add the vjs-error classname to the player\n      this.addClass('vjs-error');\n\n      // log the name of the error type and any message\n      // IE11 logs \"[object object]\" and required you to expand message to see error object\n      log$1.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n      /**\n       * @event Player#error\n       * @type {Event}\n       */\n      this.trigger('error');\n\n      // notify hooks of the per player error\n      hooks('error').forEach(hookFunction => hookFunction(this, this.error_));\n      return;\n    }\n\n    /**\n     * Report user activity\n     *\n     * @param {Object} event\n     *        Event object\n     */\n    reportUserActivity(event) {\n      this.userActivity_ = true;\n    }\n\n    /**\n     * Get/set if user is active\n     *\n     * @fires Player#useractive\n     * @fires Player#userinactive\n     *\n     * @param {boolean} [bool]\n     *        - true if the user is active\n     *        - false if the user is inactive\n     *\n     * @return {boolean|undefined}\n     *         - The current value of userActive when getting\n     *         - Nothing when setting\n     */\n    userActive(bool) {\n      if (bool === undefined) {\n        return this.userActive_;\n      }\n      bool = !!bool;\n      if (bool === this.userActive_) {\n        return;\n      }\n      this.userActive_ = bool;\n      if (this.userActive_) {\n        this.userActivity_ = true;\n        this.removeClass('vjs-user-inactive');\n        this.addClass('vjs-user-active');\n        /**\n         * @event Player#useractive\n         * @type {Event}\n         */\n        this.trigger('useractive');\n        return;\n      }\n\n      // Chrome/Safari/IE have bugs where when you change the cursor it can\n      // trigger a mousemove event. This causes an issue when you're hiding\n      // the cursor when the user is inactive, and a mousemove signals user\n      // activity. Making it impossible to go into inactive mode. Specifically\n      // this happens in fullscreen when we really need to hide the cursor.\n      //\n      // When this gets resolved in ALL browsers it can be removed\n      // https://code.google.com/p/chromium/issues/detail?id=103041\n      if (this.tech_) {\n        this.tech_.one('mousemove', function (e) {\n          e.stopPropagation();\n          e.preventDefault();\n        });\n      }\n      this.userActivity_ = false;\n      this.removeClass('vjs-user-active');\n      this.addClass('vjs-user-inactive');\n      /**\n       * @event Player#userinactive\n       * @type {Event}\n       */\n      this.trigger('userinactive');\n    }\n\n    /**\n     * Listen for user activity based on timeout value\n     *\n     * @private\n     */\n    listenForUserActivity_() {\n      let mouseInProgress;\n      let lastMoveX;\n      let lastMoveY;\n      const handleActivity = bind_(this, this.reportUserActivity);\n      const handleMouseMove = function (e) {\n        // #1068 - Prevent mousemove spamming\n        // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n        if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n          lastMoveX = e.screenX;\n          lastMoveY = e.screenY;\n          handleActivity();\n        }\n      };\n      const handleMouseDown = function () {\n        handleActivity();\n        // For as long as the they are touching the device or have their mouse down,\n        // we consider them active even if they're not moving their finger or mouse.\n        // So we want to continue to update that they are active\n        this.clearInterval(mouseInProgress);\n        // Setting userActivity=true now and setting the interval to the same time\n        // as the activityCheck interval (250) should ensure we never miss the\n        // next activityCheck\n        mouseInProgress = this.setInterval(handleActivity, 250);\n      };\n      const handleMouseUpAndMouseLeave = function (event) {\n        handleActivity();\n        // Stop the interval that maintains activity if the mouse/touch is down\n        this.clearInterval(mouseInProgress);\n      };\n\n      // Any mouse movement will be considered user activity\n      this.on('mousedown', handleMouseDown);\n      this.on('mousemove', handleMouseMove);\n      this.on('mouseup', handleMouseUpAndMouseLeave);\n      this.on('mouseleave', handleMouseUpAndMouseLeave);\n      const controlBar = this.getChild('controlBar');\n\n      // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\n      // controlBar would no longer be hidden by default timeout.\n      if (controlBar && !IS_IOS && !IS_ANDROID) {\n        controlBar.on('mouseenter', function (event) {\n          if (this.player().options_.inactivityTimeout !== 0) {\n            this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\n          }\n          this.player().options_.inactivityTimeout = 0;\n        });\n        controlBar.on('mouseleave', function (event) {\n          this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\n        });\n      }\n\n      // Listen for keyboard navigation\n      // Shouldn't need to use inProgress interval because of key repeat\n      this.on('keydown', handleActivity);\n      this.on('keyup', handleActivity);\n\n      // Run an interval every 250 milliseconds instead of stuffing everything into\n      // the mousemove/touchmove function itself, to prevent performance degradation.\n      // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n      // then gets picked up by this loop\n      // http://ejohn.org/blog/learning-from-twitter/\n      let inactivityTimeout;\n\n      /** @this Player */\n      const activityCheck = function () {\n        // Check to see if mouse/touch activity has happened\n        if (!this.userActivity_) {\n          return;\n        }\n\n        // Reset the activity tracker\n        this.userActivity_ = false;\n\n        // If the user state was inactive, set the state to active\n        this.userActive(true);\n\n        // Clear any existing inactivity timeout to start the timer over\n        this.clearTimeout(inactivityTimeout);\n        const timeout = this.options_.inactivityTimeout;\n        if (timeout <= 0) {\n          return;\n        }\n\n        // In <timeout> milliseconds, if no more activity has occurred the\n        // user will be considered inactive\n        inactivityTimeout = this.setTimeout(function () {\n          // Protect against the case where the inactivityTimeout can trigger just\n          // before the next user activity is picked up by the activity check loop\n          // causing a flicker\n          if (!this.userActivity_) {\n            this.userActive(false);\n          }\n        }, timeout);\n      };\n      this.setInterval(activityCheck, 250);\n    }\n\n    /**\n     * Gets or sets the current playback rate. A playback rate of\n     * 1.0 represents normal speed and 0.5 would indicate half-speed\n     * playback, for instance.\n     *\n     * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n     *\n     * @param {number} [rate]\n     *       New playback rate to set.\n     *\n     * @return {number|undefined}\n     *         - The current playback rate when getting or 1.0\n     *         - Nothing when setting\n     */\n    playbackRate(rate) {\n      if (rate !== undefined) {\n        // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\n        // that is registered above\n        this.techCall_('setPlaybackRate', rate);\n        return;\n      }\n      if (this.tech_ && this.tech_.featuresPlaybackRate) {\n        return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\n      }\n      return 1.0;\n    }\n\n    /**\n     * Gets or sets the current default playback rate. A default playback rate of\n     * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\n     * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\n     * not the current playbackRate.\n     *\n     * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\n     *\n     * @param {number} [rate]\n     *       New default playback rate to set.\n     *\n     * @return {number|undefined}\n     *         - The default playback rate when getting or 1.0\n     *         - Nothing when setting\n     */\n    defaultPlaybackRate(rate) {\n      if (rate !== undefined) {\n        return this.techCall_('setDefaultPlaybackRate', rate);\n      }\n      if (this.tech_ && this.tech_.featuresPlaybackRate) {\n        return this.techGet_('defaultPlaybackRate');\n      }\n      return 1.0;\n    }\n\n    /**\n     * Gets or sets the audio flag\n     *\n     * @param {boolean} [bool]\n     *        - true signals that this is an audio player\n     *        - false signals that this is not an audio player\n     *\n     * @return {boolean|undefined}\n     *         - The current value of isAudio when getting\n     *         - Nothing when setting\n     */\n    isAudio(bool) {\n      if (bool !== undefined) {\n        this.isAudio_ = !!bool;\n        return;\n      }\n      return !!this.isAudio_;\n    }\n    updatePlayerHeightOnAudioOnlyMode_() {\n      const controlBar = this.getChild('ControlBar');\n      if (!controlBar || this.audioOnlyCache_.controlBarHeight === controlBar.currentHeight()) {\n        return;\n      }\n      this.audioOnlyCache_.controlBarHeight = controlBar.currentHeight();\n      this.height(this.audioOnlyCache_.controlBarHeight);\n    }\n    enableAudioOnlyUI_() {\n      // Update styling immediately to show the control bar so we can get its height\n      this.addClass('vjs-audio-only-mode');\n      const playerChildren = this.children();\n      const controlBar = this.getChild('ControlBar');\n      const controlBarHeight = controlBar && controlBar.currentHeight();\n\n      // Hide all player components except the control bar. Control bar components\n      // needed only for video are hidden with CSS\n      playerChildren.forEach(child => {\n        if (child === controlBar) {\n          return;\n        }\n        if (child.el_ && !child.hasClass('vjs-hidden')) {\n          child.hide();\n          this.audioOnlyCache_.hiddenChildren.push(child);\n        }\n      });\n      this.audioOnlyCache_.playerHeight = this.currentHeight();\n      this.audioOnlyCache_.controlBarHeight = controlBarHeight;\n      this.on('playerresize', this.boundUpdatePlayerHeightOnAudioOnlyMode_);\n\n      // Set the player height the same as the control bar\n      this.height(controlBarHeight);\n      this.trigger('audioonlymodechange');\n    }\n    disableAudioOnlyUI_() {\n      this.removeClass('vjs-audio-only-mode');\n      this.off('playerresize', this.boundUpdatePlayerHeightOnAudioOnlyMode_);\n\n      // Show player components that were previously hidden\n      this.audioOnlyCache_.hiddenChildren.forEach(child => child.show());\n\n      // Reset player height\n      this.height(this.audioOnlyCache_.playerHeight);\n      this.trigger('audioonlymodechange');\n    }\n\n    /**\n     * Get the current audioOnlyMode state or set audioOnlyMode to true or false.\n     *\n     * Setting this to `true` will hide all player components except the control bar,\n     * as well as control bar components needed only for video.\n     *\n     * @param {boolean} [value]\n     *         The value to set audioOnlyMode to.\n     *\n     * @return {Promise|boolean}\n     *        A Promise is returned when setting the state, and a boolean when getting\n     *        the present state\n     */\n    audioOnlyMode(value) {\n      if (typeof value !== 'boolean' || value === this.audioOnlyMode_) {\n        return this.audioOnlyMode_;\n      }\n      this.audioOnlyMode_ = value;\n\n      // Enable Audio Only Mode\n      if (value) {\n        const exitPromises = [];\n\n        // Fullscreen and PiP are not supported in audioOnlyMode, so exit if we need to.\n        if (this.isInPictureInPicture()) {\n          exitPromises.push(this.exitPictureInPicture());\n        }\n        if (this.isFullscreen()) {\n          exitPromises.push(this.exitFullscreen());\n        }\n        if (this.audioPosterMode()) {\n          exitPromises.push(this.audioPosterMode(false));\n        }\n        return Promise.all(exitPromises).then(() => this.enableAudioOnlyUI_());\n      }\n\n      // Disable Audio Only Mode\n      return Promise.resolve().then(() => this.disableAudioOnlyUI_());\n    }\n    enablePosterModeUI_() {\n      // Hide the video element and show the poster image to enable posterModeUI\n      const tech = this.tech_ && this.tech_;\n      tech.hide();\n      this.addClass('vjs-audio-poster-mode');\n      this.trigger('audiopostermodechange');\n    }\n    disablePosterModeUI_() {\n      // Show the video element and hide the poster image to disable posterModeUI\n      const tech = this.tech_ && this.tech_;\n      tech.show();\n      this.removeClass('vjs-audio-poster-mode');\n      this.trigger('audiopostermodechange');\n    }\n\n    /**\n     * Get the current audioPosterMode state or set audioPosterMode to true or false\n     *\n     * @param {boolean} [value]\n     *         The value to set audioPosterMode to.\n     *\n     * @return {Promise|boolean}\n     *         A Promise is returned when setting the state, and a boolean when getting\n     *        the present state\n     */\n    audioPosterMode(value) {\n      if (typeof value !== 'boolean' || value === this.audioPosterMode_) {\n        return this.audioPosterMode_;\n      }\n      this.audioPosterMode_ = value;\n      if (value) {\n        if (this.audioOnlyMode()) {\n          const audioOnlyModePromise = this.audioOnlyMode(false);\n          return audioOnlyModePromise.then(() => {\n            // enable audio poster mode after audio only mode is disabled\n            this.enablePosterModeUI_();\n          });\n        }\n        return Promise.resolve().then(() => {\n          // enable audio poster mode\n          this.enablePosterModeUI_();\n        });\n      }\n      return Promise.resolve().then(() => {\n        // disable audio poster mode\n        this.disablePosterModeUI_();\n      });\n    }\n\n    /**\n     * A helper method for adding a {@link TextTrack} to our\n     * {@link TextTrackList}.\n     *\n     * In addition to the W3C settings we allow adding additional info through options.\n     *\n     * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n     *\n     * @param {string} [kind]\n     *        the kind of TextTrack you are adding\n     *\n     * @param {string} [label]\n     *        the label to give the TextTrack label\n     *\n     * @param {string} [language]\n     *        the language to set on the TextTrack\n     *\n     * @return {TextTrack|undefined}\n     *         the TextTrack that was added or undefined\n     *         if there is no tech\n     */\n    addTextTrack(kind, label, language) {\n      if (this.tech_) {\n        return this.tech_.addTextTrack(kind, label, language);\n      }\n    }\n\n    /**\n     * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.\n     *\n     * @param {Object} options\n     *        Options to pass to {@link HTMLTrackElement} during creation. See\n     *        {@link HTMLTrackElement} for object properties that you should use.\n     *\n     * @param {boolean} [manualCleanup=false] if set to true, the TextTrack will not be removed\n     *                                        from the TextTrackList and HtmlTrackElementList\n     *                                        after a source change\n     *\n     * @return {HtmlTrackElement}\n     *         the HTMLTrackElement that was created and added\n     *         to the HtmlTrackElementList and the remote\n     *         TextTrackList\n     *\n     */\n    addRemoteTextTrack(options, manualCleanup) {\n      if (this.tech_) {\n        return this.tech_.addRemoteTextTrack(options, manualCleanup);\n      }\n    }\n\n    /**\n     * Remove a remote {@link TextTrack} from the respective\n     * {@link TextTrackList} and {@link HtmlTrackElementList}.\n     *\n     * @param {Object} track\n     *        Remote {@link TextTrack} to remove\n     *\n     * @return {undefined}\n     *         does not return anything\n     */\n    removeRemoteTextTrack(obj = {}) {\n      let {\n        track\n      } = obj;\n      if (!track) {\n        track = obj;\n      }\n\n      // destructure the input into an object with a track argument, defaulting to arguments[0]\n      // default the whole argument to an empty object if nothing was passed in\n\n      if (this.tech_) {\n        return this.tech_.removeRemoteTextTrack(track);\n      }\n    }\n\n    /**\n     * Gets available media playback quality metrics as specified by the W3C's Media\n     * Playback Quality API.\n     *\n     * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n     *\n     * @return {Object|undefined}\n     *         An object with supported media playback quality metrics or undefined if there\n     *         is no tech or the tech does not support it.\n     */\n    getVideoPlaybackQuality() {\n      return this.techGet_('getVideoPlaybackQuality');\n    }\n\n    /**\n     * Get video width\n     *\n     * @return {number}\n     *         current video width\n     */\n    videoWidth() {\n      return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n    }\n\n    /**\n     * Get video height\n     *\n     * @return {number}\n     *         current video height\n     */\n    videoHeight() {\n      return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n    }\n\n    /**\n     * Set or get the player's language code.\n     *\n     * Changing the language will trigger\n     * [languagechange]{@link Player#event:languagechange}\n     * which Components can use to update control text.\n     * ClickableComponent will update its control text by default on\n     * [languagechange]{@link Player#event:languagechange}.\n     *\n     * @fires Player#languagechange\n     *\n     * @param {string} [code]\n     *        the language code to set the player to\n     *\n     * @return {string|undefined}\n     *         - The current language code when getting\n     *         - Nothing when setting\n     */\n    language(code) {\n      if (code === undefined) {\n        return this.language_;\n      }\n      if (this.language_ !== String(code).toLowerCase()) {\n        this.language_ = String(code).toLowerCase();\n\n        // during first init, it's possible some things won't be evented\n        if (isEvented(this)) {\n          /**\n          * fires when the player language change\n          *\n          * @event Player#languagechange\n          * @type {Event}\n          */\n          this.trigger('languagechange');\n        }\n      }\n    }\n\n    /**\n     * Get the player's language dictionary\n     * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n     * Languages specified directly in the player options have precedence\n     *\n     * @return {Array}\n     *         An array of of supported languages\n     */\n    languages() {\n      return merge$2(Player.prototype.options_.languages, this.languages_);\n    }\n\n    /**\n     * returns a JavaScript object representing the current track\n     * information. **DOES not return it as JSON**\n     *\n     * @return {Object}\n     *         Object representing the current of track info\n     */\n    toJSON() {\n      const options = merge$2(this.options_);\n      const tracks = options.tracks;\n      options.tracks = [];\n      for (let i = 0; i < tracks.length; i++) {\n        let track = tracks[i];\n\n        // deep merge tracks and null out player so no circular references\n        track = merge$2(track);\n        track.player = undefined;\n        options.tracks[i] = track;\n      }\n      return options;\n    }\n\n    /**\n     * Creates a simple modal dialog (an instance of the {@link ModalDialog}\n     * component) that immediately overlays the player with arbitrary\n     * content and removes itself when closed.\n     *\n     * @param {string|Function|Element|Array|null} content\n     *        Same as {@link ModalDialog#content}'s param of the same name.\n     *        The most straight-forward usage is to provide a string or DOM\n     *        element.\n     *\n     * @param {Object} [options]\n     *        Extra options which will be passed on to the {@link ModalDialog}.\n     *\n     * @return {ModalDialog}\n     *         the {@link ModalDialog} that was created\n     */\n    createModal(content, options) {\n      options = options || {};\n      options.content = content || '';\n      const modal = new ModalDialog(this, options);\n      this.addChild(modal);\n      modal.on('dispose', () => {\n        this.removeChild(modal);\n      });\n      modal.open();\n      return modal;\n    }\n\n    /**\n     * Change breakpoint classes when the player resizes.\n     *\n     * @private\n     */\n    updateCurrentBreakpoint_() {\n      if (!this.responsive()) {\n        return;\n      }\n      const currentBreakpoint = this.currentBreakpoint();\n      const currentWidth = this.currentWidth();\n      for (let i = 0; i < BREAKPOINT_ORDER.length; i++) {\n        const candidateBreakpoint = BREAKPOINT_ORDER[i];\n        const maxWidth = this.breakpoints_[candidateBreakpoint];\n        if (currentWidth <= maxWidth) {\n          // The current breakpoint did not change, nothing to do.\n          if (currentBreakpoint === candidateBreakpoint) {\n            return;\n          }\n\n          // Only remove a class if there is a current breakpoint.\n          if (currentBreakpoint) {\n            this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\n          }\n          this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\n          this.breakpoint_ = candidateBreakpoint;\n          break;\n        }\n      }\n    }\n\n    /**\n     * Removes the current breakpoint.\n     *\n     * @private\n     */\n    removeCurrentBreakpoint_() {\n      const className = this.currentBreakpointClass();\n      this.breakpoint_ = '';\n      if (className) {\n        this.removeClass(className);\n      }\n    }\n\n    /**\n     * Get or set breakpoints on the player.\n     *\n     * Calling this method with an object or `true` will remove any previous\n     * custom breakpoints and start from the defaults again.\n     *\n     * @param  {Object|boolean} [breakpoints]\n     *         If an object is given, it can be used to provide custom\n     *         breakpoints. If `true` is given, will set default breakpoints.\n     *         If this argument is not given, will simply return the current\n     *         breakpoints.\n     *\n     * @param  {number} [breakpoints.tiny]\n     *         The maximum width for the \"vjs-layout-tiny\" class.\n     *\n     * @param  {number} [breakpoints.xsmall]\n     *         The maximum width for the \"vjs-layout-x-small\" class.\n     *\n     * @param  {number} [breakpoints.small]\n     *         The maximum width for the \"vjs-layout-small\" class.\n     *\n     * @param  {number} [breakpoints.medium]\n     *         The maximum width for the \"vjs-layout-medium\" class.\n     *\n     * @param  {number} [breakpoints.large]\n     *         The maximum width for the \"vjs-layout-large\" class.\n     *\n     * @param  {number} [breakpoints.xlarge]\n     *         The maximum width for the \"vjs-layout-x-large\" class.\n     *\n     * @param  {number} [breakpoints.huge]\n     *         The maximum width for the \"vjs-layout-huge\" class.\n     *\n     * @return {Object}\n     *         An object mapping breakpoint names to maximum width values.\n     */\n    breakpoints(breakpoints) {\n      // Used as a getter.\n      if (breakpoints === undefined) {\n        return Object.assign(this.breakpoints_);\n      }\n      this.breakpoint_ = '';\n      this.breakpoints_ = Object.assign({}, DEFAULT_BREAKPOINTS, breakpoints);\n\n      // When breakpoint definitions change, we need to update the currently\n      // selected breakpoint.\n      this.updateCurrentBreakpoint_();\n\n      // Clone the breakpoints before returning.\n      return Object.assign(this.breakpoints_);\n    }\n\n    /**\n     * Get or set a flag indicating whether or not this player should adjust\n     * its UI based on its dimensions.\n     *\n     * @param  {boolean} [value]\n     *         Should be `true` if the player should adjust its UI based on its\n     *         dimensions; otherwise, should be `false`.\n     *\n     * @return {boolean|undefined}\n     *         Will be `true` if this player should adjust its UI based on its\n     *         dimensions; otherwise, will be `false`.\n     *         Nothing if setting\n     */\n    responsive(value) {\n      // Used as a getter.\n      if (value === undefined) {\n        return this.responsive_;\n      }\n      value = Boolean(value);\n      const current = this.responsive_;\n\n      // Nothing changed.\n      if (value === current) {\n        return;\n      }\n\n      // The value actually changed, set it.\n      this.responsive_ = value;\n\n      // Start listening for breakpoints and set the initial breakpoint if the\n      // player is now responsive.\n      if (value) {\n        this.on('playerresize', this.boundUpdateCurrentBreakpoint_);\n        this.updateCurrentBreakpoint_();\n\n        // Stop listening for breakpoints if the player is no longer responsive.\n      } else {\n        this.off('playerresize', this.boundUpdateCurrentBreakpoint_);\n        this.removeCurrentBreakpoint_();\n      }\n      return value;\n    }\n\n    /**\n     * Get current breakpoint name, if any.\n     *\n     * @return {string}\n     *         If there is currently a breakpoint set, returns a the key from the\n     *         breakpoints object matching it. Otherwise, returns an empty string.\n     */\n    currentBreakpoint() {\n      return this.breakpoint_;\n    }\n\n    /**\n     * Get the current breakpoint class name.\n     *\n     * @return {string}\n     *         The matching class name (e.g. `\"vjs-layout-tiny\"` or\n     *         `\"vjs-layout-large\"`) for the current breakpoint. Empty string if\n     *         there is no current breakpoint.\n     */\n    currentBreakpointClass() {\n      return BREAKPOINT_CLASSES[this.breakpoint_] || '';\n    }\n\n    /**\n     * An object that describes a single piece of media.\n     *\n     * Properties that are not part of this type description will be retained; so,\n     * this can be viewed as a generic metadata storage mechanism as well.\n     *\n     * @see      {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\n     * @typedef  {Object} Player~MediaObject\n     *\n     * @property {string} [album]\n     *           Unused, except if this object is passed to the `MediaSession`\n     *           API.\n     *\n     * @property {string} [artist]\n     *           Unused, except if this object is passed to the `MediaSession`\n     *           API.\n     *\n     * @property {Object[]} [artwork]\n     *           Unused, except if this object is passed to the `MediaSession`\n     *           API. If not specified, will be populated via the `poster`, if\n     *           available.\n     *\n     * @property {string} [poster]\n     *           URL to an image that will display before playback.\n     *\n     * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\n     *           A single source object, an array of source objects, or a string\n     *           referencing a URL to a media source. It is _highly recommended_\n     *           that an object or array of objects is used here, so that source\n     *           selection algorithms can take the `type` into account.\n     *\n     * @property {string} [title]\n     *           Unused, except if this object is passed to the `MediaSession`\n     *           API.\n     *\n     * @property {Object[]} [textTracks]\n     *           An array of objects to be used to create text tracks, following\n     *           the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\n     *           For ease of removal, these will be created as \"remote\" text\n     *           tracks and set to automatically clean up on source changes.\n     *\n     *           These objects may have properties like `src`, `kind`, `label`,\n     *           and `language`, see {@link Tech#createRemoteTextTrack}.\n     */\n\n    /**\n     * Populate the player using a {@link Player~MediaObject|MediaObject}.\n     *\n     * @param  {Player~MediaObject} media\n     *         A media object.\n     *\n     * @param  {Function} ready\n     *         A callback to be called when the player is ready.\n     */\n    loadMedia(media, ready) {\n      if (!media || typeof media !== 'object') {\n        return;\n      }\n      const crossOrigin = this.crossOrigin();\n      this.reset();\n\n      // Clone the media object so it cannot be mutated from outside.\n      this.cache_.media = merge$2(media);\n      const {\n        artist,\n        artwork,\n        description,\n        poster,\n        src,\n        textTracks,\n        title\n      } = this.cache_.media;\n\n      // If `artwork` is not given, create it using `poster`.\n      if (!artwork && poster) {\n        this.cache_.media.artwork = [{\n          src: poster,\n          type: getMimetype(poster)\n        }];\n      }\n      if (crossOrigin) {\n        this.crossOrigin(crossOrigin);\n      }\n      if (src) {\n        this.src(src);\n      }\n      if (poster) {\n        this.poster(poster);\n      }\n      if (Array.isArray(textTracks)) {\n        textTracks.forEach(tt => this.addRemoteTextTrack(tt, false));\n      }\n      if (this.titleBar) {\n        this.titleBar.update({\n          title,\n          description: description || artist || ''\n        });\n      }\n      this.ready(ready);\n    }\n\n    /**\n     * Get a clone of the current {@link Player~MediaObject} for this player.\n     *\n     * If the `loadMedia` method has not been used, will attempt to return a\n     * {@link Player~MediaObject} based on the current state of the player.\n     *\n     * @return {Player~MediaObject}\n     */\n    getMedia() {\n      if (!this.cache_.media) {\n        const poster = this.poster();\n        const src = this.currentSources();\n        const textTracks = Array.prototype.map.call(this.remoteTextTracks(), tt => ({\n          kind: tt.kind,\n          label: tt.label,\n          language: tt.language,\n          src: tt.src\n        }));\n        const media = {\n          src,\n          textTracks\n        };\n        if (poster) {\n          media.poster = poster;\n          media.artwork = [{\n            src: media.poster,\n            type: getMimetype(media.poster)\n          }];\n        }\n        return media;\n      }\n      return merge$2(this.cache_.media);\n    }\n\n    /**\n     * Gets tag settings\n     *\n     * @param {Element} tag\n     *        The player tag\n     *\n     * @return {Object}\n     *         An object containing all of the settings\n     *         for a player tag\n     */\n    static getTagSettings(tag) {\n      const baseOptions = {\n        sources: [],\n        tracks: []\n      };\n      const tagOptions = getAttributes(tag);\n      const dataSetup = tagOptions['data-setup'];\n      if (hasClass(tag, 'vjs-fill')) {\n        tagOptions.fill = true;\n      }\n      if (hasClass(tag, 'vjs-fluid')) {\n        tagOptions.fluid = true;\n      }\n\n      // Check if data-setup attr exists.\n      if (dataSetup !== null) {\n        // Parse options JSON\n        try {\n          // If empty string, make it a parsable json object.\n          Object.assign(tagOptions, JSON.parse(dataSetup || '{}'));\n        } catch (e) {\n          log$1.error('data-setup', e);\n        }\n      }\n      Object.assign(baseOptions, tagOptions);\n\n      // Get tag children settings\n      if (tag.hasChildNodes()) {\n        const children = tag.childNodes;\n        for (let i = 0, j = children.length; i < j; i++) {\n          const child = children[i];\n          // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n          const childName = child.nodeName.toLowerCase();\n          if (childName === 'source') {\n            baseOptions.sources.push(getAttributes(child));\n          } else if (childName === 'track') {\n            baseOptions.tracks.push(getAttributes(child));\n          }\n        }\n      }\n      return baseOptions;\n    }\n\n    /**\n     * Set debug mode to enable/disable logs at info level.\n     *\n     * @param {boolean} enabled\n     * @fires Player#debugon\n     * @fires Player#debugoff\n     * @return {boolean|undefined}\n     */\n    debug(enabled) {\n      if (enabled === undefined) {\n        return this.debugEnabled_;\n      }\n      if (enabled) {\n        this.trigger('debugon');\n        this.previousLogLevel_ = this.log.level;\n        this.log.level('debug');\n        this.debugEnabled_ = true;\n      } else {\n        this.trigger('debugoff');\n        this.log.level(this.previousLogLevel_);\n        this.previousLogLevel_ = undefined;\n        this.debugEnabled_ = false;\n      }\n    }\n\n    /**\n     * Set or get current playback rates.\n     * Takes an array and updates the playback rates menu with the new items.\n     * Pass in an empty array to hide the menu.\n     * Values other than arrays are ignored.\n     *\n     * @fires Player#playbackrateschange\n     * @param {number[]} [newRates]\n     *                   The new rates that the playback rates menu should update to.\n     *                   An empty array will hide the menu\n     * @return {number[]} When used as a getter will return the current playback rates\n     */\n    playbackRates(newRates) {\n      if (newRates === undefined) {\n        return this.cache_.playbackRates;\n      }\n\n      // ignore any value that isn't an array\n      if (!Array.isArray(newRates)) {\n        return;\n      }\n\n      // ignore any arrays that don't only contain numbers\n      if (!newRates.every(rate => typeof rate === 'number')) {\n        return;\n      }\n      this.cache_.playbackRates = newRates;\n\n      /**\n      * fires when the playback rates in a player are changed\n      *\n      * @event Player#playbackrateschange\n      * @type {Event}\n      */\n      this.trigger('playbackrateschange');\n    }\n\n    /**\n     * Reports whether or not a player has a plugin available.\n     *\n     * This does not report whether or not the plugin has ever been initialized\n     * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\n     *\n     * @method hasPlugin\n     * @param  {string}  name\n     *         The name of a plugin.\n     *\n     * @return {boolean}\n     *         Whether or not this player has the requested plugin available.\n     */\n\n    /**\n     * Reports whether or not a player is using a plugin by name.\n     *\n     * For basic plugins, this only reports whether the plugin has _ever_ been\n     * initialized on this player.\n     *\n     * @method Player#usingPlugin\n     * @param  {string} name\n     *         The name of a plugin.\n     *\n     * @return {boolean}\n     *         Whether or not this player is using the requested plugin.\n     */\n  }\n\n  /**\n   * Get the {@link VideoTrackList}\n   *\n   * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\n   *\n   * @return {VideoTrackList}\n   *         the current video track list\n   *\n   * @method Player.prototype.videoTracks\n   */\n\n  /**\n   * Get the {@link AudioTrackList}\n   *\n   * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\n   *\n   * @return {AudioTrackList}\n   *         the current audio track list\n   *\n   * @method Player.prototype.audioTracks\n   */\n\n  /**\n   * Get the {@link TextTrackList}\n   *\n   * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n   *\n   * @return {TextTrackList}\n   *         the current text track list\n   *\n   * @method Player.prototype.textTracks\n   */\n\n  /**\n   * Get the remote {@link TextTrackList}\n   *\n   * @return {TextTrackList}\n   *         The current remote text track list\n   *\n   * @method Player.prototype.remoteTextTracks\n   */\n\n  /**\n   * Get the remote {@link HtmlTrackElementList} tracks.\n   *\n   * @return {HtmlTrackElementList}\n   *         The current remote text track element list\n   *\n   * @method Player.prototype.remoteTextTrackEls\n   */\n\n  ALL.names.forEach(function (name) {\n    const props = ALL[name];\n    Player.prototype[props.getterName] = function () {\n      if (this.tech_) {\n        return this.tech_[props.getterName]();\n      }\n\n      // if we have not yet loadTech_, we create {video,audio,text}Tracks_\n      // these will be passed to the tech during loading\n      this[props.privateName] = this[props.privateName] || new props.ListClass();\n      return this[props.privateName];\n    };\n  });\n\n  /**\n   * Get or set the `Player`'s crossorigin option. For the HTML5 player, this\n   * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n   * behavior.\n   *\n   * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n   *\n   * @param {string} [value]\n   *        The value to set the `Player`'s crossorigin to. If an argument is\n   *        given, must be one of `anonymous` or `use-credentials`.\n   *\n   * @return {string|undefined}\n   *         - The current crossorigin value of the `Player` when getting.\n   *         - undefined when setting\n   */\n  Player.prototype.crossorigin = Player.prototype.crossOrigin;\n\n  /**\n   * Global enumeration of players.\n   *\n   * The keys are the player IDs and the values are either the {@link Player}\n   * instance or `null` for disposed players.\n   *\n   * @type {Object}\n   */\n  Player.players = {};\n  const navigator = window.navigator;\n\n  /*\n   * Player instance options, surfaced using options\n   * options = Player.prototype.options_\n   * Make changes in options, not here.\n   *\n   * @type {Object}\n   * @private\n   */\n  Player.prototype.options_ = {\n    // Default order of fallback technology\n    techOrder: Tech.defaultTechOrder_,\n    html5: {},\n    // enable sourceset by default\n    enableSourceset: true,\n    // default inactivity timeout\n    inactivityTimeout: 2000,\n    // default playback rates\n    playbackRates: [],\n    // Add playback rate selection by adding rates\n    // 'playbackRates': [0.5, 1, 1.5, 2],\n    liveui: false,\n    // Included control sets\n    children: ['mediaLoader', 'posterImage', 'titleBar', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\n    language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\n    // locales and their language translations\n    languages: {},\n    // Default message to show when a video cannot be played.\n    notSupportedMessage: 'No compatible source was found for this media.',\n    normalizeAutoplay: false,\n    fullscreen: {\n      options: {\n        navigationUI: 'hide'\n      }\n    },\n    breakpoints: {},\n    responsive: false,\n    audioOnlyMode: false,\n    audioPosterMode: false,\n    spatialNavigation: {\n      enabled: false,\n      horizontalSeek: false\n    },\n    // Default smooth seeking to false\n    enableSmoothSeeking: false,\n    disableSeekWhileScrubbingOnMobile: false\n  };\n  TECH_EVENTS_RETRIGGER.forEach(function (event) {\n    Player.prototype[`handleTech${toTitleCase$1(event)}_`] = function () {\n      return this.trigger(event);\n    };\n  });\n\n  /**\n   * Fired when the player has initial duration and dimension information\n   *\n   * @event Player#loadedmetadata\n   * @type {Event}\n   */\n\n  /**\n   * Fired when the player has downloaded data at the current playback position\n   *\n   * @event Player#loadeddata\n   * @type {Event}\n   */\n\n  /**\n   * Fired when the current playback position has changed *\n   * During playback this is fired every 15-250 milliseconds, depending on the\n   * playback technology in use.\n   *\n   * @event Player#timeupdate\n   * @type {Event}\n   */\n\n  /**\n   * Fired when the volume changes\n   *\n   * @event Player#volumechange\n   * @type {Event}\n   */\n\n  Component$1.registerComponent('Player', Player);\n\n  /**\n   * @file plugin.js\n   */\n\n  /**\n   * The base plugin name.\n   *\n   * @private\n   * @constant\n   * @type {string}\n   */\n  const BASE_PLUGIN_NAME = 'plugin';\n\n  /**\n   * The key on which a player's active plugins cache is stored.\n   *\n   * @private\n   * @constant\n   * @type     {string}\n   */\n  const PLUGIN_CACHE_KEY = 'activePlugins_';\n\n  /**\n   * Stores registered plugins in a private space.\n   *\n   * @private\n   * @type    {Object}\n   */\n  const pluginStorage = {};\n\n  /**\n   * Reports whether or not a plugin has been registered.\n   *\n   * @private\n   * @param   {string} name\n   *          The name of a plugin.\n   *\n   * @return {boolean}\n   *          Whether or not the plugin has been registered.\n   */\n  const pluginExists = name => pluginStorage.hasOwnProperty(name);\n\n  /**\n   * Get a single registered plugin by name.\n   *\n   * @private\n   * @param   {string} name\n   *          The name of a plugin.\n   *\n   * @return {typeof Plugin|Function|undefined}\n   *          The plugin (or undefined).\n   */\n  const getPlugin = name => pluginExists(name) ? pluginStorage[name] : undefined;\n\n  /**\n   * Marks a plugin as \"active\" on a player.\n   *\n   * Also, ensures that the player has an object for tracking active plugins.\n   *\n   * @private\n   * @param   {Player} player\n   *          A Video.js player instance.\n   *\n   * @param   {string} name\n   *          The name of a plugin.\n   */\n  const markPluginAsActive = (player, name) => {\n    player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\n    player[PLUGIN_CACHE_KEY][name] = true;\n  };\n\n  /**\n   * Triggers a pair of plugin setup events.\n   *\n   * @private\n   * @param  {Player} player\n   *         A Video.js player instance.\n   *\n   * @param  {PluginEventHash} hash\n   *         A plugin event hash.\n   *\n   * @param  {boolean} [before]\n   *         If true, prefixes the event name with \"before\". In other words,\n   *         use this to trigger \"beforepluginsetup\" instead of \"pluginsetup\".\n   */\n  const triggerSetupEvent = (player, hash, before) => {\n    const eventName = (before ? 'before' : '') + 'pluginsetup';\n    player.trigger(eventName, hash);\n    player.trigger(eventName + ':' + hash.name, hash);\n  };\n\n  /**\n   * Takes a basic plugin function and returns a wrapper function which marks\n   * on the player that the plugin has been activated.\n   *\n   * @private\n   * @param   {string} name\n   *          The name of the plugin.\n   *\n   * @param   {Function} plugin\n   *          The basic plugin.\n   *\n   * @return {Function}\n   *          A wrapper function for the given plugin.\n   */\n  const createBasicPlugin = function (name, plugin) {\n    const basicPluginWrapper = function () {\n      // We trigger the \"beforepluginsetup\" and \"pluginsetup\" events on the player\n      // regardless, but we want the hash to be consistent with the hash provided\n      // for advanced plugins.\n      //\n      // The only potentially counter-intuitive thing here is the `instance` in\n      // the \"pluginsetup\" event is the value returned by the `plugin` function.\n      triggerSetupEvent(this, {\n        name,\n        plugin,\n        instance: null\n      }, true);\n      const instance = plugin.apply(this, arguments);\n      markPluginAsActive(this, name);\n      triggerSetupEvent(this, {\n        name,\n        plugin,\n        instance\n      });\n      return instance;\n    };\n    Object.keys(plugin).forEach(function (prop) {\n      basicPluginWrapper[prop] = plugin[prop];\n    });\n    return basicPluginWrapper;\n  };\n\n  /**\n   * Takes a plugin sub-class and returns a factory function for generating\n   * instances of it.\n   *\n   * This factory function will replace itself with an instance of the requested\n   * sub-class of Plugin.\n   *\n   * @private\n   * @param   {string} name\n   *          The name of the plugin.\n   *\n   * @param   {Plugin} PluginSubClass\n   *          The advanced plugin.\n   *\n   * @return {Function}\n   */\n  const createPluginFactory = (name, PluginSubClass) => {\n    // Add a `name` property to the plugin prototype so that each plugin can\n    // refer to itself by name.\n    PluginSubClass.prototype.name = name;\n    return function (...args) {\n      triggerSetupEvent(this, {\n        name,\n        plugin: PluginSubClass,\n        instance: null\n      }, true);\n      const instance = new PluginSubClass(...[this, ...args]);\n\n      // The plugin is replaced by a function that returns the current instance.\n      this[name] = () => instance;\n      triggerSetupEvent(this, instance.getEventHash());\n      return instance;\n    };\n  };\n\n  /**\n   * Parent class for all advanced plugins.\n   *\n   * @mixes   module:evented~EventedMixin\n   * @mixes   module:stateful~StatefulMixin\n   * @fires   Player#beforepluginsetup\n   * @fires   Player#beforepluginsetup:$name\n   * @fires   Player#pluginsetup\n   * @fires   Player#pluginsetup:$name\n   * @listens Player#dispose\n   * @throws  {Error}\n   *          If attempting to instantiate the base {@link Plugin} class\n   *          directly instead of via a sub-class.\n   */\n  class Plugin {\n    /**\n     * Creates an instance of this class.\n     *\n     * Sub-classes should call `super` to ensure plugins are properly initialized.\n     *\n     * @param {Player} player\n     *        A Video.js player instance.\n     */\n    constructor(player) {\n      if (this.constructor === Plugin) {\n        throw new Error('Plugin must be sub-classed; not directly instantiated.');\n      }\n      this.player = player;\n      if (!this.log) {\n        this.log = this.player.log.createLogger(this.name);\n      }\n\n      // Make this object evented, but remove the added `trigger` method so we\n      // use the prototype version instead.\n      evented(this);\n      delete this.trigger;\n      stateful(this, this.constructor.defaultState);\n      markPluginAsActive(player, this.name);\n\n      // Auto-bind the dispose method so we can use it as a listener and unbind\n      // it later easily.\n      this.dispose = this.dispose.bind(this);\n\n      // If the player is disposed, dispose the plugin.\n      player.on('dispose', this.dispose);\n    }\n\n    /**\n     * Get the version of the plugin that was set on <pluginName>.VERSION\n     */\n    version() {\n      return this.constructor.VERSION;\n    }\n\n    /**\n     * Each event triggered by plugins includes a hash of additional data with\n     * conventional properties.\n     *\n     * This returns that object or mutates an existing hash.\n     *\n     * @param   {Object} [hash={}]\n     *          An object to be used as event an event hash.\n     *\n     * @return {PluginEventHash}\n     *          An event hash object with provided properties mixed-in.\n     */\n    getEventHash(hash = {}) {\n      hash.name = this.name;\n      hash.plugin = this.constructor;\n      hash.instance = this;\n      return hash;\n    }\n\n    /**\n     * Triggers an event on the plugin object and overrides\n     * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\n     *\n     * @param   {string|Object} event\n     *          An event type or an object with a type property.\n     *\n     * @param   {Object} [hash={}]\n     *          Additional data hash to merge with a\n     *          {@link PluginEventHash|PluginEventHash}.\n     *\n     * @return {boolean}\n     *          Whether or not default was prevented.\n     */\n    trigger(event, hash = {}) {\n      return trigger(this.eventBusEl_, event, this.getEventHash(hash));\n    }\n\n    /**\n     * Handles \"statechanged\" events on the plugin. No-op by default, override by\n     * subclassing.\n     *\n     * @abstract\n     * @param    {Event} e\n     *           An event object provided by a \"statechanged\" event.\n     *\n     * @param    {Object} e.changes\n     *           An object describing changes that occurred with the \"statechanged\"\n     *           event.\n     */\n    handleStateChanged(e) {}\n\n    /**\n     * Disposes a plugin.\n     *\n     * Subclasses can override this if they want, but for the sake of safety,\n     * it's probably best to subscribe the \"dispose\" event.\n     *\n     * @fires Plugin#dispose\n     */\n    dispose() {\n      const {\n        name,\n        player\n      } = this;\n\n      /**\n       * Signals that a advanced plugin is about to be disposed.\n       *\n       * @event Plugin#dispose\n       * @type  {Event}\n       */\n      this.trigger('dispose');\n      this.off();\n      player.off('dispose', this.dispose);\n\n      // Eliminate any possible sources of leaking memory by clearing up\n      // references between the player and the plugin instance and nulling out\n      // the plugin's state and replacing methods with a function that throws.\n      player[PLUGIN_CACHE_KEY][name] = false;\n      this.player = this.state = null;\n\n      // Finally, replace the plugin name on the player with a new factory\n      // function, so that the plugin is ready to be set up again.\n      player[name] = createPluginFactory(name, pluginStorage[name]);\n    }\n\n    /**\n     * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\n     *\n     * @param   {string|Function} plugin\n     *          If a string, matches the name of a plugin. If a function, will be\n     *          tested directly.\n     *\n     * @return {boolean}\n     *          Whether or not a plugin is a basic plugin.\n     */\n    static isBasic(plugin) {\n      const p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\n      return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\n    }\n\n    /**\n     * Register a Video.js plugin.\n     *\n     * @param   {string} name\n     *          The name of the plugin to be registered. Must be a string and\n     *          must not match an existing plugin or a method on the `Player`\n     *          prototype.\n     *\n     * @param   {typeof Plugin|Function} plugin\n     *          A sub-class of `Plugin` or a function for basic plugins.\n     *\n     * @return {typeof Plugin|Function}\n     *          For advanced plugins, a factory function for that plugin. For\n     *          basic plugins, a wrapper function that initializes the plugin.\n     */\n    static registerPlugin(name, plugin) {\n      if (typeof name !== 'string') {\n        throw new Error(`Illegal plugin name, \"${name}\", must be a string, was ${typeof name}.`);\n      }\n      if (pluginExists(name)) {\n        log$1.warn(`A plugin named \"${name}\" already exists. You may want to avoid re-registering plugins!`);\n      } else if (Player.prototype.hasOwnProperty(name)) {\n        throw new Error(`Illegal plugin name, \"${name}\", cannot share a name with an existing player method!`);\n      }\n      if (typeof plugin !== 'function') {\n        throw new Error(`Illegal plugin for \"${name}\", must be a function, was ${typeof plugin}.`);\n      }\n      pluginStorage[name] = plugin;\n\n      // Add a player prototype method for all sub-classed plugins (but not for\n      // the base Plugin class).\n      if (name !== BASE_PLUGIN_NAME) {\n        if (Plugin.isBasic(plugin)) {\n          Player.prototype[name] = createBasicPlugin(name, plugin);\n        } else {\n          Player.prototype[name] = createPluginFactory(name, plugin);\n        }\n      }\n      return plugin;\n    }\n\n    /**\n     * De-register a Video.js plugin.\n     *\n     * @param  {string} name\n     *         The name of the plugin to be de-registered. Must be a string that\n     *         matches an existing plugin.\n     *\n     * @throws {Error}\n     *         If an attempt is made to de-register the base plugin.\n     */\n    static deregisterPlugin(name) {\n      if (name === BASE_PLUGIN_NAME) {\n        throw new Error('Cannot de-register base plugin.');\n      }\n      if (pluginExists(name)) {\n        delete pluginStorage[name];\n        delete Player.prototype[name];\n      }\n    }\n\n    /**\n     * Gets an object containing multiple Video.js plugins.\n     *\n     * @param   {Array} [names]\n     *          If provided, should be an array of plugin names. Defaults to _all_\n     *          plugin names.\n     *\n     * @return {Object|undefined}\n     *          An object containing plugin(s) associated with their name(s) or\n     *          `undefined` if no matching plugins exist).\n     */\n    static getPlugins(names = Object.keys(pluginStorage)) {\n      let result;\n      names.forEach(name => {\n        const plugin = getPlugin(name);\n        if (plugin) {\n          result = result || {};\n          result[name] = plugin;\n        }\n      });\n      return result;\n    }\n\n    /**\n     * Gets a plugin's version, if available\n     *\n     * @param   {string} name\n     *          The name of a plugin.\n     *\n     * @return {string}\n     *          The plugin's version or an empty string.\n     */\n    static getPluginVersion(name) {\n      const plugin = getPlugin(name);\n      return plugin && plugin.VERSION || '';\n    }\n  }\n\n  /**\n   * Gets a plugin by name if it exists.\n   *\n   * @static\n   * @method   getPlugin\n   * @memberOf Plugin\n   * @param    {string} name\n   *           The name of a plugin.\n   *\n   * @returns  {typeof Plugin|Function|undefined}\n   *           The plugin (or `undefined`).\n   */\n  Plugin.getPlugin = getPlugin;\n\n  /**\n   * The name of the base plugin class as it is registered.\n   *\n   * @type {string}\n   */\n  Plugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\n  Plugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\n\n  /**\n   * Documented in player.js\n   *\n   * @ignore\n   */\n  Player.prototype.usingPlugin = function (name) {\n    return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\n  };\n\n  /**\n   * Documented in player.js\n   *\n   * @ignore\n   */\n  Player.prototype.hasPlugin = function (name) {\n    return !!pluginExists(name);\n  };\n\n  /**\n   * Signals that a plugin is about to be set up on a player.\n   *\n   * @event    Player#beforepluginsetup\n   * @type     {PluginEventHash}\n   */\n\n  /**\n   * Signals that a plugin is about to be set up on a player - by name. The name\n   * is the name of the plugin.\n   *\n   * @event    Player#beforepluginsetup:$name\n   * @type     {PluginEventHash}\n   */\n\n  /**\n   * Signals that a plugin has just been set up on a player.\n   *\n   * @event    Player#pluginsetup\n   * @type     {PluginEventHash}\n   */\n\n  /**\n   * Signals that a plugin has just been set up on a player - by name. The name\n   * is the name of the plugin.\n   *\n   * @event    Player#pluginsetup:$name\n   * @type     {PluginEventHash}\n   */\n\n  /**\n   * @typedef  {Object} PluginEventHash\n   *\n   * @property {string} instance\n   *           For basic plugins, the return value of the plugin function. For\n   *           advanced plugins, the plugin instance on which the event is fired.\n   *\n   * @property {string} name\n   *           The name of the plugin.\n   *\n   * @property {string} plugin\n   *           For basic plugins, the plugin function. For advanced plugins, the\n   *           plugin class/constructor.\n   */\n\n  /**\n   * @file deprecate.js\n   * @module deprecate\n   */\n\n  /**\n   * Decorate a function with a deprecation message the first time it is called.\n   *\n   * @param  {string}   message\n   *         A deprecation message to log the first time the returned function\n   *         is called.\n   *\n   * @param  {Function} fn\n   *         The function to be deprecated.\n   *\n   * @return {Function}\n   *         A wrapper function that will log a deprecation warning the first\n   *         time it is called. The return value will be the return value of\n   *         the wrapped function.\n   */\n  function deprecate(message, fn) {\n    let warned = false;\n    return function (...args) {\n      if (!warned) {\n        log$1.warn(message);\n      }\n      warned = true;\n      return fn.apply(this, args);\n    };\n  }\n\n  /**\n   * Internal function used to mark a function as deprecated in the next major\n   * version with consistent messaging.\n   *\n   * @param  {number}   major   The major version where it will be removed\n   * @param  {string}   oldName The old function name\n   * @param  {string}   newName The new function name\n   * @param  {Function} fn      The function to deprecate\n   * @return {Function}         The decorated function\n   */\n  function deprecateForMajor(major, oldName, newName, fn) {\n    return deprecate(`${oldName} is deprecated and will be removed in ${major}.0; please use ${newName} instead.`, fn);\n  }\n\n  var VjsErrors = {\n    NetworkBadStatus: 'networkbadstatus',\n    NetworkRequestFailed: 'networkrequestfailed',\n    NetworkRequestAborted: 'networkrequestaborted',\n    NetworkRequestTimeout: 'networkrequesttimeout',\n    NetworkBodyParserFailed: 'networkbodyparserfailed',\n    StreamingHlsPlaylistParserError: 'streaminghlsplaylistparsererror',\n    StreamingDashManifestParserError: 'streamingdashmanifestparsererror',\n    StreamingContentSteeringParserError: 'streamingcontentsteeringparsererror',\n    StreamingVttParserError: 'streamingvttparsererror',\n    StreamingFailedToSelectNextSegment: 'streamingfailedtoselectnextsegment',\n    StreamingFailedToDecryptSegment: 'streamingfailedtodecryptsegment',\n    StreamingFailedToTransmuxSegment: 'streamingfailedtotransmuxsegment',\n    StreamingFailedToAppendSegment: 'streamingfailedtoappendsegment',\n    StreamingCodecsChangeError: 'streamingcodecschangeerror'\n  };\n\n  /**\n   * @file video.js\n   * @module videojs\n   */\n\n  /** @import { PlayerReadyCallback } from './player' */\n\n  /**\n   * Normalize an `id` value by trimming off a leading `#`\n   *\n   * @private\n   * @param   {string} id\n   *          A string, maybe with a leading `#`.\n   *\n   * @return {string}\n   *          The string, without any leading `#`.\n   */\n  const normalizeId = id => id.indexOf('#') === 0 ? id.slice(1) : id;\n\n  /**\n   * The `videojs()` function doubles as the main function for users to create a\n   * {@link Player} instance as well as the main library namespace.\n   *\n   * It can also be used as a getter for a pre-existing {@link Player} instance.\n   * However, we _strongly_ recommend using `videojs.getPlayer()` for this\n   * purpose because it avoids any potential for unintended initialization.\n   *\n   * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n   * of our JSDoc template, we cannot properly document this as both a function\n   * and a namespace, so its function signature is documented here.\n   *\n   * #### Arguments\n   * ##### id\n   * string|Element, **required**\n   *\n   * Video element or video element ID.\n   *\n   * ##### options\n   * Object, optional\n   *\n   * Options object for providing settings.\n   * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n   *\n   * ##### ready\n   * {@link Component~ReadyCallback}, optional\n   *\n   * A function to be called when the {@link Player} and {@link Tech} are ready.\n   *\n   * #### Return Value\n   *\n   * The `videojs()` function returns a {@link Player} instance.\n   *\n   * @namespace\n   *\n   * @borrows AudioTrack as AudioTrack\n   * @borrows Component.getComponent as getComponent\n   * @borrows module:events.on as on\n   * @borrows module:events.one as one\n   * @borrows module:events.off as off\n   * @borrows module:events.trigger as trigger\n   * @borrows EventTarget as EventTarget\n   * @borrows module:middleware.use as use\n   * @borrows Player.players as players\n   * @borrows Plugin.registerPlugin as registerPlugin\n   * @borrows Plugin.deregisterPlugin as deregisterPlugin\n   * @borrows Plugin.getPlugins as getPlugins\n   * @borrows Plugin.getPlugin as getPlugin\n   * @borrows Plugin.getPluginVersion as getPluginVersion\n   * @borrows Tech.getTech as getTech\n   * @borrows Tech.registerTech as registerTech\n   * @borrows TextTrack as TextTrack\n   * @borrows VideoTrack as VideoTrack\n   *\n   * @param  {string|Element} id\n   *         Video element or video element ID.\n   *\n   * @param  {Object} [options]\n   *         Options object for providing settings.\n   *         See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n   *\n   * @param  {PlayerReadyCallback} [ready]\n   *         A function to be called when the {@link Player} and {@link Tech} are\n   *         ready.\n   *\n   * @return {Player}\n   *         The `videojs()` function returns a {@link Player|Player} instance.\n   */\n  function videojs(id, options, ready) {\n    let player = videojs.getPlayer(id);\n    if (player) {\n      if (options) {\n        log$1.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n      }\n      if (ready) {\n        player.ready(ready);\n      }\n      return player;\n    }\n    const el = typeof id === 'string' ? $('#' + normalizeId(id)) : id;\n    if (!isEl(el)) {\n      throw new TypeError('The element or ID supplied is not valid. (videojs)');\n    }\n\n    // document.body.contains(el) will only check if el is contained within that one document.\n    // This causes problems for elements in iframes.\n    // Instead, use the element's ownerDocument instead of the global document.\n    // This will make sure that the element is indeed in the dom of that document.\n    // Additionally, check that the document in question has a default view.\n    // If the document is no longer attached to the dom, the defaultView of the document will be null.\n    // If element is inside Shadow DOM (e.g. is part of a Custom element), ownerDocument.body\n    // always returns false. Instead, use the Shadow DOM root.\n    const inShadowDom = 'getRootNode' in el ? el.getRootNode() instanceof window.ShadowRoot : false;\n    const rootNode = inShadowDom ? el.getRootNode() : el.ownerDocument.body;\n    if (!el.ownerDocument.defaultView || !rootNode.contains(el)) {\n      log$1.warn('The element supplied is not included in the DOM');\n    }\n    options = options || {};\n\n    // Store a copy of the el before modification, if it is to be restored in destroy()\n    // If div ingest, store the parent div\n    if (options.restoreEl === true) {\n      options.restoreEl = (el.parentNode && el.parentNode.hasAttribute && el.parentNode.hasAttribute('data-vjs-player') ? el.parentNode : el).cloneNode(true);\n    }\n    hooks('beforesetup').forEach(hookFunction => {\n      const opts = hookFunction(el, merge$2(options));\n      if (!isObject$1(opts) || Array.isArray(opts)) {\n        log$1.error('please return an object in beforesetup hooks');\n        return;\n      }\n      options = merge$2(options, opts);\n    });\n\n    // We get the current \"Player\" component here in case an integration has\n    // replaced it with a custom player.\n    const PlayerComponent = Component$1.getComponent('Player');\n    player = new PlayerComponent(el, options, ready);\n    hooks('setup').forEach(hookFunction => hookFunction(player));\n    return player;\n  }\n  videojs.hooks_ = hooks_;\n  videojs.hooks = hooks;\n  videojs.hook = hook;\n  videojs.hookOnce = hookOnce;\n  videojs.removeHook = removeHook;\n\n  // Add default styles\n  if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\n    let style = $('.vjs-styles-defaults');\n    if (!style) {\n      style = createStyleElement('vjs-styles-defaults');\n      const head = $('head');\n      if (head) {\n        head.insertBefore(style, head.firstChild);\n      }\n      setTextContent(style, `\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    `);\n    }\n  }\n\n  // Run Auto-load players\n  // You have to wait at least once in case this script is loaded after your\n  // video in the DOM (weird behavior only with minified version)\n  autoSetupTimeout(1, videojs);\n\n  /**\n   * Current Video.js version. Follows [semantic versioning](https://semver.org/).\n   *\n   * @type {string}\n   */\n  videojs.VERSION = version$5;\n\n  /**\n   * The global options object. These are the settings that take effect\n   * if no overrides are specified when the player is created.\n   *\n   * @type {Object}\n   */\n  videojs.options = Player.prototype.options_;\n\n  /**\n   * Get an object with the currently created players, keyed by player ID\n   *\n   * @return {Object}\n   *         The created players\n   */\n  videojs.getPlayers = () => Player.players;\n\n  /**\n   * Get a single player based on an ID or DOM element.\n   *\n   * This is useful if you want to check if an element or ID has an associated\n   * Video.js player, but not create one if it doesn't.\n   *\n   * @param   {string|Element} id\n   *          An HTML element - `<video>`, `<audio>`, or `<video-js>` -\n   *          or a string matching the `id` of such an element.\n   *\n   * @return {Player|undefined}\n   *          A player instance or `undefined` if there is no player instance\n   *          matching the argument.\n   */\n  videojs.getPlayer = id => {\n    const players = Player.players;\n    let tag;\n    if (typeof id === 'string') {\n      const nId = normalizeId(id);\n      const player = players[nId];\n      if (player) {\n        return player;\n      }\n      tag = $('#' + nId);\n    } else {\n      tag = id;\n    }\n    if (isEl(tag)) {\n      const {\n        player,\n        playerId\n      } = tag;\n\n      // Element may have a `player` property referring to an already created\n      // player instance. If so, return that.\n      if (player || players[playerId]) {\n        return player || players[playerId];\n      }\n    }\n  };\n\n  /**\n   * Returns an array of all current players.\n   *\n   * @return {Array}\n   *         An array of all players. The array will be in the order that\n   *         `Object.keys` provides, which could potentially vary between\n   *         JavaScript engines.\n   *\n   */\n  videojs.getAllPlayers = () =>\n  // Disposed players leave a key with a `null` value, so we need to make sure\n  // we filter those out.\n  Object.keys(Player.players).map(k => Player.players[k]).filter(Boolean);\n  videojs.players = Player.players;\n  videojs.getComponent = Component$1.getComponent;\n\n  /**\n   * Register a component so it can referred to by name. Used when adding to other\n   * components, either through addChild `component.addChild('myComponent')` or through\n   * default children options  `{ children: ['myComponent'] }`.\n   *\n   * > NOTE: You could also just initialize the component before adding.\n   * `component.addChild(new MyComponent());`\n   *\n   * @param {string} name\n   *        The class name of the component\n   *\n   * @param {typeof Component} comp\n   *        The component class\n   *\n   * @return {typeof Component}\n   *         The newly registered component\n   */\n  videojs.registerComponent = (name, comp) => {\n    if (Tech.isTech(comp)) {\n      log$1.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n    }\n    return Component$1.registerComponent.call(Component$1, name, comp);\n  };\n  videojs.getTech = Tech.getTech;\n  videojs.registerTech = Tech.registerTech;\n  videojs.use = use;\n\n  /**\n   * An object that can be returned by a middleware to signify\n   * that the middleware is being terminated.\n   *\n   * @type {object}\n   * @property {object} middleware.TERMINATOR\n   */\n  Object.defineProperty(videojs, 'middleware', {\n    value: {},\n    writeable: false,\n    enumerable: true\n  });\n  Object.defineProperty(videojs.middleware, 'TERMINATOR', {\n    value: TERMINATOR,\n    writeable: false,\n    enumerable: true\n  });\n\n  /**\n   * A reference to the {@link module:browser|browser utility module} as an object.\n   *\n   * @type {Object}\n   * @see  {@link module:browser|browser}\n   */\n  videojs.browser = browser;\n\n  /**\n   * A reference to the {@link module:obj|obj utility module} as an object.\n   *\n   * @type {Object}\n   * @see  {@link module:obj|obj}\n   */\n  videojs.obj = Obj;\n\n  /**\n   * Deprecated reference to the {@link module:obj.merge|merge function}\n   *\n   * @type {Function}\n   * @see {@link module:obj.merge|merge}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.obj.merge instead.\n   */\n  videojs.mergeOptions = deprecateForMajor(9, 'videojs.mergeOptions', 'videojs.obj.merge', merge$2);\n\n  /**\n   * Deprecated reference to the {@link module:obj.defineLazyProperty|defineLazyProperty function}\n   *\n   * @type {Function}\n   * @see {@link module:obj.defineLazyProperty|defineLazyProperty}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.obj.defineLazyProperty instead.\n   */\n  videojs.defineLazyProperty = deprecateForMajor(9, 'videojs.defineLazyProperty', 'videojs.obj.defineLazyProperty', defineLazyProperty);\n\n  /**\n   * Deprecated reference to the {@link module:fn.bind_|fn.bind_ function}\n   *\n   * @type {Function}\n   * @see {@link module:fn.bind_|fn.bind_}\n   * @deprecated Deprecated and will be removed in 9.0. Please use native Function.prototype.bind instead.\n   */\n  videojs.bind = deprecateForMajor(9, 'videojs.bind', 'native Function.prototype.bind', bind_);\n  videojs.registerPlugin = Plugin.registerPlugin;\n  videojs.deregisterPlugin = Plugin.deregisterPlugin;\n\n  /**\n   * Deprecated method to register a plugin with Video.js\n   *\n   * @deprecated Deprecated and will be removed in 9.0. Use videojs.registerPlugin() instead.\n   *\n   * @param {string} name\n   *        The plugin name\n  *\n   * @param {typeof Plugin|Function} plugin\n   *         The plugin sub-class or function\n   *\n   * @return {typeof Plugin|Function}\n   */\n  videojs.plugin = (name, plugin) => {\n    log$1.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\n    return Plugin.registerPlugin(name, plugin);\n  };\n  videojs.getPlugins = Plugin.getPlugins;\n  videojs.getPlugin = Plugin.getPlugin;\n  videojs.getPluginVersion = Plugin.getPluginVersion;\n\n  /**\n   * Adding languages so that they're available to all players.\n   * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\n   *\n   * @param {string} code\n   *        The language code or dictionary property\n   *\n   * @param {Object} data\n   *        The data values to be translated\n   *\n   * @return {Object}\n   *         The resulting language dictionary object\n   */\n  videojs.addLanguage = function (code, data) {\n    code = ('' + code).toLowerCase();\n    videojs.options.languages = merge$2(videojs.options.languages, {\n      [code]: data\n    });\n    return videojs.options.languages[code];\n  };\n\n  /**\n   * A reference to the {@link module:log|log utility module} as an object.\n   *\n   * @type {Function}\n   * @see  {@link module:log|log}\n   */\n  videojs.log = log$1;\n  videojs.createLogger = createLogger;\n\n  /**\n   * A reference to the {@link module:time|time utility module} as an object.\n   *\n   * @type {Object}\n   * @see {@link module:time|time}\n   */\n  videojs.time = Time;\n\n  /**\n   * Deprecated reference to the {@link module:time.createTimeRanges|createTimeRanges function}\n   *\n   * @type {Function}\n   * @see {@link module:time.createTimeRanges|createTimeRanges}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.createTimeRanges instead.\n   */\n  videojs.createTimeRange = deprecateForMajor(9, 'videojs.createTimeRange', 'videojs.time.createTimeRanges', createTimeRanges$1);\n\n  /**\n   * Deprecated reference to the {@link module:time.createTimeRanges|createTimeRanges function}\n   *\n   * @type {Function}\n   * @see {@link module:time.createTimeRanges|createTimeRanges}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.createTimeRanges instead.\n   */\n  videojs.createTimeRanges = deprecateForMajor(9, 'videojs.createTimeRanges', 'videojs.time.createTimeRanges', createTimeRanges$1);\n\n  /**\n   * Deprecated reference to the {@link module:time.formatTime|formatTime function}\n   *\n   * @type {Function}\n   * @see {@link module:time.formatTime|formatTime}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.format instead.\n   */\n  videojs.formatTime = deprecateForMajor(9, 'videojs.formatTime', 'videojs.time.formatTime', formatTime);\n\n  /**\n   * Deprecated reference to the {@link module:time.setFormatTime|setFormatTime function}\n   *\n   * @type {Function}\n   * @see {@link module:time.setFormatTime|setFormatTime}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.setFormat instead.\n   */\n  videojs.setFormatTime = deprecateForMajor(9, 'videojs.setFormatTime', 'videojs.time.setFormatTime', setFormatTime);\n\n  /**\n   * Deprecated reference to the {@link module:time.resetFormatTime|resetFormatTime function}\n   *\n   * @type {Function}\n   * @see {@link module:time.resetFormatTime|resetFormatTime}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.resetFormat instead.\n   */\n  videojs.resetFormatTime = deprecateForMajor(9, 'videojs.resetFormatTime', 'videojs.time.resetFormatTime', resetFormatTime);\n\n  /**\n   * Deprecated reference to the {@link module:url.parseUrl|Url.parseUrl function}\n   *\n   * @type {Function}\n   * @see {@link module:url.parseUrl|parseUrl}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.url.parseUrl instead.\n   */\n  videojs.parseUrl = deprecateForMajor(9, 'videojs.parseUrl', 'videojs.url.parseUrl', parseUrl);\n\n  /**\n   * Deprecated reference to the {@link module:url.isCrossOrigin|Url.isCrossOrigin function}\n   *\n   * @type {Function}\n   * @see {@link module:url.isCrossOrigin|isCrossOrigin}\n   * @deprecated Deprecated and will be removed in 9.0. Please use videojs.url.isCrossOrigin instead.\n   */\n  videojs.isCrossOrigin = deprecateForMajor(9, 'videojs.isCrossOrigin', 'videojs.url.isCrossOrigin', isCrossOrigin);\n  videojs.EventTarget = EventTarget$2;\n  videojs.any = any;\n  videojs.on = on;\n  videojs.one = one;\n  videojs.off = off;\n  videojs.trigger = trigger;\n\n  /**\n   * A cross-browser XMLHttpRequest wrapper.\n   *\n   * @function\n   * @param    {Object} options\n   *           Settings for the request.\n   *\n   * @return   {XMLHttpRequest|XDomainRequest}\n   *           The request object.\n   *\n   * @see      https://github.com/Raynos/xhr\n   */\n  videojs.xhr = lib;\n  videojs.TextTrack = TextTrack;\n  videojs.AudioTrack = AudioTrack;\n  videojs.VideoTrack = VideoTrack;\n  ['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(k => {\n    videojs[k] = function () {\n      log$1.warn(`videojs.${k}() is deprecated; use videojs.dom.${k}() instead`);\n      return Dom[k].apply(null, arguments);\n    };\n  });\n  videojs.computedStyle = deprecateForMajor(9, 'videojs.computedStyle', 'videojs.dom.computedStyle', computedStyle);\n\n  /**\n   * A reference to the {@link module:dom|DOM utility module} as an object.\n   *\n   * @type {Object}\n   * @see {@link module:dom|dom}\n   */\n  videojs.dom = Dom;\n\n  /**\n   * A reference to the {@link module:fn|fn utility module} as an object.\n   *\n   * @type {Object}\n   * @see {@link module:fn|fn}\n   */\n  videojs.fn = Fn;\n\n  /**\n   * A reference to the {@link module:num|num utility module} as an object.\n   *\n   * @type {Object}\n   * @see {@link module:num|num}\n   */\n  videojs.num = Num;\n\n  /**\n   * A reference to the {@link module:str|str utility module} as an object.\n   *\n   * @type {Object}\n   * @see {@link module:str|str}\n   */\n  videojs.str = Str;\n\n  /**\n   * A reference to the {@link module:url|URL utility module} as an object.\n   *\n   * @type {Object}\n   * @see {@link module:url|url}\n   */\n  videojs.url = Url;\n\n  // The list of possible error types to occur in video.js\n  videojs.Error = VjsErrors;\n\n  createCommonjsModule(function (module, exports) {\n    /*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\n    (function (global, factory) {\n      module.exports = factory(videojs) ;\n    })(commonjsGlobal, function (videojs) {\n\n      function _interopDefaultLegacy(e) {\n        return e && typeof e === 'object' && 'default' in e ? e : {\n          'default': e\n        };\n      }\n      var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);\n\n      /**\n       * A single QualityLevel.\n       *\n       * interface QualityLevel {\n       *   readonly attribute DOMString id;\n       *            attribute DOMString label;\n       *   readonly attribute long width;\n       *   readonly attribute long height;\n       *   readonly attribute long bitrate;\n       *            attribute boolean enabled;\n       * };\n       *\n       * @class QualityLevel\n       */\n      class QualityLevel {\n        /**\n         * Creates a QualityLevel\n         *\n         * @param {Representation|Object} representation The representation of the quality level\n         * @param {string}   representation.id        Unique id of the QualityLevel\n         * @param {number=}  representation.width     Resolution width of the QualityLevel\n         * @param {number=}  representation.height    Resolution height of the QualityLevel\n         * @param {number}   representation.bandwidth Bitrate of the QualityLevel\n         * @param {number=}  representation.frameRate Frame-rate of the QualityLevel\n         * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\n         */\n        constructor(representation) {\n          let level = this; // eslint-disable-line\n\n          level.id = representation.id;\n          level.label = level.id;\n          level.width = representation.width;\n          level.height = representation.height;\n          level.bitrate = representation.bandwidth;\n          level.frameRate = representation.frameRate;\n          level.enabled_ = representation.enabled;\n          Object.defineProperty(level, 'enabled', {\n            /**\n             * Get whether the QualityLevel is enabled.\n             *\n             * @return {boolean} True if the QualityLevel is enabled.\n             */\n            get() {\n              return level.enabled_();\n            },\n            /**\n             * Enable or disable the QualityLevel.\n             *\n             * @param {boolean} enable true to enable QualityLevel, false to disable.\n             */\n            set(enable) {\n              level.enabled_(enable);\n            }\n          });\n          return level;\n        }\n      }\n\n      /**\n       * A list of QualityLevels.\n       *\n       * interface QualityLevelList : EventTarget {\n       *   getter QualityLevel (unsigned long index);\n       *   readonly attribute unsigned long length;\n       *   readonly attribute long selectedIndex;\n       *\n       *   void addQualityLevel(QualityLevel qualityLevel)\n       *   void removeQualityLevel(QualityLevel remove)\n       *   QualityLevel? getQualityLevelById(DOMString id);\n       *\n       *   attribute EventHandler onchange;\n       *   attribute EventHandler onaddqualitylevel;\n       *   attribute EventHandler onremovequalitylevel;\n       * };\n       *\n       * @extends videojs.EventTarget\n       * @class QualityLevelList\n       */\n      class QualityLevelList extends videojs__default[\"default\"].EventTarget {\n        /**\n         * Creates a QualityLevelList.\n         */\n        constructor() {\n          super();\n          let list = this; // eslint-disable-line\n\n          list.levels_ = [];\n          list.selectedIndex_ = -1;\n\n          /**\n           * Get the index of the currently selected QualityLevel.\n           *\n           * @returns {number} The index of the selected QualityLevel. -1 if none selected.\n           * @readonly\n           */\n          Object.defineProperty(list, 'selectedIndex', {\n            get() {\n              return list.selectedIndex_;\n            }\n          });\n\n          /**\n           * Get the length of the list of QualityLevels.\n           *\n           * @returns {number} The length of the list.\n           * @readonly\n           */\n          Object.defineProperty(list, 'length', {\n            get() {\n              return list.levels_.length;\n            }\n          });\n          list[Symbol.iterator] = () => list.levels_.values();\n          return list;\n        }\n\n        /**\n         * Adds a quality level to the list.\n         *\n         * @param {Representation|Object} representation The representation of the quality level\n         * @param {string}   representation.id        Unique id of the QualityLevel\n         * @param {number=}  representation.width     Resolution width of the QualityLevel\n         * @param {number=}  representation.height    Resolution height of the QualityLevel\n         * @param {number}   representation.bandwidth Bitrate of the QualityLevel\n         * @param {number=}  representation.frameRate Frame-rate of the QualityLevel\n         * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\n         * @return {QualityLevel} the QualityLevel added to the list\n         * @method addQualityLevel\n         */\n        addQualityLevel(representation) {\n          let qualityLevel = this.getQualityLevelById(representation.id);\n\n          // Do not add duplicate quality levels\n          if (qualityLevel) {\n            return qualityLevel;\n          }\n          const index = this.levels_.length;\n          qualityLevel = new QualityLevel(representation);\n          if (!('' + index in this)) {\n            Object.defineProperty(this, index, {\n              get() {\n                return this.levels_[index];\n              }\n            });\n          }\n          this.levels_.push(qualityLevel);\n          this.trigger({\n            qualityLevel,\n            type: 'addqualitylevel'\n          });\n          return qualityLevel;\n        }\n\n        /**\n         * Removes a quality level from the list.\n         *\n         * @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.\n         * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed\n         * @method removeQualityLevel\n         */\n        removeQualityLevel(qualityLevel) {\n          let removed = null;\n          for (let i = 0, l = this.length; i < l; i++) {\n            if (this[i] === qualityLevel) {\n              removed = this.levels_.splice(i, 1)[0];\n              if (this.selectedIndex_ === i) {\n                this.selectedIndex_ = -1;\n              } else if (this.selectedIndex_ > i) {\n                this.selectedIndex_--;\n              }\n              break;\n            }\n          }\n          if (removed) {\n            this.trigger({\n              qualityLevel,\n              type: 'removequalitylevel'\n            });\n          }\n          return removed;\n        }\n\n        /**\n         * Searches for a QualityLevel with the given id.\n         *\n         * @param {string} id The id of the QualityLevel to find.\n         * @return {QualityLevel|null} The QualityLevel with id, or null if not found.\n         * @method getQualityLevelById\n         */\n        getQualityLevelById(id) {\n          for (let i = 0, l = this.length; i < l; i++) {\n            const level = this[i];\n            if (level.id === id) {\n              return level;\n            }\n          }\n          return null;\n        }\n\n        /**\n         * Resets the list of QualityLevels to empty\n         *\n         * @method dispose\n         */\n        dispose() {\n          this.selectedIndex_ = -1;\n          this.levels_.length = 0;\n        }\n      }\n\n      /**\n       * change - The selected QualityLevel has changed.\n       * addqualitylevel - A QualityLevel has been added to the QualityLevelList.\n       * removequalitylevel - A QualityLevel has been removed from the QualityLevelList.\n       */\n      QualityLevelList.prototype.allowedEvents_ = {\n        change: 'change',\n        addqualitylevel: 'addqualitylevel',\n        removequalitylevel: 'removequalitylevel'\n      };\n\n      // emulate attribute EventHandler support to allow for feature detection\n      for (const event in QualityLevelList.prototype.allowedEvents_) {\n        QualityLevelList.prototype['on' + event] = null;\n      }\n      var version = \"4.1.0\";\n\n      /**\n       * Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and\n       * event handlers.\n       *\n       * @param {Player} player Player object.\n       * @param {Object} options Plugin options object.\n       * @return {QualityLevelList} a list of QualityLevels\n       */\n      const initPlugin = function (player, options) {\n        const originalPluginFn = player.qualityLevels;\n        const qualityLevelList = new QualityLevelList();\n        const disposeHandler = function () {\n          qualityLevelList.dispose();\n          player.qualityLevels = originalPluginFn;\n          player.off('dispose', disposeHandler);\n        };\n        player.on('dispose', disposeHandler);\n        player.qualityLevels = () => qualityLevelList;\n        player.qualityLevels.VERSION = version;\n        return qualityLevelList;\n      };\n\n      /**\n       * A video.js plugin.\n       *\n       * In the plugin function, the value of `this` is a video.js `Player`\n       * instance. You cannot rely on the player being in a \"ready\" state here,\n       * depending on how the plugin is invoked. This may or may not be important\n       * to you; if not, remove the wait for \"ready\"!\n       *\n       * @param {Object} options Plugin options object\n       * @return {QualityLevelList} a list of QualityLevels\n       */\n      const qualityLevels = function (options) {\n        return initPlugin(this, videojs__default[\"default\"].obj.merge({}, options));\n      };\n\n      // Register the plugin with video.js.\n      videojs__default[\"default\"].registerPlugin('qualityLevels', qualityLevels);\n\n      // Include the version number.\n      qualityLevels.VERSION = version;\n      return qualityLevels;\n    });\n  });\n\n  var DEFAULT_LOCATION = 'https://example.com';\n  var resolveUrl$1 = function resolveUrl(baseUrl, relativeUrl) {\n    // return early if we don't need to resolve\n    if (/^[a-z]+:/i.test(relativeUrl)) {\n      return relativeUrl;\n    } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n    if (/^data:/.test(baseUrl)) {\n      baseUrl = window.location && window.location.href || '';\n    }\n    var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n    // and if baseUrl isn't an absolute url\n\n    var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n    baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n    var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n    // and if we're location-less, remove the location\n    // otherwise, return the url unmodified\n\n    if (removeLocation) {\n      return newUrl.href.slice(DEFAULT_LOCATION.length);\n    } else if (protocolLess) {\n      return newUrl.href.slice(newUrl.protocol.length);\n    }\n    return newUrl.href;\n  };\n\n  /**\n   * @file stream.js\n   */\n\n  /**\n   * A lightweight readable stream implemention that handles event dispatching.\n   *\n   * @class Stream\n   */\n  var Stream = /*#__PURE__*/function () {\n    function Stream() {\n      this.listeners = {};\n    }\n    /**\n     * Add a listener for a specified event type.\n     *\n     * @param {string} type the event name\n     * @param {Function} listener the callback to be invoked when an event of\n     * the specified type occurs\n     */\n\n    var _proto = Stream.prototype;\n    _proto.on = function on(type, listener) {\n      if (!this.listeners[type]) {\n        this.listeners[type] = [];\n      }\n      this.listeners[type].push(listener);\n    }\n    /**\n     * Remove a listener for a specified event type.\n     *\n     * @param {string} type the event name\n     * @param {Function} listener  a function previously registered for this\n     * type of event through `on`\n     * @return {boolean} if we could turn it off or not\n     */;\n    _proto.off = function off(type, listener) {\n      if (!this.listeners[type]) {\n        return false;\n      }\n      var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n      // In Video.js we slice listener functions\n      // on trigger so that it does not mess up the order\n      // while we loop through.\n      //\n      // Here we slice on off so that the loop in trigger\n      // can continue using it's old reference to loop without\n      // messing up the order.\n\n      this.listeners[type] = this.listeners[type].slice(0);\n      this.listeners[type].splice(index, 1);\n      return index > -1;\n    }\n    /**\n     * Trigger an event of the specified type on this stream. Any additional\n     * arguments to this function are passed as parameters to event listeners.\n     *\n     * @param {string} type the event name\n     */;\n    _proto.trigger = function trigger(type) {\n      var callbacks = this.listeners[type];\n      if (!callbacks) {\n        return;\n      } // Slicing the arguments on every invocation of this method\n      // can add a significant amount of overhead. Avoid the\n      // intermediate object creation for the common case of a\n      // single callback argument\n\n      if (arguments.length === 2) {\n        var length = callbacks.length;\n        for (var i = 0; i < length; ++i) {\n          callbacks[i].call(this, arguments[1]);\n        }\n      } else {\n        var args = Array.prototype.slice.call(arguments, 1);\n        var _length = callbacks.length;\n        for (var _i = 0; _i < _length; ++_i) {\n          callbacks[_i].apply(this, args);\n        }\n      }\n    }\n    /**\n     * Destroys the stream and cleans up.\n     */;\n    _proto.dispose = function dispose() {\n      this.listeners = {};\n    }\n    /**\n     * Forwards all `data` events on this stream to the destination stream. The\n     * destination stream should provide a method `push` to receive the data\n     * events as they arrive.\n     *\n     * @param {Stream} destination the stream that will receive all `data` events\n     * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n     */;\n    _proto.pipe = function pipe(destination) {\n      this.on('data', function (data) {\n        destination.push(data);\n      });\n    };\n    return Stream;\n  }();\n\n  var atob = function atob(s) {\n    return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n  };\n  function decodeB64ToUint8Array(b64Text) {\n    var decodedString = atob(b64Text);\n    var array = new Uint8Array(decodedString.length);\n    for (var i = 0; i < decodedString.length; i++) {\n      array[i] = decodedString.charCodeAt(i);\n    }\n    return array;\n  }\n\n  /*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */\n\n  /**\n   * @file m3u8/line-stream.js\n   */\n  /**\n   * A stream that buffers string input and generates a `data` event for each\n   * line.\n   *\n   * @class LineStream\n   * @extends Stream\n   */\n\n  class LineStream extends Stream {\n    constructor() {\n      super();\n      this.buffer = '';\n    }\n    /**\n     * Add new data to be parsed.\n     *\n     * @param {string} data the text to process\n     */\n\n    push(data) {\n      let nextNewline;\n      this.buffer += data;\n      nextNewline = this.buffer.indexOf('\\n');\n      for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n        this.trigger('data', this.buffer.substring(0, nextNewline));\n        this.buffer = this.buffer.substring(nextNewline + 1);\n      }\n    }\n  }\n  const TAB = String.fromCharCode(0x09);\n  const parseByterange = function (byterangeString) {\n    // optionally match and capture 0+ digits before `@`\n    // optionally match and capture 0+ digits after `@`\n    const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n    const result = {};\n    if (match[1]) {\n      result.length = parseInt(match[1], 10);\n    }\n    if (match[2]) {\n      result.offset = parseInt(match[2], 10);\n    }\n    return result;\n  };\n  /**\n   * \"forgiving\" attribute list psuedo-grammar:\n   * attributes -> keyvalue (',' keyvalue)*\n   * keyvalue   -> key '=' value\n   * key        -> [^=]*\n   * value      -> '\"' [^\"]* '\"' | [^,]*\n   */\n\n  const attributeSeparator = function () {\n    const key = '[^=]*';\n    const value = '\"[^\"]*\"|[^,]*';\n    const keyvalue = '(?:' + key + ')=(?:' + value + ')';\n    return new RegExp('(?:^|,)(' + keyvalue + ')');\n  };\n  /**\n   * Parse attributes from a line given the separator\n   *\n   * @param {string} attributes the attribute line to parse\n   */\n\n  const parseAttributes$1 = function (attributes) {\n    const result = {};\n    if (!attributes) {\n      return result;\n    } // split the string using attributes as the separator\n\n    const attrs = attributes.split(attributeSeparator());\n    let i = attrs.length;\n    let attr;\n    while (i--) {\n      // filter out unmatched portions of the string\n      if (attrs[i] === '') {\n        continue;\n      } // split the key and value\n\n      attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n      attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n      attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n      attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n      result[attr[0]] = attr[1];\n    }\n    return result;\n  };\n  /**\n   * Converts a string into a resolution object\n   *\n   * @param {string} resolution a string such as 3840x2160\n   *\n   * @return {Object} An object representing the resolution\n   *\n   */\n\n  const parseResolution = resolution => {\n    const split = resolution.split('x');\n    const result = {};\n    if (split[0]) {\n      result.width = parseInt(split[0], 10);\n    }\n    if (split[1]) {\n      result.height = parseInt(split[1], 10);\n    }\n    return result;\n  };\n  /**\n   * A line-level M3U8 parser event stream. It expects to receive input one\n   * line at a time and performs a context-free parse of its contents. A stream\n   * interpretation of a manifest can be useful if the manifest is expected to\n   * be too large to fit comfortably into memory or the entirety of the input\n   * is not immediately available. Otherwise, it's probably much easier to work\n   * with a regular `Parser` object.\n   *\n   * Produces `data` events with an object that captures the parser's\n   * interpretation of the input. That object has a property `tag` that is one\n   * of `uri`, `comment`, or `tag`. URIs only have a single additional\n   * property, `line`, which captures the entirety of the input without\n   * interpretation. Comments similarly have a single additional property\n   * `text` which is the input without the leading `#`.\n   *\n   * Tags always have a property `tagType` which is the lower-cased version of\n   * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n   * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n   * tags are given the tag type `unknown` and a single additional property\n   * `data` with the remainder of the input.\n   *\n   * @class ParseStream\n   * @extends Stream\n   */\n\n  class ParseStream extends Stream {\n    constructor() {\n      super();\n      this.customParsers = [];\n      this.tagMappers = [];\n    }\n    /**\n     * Parses an additional line of input.\n     *\n     * @param {string} line a single line of an M3U8 file to parse\n     */\n\n    push(line) {\n      let match;\n      let event; // strip whitespace\n\n      line = line.trim();\n      if (line.length === 0) {\n        // ignore empty lines\n        return;\n      } // URIs\n\n      if (line[0] !== '#') {\n        this.trigger('data', {\n          type: 'uri',\n          uri: line\n        });\n        return;\n      } // map tags\n\n      const newLines = this.tagMappers.reduce((acc, mapper) => {\n        const mappedLine = mapper(line); // skip if unchanged\n\n        if (mappedLine === line) {\n          return acc;\n        }\n        return acc.concat([mappedLine]);\n      }, [line]);\n      newLines.forEach(newLine => {\n        for (let i = 0; i < this.customParsers.length; i++) {\n          if (this.customParsers[i].call(this, newLine)) {\n            return;\n          }\n        } // Comments\n\n        if (newLine.indexOf('#EXT') !== 0) {\n          this.trigger('data', {\n            type: 'comment',\n            text: newLine.slice(1)\n          });\n          return;\n        } // strip off any carriage returns here so the regex matching\n        // doesn't have to account for them.\n\n        newLine = newLine.replace('\\r', ''); // Tags\n\n        match = /^#EXTM3U/.exec(newLine);\n        if (match) {\n          this.trigger('data', {\n            type: 'tag',\n            tagType: 'm3u'\n          });\n          return;\n        }\n        match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'inf'\n          };\n          if (match[1]) {\n            event.duration = parseFloat(match[1]);\n          }\n          if (match[2]) {\n            event.title = match[2];\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'targetduration'\n          };\n          if (match[1]) {\n            event.duration = parseInt(match[1], 10);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'version'\n          };\n          if (match[1]) {\n            event.version = parseInt(match[1], 10);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'media-sequence'\n          };\n          if (match[1]) {\n            event.number = parseInt(match[1], 10);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'discontinuity-sequence'\n          };\n          if (match[1]) {\n            event.number = parseInt(match[1], 10);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'playlist-type'\n          };\n          if (match[1]) {\n            event.playlistType = match[1];\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n        if (match) {\n          event = _extends$1(parseByterange(match[1]), {\n            type: 'tag',\n            tagType: 'byterange'\n          });\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'allow-cache'\n          };\n          if (match[1]) {\n            event.allowed = !/NO/.test(match[1]);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'map'\n          };\n          if (match[1]) {\n            const attributes = parseAttributes$1(match[1]);\n            if (attributes.URI) {\n              event.uri = attributes.URI;\n            }\n            if (attributes.BYTERANGE) {\n              event.byterange = parseByterange(attributes.BYTERANGE);\n            }\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'stream-inf'\n          };\n          if (match[1]) {\n            event.attributes = parseAttributes$1(match[1]);\n            if (event.attributes.RESOLUTION) {\n              event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);\n            }\n            if (event.attributes.BANDWIDTH) {\n              event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n            }\n            if (event.attributes['FRAME-RATE']) {\n              event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n            }\n            if (event.attributes['PROGRAM-ID']) {\n              event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n            }\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'media'\n          };\n          if (match[1]) {\n            event.attributes = parseAttributes$1(match[1]);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-ENDLIST/.exec(newLine);\n        if (match) {\n          this.trigger('data', {\n            type: 'tag',\n            tagType: 'endlist'\n          });\n          return;\n        }\n        match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n        if (match) {\n          this.trigger('data', {\n            type: 'tag',\n            tagType: 'discontinuity'\n          });\n          return;\n        }\n        match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'program-date-time'\n          };\n          if (match[1]) {\n            event.dateTimeString = match[1];\n            event.dateTimeObject = new Date(match[1]);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'key'\n          };\n          if (match[1]) {\n            event.attributes = parseAttributes$1(match[1]); // parse the IV string into a Uint32Array\n\n            if (event.attributes.IV) {\n              if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n                event.attributes.IV = event.attributes.IV.substring(2);\n              }\n              event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n              event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n              event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n              event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n              event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n              event.attributes.IV = new Uint32Array(event.attributes.IV);\n            }\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-START:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'start'\n          };\n          if (match[1]) {\n            event.attributes = parseAttributes$1(match[1]);\n            event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n            event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'cue-out-cont'\n          };\n          if (match[1]) {\n            event.data = match[1];\n          } else {\n            event.data = '';\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'cue-out'\n          };\n          if (match[1]) {\n            event.data = match[1];\n          } else {\n            event.data = '';\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'cue-in'\n          };\n          if (match[1]) {\n            event.data = match[1];\n          } else {\n            event.data = '';\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'skip'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n            event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n          }\n          if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n            event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'part'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          ['DURATION'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = parseFloat(event.attributes[key]);\n            }\n          });\n          ['INDEPENDENT', 'GAP'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = /YES/.test(event.attributes[key]);\n            }\n          });\n          if (event.attributes.hasOwnProperty('BYTERANGE')) {\n            event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'server-control'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = parseFloat(event.attributes[key]);\n            }\n          });\n          ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = /YES/.test(event.attributes[key]);\n            }\n          });\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'part-inf'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          ['PART-TARGET'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = parseFloat(event.attributes[key]);\n            }\n          });\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'preload-hint'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = parseInt(event.attributes[key], 10);\n              const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n              event.attributes.byterange = event.attributes.byterange || {};\n              event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n              delete event.attributes[key];\n            }\n          });\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'rendition-report'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = parseInt(event.attributes[key], 10);\n            }\n          });\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n        if (match && match[1]) {\n          event = {\n            type: 'tag',\n            tagType: 'daterange'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          ['ID', 'CLASS'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = String(event.attributes[key]);\n            }\n          });\n          ['START-DATE', 'END-DATE'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = new Date(event.attributes[key]);\n            }\n          });\n          ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = parseFloat(event.attributes[key]);\n            }\n          });\n          ['END-ON-NEXT'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = /YES/i.test(event.attributes[key]);\n            }\n          });\n          ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n            if (event.attributes.hasOwnProperty(key)) {\n              event.attributes[key] = event.attributes[key].toString(16);\n            }\n          });\n          const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n          for (const key in event.attributes) {\n            if (!clientAttributePattern.test(key)) {\n              continue;\n            }\n            const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n            const isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n            event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n        if (match) {\n          this.trigger('data', {\n            type: 'tag',\n            tagType: 'independent-segments'\n          });\n          return;\n        }\n        match = /^#EXT-X-I-FRAMES-ONLY/.exec(newLine);\n        if (match) {\n          this.trigger('data', {\n            type: 'tag',\n            tagType: 'i-frames-only'\n          });\n          return;\n        }\n        match = /^#EXT-X-CONTENT-STEERING:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'content-steering'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'i-frame-playlist'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          if (event.attributes.URI) {\n            event.uri = event.attributes.URI;\n          }\n          if (event.attributes.BANDWIDTH) {\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n          }\n          if (event.attributes.RESOLUTION) {\n            event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);\n          }\n          if (event.attributes['AVERAGE-BANDWIDTH']) {\n            event.attributes['AVERAGE-BANDWIDTH'] = parseInt(event.attributes['AVERAGE-BANDWIDTH'], 10);\n          }\n          if (event.attributes['FRAME-RATE']) {\n            event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n          }\n          this.trigger('data', event);\n          return;\n        }\n        match = /^#EXT-X-DEFINE:(.*)$/.exec(newLine);\n        if (match) {\n          event = {\n            type: 'tag',\n            tagType: 'define'\n          };\n          event.attributes = parseAttributes$1(match[1]);\n          this.trigger('data', event);\n          return;\n        } // unknown tag type\n\n        this.trigger('data', {\n          type: 'tag',\n          data: newLine.slice(4)\n        });\n      });\n    }\n    /**\n     * Add a parser for custom headers\n     *\n     * @param {Object}   options              a map of options for the added parser\n     * @param {RegExp}   options.expression   a regular expression to match the custom header\n     * @param {string}   options.customType   the custom type to register to the output\n     * @param {Function} [options.dataParser] function to parse the line into an object\n     * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n     */\n\n    addParser({\n      expression,\n      customType,\n      dataParser,\n      segment\n    }) {\n      if (typeof dataParser !== 'function') {\n        dataParser = line => line;\n      }\n      this.customParsers.push(line => {\n        const match = expression.exec(line);\n        if (match) {\n          this.trigger('data', {\n            type: 'custom',\n            data: dataParser(line),\n            customType,\n            segment\n          });\n          return true;\n        }\n      });\n    }\n    /**\n     * Add a custom header mapper\n     *\n     * @param {Object}   options\n     * @param {RegExp}   options.expression   a regular expression to match the custom header\n     * @param {Function} options.map          function to translate tag into a different tag\n     */\n\n    addTagMapper({\n      expression,\n      map\n    }) {\n      const mapFn = line => {\n        if (expression.test(line)) {\n          return map(line);\n        }\n        return line;\n      };\n      this.tagMappers.push(mapFn);\n    }\n  }\n  const camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n  const camelCaseKeys = function (attributes) {\n    const result = {};\n    Object.keys(attributes).forEach(function (key) {\n      result[camelCase(key)] = attributes[key];\n    });\n    return result;\n  }; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n  // we need this helper because defaults are based upon targetDuration and\n  // partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n  // target durations are set.\n\n  const setHoldBack = function (manifest) {\n    const {\n      serverControl,\n      targetDuration,\n      partTargetDuration\n    } = manifest;\n    if (!serverControl) {\n      return;\n    }\n    const tag = '#EXT-X-SERVER-CONTROL';\n    const hb = 'holdBack';\n    const phb = 'partHoldBack';\n    const minTargetDuration = targetDuration && targetDuration * 3;\n    const minPartDuration = partTargetDuration && partTargetDuration * 2;\n    if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n      serverControl[hb] = minTargetDuration;\n      this.trigger('info', {\n        message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n      });\n    }\n    if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n      this.trigger('warn', {\n        message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n      });\n      serverControl[hb] = minTargetDuration;\n    } // default no part hold back to part target duration * 3\n\n    if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n      serverControl[phb] = partTargetDuration * 3;\n      this.trigger('info', {\n        message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n      });\n    } // if part hold back is too small default it to part target duration * 2\n\n    if (partTargetDuration && serverControl[phb] < minPartDuration) {\n      this.trigger('warn', {\n        message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).`\n      });\n      serverControl[phb] = minPartDuration;\n    }\n  };\n  /**\n   * A parser for M3U8 files. The current interpretation of the input is\n   * exposed as a property `manifest` on parser objects. It's just two lines to\n   * create and parse a manifest once you have the contents available as a string:\n   *\n   * ```js\n   * var parser = new m3u8.Parser();\n   * parser.push(xhr.responseText);\n   * ```\n   *\n   * New input can later be applied to update the manifest object by calling\n   * `push` again.\n   *\n   * The parser attempts to create a usable manifest object even if the\n   * underlying input is somewhat nonsensical. It emits `info` and `warning`\n   * events during the parse if it encounters input that seems invalid or\n   * requires some property of the manifest object to be defaulted.\n   *\n   * @class Parser\n   * @param {Object} [opts] Options for the constructor, needed for substitutions\n   * @param {string} [opts.uri] URL to check for query params\n   * @param {Object} [opts.mainDefinitions] Definitions on main playlist that can be imported\n   * @extends Stream\n   */\n\n  class Parser extends Stream {\n    constructor(opts = {}) {\n      super();\n      this.lineStream = new LineStream();\n      this.parseStream = new ParseStream();\n      this.lineStream.pipe(this.parseStream);\n      this.mainDefinitions = opts.mainDefinitions || {};\n      this.params = new URL(opts.uri, 'https://a.com').searchParams;\n      this.lastProgramDateTime = null;\n      /* eslint-disable consistent-this */\n\n      const self = this;\n      /* eslint-enable consistent-this */\n\n      const uris = [];\n      let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n      let currentMap; // if specified, the active decryption key\n\n      let key;\n      let hasParts = false;\n      const noop = function () {};\n      const defaultMediaGroups = {\n        'AUDIO': {},\n        'VIDEO': {},\n        'CLOSED-CAPTIONS': {},\n        'SUBTITLES': {}\n      }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n      // used in MPDs with Widevine encrypted streams.\n\n      const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n      let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n      this.manifest = {\n        allowCache: true,\n        discontinuityStarts: [],\n        dateRanges: [],\n        iFramePlaylists: [],\n        segments: []\n      }; // keep track of the last seen segment's byte range end, as segments are not required\n      // to provide the offset, in which case it defaults to the next byte after the\n      // previous segment\n\n      let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n      let lastPartByterangeEnd = 0;\n      const dateRangeTags = {};\n      this.on('end', () => {\n        // only add preloadSegment if we don't yet have a uri for it.\n        // and we actually have parts/preloadHints\n        if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n          return;\n        }\n        if (!currentUri.map && currentMap) {\n          currentUri.map = currentMap;\n        }\n        if (!currentUri.key && key) {\n          currentUri.key = key;\n        }\n        if (!currentUri.timeline && typeof currentTimeline === 'number') {\n          currentUri.timeline = currentTimeline;\n        }\n        this.manifest.preloadSegment = currentUri;\n      }); // update the manifest with the m3u8 entry from the parse stream\n\n      this.parseStream.on('data', function (entry) {\n        let mediaGroup;\n        let rendition; // Replace variables in uris and attributes as defined in #EXT-X-DEFINE tags\n\n        if (self.manifest.definitions) {\n          for (const def in self.manifest.definitions) {\n            if (entry.uri) {\n              entry.uri = entry.uri.replace(`{$${def}}`, self.manifest.definitions[def]);\n            }\n            if (entry.attributes) {\n              for (const attr in entry.attributes) {\n                if (typeof entry.attributes[attr] === 'string') {\n                  entry.attributes[attr] = entry.attributes[attr].replace(`{$${def}}`, self.manifest.definitions[def]);\n                }\n              }\n            }\n          }\n        }\n        ({\n          tag() {\n            // switch based on the tag type\n            (({\n              version() {\n                if (entry.version) {\n                  this.manifest.version = entry.version;\n                }\n              },\n              'allow-cache'() {\n                this.manifest.allowCache = entry.allowed;\n                if (!('allowed' in entry)) {\n                  this.trigger('info', {\n                    message: 'defaulting allowCache to YES'\n                  });\n                  this.manifest.allowCache = true;\n                }\n              },\n              byterange() {\n                const byterange = {};\n                if ('length' in entry) {\n                  currentUri.byterange = byterange;\n                  byterange.length = entry.length;\n                  if (!('offset' in entry)) {\n                    /*\n                     * From the latest spec (as of this writing):\n                     * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n                     *\n                     * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n                     * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n                     *\n                     * \"If o [offset] is not present, the sub-range begins at the next byte\n                     * following the sub-range of the previous media segment.\"\n                     */\n                    entry.offset = lastByterangeEnd;\n                  }\n                }\n                if ('offset' in entry) {\n                  currentUri.byterange = byterange;\n                  byterange.offset = entry.offset;\n                }\n                lastByterangeEnd = byterange.offset + byterange.length;\n              },\n              endlist() {\n                this.manifest.endList = true;\n              },\n              inf() {\n                if (!('mediaSequence' in this.manifest)) {\n                  this.manifest.mediaSequence = 0;\n                  this.trigger('info', {\n                    message: 'defaulting media sequence to zero'\n                  });\n                }\n                if (!('discontinuitySequence' in this.manifest)) {\n                  this.manifest.discontinuitySequence = 0;\n                  this.trigger('info', {\n                    message: 'defaulting discontinuity sequence to zero'\n                  });\n                }\n                if (entry.title) {\n                  currentUri.title = entry.title;\n                }\n                if (entry.duration > 0) {\n                  currentUri.duration = entry.duration;\n                }\n                if (entry.duration === 0) {\n                  currentUri.duration = 0.01;\n                  this.trigger('info', {\n                    message: 'updating zero segment duration to a small value'\n                  });\n                }\n                this.manifest.segments = uris;\n              },\n              key() {\n                if (!entry.attributes) {\n                  this.trigger('warn', {\n                    message: 'ignoring key declaration without attribute list'\n                  });\n                  return;\n                } // clear the active encryption key\n\n                if (entry.attributes.METHOD === 'NONE') {\n                  key = null;\n                  return;\n                }\n                if (!entry.attributes.URI) {\n                  this.trigger('warn', {\n                    message: 'ignoring key declaration without URI'\n                  });\n                  return;\n                }\n                if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n                  this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                  this.manifest.contentProtection['com.apple.fps.1_0'] = {\n                    attributes: entry.attributes\n                  };\n                  return;\n                }\n                if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n                  this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                  this.manifest.contentProtection['com.microsoft.playready'] = {\n                    uri: entry.attributes.URI\n                  };\n                  return;\n                } // check if the content is encrypted for Widevine\n                // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n                if (entry.attributes.KEYFORMAT === widevineUuid) {\n                  const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n                  if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n                    this.trigger('warn', {\n                      message: 'invalid key method provided for Widevine'\n                    });\n                    return;\n                  }\n                  if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n                    this.trigger('warn', {\n                      message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n                    });\n                  }\n                  if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n                    this.trigger('warn', {\n                      message: 'invalid key URI provided for Widevine'\n                    });\n                    return;\n                  }\n                  if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n                    this.trigger('warn', {\n                      message: 'invalid key ID provided for Widevine'\n                    });\n                    return;\n                  } // if Widevine key attributes are valid, store them as `contentProtection`\n                  // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n                  this.manifest.contentProtection = this.manifest.contentProtection || {};\n                  this.manifest.contentProtection['com.widevine.alpha'] = {\n                    attributes: {\n                      schemeIdUri: entry.attributes.KEYFORMAT,\n                      // remove '0x' from the key id string\n                      keyId: entry.attributes.KEYID.substring(2)\n                    },\n                    // decode the base64-encoded PSSH box\n                    pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n                  };\n                  return;\n                }\n                if (!entry.attributes.METHOD) {\n                  this.trigger('warn', {\n                    message: 'defaulting key method to AES-128'\n                  });\n                } // setup an encryption key for upcoming segments\n\n                key = {\n                  method: entry.attributes.METHOD || 'AES-128',\n                  uri: entry.attributes.URI\n                };\n                if (typeof entry.attributes.IV !== 'undefined') {\n                  key.iv = entry.attributes.IV;\n                }\n              },\n              'media-sequence'() {\n                if (!isFinite(entry.number)) {\n                  this.trigger('warn', {\n                    message: 'ignoring invalid media sequence: ' + entry.number\n                  });\n                  return;\n                }\n                this.manifest.mediaSequence = entry.number;\n              },\n              'discontinuity-sequence'() {\n                if (!isFinite(entry.number)) {\n                  this.trigger('warn', {\n                    message: 'ignoring invalid discontinuity sequence: ' + entry.number\n                  });\n                  return;\n                }\n                this.manifest.discontinuitySequence = entry.number;\n                currentTimeline = entry.number;\n              },\n              'playlist-type'() {\n                if (!/VOD|EVENT/.test(entry.playlistType)) {\n                  this.trigger('warn', {\n                    message: 'ignoring unknown playlist type: ' + entry.playlist\n                  });\n                  return;\n                }\n                this.manifest.playlistType = entry.playlistType;\n              },\n              map() {\n                currentMap = {};\n                if (entry.uri) {\n                  currentMap.uri = entry.uri;\n                }\n                if (entry.byterange) {\n                  currentMap.byterange = entry.byterange;\n                }\n                if (key) {\n                  currentMap.key = key;\n                }\n              },\n              'stream-inf'() {\n                this.manifest.playlists = uris;\n                this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n                if (!entry.attributes) {\n                  this.trigger('warn', {\n                    message: 'ignoring empty stream-inf attributes'\n                  });\n                  return;\n                }\n                if (!currentUri.attributes) {\n                  currentUri.attributes = {};\n                }\n                _extends$1(currentUri.attributes, entry.attributes);\n              },\n              media() {\n                this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n                if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n                  this.trigger('warn', {\n                    message: 'ignoring incomplete or missing media group'\n                  });\n                  return;\n                } // find the media group, creating defaults as necessary\n\n                const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n                mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n                mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n                rendition = {\n                  default: /yes/i.test(entry.attributes.DEFAULT)\n                };\n                if (rendition.default) {\n                  rendition.autoselect = true;\n                } else {\n                  rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n                }\n                if (entry.attributes.LANGUAGE) {\n                  rendition.language = entry.attributes.LANGUAGE;\n                }\n                if (entry.attributes.URI) {\n                  rendition.uri = entry.attributes.URI;\n                }\n                if (entry.attributes['INSTREAM-ID']) {\n                  rendition.instreamId = entry.attributes['INSTREAM-ID'];\n                }\n                if (entry.attributes.CHARACTERISTICS) {\n                  rendition.characteristics = entry.attributes.CHARACTERISTICS;\n                }\n                if (entry.attributes.FORCED) {\n                  rendition.forced = /yes/i.test(entry.attributes.FORCED);\n                } // insert the new rendition\n\n                mediaGroup[entry.attributes.NAME] = rendition;\n              },\n              discontinuity() {\n                currentTimeline += 1;\n                currentUri.discontinuity = true;\n                this.manifest.discontinuityStarts.push(uris.length);\n              },\n              'program-date-time'() {\n                if (typeof this.manifest.dateTimeString === 'undefined') {\n                  // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n                  // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n                  // to the manifest object\n                  // TODO: Consider removing this in future major version\n                  this.manifest.dateTimeString = entry.dateTimeString;\n                  this.manifest.dateTimeObject = entry.dateTimeObject;\n                }\n                currentUri.dateTimeString = entry.dateTimeString;\n                currentUri.dateTimeObject = entry.dateTimeObject;\n                const {\n                  lastProgramDateTime\n                } = this;\n                this.lastProgramDateTime = new Date(entry.dateTimeString).getTime(); // We should extrapolate Program Date Time backward only during first program date time occurrence.\n                // Once we have at least one program date time point, we can always extrapolate it forward using lastProgramDateTime reference.\n\n                if (lastProgramDateTime === null) {\n                  // Extrapolate Program Date Time backward\n                  // Since it is first program date time occurrence we're assuming that\n                  // all this.manifest.segments have no program date time info\n                  this.manifest.segments.reduceRight((programDateTime, segment) => {\n                    segment.programDateTime = programDateTime - segment.duration * 1000;\n                    return segment.programDateTime;\n                  }, this.lastProgramDateTime);\n                }\n              },\n              targetduration() {\n                if (!isFinite(entry.duration) || entry.duration < 0) {\n                  this.trigger('warn', {\n                    message: 'ignoring invalid target duration: ' + entry.duration\n                  });\n                  return;\n                }\n                this.manifest.targetDuration = entry.duration;\n                setHoldBack.call(this, this.manifest);\n              },\n              start() {\n                if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n                  this.trigger('warn', {\n                    message: 'ignoring start declaration without appropriate attribute list'\n                  });\n                  return;\n                }\n                this.manifest.start = {\n                  timeOffset: entry.attributes['TIME-OFFSET'],\n                  precise: entry.attributes.PRECISE\n                };\n              },\n              'cue-out'() {\n                currentUri.cueOut = entry.data;\n              },\n              'cue-out-cont'() {\n                currentUri.cueOutCont = entry.data;\n              },\n              'cue-in'() {\n                currentUri.cueIn = entry.data;\n              },\n              'skip'() {\n                this.manifest.skip = camelCaseKeys(entry.attributes);\n                this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n              },\n              'part'() {\n                hasParts = true; // parts are always specifed before a segment\n\n                const segmentIndex = this.manifest.segments.length;\n                const part = camelCaseKeys(entry.attributes);\n                currentUri.parts = currentUri.parts || [];\n                currentUri.parts.push(part);\n                if (part.byterange) {\n                  if (!part.byterange.hasOwnProperty('offset')) {\n                    part.byterange.offset = lastPartByterangeEnd;\n                  }\n                  lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n                }\n                const partIndex = currentUri.parts.length - 1;\n                this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n                if (this.manifest.renditionReports) {\n                  this.manifest.renditionReports.forEach((r, i) => {\n                    if (!r.hasOwnProperty('lastPart')) {\n                      this.trigger('warn', {\n                        message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n                      });\n                    }\n                  });\n                }\n              },\n              'server-control'() {\n                const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n                if (!attrs.hasOwnProperty('canBlockReload')) {\n                  attrs.canBlockReload = false;\n                  this.trigger('info', {\n                    message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n                  });\n                }\n                setHoldBack.call(this, this.manifest);\n                if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n                  this.trigger('warn', {\n                    message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n                  });\n                }\n              },\n              'preload-hint'() {\n                // parts are always specifed before a segment\n                const segmentIndex = this.manifest.segments.length;\n                const hint = camelCaseKeys(entry.attributes);\n                const isPart = hint.type && hint.type === 'PART';\n                currentUri.preloadHints = currentUri.preloadHints || [];\n                currentUri.preloadHints.push(hint);\n                if (hint.byterange) {\n                  if (!hint.byterange.hasOwnProperty('offset')) {\n                    // use last part byterange end or zero if not a part.\n                    hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n                    if (isPart) {\n                      lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n                    }\n                  }\n                }\n                const index = currentUri.preloadHints.length - 1;\n                this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n                if (!hint.type) {\n                  return;\n                } // search through all preload hints except for the current one for\n                // a duplicate type.\n\n                for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n                  const otherHint = currentUri.preloadHints[i];\n                  if (!otherHint.type) {\n                    continue;\n                  }\n                  if (otherHint.type === hint.type) {\n                    this.trigger('warn', {\n                      message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n                    });\n                  }\n                }\n              },\n              'rendition-report'() {\n                const report = camelCaseKeys(entry.attributes);\n                this.manifest.renditionReports = this.manifest.renditionReports || [];\n                this.manifest.renditionReports.push(report);\n                const index = this.manifest.renditionReports.length - 1;\n                const required = ['LAST-MSN', 'URI'];\n                if (hasParts) {\n                  required.push('LAST-PART');\n                }\n                this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n              },\n              'part-inf'() {\n                this.manifest.partInf = camelCaseKeys(entry.attributes);\n                this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n                if (this.manifest.partInf.partTarget) {\n                  this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n                }\n                setHoldBack.call(this, this.manifest);\n              },\n              'daterange'() {\n                this.manifest.dateRanges.push(camelCaseKeys(entry.attributes));\n                const index = this.manifest.dateRanges.length - 1;\n                this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n                const dateRange = this.manifest.dateRanges[index];\n                if (dateRange.endDate && dateRange.startDate && new Date(dateRange.endDate) < new Date(dateRange.startDate)) {\n                  this.trigger('warn', {\n                    message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n                  });\n                }\n                if (dateRange.duration && dateRange.duration < 0) {\n                  this.trigger('warn', {\n                    message: 'EXT-X-DATERANGE DURATION must not be negative'\n                  });\n                }\n                if (dateRange.plannedDuration && dateRange.plannedDuration < 0) {\n                  this.trigger('warn', {\n                    message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n                  });\n                }\n                const endOnNextYes = !!dateRange.endOnNext;\n                if (endOnNextYes && !dateRange.class) {\n                  this.trigger('warn', {\n                    message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n                  });\n                }\n                if (endOnNextYes && (dateRange.duration || dateRange.endDate)) {\n                  this.trigger('warn', {\n                    message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n                  });\n                }\n                if (dateRange.duration && dateRange.endDate) {\n                  const startDate = dateRange.startDate;\n                  const newDateInSeconds = startDate.getTime() + dateRange.duration * 1000;\n                  this.manifest.dateRanges[index].endDate = new Date(newDateInSeconds);\n                }\n                if (!dateRangeTags[dateRange.id]) {\n                  dateRangeTags[dateRange.id] = dateRange;\n                } else {\n                  for (const attribute in dateRangeTags[dateRange.id]) {\n                    if (!!dateRange[attribute] && JSON.stringify(dateRangeTags[dateRange.id][attribute]) !== JSON.stringify(dateRange[attribute])) {\n                      this.trigger('warn', {\n                        message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values'\n                      });\n                      break;\n                    }\n                  } // if tags with the same ID do not have conflicting attributes, merge them\n\n                  const dateRangeWithSameId = this.manifest.dateRanges.findIndex(dateRangeToFind => dateRangeToFind.id === dateRange.id);\n                  this.manifest.dateRanges[dateRangeWithSameId] = _extends$1(this.manifest.dateRanges[dateRangeWithSameId], dateRange);\n                  dateRangeTags[dateRange.id] = _extends$1(dateRangeTags[dateRange.id], dateRange); // after merging, delete the duplicate dateRange that was added last\n\n                  this.manifest.dateRanges.pop();\n                }\n              },\n              'independent-segments'() {\n                this.manifest.independentSegments = true;\n              },\n              'i-frames-only'() {\n                this.manifest.iFramesOnly = true;\n                this.requiredCompatibilityversion(this.manifest.version, 4);\n              },\n              'content-steering'() {\n                this.manifest.contentSteering = camelCaseKeys(entry.attributes);\n                this.warnOnMissingAttributes_('#EXT-X-CONTENT-STEERING', entry.attributes, ['SERVER-URI']);\n              },\n              /** @this {Parser} */\n              define() {\n                this.manifest.definitions = this.manifest.definitions || {};\n                const addDef = (n, v) => {\n                  if (n in this.manifest.definitions) {\n                    // An EXT-X-DEFINE tag MUST NOT specify the same Variable Name as any other\n                    // EXT-X-DEFINE tag in the same Playlist.  Parsers that encounter duplicate\n                    // Variable Name declarations MUST fail to parse the Playlist.\n                    this.trigger('error', {\n                      message: `EXT-X-DEFINE: Duplicate name ${n}`\n                    });\n                    return;\n                  }\n                  this.manifest.definitions[n] = v;\n                };\n                if ('QUERYPARAM' in entry.attributes) {\n                  if ('NAME' in entry.attributes || 'IMPORT' in entry.attributes) {\n                    // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a\n                    // QUERYPARAM attribute, but only one of the three.  Otherwise, the\n                    // client MUST fail to parse the Playlist.\n                    this.trigger('error', {\n                      message: 'EXT-X-DEFINE: Invalid attributes'\n                    });\n                    return;\n                  }\n                  const val = this.params.get(entry.attributes.QUERYPARAM);\n                  if (!val) {\n                    // If the QUERYPARAM attribute value does not match any query parameter in\n                    // the URI or the matching parameter has no associated value, the parser\n                    // MUST fail to parse the Playlist.  If more than one parameter matches,\n                    // any of the associated values MAY be used.\n                    this.trigger('error', {\n                      message: `EXT-X-DEFINE: No query param ${entry.attributes.QUERYPARAM}`\n                    });\n                    return;\n                  }\n                  addDef(entry.attributes.QUERYPARAM, decodeURIComponent(val));\n                  return;\n                }\n                if ('NAME' in entry.attributes) {\n                  if ('IMPORT' in entry.attributes) {\n                    // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a\n                    // QUERYPARAM attribute, but only one of the three.  Otherwise, the\n                    // client MUST fail to parse the Playlist.\n                    this.trigger('error', {\n                      message: 'EXT-X-DEFINE: Invalid attributes'\n                    });\n                    return;\n                  }\n                  if (!('VALUE' in entry.attributes) || typeof entry.attributes.VALUE !== 'string') {\n                    // This attribute is REQUIRED if the EXT-X-DEFINE tag has a NAME attribute.\n                    // The quoted-string MAY be empty.\n                    this.trigger('error', {\n                      message: `EXT-X-DEFINE: No value for ${entry.attributes.NAME}`\n                    });\n                    return;\n                  }\n                  addDef(entry.attributes.NAME, entry.attributes.VALUE);\n                  return;\n                }\n                if ('IMPORT' in entry.attributes) {\n                  if (!this.mainDefinitions[entry.attributes.IMPORT]) {\n                    // Covers two conditions, as mainDefinitions will always be empty on main\n                    //\n                    // EXT-X-DEFINE tags containing the IMPORT attribute MUST NOT occur in\n                    // Multivariant Playlists; they are only allowed in Media Playlists.\n                    //\n                    // If the IMPORT attribute value does not match any Variable Name in the\n                    // Multivariant Playlist, or if the Media Playlist loaded from a\n                    // Multivariant Playlist, the parser MUST fail the Playlist.\n                    this.trigger('error', {\n                      message: `EXT-X-DEFINE: No value ${entry.attributes.IMPORT} to import, or IMPORT used on main playlist`\n                    });\n                    return;\n                  }\n                  addDef(entry.attributes.IMPORT, this.mainDefinitions[entry.attributes.IMPORT]);\n                  return;\n                } // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a QUERYPARAM\n                // attribute, but only one of the three.  Otherwise, the client MUST fail to\n                // parse the Playlist.\n\n                this.trigger('error', {\n                  message: 'EXT-X-DEFINE: No attribute'\n                });\n              },\n              'i-frame-playlist'() {\n                this.manifest.iFramePlaylists.push({\n                  attributes: entry.attributes,\n                  uri: entry.uri,\n                  timeline: currentTimeline\n                });\n                this.warnOnMissingAttributes_('#EXT-X-I-FRAME-STREAM-INF', entry.attributes, ['BANDWIDTH', 'URI']);\n              }\n            })[entry.tagType] || noop).call(self);\n          },\n          uri() {\n            currentUri.uri = entry.uri;\n            uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n            if (this.manifest.targetDuration && !('duration' in currentUri)) {\n              this.trigger('warn', {\n                message: 'defaulting segment duration to the target duration'\n              });\n              currentUri.duration = this.manifest.targetDuration;\n            } // annotate with encryption information, if necessary\n\n            if (key) {\n              currentUri.key = key;\n            }\n            currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n            if (currentMap) {\n              currentUri.map = currentMap;\n            } // reset the last byterange end as it needs to be 0 between parts\n\n            lastPartByterangeEnd = 0; // Once we have at least one program date time we can always extrapolate it forward\n\n            if (this.lastProgramDateTime !== null) {\n              currentUri.programDateTime = this.lastProgramDateTime;\n              this.lastProgramDateTime += currentUri.duration * 1000;\n            } // prepare for the next URI\n\n            currentUri = {};\n          },\n          comment() {// comments are not important for playback\n          },\n          custom() {\n            // if this is segment-level data attach the output to the segment\n            if (entry.segment) {\n              currentUri.custom = currentUri.custom || {};\n              currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n            } else {\n              this.manifest.custom = this.manifest.custom || {};\n              this.manifest.custom[entry.customType] = entry.data;\n            }\n          }\n        })[entry.type].call(self);\n      });\n    }\n    requiredCompatibilityversion(currentVersion, targetVersion) {\n      if (currentVersion < targetVersion || !currentVersion) {\n        this.trigger('warn', {\n          message: `manifest must be at least version ${targetVersion}`\n        });\n      }\n    }\n    warnOnMissingAttributes_(identifier, attributes, required) {\n      const missing = [];\n      required.forEach(function (key) {\n        if (!attributes.hasOwnProperty(key)) {\n          missing.push(key);\n        }\n      });\n      if (missing.length) {\n        this.trigger('warn', {\n          message: `${identifier} lacks required attribute(s): ${missing.join(', ')}`\n        });\n      }\n    }\n    /**\n     * Parse the input string and update the manifest object.\n     *\n     * @param {string} chunk a potentially incomplete portion of the manifest\n     */\n\n    push(chunk) {\n      this.lineStream.push(chunk);\n    }\n    /**\n     * Flush any remaining input. This can be handy if the last line of an M3U8\n     * manifest did not contain a trailing newline but the file has been\n     * completely received.\n     */\n\n    end() {\n      // flush any buffered input\n      this.lineStream.push('\\n');\n      if (this.manifest.dateRanges.length && this.lastProgramDateTime === null) {\n        this.trigger('warn', {\n          message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n        });\n      }\n      this.lastProgramDateTime = null;\n      this.trigger('end');\n    }\n    /**\n     * Add an additional parser for non-standard tags\n     *\n     * @param {Object}   options              a map of options for the added parser\n     * @param {RegExp}   options.expression   a regular expression to match the custom header\n     * @param {string}   options.customType   the custom type to register to the output\n     * @param {Function} [options.dataParser] function to parse the line into an object\n     * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n     */\n\n    addParser(options) {\n      this.parseStream.addParser(options);\n    }\n    /**\n     * Add a custom header mapper\n     *\n     * @param {Object}   options\n     * @param {RegExp}   options.expression   a regular expression to match the custom header\n     * @param {Function} options.map          function to translate tag into a different tag\n     */\n\n    addTagMapper(options) {\n      this.parseStream.addTagMapper(options);\n    }\n  }\n\n  var regexs = {\n    // to determine mime types\n    mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n    webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n    ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n    // to determine if a codec is audio or video\n    video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n    audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n    text: /^(stpp.ttml.im1t)/,\n    // mux.js support regex\n    muxerVideo: /^(avc0?1)/,\n    muxerAudio: /^(mp4a)/,\n    // match nothing as muxer does not support text right now.\n    // there cannot never be a character before the start of a string\n    // so this matches nothing.\n    muxerText: /a^/\n  };\n  var mediaTypes = ['video', 'audio', 'text'];\n  var upperMediaTypes = ['Video', 'Audio', 'Text'];\n  /**\n   * Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard\n   * `avc1.<hhhhhh>`\n   *\n   * @param {string} codec\n   *        Codec string to translate\n   * @return {string}\n   *         The translated codec string\n   */\n\n  var translateLegacyCodec = function translateLegacyCodec(codec) {\n    if (!codec) {\n      return codec;\n    }\n    return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n      var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n      var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n      return 'avc1.' + profileHex + '00' + avcLevelHex;\n    });\n  };\n  /**\n   * @typedef {Object} ParsedCodecInfo\n   * @property {number} codecCount\n   *           Number of codecs parsed\n   * @property {string} [videoCodec]\n   *           Parsed video codec (if found)\n   * @property {string} [videoObjectTypeIndicator]\n   *           Video object type indicator (if found)\n   * @property {string|null} audioProfile\n   *           Audio profile\n   */\n\n  /**\n   * Parses a codec string to retrieve the number of codecs specified, the video codec and\n   * object type indicator, and the audio profile.\n   *\n   * @param {string} [codecString]\n   *        The codec string to parse\n   * @return {ParsedCodecInfo}\n   *         Parsed codec info\n   */\n\n  var parseCodecs = function parseCodecs(codecString) {\n    if (codecString === void 0) {\n      codecString = '';\n    }\n    var codecs = codecString.split(',');\n    var result = [];\n    codecs.forEach(function (codec) {\n      codec = codec.trim();\n      var codecType;\n      mediaTypes.forEach(function (name) {\n        var match = regexs[name].exec(codec.toLowerCase());\n        if (!match || match.length <= 1) {\n          return;\n        }\n        codecType = name; // maintain codec case\n\n        var type = codec.substring(0, match[1].length);\n        var details = codec.replace(type, '');\n        result.push({\n          type: type,\n          details: details,\n          mediaType: name\n        });\n      });\n      if (!codecType) {\n        result.push({\n          type: codec,\n          details: '',\n          mediaType: 'unknown'\n        });\n      }\n    });\n    return result;\n  };\n  /**\n   * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n   * a default alternate audio playlist for the provided audio group.\n   *\n   * @param {Object} master\n   *        The master playlist\n   * @param {string} audioGroupId\n   *        ID of the audio group for which to find the default codec info\n   * @return {ParsedCodecInfo}\n   *         Parsed codec info\n   */\n\n  var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n    if (!master.mediaGroups.AUDIO || !audioGroupId) {\n      return null;\n    }\n    var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n    if (!audioGroup) {\n      return null;\n    }\n    for (var name in audioGroup) {\n      var audioType = audioGroup[name];\n      if (audioType.default && audioType.playlists) {\n        // codec should be the same for all playlists within the audio type\n        return parseCodecs(audioType.playlists[0].attributes.CODECS);\n      }\n    }\n    return null;\n  };\n  var isAudioCodec = function isAudioCodec(codec) {\n    if (codec === void 0) {\n      codec = '';\n    }\n    return regexs.audio.test(codec.trim().toLowerCase());\n  };\n  var isTextCodec = function isTextCodec(codec) {\n    if (codec === void 0) {\n      codec = '';\n    }\n    return regexs.text.test(codec.trim().toLowerCase());\n  };\n  var getMimeForCodec = function getMimeForCodec(codecString) {\n    if (!codecString || typeof codecString !== 'string') {\n      return;\n    }\n    var codecs = codecString.toLowerCase().split(',').map(function (c) {\n      return translateLegacyCodec(c.trim());\n    }); // default to video type\n\n    var type = 'video'; // only change to audio type if the only codec we have is\n    // audio\n\n    if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n      type = 'audio';\n    } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n      // text uses application/<container> for now\n      type = 'application';\n    } // default the container to mp4\n\n    var container = 'mp4'; // every codec must be able to go into the container\n    // for that container to be the correct one\n\n    if (codecs.every(function (c) {\n      return regexs.mp4.test(c);\n    })) {\n      container = 'mp4';\n    } else if (codecs.every(function (c) {\n      return regexs.webm.test(c);\n    })) {\n      container = 'webm';\n    } else if (codecs.every(function (c) {\n      return regexs.ogg.test(c);\n    })) {\n      container = 'ogg';\n    }\n    return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n  };\n  /**\n   * Tests whether the codec is supported by MediaSource. Optionally also tests ManagedMediaSource.\n   *\n   * @param {string} codecString\n   *        Codec to test\n   * @param {boolean} [withMMS]\n   *        Whether to check if ManagedMediaSource supports it\n   * @return {boolean}\n   *          Codec is supported\n   */\n\n  var browserSupportsCodec = function browserSupportsCodec(codecString, withMMS) {\n    if (codecString === void 0) {\n      codecString = '';\n    }\n    if (withMMS === void 0) {\n      withMMS = false;\n    }\n    return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || withMMS && window.ManagedMediaSource && window.ManagedMediaSource.isTypeSupported && window.ManagedMediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n  };\n  var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n    if (codecString === void 0) {\n      codecString = '';\n    }\n    return codecString.toLowerCase().split(',').every(function (codec) {\n      codec = codec.trim(); // any match is supported.\n\n      for (var i = 0; i < upperMediaTypes.length; i++) {\n        var type = upperMediaTypes[i];\n        if (regexs[\"muxer\" + type].test(codec)) {\n          return true;\n        }\n      }\n      return false;\n    });\n  };\n  var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\n  var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';\n\n  var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\n  var DASH_REGEX = /^application\\/dash\\+xml/i;\n  /**\n   * Returns a string that describes the type of source based on a video source object's\n   * media type.\n   *\n   * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n   *\n   * @param {string} type\n   *        Video source object media type\n   * @return {('hls'|'dash'|'vhs-json'|null)}\n   *         VHS source type string\n   */\n\n  var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n    if (MPEGURL_REGEX.test(type)) {\n      return 'hls';\n    }\n    if (DASH_REGEX.test(type)) {\n      return 'dash';\n    } // Denotes the special case of a manifest object passed to http-streaming instead of a\n    // source URL.\n    //\n    // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n    //\n    // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n    // project, and the +json suffix identifies the structure of the media type.\n\n    if (type === 'application/vnd.videojs.vhs+json') {\n      return 'vhs-json';\n    }\n    return null;\n  };\n\n  // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n  // we used to do this with log2 but BigInt does not support builtin math\n  // Math.ceil(log2(x));\n\n  var countBits = function countBits(x) {\n    return x.toString(2).length;\n  }; // count the number of whole bytes it would take to represent a number\n\n  var countBytes = function countBytes(x) {\n    return Math.ceil(countBits(x) / 8);\n  };\n  var isArrayBufferView = function isArrayBufferView(obj) {\n    if (ArrayBuffer.isView === 'function') {\n      return ArrayBuffer.isView(obj);\n    }\n    return obj && obj.buffer instanceof ArrayBuffer;\n  };\n  var isTypedArray = function isTypedArray(obj) {\n    return isArrayBufferView(obj);\n  };\n  var toUint8 = function toUint8(bytes) {\n    if (bytes instanceof Uint8Array) {\n      return bytes;\n    }\n    if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n      // any non-number or NaN leads to empty uint8array\n      // eslint-disable-next-line\n      if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n        bytes = 0;\n      } else {\n        bytes = [bytes];\n      }\n    }\n    return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n  };\n  var BigInt = window.BigInt || Number;\n  var BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n  (function () {\n    var a = new Uint16Array([0xFFCC]);\n    var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n    if (b[0] === 0xFF) {\n      return 'big';\n    }\n    if (b[0] === 0xCC) {\n      return 'little';\n    }\n    return 'unknown';\n  })();\n  var bytesToNumber = function bytesToNumber(bytes, _temp) {\n    var _ref = _temp === void 0 ? {} : _temp,\n      _ref$signed = _ref.signed,\n      signed = _ref$signed === void 0 ? false : _ref$signed,\n      _ref$le = _ref.le,\n      le = _ref$le === void 0 ? false : _ref$le;\n    bytes = toUint8(bytes);\n    var fn = le ? 'reduce' : 'reduceRight';\n    var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n    var number = obj.call(bytes, function (total, byte, i) {\n      var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n      return total + BigInt(byte) * BYTE_TABLE[exponent];\n    }, BigInt(0));\n    if (signed) {\n      var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n      number = BigInt(number);\n      if (number > max) {\n        number -= max;\n        number -= max;\n        number -= BigInt(2);\n      }\n    }\n    return Number(number);\n  };\n  var numberToBytes = function numberToBytes(number, _temp2) {\n    var _ref2 = _temp2 === void 0 ? {} : _temp2,\n      _ref2$le = _ref2.le,\n      le = _ref2$le === void 0 ? false : _ref2$le;\n\n    // eslint-disable-next-line\n    if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n      number = 0;\n    }\n    number = BigInt(number);\n    var byteCount = countBytes(number);\n    var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n    for (var i = 0; i < byteCount; i++) {\n      var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n      bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n      if (number < 0) {\n        bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n        bytes[byteIndex] -= i === 0 ? 1 : 2;\n      }\n    }\n    return bytes;\n  };\n  var stringToBytes = function stringToBytes(string, stringIsBytes) {\n    if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n      string = string.toString();\n    }\n    if (typeof string !== 'string') {\n      return new Uint8Array();\n    } // If the string already is bytes, we don't have to do this\n    // otherwise we do this so that we split multi length characters\n    // into individual bytes\n\n    if (!stringIsBytes) {\n      string = unescape(encodeURIComponent(string));\n    }\n    var view = new Uint8Array(string.length);\n    for (var i = 0; i < string.length; i++) {\n      view[i] = string.charCodeAt(i);\n    }\n    return view;\n  };\n  var concatTypedArrays = function concatTypedArrays() {\n    for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n      buffers[_key] = arguments[_key];\n    }\n    buffers = buffers.filter(function (b) {\n      return b && (b.byteLength || b.length) && typeof b !== 'string';\n    });\n    if (buffers.length <= 1) {\n      // for 0 length we will return empty uint8\n      // for 1 length we return the first uint8\n      return toUint8(buffers[0]);\n    }\n    var totalLen = buffers.reduce(function (total, buf, i) {\n      return total + (buf.byteLength || buf.length);\n    }, 0);\n    var tempBuffer = new Uint8Array(totalLen);\n    var offset = 0;\n    buffers.forEach(function (buf) {\n      buf = toUint8(buf);\n      tempBuffer.set(buf, offset);\n      offset += buf.byteLength;\n    });\n    return tempBuffer;\n  };\n  /**\n   * Check if the bytes \"b\" are contained within bytes \"a\".\n   *\n   * @param {Uint8Array|Array} a\n   *        Bytes to check in\n   *\n   * @param {Uint8Array|Array} b\n   *        Bytes to check for\n   *\n   * @param {Object} options\n   *        options\n   *\n   * @param {Array|Uint8Array} [offset=0]\n   *        offset to use when looking at bytes in a\n   *\n   * @param {Array|Uint8Array} [mask=[]]\n   *        mask to use on bytes before comparison.\n   *\n   * @return {boolean}\n   *         If all bytes in b are inside of a, taking into account\n   *         bit masks.\n   */\n\n  var bytesMatch = function bytesMatch(a, b, _temp3) {\n    var _ref3 = _temp3 === void 0 ? {} : _temp3,\n      _ref3$offset = _ref3.offset,\n      offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n      _ref3$mask = _ref3.mask,\n      mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n    a = toUint8(a);\n    b = toUint8(b); // ie 11 does not support uint8 every\n\n    var fn = b.every ? b.every : Array.prototype.every;\n    return b.length && a.length - offset >= b.length &&\n    // ie 11 doesn't support every on uin8\n    fn.call(b, function (bByte, i) {\n      var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n      return bByte === aByte;\n    });\n  };\n\n  /**\n   * Loops through all supported media groups in master and calls the provided\n   * callback for each group\n   *\n   * @param {Object} master\n   *        The parsed master manifest object\n   * @param {string[]} groups\n   *        The media groups to call the callback for\n   * @param {Function} callback\n   *        Callback to call for each media group\n   */\n  var forEachMediaGroup$1 = function forEachMediaGroup(master, groups, callback) {\n    groups.forEach(function (mediaType) {\n      for (var groupKey in master.mediaGroups[mediaType]) {\n        for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n          var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n          callback(mediaProperties, mediaType, groupKey, labelKey);\n        }\n      }\n    });\n  };\n\n  /**\n   * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n   *\n   * Works with anything that has a `length` property and index access properties, including NodeList.\n   *\n   * @template {unknown} T\n   * @param {Array<T> | ({length:number, [number]: T})} list\n   * @param {function (item: T, index: number, list:Array<T> | ({length:number, [number]: T})):boolean} predicate\n   * @param {Partial<Pick<ArrayConstructor['prototype'], 'find'>>?} ac `Array.prototype` by default,\n   * \t\t\t\tallows injecting a custom implementation in tests\n   * @returns {T | undefined}\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n   * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n   */\n  function find$1(list, predicate, ac) {\n    if (ac === undefined) {\n      ac = Array.prototype;\n    }\n    if (list && typeof ac.find === 'function') {\n      return ac.find.call(list, predicate);\n    }\n    for (var i = 0; i < list.length; i++) {\n      if (Object.prototype.hasOwnProperty.call(list, i)) {\n        var item = list[i];\n        if (predicate.call(undefined, item, i, list)) {\n          return item;\n        }\n      }\n    }\n  }\n\n  /**\n   * \"Shallow freezes\" an object to render it immutable.\n   * Uses `Object.freeze` if available,\n   * otherwise the immutability is only in the type.\n   *\n   * Is used to create \"enum like\" objects.\n   *\n   * @template T\n   * @param {T} object the object to freeze\n   * @param {Pick<ObjectConstructor, 'freeze'> = Object} oc `Object` by default,\n   * \t\t\t\tallows to inject custom object constructor for tests\n   * @returns {Readonly<T>}\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n   */\n  function freeze(object, oc) {\n    if (oc === undefined) {\n      oc = Object;\n    }\n    return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object;\n  }\n\n  /**\n   * Since we can not rely on `Object.assign` we provide a simplified version\n   * that is sufficient for our needs.\n   *\n   * @param {Object} target\n   * @param {Object | null | undefined} source\n   *\n   * @returns {Object} target\n   * @throws TypeError if target is not an object\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n   * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n   */\n  function assign(target, source) {\n    if (target === null || typeof target !== 'object') {\n      throw new TypeError('target is not an object');\n    }\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n    return target;\n  }\n\n  /**\n   * All mime types that are allowed as input to `DOMParser.parseFromString`\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n   * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n   * @see DOMParser.prototype.parseFromString\n   */\n  var MIME_TYPE = freeze({\n    /**\n     * `text/html`, the only mime type that triggers treating an XML document as HTML.\n     *\n     * @see DOMParser.SupportedType.isHTML\n     * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n     * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n     * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n     */\n    HTML: 'text/html',\n    /**\n     * Helper method to check a mime type if it indicates an HTML document\n     *\n     * @param {string} [value]\n     * @returns {boolean}\n     *\n     * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n     * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n     * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n    isHTML: function (value) {\n      return value === MIME_TYPE.HTML;\n    },\n    /**\n     * `application/xml`, the standard mime type for XML documents.\n     *\n     * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n     * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n     * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n     */\n    XML_APPLICATION: 'application/xml',\n    /**\n     * `text/html`, an alias for `application/xml`.\n     *\n     * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n     * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n     * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n     */\n    XML_TEXT: 'text/xml',\n    /**\n     * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n     * but is parsed as an XML document.\n     *\n     * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n     * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n     * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n     */\n    XML_XHTML_APPLICATION: 'application/xhtml+xml',\n    /**\n     * `image/svg+xml`,\n     *\n     * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n     * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n     * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n     */\n    XML_SVG_IMAGE: 'image/svg+xml'\n  });\n\n  /**\n   * Namespaces that are used in this code base.\n   *\n   * @see http://www.w3.org/TR/REC-xml-names\n   */\n  var NAMESPACE$3 = freeze({\n    /**\n     * The XHTML namespace.\n     *\n     * @see http://www.w3.org/1999/xhtml\n     */\n    HTML: 'http://www.w3.org/1999/xhtml',\n    /**\n     * Checks if `uri` equals `NAMESPACE.HTML`.\n     *\n     * @param {string} [uri]\n     *\n     * @see NAMESPACE.HTML\n     */\n    isHTML: function (uri) {\n      return uri === NAMESPACE$3.HTML;\n    },\n    /**\n     * The SVG namespace.\n     *\n     * @see http://www.w3.org/2000/svg\n     */\n    SVG: 'http://www.w3.org/2000/svg',\n    /**\n     * The `xml:` namespace.\n     *\n     * @see http://www.w3.org/XML/1998/namespace\n     */\n    XML: 'http://www.w3.org/XML/1998/namespace',\n    /**\n     * The `xmlns:` namespace\n     *\n     * @see https://www.w3.org/2000/xmlns/\n     */\n    XMLNS: 'http://www.w3.org/2000/xmlns/'\n  });\n  var assign_1 = assign;\n  var find_1 = find$1;\n  var freeze_1 = freeze;\n  var MIME_TYPE_1 = MIME_TYPE;\n  var NAMESPACE_1 = NAMESPACE$3;\n  var conventions = {\n    assign: assign_1,\n    find: find_1,\n    freeze: freeze_1,\n    MIME_TYPE: MIME_TYPE_1,\n    NAMESPACE: NAMESPACE_1\n  };\n\n  var find = conventions.find;\n  var NAMESPACE$2 = conventions.NAMESPACE;\n\n  /**\n   * A prerequisite for `[].filter`, to drop elements that are empty\n   * @param {string} input\n   * @returns {boolean}\n   */\n  function notEmptyString(input) {\n    return input !== '';\n  }\n  /**\n   * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n   * @see https://infra.spec.whatwg.org/#ascii-whitespace\n   *\n   * @param {string} input\n   * @returns {string[]} (can be empty)\n   */\n  function splitOnASCIIWhitespace(input) {\n    // U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n    return input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : [];\n  }\n\n  /**\n   * Adds element as a key to current if it is not already present.\n   *\n   * @param {Record<string, boolean | undefined>} current\n   * @param {string} element\n   * @returns {Record<string, boolean | undefined>}\n   */\n  function orderedSetReducer(current, element) {\n    if (!current.hasOwnProperty(element)) {\n      current[element] = true;\n    }\n    return current;\n  }\n\n  /**\n   * @see https://infra.spec.whatwg.org/#ordered-set\n   * @param {string} input\n   * @returns {string[]}\n   */\n  function toOrderedSet(input) {\n    if (!input) return [];\n    var list = splitOnASCIIWhitespace(input);\n    return Object.keys(list.reduce(orderedSetReducer, {}));\n  }\n\n  /**\n   * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n   * which we can not rely on being available.\n   *\n   * @param {any[]} list\n   * @returns {function(any): boolean}\n   */\n  function arrayIncludes(list) {\n    return function (element) {\n      return list && list.indexOf(element) !== -1;\n    };\n  }\n  function copy(src, dest) {\n    for (var p in src) {\n      if (Object.prototype.hasOwnProperty.call(src, p)) {\n        dest[p] = src[p];\n      }\n    }\n  }\n\n  /**\n  ^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n  ^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n   */\n  function _extends(Class, Super) {\n    var pt = Class.prototype;\n    if (!(pt instanceof Super)) {\n      function t() {}\n      t.prototype = Super.prototype;\n      t = new t();\n      copy(pt, t);\n      Class.prototype = pt = t;\n    }\n    if (pt.constructor != Class) {\n      if (typeof Class != 'function') {\n        console.error(\"unknown Class:\" + Class);\n      }\n      pt.constructor = Class;\n    }\n  }\n\n  // Node Types\n  var NodeType = {};\n  var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;\n  var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;\n  var TEXT_NODE = NodeType.TEXT_NODE = 3;\n  var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;\n  var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;\n  var ENTITY_NODE = NodeType.ENTITY_NODE = 6;\n  var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\n  var COMMENT_NODE = NodeType.COMMENT_NODE = 8;\n  var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;\n  var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;\n  var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;\n  var NOTATION_NODE = NodeType.NOTATION_NODE = 12;\n\n  // ExceptionCode\n  var ExceptionCode = {};\n  var ExceptionMessage = {};\n  ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = \"Index size error\", 1);\n  ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = \"DOMString size error\", 2);\n  var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = \"Hierarchy request error\", 3);\n  ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = \"Wrong document\", 4);\n  ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = \"Invalid character\", 5);\n  ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = \"No data allowed\", 6);\n  ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = \"No modification allowed\", 7);\n  var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = \"Not found\", 8);\n  ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = \"Not supported\", 9);\n  var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = \"Attribute in use\", 10);\n  //level2\n  ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = \"Invalid state\", 11);\n  ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = \"Syntax error\", 12);\n  ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = \"Invalid modification\", 13);\n  ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = \"Invalid namespace\", 14);\n  ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = \"Invalid access\", 15);\n\n  /**\n   * DOM Level 2\n   * Object DOMException\n   * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n   * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n   */\n  function DOMException(code, message) {\n    if (message instanceof Error) {\n      var error = message;\n    } else {\n      error = this;\n      Error.call(this, ExceptionMessage[code]);\n      this.message = ExceptionMessage[code];\n      if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n    }\n    error.code = code;\n    if (message) this.message = this.message + \": \" + message;\n    return error;\n  }\n  DOMException.prototype = Error.prototype;\n  copy(ExceptionCode, DOMException);\n\n  /**\n   * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n   * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n   * The items in the NodeList are accessible via an integral index, starting from 0.\n   */\n  function NodeList() {}\n  NodeList.prototype = {\n    /**\n     * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n     * @standard level1\n     */\n    length: 0,\n    /**\n     * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n     * @standard level1\n     * @param index  unsigned long\n     *   Index into the collection.\n     * @return Node\n     * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n     */\n    item: function (index) {\n      return index >= 0 && index < this.length ? this[index] : null;\n    },\n    toString: function (isHTML, nodeFilter) {\n      for (var buf = [], i = 0; i < this.length; i++) {\n        serializeToString(this[i], buf, isHTML, nodeFilter);\n      }\n      return buf.join('');\n    },\n    /**\n     * @private\n     * @param {function (Node):boolean} predicate\n     * @returns {Node[]}\n     */\n    filter: function (predicate) {\n      return Array.prototype.filter.call(this, predicate);\n    },\n    /**\n     * @private\n     * @param {Node} item\n     * @returns {number}\n     */\n    indexOf: function (item) {\n      return Array.prototype.indexOf.call(this, item);\n    }\n  };\n  function LiveNodeList(node, refresh) {\n    this._node = node;\n    this._refresh = refresh;\n    _updateLiveList(this);\n  }\n  function _updateLiveList(list) {\n    var inc = list._node._inc || list._node.ownerDocument._inc;\n    if (list._inc !== inc) {\n      var ls = list._refresh(list._node);\n      __set__(list, 'length', ls.length);\n      if (!list.$$length || ls.length < list.$$length) {\n        for (var i = ls.length; i in list; i++) {\n          if (Object.prototype.hasOwnProperty.call(list, i)) {\n            delete list[i];\n          }\n        }\n      }\n      copy(ls, list);\n      list._inc = inc;\n    }\n  }\n  LiveNodeList.prototype.item = function (i) {\n    _updateLiveList(this);\n    return this[i] || null;\n  };\n  _extends(LiveNodeList, NodeList);\n\n  /**\n   * Objects implementing the NamedNodeMap interface are used\n   * to represent collections of nodes that can be accessed by name.\n   * Note that NamedNodeMap does not inherit from NodeList;\n   * NamedNodeMaps are not maintained in any particular order.\n   * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index,\n   * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap,\n   * and does not imply that the DOM specifies an order to these Nodes.\n   * NamedNodeMap objects in the DOM are live.\n   * used for attributes or DocumentType entities\n   */\n  function NamedNodeMap() {}\n  function _findNodeIndex(list, node) {\n    var i = list.length;\n    while (i--) {\n      if (list[i] === node) {\n        return i;\n      }\n    }\n  }\n  function _addNamedNode(el, list, newAttr, oldAttr) {\n    if (oldAttr) {\n      list[_findNodeIndex(list, oldAttr)] = newAttr;\n    } else {\n      list[list.length++] = newAttr;\n    }\n    if (el) {\n      newAttr.ownerElement = el;\n      var doc = el.ownerDocument;\n      if (doc) {\n        oldAttr && _onRemoveAttribute(doc, el, oldAttr);\n        _onAddAttribute(doc, el, newAttr);\n      }\n    }\n  }\n  function _removeNamedNode(el, list, attr) {\n    //console.log('remove attr:'+attr)\n    var i = _findNodeIndex(list, attr);\n    if (i >= 0) {\n      var lastIndex = list.length - 1;\n      while (i < lastIndex) {\n        list[i] = list[++i];\n      }\n      list.length = lastIndex;\n      if (el) {\n        var doc = el.ownerDocument;\n        if (doc) {\n          _onRemoveAttribute(doc, el, attr);\n          attr.ownerElement = null;\n        }\n      }\n    } else {\n      throw new DOMException(NOT_FOUND_ERR, new Error(el.tagName + '@' + attr));\n    }\n  }\n  NamedNodeMap.prototype = {\n    length: 0,\n    item: NodeList.prototype.item,\n    getNamedItem: function (key) {\n      //\t\tif(key.indexOf(':')>0 || key == 'xmlns'){\n      //\t\t\treturn null;\n      //\t\t}\n      //console.log()\n      var i = this.length;\n      while (i--) {\n        var attr = this[i];\n        //console.log(attr.nodeName,key)\n        if (attr.nodeName == key) {\n          return attr;\n        }\n      }\n    },\n    setNamedItem: function (attr) {\n      var el = attr.ownerElement;\n      if (el && el != this._ownerElement) {\n        throw new DOMException(INUSE_ATTRIBUTE_ERR);\n      }\n      var oldAttr = this.getNamedItem(attr.nodeName);\n      _addNamedNode(this._ownerElement, this, attr, oldAttr);\n      return oldAttr;\n    },\n    /* returns Node */\n    setNamedItemNS: function (attr) {\n      // raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n      var el = attr.ownerElement,\n        oldAttr;\n      if (el && el != this._ownerElement) {\n        throw new DOMException(INUSE_ATTRIBUTE_ERR);\n      }\n      oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName);\n      _addNamedNode(this._ownerElement, this, attr, oldAttr);\n      return oldAttr;\n    },\n    /* returns Node */\n    removeNamedItem: function (key) {\n      var attr = this.getNamedItem(key);\n      _removeNamedNode(this._ownerElement, this, attr);\n      return attr;\n    },\n    // raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n    //for level2\n    removeNamedItemNS: function (namespaceURI, localName) {\n      var attr = this.getNamedItemNS(namespaceURI, localName);\n      _removeNamedNode(this._ownerElement, this, attr);\n      return attr;\n    },\n    getNamedItemNS: function (namespaceURI, localName) {\n      var i = this.length;\n      while (i--) {\n        var node = this[i];\n        if (node.localName == localName && node.namespaceURI == namespaceURI) {\n          return node;\n        }\n      }\n      return null;\n    }\n  };\n\n  /**\n   * The DOMImplementation interface represents an object providing methods\n   * which are not dependent on any particular document.\n   * Such an object is returned by the `Document.implementation` property.\n   *\n   * __The individual methods describe the differences compared to the specs.__\n   *\n   * @constructor\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n   * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n   * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n   * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n   * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n   */\n  function DOMImplementation$1() {}\n  DOMImplementation$1.prototype = {\n    /**\n     * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n     * The different implementations fairly diverged in what kind of features were reported.\n     * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n     *\n     * @deprecated It is deprecated and modern browsers return true in all cases.\n     *\n     * @param {string} feature\n     * @param {string} [version]\n     * @returns {boolean} always true\n     *\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n     * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n     * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n     */\n    hasFeature: function (feature, version) {\n      return true;\n    },\n    /**\n     * Creates an XML Document object of the specified type with its document element.\n     *\n     * __It behaves slightly different from the description in the living standard__:\n     * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n     * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n     * - this implementation is not validating names or qualified names\n     *   (when parsing XML strings, the SAX parser takes care of that)\n     *\n     * @param {string|null} namespaceURI\n     * @param {string} qualifiedName\n     * @param {DocumentType=null} doctype\n     * @returns {Document}\n     *\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n     * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n     * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument  DOM Level 2 Core\n     *\n     * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n     * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n     * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n     */\n    createDocument: function (namespaceURI, qualifiedName, doctype) {\n      var doc = new Document();\n      doc.implementation = this;\n      doc.childNodes = new NodeList();\n      doc.doctype = doctype || null;\n      if (doctype) {\n        doc.appendChild(doctype);\n      }\n      if (qualifiedName) {\n        var root = doc.createElementNS(namespaceURI, qualifiedName);\n        doc.appendChild(root);\n      }\n      return doc;\n    },\n    /**\n     * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n     *\n     * __This behavior is slightly different from the in the specs__:\n     * - this implementation is not validating names or qualified names\n     *   (when parsing XML strings, the SAX parser takes care of that)\n     *\n     * @param {string} qualifiedName\n     * @param {string} [publicId]\n     * @param {string} [systemId]\n     * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n     * \t\t\t\t  or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n     *\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n     * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n     * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n     *\n     * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n     * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n     * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n     */\n    createDocumentType: function (qualifiedName, publicId, systemId) {\n      var node = new DocumentType();\n      node.name = qualifiedName;\n      node.nodeName = qualifiedName;\n      node.publicId = publicId || '';\n      node.systemId = systemId || '';\n      return node;\n    }\n  };\n\n  /**\n   * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n   */\n\n  function Node() {}\n  Node.prototype = {\n    firstChild: null,\n    lastChild: null,\n    previousSibling: null,\n    nextSibling: null,\n    attributes: null,\n    parentNode: null,\n    childNodes: null,\n    ownerDocument: null,\n    nodeValue: null,\n    namespaceURI: null,\n    prefix: null,\n    localName: null,\n    // Modified in DOM Level 2:\n    insertBefore: function (newChild, refChild) {\n      //raises\n      return _insertBefore(this, newChild, refChild);\n    },\n    replaceChild: function (newChild, oldChild) {\n      //raises\n      _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n      if (oldChild) {\n        this.removeChild(oldChild);\n      }\n    },\n    removeChild: function (oldChild) {\n      return _removeChild(this, oldChild);\n    },\n    appendChild: function (newChild) {\n      return this.insertBefore(newChild, null);\n    },\n    hasChildNodes: function () {\n      return this.firstChild != null;\n    },\n    cloneNode: function (deep) {\n      return cloneNode(this.ownerDocument || this, this, deep);\n    },\n    // Modified in DOM Level 2:\n    normalize: function () {\n      var child = this.firstChild;\n      while (child) {\n        var next = child.nextSibling;\n        if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) {\n          this.removeChild(next);\n          child.appendData(next.data);\n        } else {\n          child.normalize();\n          child = next;\n        }\n      }\n    },\n    // Introduced in DOM Level 2:\n    isSupported: function (feature, version) {\n      return this.ownerDocument.implementation.hasFeature(feature, version);\n    },\n    // Introduced in DOM Level 2:\n    hasAttributes: function () {\n      return this.attributes.length > 0;\n    },\n    /**\n     * Look up the prefix associated to the given namespace URI, starting from this node.\n     * **The default namespace declarations are ignored by this method.**\n     * See Namespace Prefix Lookup for details on the algorithm used by this method.\n     *\n     * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n     *\n     * @param {string | null} namespaceURI\n     * @returns {string | null}\n     * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n     * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n     * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n     * @see https://github.com/xmldom/xmldom/issues/322\n     */\n    lookupPrefix: function (namespaceURI) {\n      var el = this;\n      while (el) {\n        var map = el._nsMap;\n        //console.dir(map)\n        if (map) {\n          for (var n in map) {\n            if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n              return n;\n            }\n          }\n        }\n        el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;\n      }\n      return null;\n    },\n    // Introduced in DOM Level 3:\n    lookupNamespaceURI: function (prefix) {\n      var el = this;\n      while (el) {\n        var map = el._nsMap;\n        //console.dir(map)\n        if (map) {\n          if (Object.prototype.hasOwnProperty.call(map, prefix)) {\n            return map[prefix];\n          }\n        }\n        el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;\n      }\n      return null;\n    },\n    // Introduced in DOM Level 3:\n    isDefaultNamespace: function (namespaceURI) {\n      var prefix = this.lookupPrefix(namespaceURI);\n      return prefix == null;\n    }\n  };\n  function _xmlEncoder(c) {\n    return c == '<' && '&lt;' || c == '>' && '&gt;' || c == '&' && '&amp;' || c == '\"' && '&quot;' || '&#' + c.charCodeAt() + ';';\n  }\n  copy(NodeType, Node);\n  copy(NodeType, Node.prototype);\n\n  /**\n   * @param callback return true for continue,false for break\n   * @return boolean true: break visit;\n   */\n  function _visitNode(node, callback) {\n    if (callback(node)) {\n      return true;\n    }\n    if (node = node.firstChild) {\n      do {\n        if (_visitNode(node, callback)) {\n          return true;\n        }\n      } while (node = node.nextSibling);\n    }\n  }\n  function Document() {\n    this.ownerDocument = this;\n  }\n  function _onAddAttribute(doc, el, newAttr) {\n    doc && doc._inc++;\n    var ns = newAttr.namespaceURI;\n    if (ns === NAMESPACE$2.XMLNS) {\n      //update namespace\n      el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value;\n    }\n  }\n  function _onRemoveAttribute(doc, el, newAttr, remove) {\n    doc && doc._inc++;\n    var ns = newAttr.namespaceURI;\n    if (ns === NAMESPACE$2.XMLNS) {\n      //update namespace\n      delete el._nsMap[newAttr.prefix ? newAttr.localName : ''];\n    }\n  }\n\n  /**\n   * Updates `el.childNodes`, updating the indexed items and it's `length`.\n   * Passing `newChild` means it will be appended.\n   * Otherwise it's assumed that an item has been removed,\n   * and `el.firstNode` and it's `.nextSibling` are used\n   * to walk the current list of child nodes.\n   *\n   * @param {Document} doc\n   * @param {Node} el\n   * @param {Node} [newChild]\n   * @private\n   */\n  function _onUpdateChild(doc, el, newChild) {\n    if (doc && doc._inc) {\n      doc._inc++;\n      //update childNodes\n      var cs = el.childNodes;\n      if (newChild) {\n        cs[cs.length++] = newChild;\n      } else {\n        var child = el.firstChild;\n        var i = 0;\n        while (child) {\n          cs[i++] = child;\n          child = child.nextSibling;\n        }\n        cs.length = i;\n        delete cs[cs.length];\n      }\n    }\n  }\n\n  /**\n   * Removes the connections between `parentNode` and `child`\n   * and any existing `child.previousSibling` or `child.nextSibling`.\n   *\n   * @see https://github.com/xmldom/xmldom/issues/135\n   * @see https://github.com/xmldom/xmldom/issues/145\n   *\n   * @param {Node} parentNode\n   * @param {Node} child\n   * @returns {Node} the child that was removed.\n   * @private\n   */\n  function _removeChild(parentNode, child) {\n    var previous = child.previousSibling;\n    var next = child.nextSibling;\n    if (previous) {\n      previous.nextSibling = next;\n    } else {\n      parentNode.firstChild = next;\n    }\n    if (next) {\n      next.previousSibling = previous;\n    } else {\n      parentNode.lastChild = previous;\n    }\n    child.parentNode = null;\n    child.previousSibling = null;\n    child.nextSibling = null;\n    _onUpdateChild(parentNode.ownerDocument, parentNode);\n    return child;\n  }\n\n  /**\n   * Returns `true` if `node` can be a parent for insertion.\n   * @param {Node} node\n   * @returns {boolean}\n   */\n  function hasValidParentNodeType(node) {\n    return node && (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE);\n  }\n\n  /**\n   * Returns `true` if `node` can be inserted according to it's `nodeType`.\n   * @param {Node} node\n   * @returns {boolean}\n   */\n  function hasInsertableNodeType(node) {\n    return node && (isElementNode(node) || isTextNode(node) || isDocTypeNode(node) || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.COMMENT_NODE || node.nodeType === Node.PROCESSING_INSTRUCTION_NODE);\n  }\n\n  /**\n   * Returns true if `node` is a DOCTYPE node\n   * @param {Node} node\n   * @returns {boolean}\n   */\n  function isDocTypeNode(node) {\n    return node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n  }\n\n  /**\n   * Returns true if the node is an element\n   * @param {Node} node\n   * @returns {boolean}\n   */\n  function isElementNode(node) {\n    return node && node.nodeType === Node.ELEMENT_NODE;\n  }\n  /**\n   * Returns true if `node` is a text node\n   * @param {Node} node\n   * @returns {boolean}\n   */\n  function isTextNode(node) {\n    return node && node.nodeType === Node.TEXT_NODE;\n  }\n\n  /**\n   * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n   * according to the presence and position of a doctype node on the same level.\n   *\n   * @param {Document} doc The document node\n   * @param {Node} child the node that would become the nextSibling if the element would be inserted\n   * @returns {boolean} `true` if an element can be inserted before child\n   * @private\n   * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n   */\n  function isElementInsertionPossible(doc, child) {\n    var parentChildNodes = doc.childNodes || [];\n    if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n      return false;\n    }\n    var docTypeNode = find(parentChildNodes, isDocTypeNode);\n    return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n  }\n\n  /**\n   * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n   * according to the presence and position of a doctype node on the same level.\n   *\n   * @param {Node} doc The document node\n   * @param {Node} child the node that would become the nextSibling if the element would be inserted\n   * @returns {boolean} `true` if an element can be inserted before child\n   * @private\n   * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n   */\n  function isElementReplacementPossible(doc, child) {\n    var parentChildNodes = doc.childNodes || [];\n    function hasElementChildThatIsNotChild(node) {\n      return isElementNode(node) && node !== child;\n    }\n    if (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n      return false;\n    }\n    var docTypeNode = find(parentChildNodes, isDocTypeNode);\n    return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n  }\n\n  /**\n   * @private\n   * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n   *\n   * @param {Node} parent the parent node to insert `node` into\n   * @param {Node} node the node to insert\n   * @param {Node=} child the node that should become the `nextSibling` of `node`\n   * @returns {Node}\n   * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n   * @throws DOMException if `child` is provided but is not a child of `parent`.\n   * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n   * @see https://dom.spec.whatwg.org/#concept-node-replace\n   */\n  function assertPreInsertionValidity1to5(parent, node, child) {\n    // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n    if (!hasValidParentNodeType(parent)) {\n      throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n    }\n    // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n    // not implemented!\n    // 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n    if (child && child.parentNode !== parent) {\n      throw new DOMException(NOT_FOUND_ERR, 'child not in parent');\n    }\n    if (\n    // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n    !hasInsertableNodeType(node) ||\n    // 5. If either `node` is a Text node and `parent` is a document,\n    // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n    // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n    // or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n    isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE) {\n      throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType);\n    }\n  }\n\n  /**\n   * @private\n   * Step 6 of the checks before inserting and before replacing a child are different.\n   *\n   * @param {Document} parent the parent node to insert `node` into\n   * @param {Node} node the node to insert\n   * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n   * @returns {Node}\n   * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n   * @throws DOMException if `child` is provided but is not a child of `parent`.\n   * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n   * @see https://dom.spec.whatwg.org/#concept-node-replace\n   */\n  function assertPreInsertionValidityInDocument(parent, node, child) {\n    var parentChildNodes = parent.childNodes || [];\n    var nodeChildNodes = node.childNodes || [];\n\n    // DocumentFragment\n    if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n      var nodeChildElements = nodeChildNodes.filter(isElementNode);\n      // If node has more than one element child or has a Text node child.\n      if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n      }\n      // Otherwise, if `node` has one element child and either `parent` has an element child,\n      // `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n      if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n      }\n    }\n    // Element\n    if (isElementNode(node)) {\n      // `parent` has an element child, `child` is a doctype,\n      // or `child` is non-null and a doctype is following `child`.\n      if (!isElementInsertionPossible(parent, child)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n      }\n    }\n    // DocumentType\n    if (isDocTypeNode(node)) {\n      // `parent` has a doctype child,\n      if (find(parentChildNodes, isDocTypeNode)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n      }\n      var parentElementChild = find(parentChildNodes, isElementNode);\n      // `child` is non-null and an element is preceding `child`,\n      if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n      }\n      // or `child` is null and `parent` has an element child.\n      if (!child && parentElementChild) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n      }\n    }\n  }\n\n  /**\n   * @private\n   * Step 6 of the checks before inserting and before replacing a child are different.\n   *\n   * @param {Document} parent the parent node to insert `node` into\n   * @param {Node} node the node to insert\n   * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n   * @returns {Node}\n   * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n   * @throws DOMException if `child` is provided but is not a child of `parent`.\n   * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n   * @see https://dom.spec.whatwg.org/#concept-node-replace\n   */\n  function assertPreReplacementValidityInDocument(parent, node, child) {\n    var parentChildNodes = parent.childNodes || [];\n    var nodeChildNodes = node.childNodes || [];\n\n    // DocumentFragment\n    if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n      var nodeChildElements = nodeChildNodes.filter(isElementNode);\n      // If `node` has more than one element child or has a Text node child.\n      if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n      }\n      // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n      if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n      }\n    }\n    // Element\n    if (isElementNode(node)) {\n      // `parent` has an element child that is not `child` or a doctype is following `child`.\n      if (!isElementReplacementPossible(parent, child)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n      }\n    }\n    // DocumentType\n    if (isDocTypeNode(node)) {\n      function hasDoctypeChildThatIsNotChild(node) {\n        return isDocTypeNode(node) && node !== child;\n      }\n\n      // `parent` has a doctype child that is not `child`,\n      if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n      }\n      var parentElementChild = find(parentChildNodes, isElementNode);\n      // or an element is preceding `child`.\n      if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n        throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n      }\n    }\n  }\n\n  /**\n   * @private\n   * @param {Node} parent the parent node to insert `node` into\n   * @param {Node} node the node to insert\n   * @param {Node=} child the node that should become the `nextSibling` of `node`\n   * @returns {Node}\n   * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n   * @throws DOMException if `child` is provided but is not a child of `parent`.\n   * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n   */\n  function _insertBefore(parent, node, child, _inDocumentAssertion) {\n    // To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n    assertPreInsertionValidity1to5(parent, node, child);\n\n    // If parent is a document, and any of the statements below, switched on the interface node implements,\n    // are true, then throw a \"HierarchyRequestError\" DOMException.\n    if (parent.nodeType === Node.DOCUMENT_NODE) {\n      (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n    }\n    var cp = node.parentNode;\n    if (cp) {\n      cp.removeChild(node); //remove and update\n    }\n    if (node.nodeType === DOCUMENT_FRAGMENT_NODE) {\n      var newFirst = node.firstChild;\n      if (newFirst == null) {\n        return node;\n      }\n      var newLast = node.lastChild;\n    } else {\n      newFirst = newLast = node;\n    }\n    var pre = child ? child.previousSibling : parent.lastChild;\n    newFirst.previousSibling = pre;\n    newLast.nextSibling = child;\n    if (pre) {\n      pre.nextSibling = newFirst;\n    } else {\n      parent.firstChild = newFirst;\n    }\n    if (child == null) {\n      parent.lastChild = newLast;\n    } else {\n      child.previousSibling = newLast;\n    }\n    do {\n      newFirst.parentNode = parent;\n    } while (newFirst !== newLast && (newFirst = newFirst.nextSibling));\n    _onUpdateChild(parent.ownerDocument || parent, parent);\n    //console.log(parent.lastChild.nextSibling == null)\n    if (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n      node.firstChild = node.lastChild = null;\n    }\n    return node;\n  }\n\n  /**\n   * Appends `newChild` to `parentNode`.\n   * If `newChild` is already connected to a `parentNode` it is first removed from it.\n   *\n   * @see https://github.com/xmldom/xmldom/issues/135\n   * @see https://github.com/xmldom/xmldom/issues/145\n   * @param {Node} parentNode\n   * @param {Node} newChild\n   * @returns {Node}\n   * @private\n   */\n  function _appendSingleChild(parentNode, newChild) {\n    if (newChild.parentNode) {\n      newChild.parentNode.removeChild(newChild);\n    }\n    newChild.parentNode = parentNode;\n    newChild.previousSibling = parentNode.lastChild;\n    newChild.nextSibling = null;\n    if (newChild.previousSibling) {\n      newChild.previousSibling.nextSibling = newChild;\n    } else {\n      parentNode.firstChild = newChild;\n    }\n    parentNode.lastChild = newChild;\n    _onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n    return newChild;\n  }\n  Document.prototype = {\n    //implementation : null,\n    nodeName: '#document',\n    nodeType: DOCUMENT_NODE,\n    /**\n     * The DocumentType node of the document.\n     *\n     * @readonly\n     * @type DocumentType\n     */\n    doctype: null,\n    documentElement: null,\n    _inc: 1,\n    insertBefore: function (newChild, refChild) {\n      //raises\n      if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {\n        var child = newChild.firstChild;\n        while (child) {\n          var next = child.nextSibling;\n          this.insertBefore(child, refChild);\n          child = next;\n        }\n        return newChild;\n      }\n      _insertBefore(this, newChild, refChild);\n      newChild.ownerDocument = this;\n      if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n        this.documentElement = newChild;\n      }\n      return newChild;\n    },\n    removeChild: function (oldChild) {\n      if (this.documentElement == oldChild) {\n        this.documentElement = null;\n      }\n      return _removeChild(this, oldChild);\n    },\n    replaceChild: function (newChild, oldChild) {\n      //raises\n      _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n      newChild.ownerDocument = this;\n      if (oldChild) {\n        this.removeChild(oldChild);\n      }\n      if (isElementNode(newChild)) {\n        this.documentElement = newChild;\n      }\n    },\n    // Introduced in DOM Level 2:\n    importNode: function (importedNode, deep) {\n      return importNode(this, importedNode, deep);\n    },\n    // Introduced in DOM Level 2:\n    getElementById: function (id) {\n      var rtv = null;\n      _visitNode(this.documentElement, function (node) {\n        if (node.nodeType == ELEMENT_NODE) {\n          if (node.getAttribute('id') == id) {\n            rtv = node;\n            return true;\n          }\n        }\n      });\n      return rtv;\n    },\n    /**\n     * The `getElementsByClassName` method of `Document` interface returns an array-like object\n     * of all child elements which have **all** of the given class name(s).\n     *\n     * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n     *\n     *\n     * Warning: This is a live LiveNodeList.\n     * Changes in the DOM will reflect in the array as the changes occur.\n     * If an element selected by this array no longer qualifies for the selector,\n     * it will automatically be removed. Be aware of this for iteration purposes.\n     *\n     * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n     *\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n     * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n     */\n    getElementsByClassName: function (classNames) {\n      var classNamesSet = toOrderedSet(classNames);\n      return new LiveNodeList(this, function (base) {\n        var ls = [];\n        if (classNamesSet.length > 0) {\n          _visitNode(base.documentElement, function (node) {\n            if (node !== base && node.nodeType === ELEMENT_NODE) {\n              var nodeClassNames = node.getAttribute('class');\n              // can be null if the attribute does not exist\n              if (nodeClassNames) {\n                // before splitting and iterating just compare them for the most common case\n                var matches = classNames === nodeClassNames;\n                if (!matches) {\n                  var nodeClassNamesSet = toOrderedSet(nodeClassNames);\n                  matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet));\n                }\n                if (matches) {\n                  ls.push(node);\n                }\n              }\n            }\n          });\n        }\n        return ls;\n      });\n    },\n    //document factory method:\n    createElement: function (tagName) {\n      var node = new Element();\n      node.ownerDocument = this;\n      node.nodeName = tagName;\n      node.tagName = tagName;\n      node.localName = tagName;\n      node.childNodes = new NodeList();\n      var attrs = node.attributes = new NamedNodeMap();\n      attrs._ownerElement = node;\n      return node;\n    },\n    createDocumentFragment: function () {\n      var node = new DocumentFragment();\n      node.ownerDocument = this;\n      node.childNodes = new NodeList();\n      return node;\n    },\n    createTextNode: function (data) {\n      var node = new Text();\n      node.ownerDocument = this;\n      node.appendData(data);\n      return node;\n    },\n    createComment: function (data) {\n      var node = new Comment();\n      node.ownerDocument = this;\n      node.appendData(data);\n      return node;\n    },\n    createCDATASection: function (data) {\n      var node = new CDATASection();\n      node.ownerDocument = this;\n      node.appendData(data);\n      return node;\n    },\n    createProcessingInstruction: function (target, data) {\n      var node = new ProcessingInstruction();\n      node.ownerDocument = this;\n      node.tagName = node.nodeName = node.target = target;\n      node.nodeValue = node.data = data;\n      return node;\n    },\n    createAttribute: function (name) {\n      var node = new Attr();\n      node.ownerDocument = this;\n      node.name = name;\n      node.nodeName = name;\n      node.localName = name;\n      node.specified = true;\n      return node;\n    },\n    createEntityReference: function (name) {\n      var node = new EntityReference();\n      node.ownerDocument = this;\n      node.nodeName = name;\n      return node;\n    },\n    // Introduced in DOM Level 2:\n    createElementNS: function (namespaceURI, qualifiedName) {\n      var node = new Element();\n      var pl = qualifiedName.split(':');\n      var attrs = node.attributes = new NamedNodeMap();\n      node.childNodes = new NodeList();\n      node.ownerDocument = this;\n      node.nodeName = qualifiedName;\n      node.tagName = qualifiedName;\n      node.namespaceURI = namespaceURI;\n      if (pl.length == 2) {\n        node.prefix = pl[0];\n        node.localName = pl[1];\n      } else {\n        //el.prefix = null;\n        node.localName = qualifiedName;\n      }\n      attrs._ownerElement = node;\n      return node;\n    },\n    // Introduced in DOM Level 2:\n    createAttributeNS: function (namespaceURI, qualifiedName) {\n      var node = new Attr();\n      var pl = qualifiedName.split(':');\n      node.ownerDocument = this;\n      node.nodeName = qualifiedName;\n      node.name = qualifiedName;\n      node.namespaceURI = namespaceURI;\n      node.specified = true;\n      if (pl.length == 2) {\n        node.prefix = pl[0];\n        node.localName = pl[1];\n      } else {\n        //el.prefix = null;\n        node.localName = qualifiedName;\n      }\n      return node;\n    }\n  };\n  _extends(Document, Node);\n  function Element() {\n    this._nsMap = {};\n  }\n  Element.prototype = {\n    nodeType: ELEMENT_NODE,\n    hasAttribute: function (name) {\n      return this.getAttributeNode(name) != null;\n    },\n    getAttribute: function (name) {\n      var attr = this.getAttributeNode(name);\n      return attr && attr.value || '';\n    },\n    getAttributeNode: function (name) {\n      return this.attributes.getNamedItem(name);\n    },\n    setAttribute: function (name, value) {\n      var attr = this.ownerDocument.createAttribute(name);\n      attr.value = attr.nodeValue = \"\" + value;\n      this.setAttributeNode(attr);\n    },\n    removeAttribute: function (name) {\n      var attr = this.getAttributeNode(name);\n      attr && this.removeAttributeNode(attr);\n    },\n    //four real opeartion method\n    appendChild: function (newChild) {\n      if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) {\n        return this.insertBefore(newChild, null);\n      } else {\n        return _appendSingleChild(this, newChild);\n      }\n    },\n    setAttributeNode: function (newAttr) {\n      return this.attributes.setNamedItem(newAttr);\n    },\n    setAttributeNodeNS: function (newAttr) {\n      return this.attributes.setNamedItemNS(newAttr);\n    },\n    removeAttributeNode: function (oldAttr) {\n      //console.log(this == oldAttr.ownerElement)\n      return this.attributes.removeNamedItem(oldAttr.nodeName);\n    },\n    //get real attribute name,and remove it by removeAttributeNode\n    removeAttributeNS: function (namespaceURI, localName) {\n      var old = this.getAttributeNodeNS(namespaceURI, localName);\n      old && this.removeAttributeNode(old);\n    },\n    hasAttributeNS: function (namespaceURI, localName) {\n      return this.getAttributeNodeNS(namespaceURI, localName) != null;\n    },\n    getAttributeNS: function (namespaceURI, localName) {\n      var attr = this.getAttributeNodeNS(namespaceURI, localName);\n      return attr && attr.value || '';\n    },\n    setAttributeNS: function (namespaceURI, qualifiedName, value) {\n      var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n      attr.value = attr.nodeValue = \"\" + value;\n      this.setAttributeNode(attr);\n    },\n    getAttributeNodeNS: function (namespaceURI, localName) {\n      return this.attributes.getNamedItemNS(namespaceURI, localName);\n    },\n    getElementsByTagName: function (tagName) {\n      return new LiveNodeList(this, function (base) {\n        var ls = [];\n        _visitNode(base, function (node) {\n          if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)) {\n            ls.push(node);\n          }\n        });\n        return ls;\n      });\n    },\n    getElementsByTagNameNS: function (namespaceURI, localName) {\n      return new LiveNodeList(this, function (base) {\n        var ls = [];\n        _visitNode(base, function (node) {\n          if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)) {\n            ls.push(node);\n          }\n        });\n        return ls;\n      });\n    }\n  };\n  Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\n  Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n  _extends(Element, Node);\n  function Attr() {}\n  Attr.prototype.nodeType = ATTRIBUTE_NODE;\n  _extends(Attr, Node);\n  function CharacterData() {}\n  CharacterData.prototype = {\n    data: '',\n    substringData: function (offset, count) {\n      return this.data.substring(offset, offset + count);\n    },\n    appendData: function (text) {\n      text = this.data + text;\n      this.nodeValue = this.data = text;\n      this.length = text.length;\n    },\n    insertData: function (offset, text) {\n      this.replaceData(offset, 0, text);\n    },\n    appendChild: function (newChild) {\n      throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]);\n    },\n    deleteData: function (offset, count) {\n      this.replaceData(offset, count, \"\");\n    },\n    replaceData: function (offset, count, text) {\n      var start = this.data.substring(0, offset);\n      var end = this.data.substring(offset + count);\n      text = start + text + end;\n      this.nodeValue = this.data = text;\n      this.length = text.length;\n    }\n  };\n  _extends(CharacterData, Node);\n  function Text() {}\n  Text.prototype = {\n    nodeName: \"#text\",\n    nodeType: TEXT_NODE,\n    splitText: function (offset) {\n      var text = this.data;\n      var newText = text.substring(offset);\n      text = text.substring(0, offset);\n      this.data = this.nodeValue = text;\n      this.length = text.length;\n      var newNode = this.ownerDocument.createTextNode(newText);\n      if (this.parentNode) {\n        this.parentNode.insertBefore(newNode, this.nextSibling);\n      }\n      return newNode;\n    }\n  };\n  _extends(Text, CharacterData);\n  function Comment() {}\n  Comment.prototype = {\n    nodeName: \"#comment\",\n    nodeType: COMMENT_NODE\n  };\n  _extends(Comment, CharacterData);\n  function CDATASection() {}\n  CDATASection.prototype = {\n    nodeName: \"#cdata-section\",\n    nodeType: CDATA_SECTION_NODE\n  };\n  _extends(CDATASection, CharacterData);\n  function DocumentType() {}\n  DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n  _extends(DocumentType, Node);\n  function Notation() {}\n  Notation.prototype.nodeType = NOTATION_NODE;\n  _extends(Notation, Node);\n  function Entity() {}\n  Entity.prototype.nodeType = ENTITY_NODE;\n  _extends(Entity, Node);\n  function EntityReference() {}\n  EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n  _extends(EntityReference, Node);\n  function DocumentFragment() {}\n  DocumentFragment.prototype.nodeName = \"#document-fragment\";\n  DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;\n  _extends(DocumentFragment, Node);\n  function ProcessingInstruction() {}\n  ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n  _extends(ProcessingInstruction, Node);\n  function XMLSerializer() {}\n  XMLSerializer.prototype.serializeToString = function (node, isHtml, nodeFilter) {\n    return nodeSerializeToString.call(node, isHtml, nodeFilter);\n  };\n  Node.prototype.toString = nodeSerializeToString;\n  function nodeSerializeToString(isHtml, nodeFilter) {\n    var buf = [];\n    var refNode = this.nodeType == 9 && this.documentElement || this;\n    var prefix = refNode.prefix;\n    var uri = refNode.namespaceURI;\n    if (uri && prefix == null) {\n      //console.log(prefix)\n      var prefix = refNode.lookupPrefix(uri);\n      if (prefix == null) {\n        //isHTML = true;\n        var visibleNamespaces = [{\n          namespace: uri,\n          prefix: null\n        }\n        //{namespace:uri,prefix:''}\n        ];\n      }\n    }\n    serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces);\n    //console.log('###',this.nodeType,uri,prefix,buf.join(''))\n    return buf.join('');\n  }\n  function needNamespaceDefine(node, isHTML, visibleNamespaces) {\n    var prefix = node.prefix || '';\n    var uri = node.namespaceURI;\n    // According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n    // and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n    // > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n    // in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n    // and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n    // > [...] Furthermore, the attribute value [...] must not be an empty string.\n    // so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n    if (!uri) {\n      return false;\n    }\n    if (prefix === \"xml\" && uri === NAMESPACE$2.XML || uri === NAMESPACE$2.XMLNS) {\n      return false;\n    }\n    var i = visibleNamespaces.length;\n    while (i--) {\n      var ns = visibleNamespaces[i];\n      // get namespace prefix\n      if (ns.prefix === prefix) {\n        return ns.namespace !== uri;\n      }\n    }\n    return true;\n  }\n  /**\n   * Well-formed constraint: No < in Attribute Values\n   * > The replacement text of any entity referred to directly or indirectly\n   * > in an attribute value must not contain a <.\n   * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n   * @see https://www.w3.org/TR/xml11/#NT-AttValue\n   *\n   * Literal whitespace other than space that appear in attribute values\n   * are serialized as their entity references, so they will be preserved.\n   * (In contrast to whitespace literals in the input which are normalized to spaces)\n   * @see https://www.w3.org/TR/xml11/#AVNormalize\n   * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n   */\n  function addSerializedAttribute(buf, qualifiedName, value) {\n    buf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"');\n  }\n  function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) {\n    if (!visibleNamespaces) {\n      visibleNamespaces = [];\n    }\n    if (nodeFilter) {\n      node = nodeFilter(node);\n      if (node) {\n        if (typeof node == 'string') {\n          buf.push(node);\n          return;\n        }\n      } else {\n        return;\n      }\n      //buf.sort.apply(attrs, attributeSorter);\n    }\n    switch (node.nodeType) {\n      case ELEMENT_NODE:\n        var attrs = node.attributes;\n        var len = attrs.length;\n        var child = node.firstChild;\n        var nodeName = node.tagName;\n        isHTML = NAMESPACE$2.isHTML(node.namespaceURI) || isHTML;\n        var prefixedNodeName = nodeName;\n        if (!isHTML && !node.prefix && node.namespaceURI) {\n          var defaultNS;\n          // lookup current default ns from `xmlns` attribute\n          for (var ai = 0; ai < attrs.length; ai++) {\n            if (attrs.item(ai).name === 'xmlns') {\n              defaultNS = attrs.item(ai).value;\n              break;\n            }\n          }\n          if (!defaultNS) {\n            // lookup current default ns in visibleNamespaces\n            for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n              var namespace = visibleNamespaces[nsi];\n              if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n                defaultNS = namespace.namespace;\n                break;\n              }\n            }\n          }\n          if (defaultNS !== node.namespaceURI) {\n            for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n              var namespace = visibleNamespaces[nsi];\n              if (namespace.namespace === node.namespaceURI) {\n                if (namespace.prefix) {\n                  prefixedNodeName = namespace.prefix + ':' + nodeName;\n                }\n                break;\n              }\n            }\n          }\n        }\n        buf.push('<', prefixedNodeName);\n        for (var i = 0; i < len; i++) {\n          // add namespaces for attributes\n          var attr = attrs.item(i);\n          if (attr.prefix == 'xmlns') {\n            visibleNamespaces.push({\n              prefix: attr.localName,\n              namespace: attr.value\n            });\n          } else if (attr.nodeName == 'xmlns') {\n            visibleNamespaces.push({\n              prefix: '',\n              namespace: attr.value\n            });\n          }\n        }\n        for (var i = 0; i < len; i++) {\n          var attr = attrs.item(i);\n          if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) {\n            var prefix = attr.prefix || '';\n            var uri = attr.namespaceURI;\n            addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n            visibleNamespaces.push({\n              prefix: prefix,\n              namespace: uri\n            });\n          }\n          serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces);\n        }\n\n        // add namespace for current node\n        if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {\n          var prefix = node.prefix || '';\n          var uri = node.namespaceURI;\n          addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n          visibleNamespaces.push({\n            prefix: prefix,\n            namespace: uri\n          });\n        }\n        if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {\n          buf.push('>');\n          //if is cdata child node\n          if (isHTML && /^script$/i.test(nodeName)) {\n            while (child) {\n              if (child.data) {\n                buf.push(child.data);\n              } else {\n                serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n              }\n              child = child.nextSibling;\n            }\n          } else {\n            while (child) {\n              serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n              child = child.nextSibling;\n            }\n          }\n          buf.push('</', prefixedNodeName, '>');\n        } else {\n          buf.push('/>');\n        }\n        // remove added visible namespaces\n        //visibleNamespaces.length = startVisibleNamespaces;\n        return;\n      case DOCUMENT_NODE:\n      case DOCUMENT_FRAGMENT_NODE:\n        var child = node.firstChild;\n        while (child) {\n          serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n          child = child.nextSibling;\n        }\n        return;\n      case ATTRIBUTE_NODE:\n        return addSerializedAttribute(buf, node.name, node.value);\n      case TEXT_NODE:\n        /**\n         * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n         * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n         * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n         * `&amp;` and `&lt;` respectively.\n         * The right angle bracket (>) may be represented using the string \" &gt; \", and must, for compatibility,\n         * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,\n         * when that string is not marking the end of a CDATA section.\n         *\n         * In the content of elements, character data is any string of characters\n         * which does not contain the start-delimiter of any markup\n         * and does not include the CDATA-section-close delimiter, `]]>`.\n         *\n         * @see https://www.w3.org/TR/xml/#NT-CharData\n         * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n         */\n        return buf.push(node.data.replace(/[<&>]/g, _xmlEncoder));\n      case CDATA_SECTION_NODE:\n        return buf.push('<![CDATA[', node.data, ']]>');\n      case COMMENT_NODE:\n        return buf.push(\"<!--\", node.data, \"-->\");\n      case DOCUMENT_TYPE_NODE:\n        var pubid = node.publicId;\n        var sysid = node.systemId;\n        buf.push('<!DOCTYPE ', node.name);\n        if (pubid) {\n          buf.push(' PUBLIC ', pubid);\n          if (sysid && sysid != '.') {\n            buf.push(' ', sysid);\n          }\n          buf.push('>');\n        } else if (sysid && sysid != '.') {\n          buf.push(' SYSTEM ', sysid, '>');\n        } else {\n          var sub = node.internalSubset;\n          if (sub) {\n            buf.push(\" [\", sub, \"]\");\n          }\n          buf.push(\">\");\n        }\n        return;\n      case PROCESSING_INSTRUCTION_NODE:\n        return buf.push(\"<?\", node.target, \" \", node.data, \"?>\");\n      case ENTITY_REFERENCE_NODE:\n        return buf.push('&', node.nodeName, ';');\n      //case ENTITY_NODE:\n      //case NOTATION_NODE:\n      default:\n        buf.push('??', node.nodeName);\n    }\n  }\n  function importNode(doc, node, deep) {\n    var node2;\n    switch (node.nodeType) {\n      case ELEMENT_NODE:\n        node2 = node.cloneNode(false);\n        node2.ownerDocument = doc;\n      //var attrs = node2.attributes;\n      //var len = attrs.length;\n      //for(var i=0;i<len;i++){\n      //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\n      //}\n      case DOCUMENT_FRAGMENT_NODE:\n        break;\n      case ATTRIBUTE_NODE:\n        deep = true;\n        break;\n      //case ENTITY_REFERENCE_NODE:\n      //case PROCESSING_INSTRUCTION_NODE:\n      ////case TEXT_NODE:\n      //case CDATA_SECTION_NODE:\n      //case COMMENT_NODE:\n      //\tdeep = false;\n      //\tbreak;\n      //case DOCUMENT_NODE:\n      //case DOCUMENT_TYPE_NODE:\n      //cannot be imported.\n      //case ENTITY_NODE:\n      //case NOTATION_NODE:\n      //can not hit in level3\n      //default:throw e;\n    }\n    if (!node2) {\n      node2 = node.cloneNode(false); //false\n    }\n    node2.ownerDocument = doc;\n    node2.parentNode = null;\n    if (deep) {\n      var child = node.firstChild;\n      while (child) {\n        node2.appendChild(importNode(doc, child, deep));\n        child = child.nextSibling;\n      }\n    }\n    return node2;\n  }\n  //\n  //var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\n  //\t\t\t\t\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\n  function cloneNode(doc, node, deep) {\n    var node2 = new node.constructor();\n    for (var n in node) {\n      if (Object.prototype.hasOwnProperty.call(node, n)) {\n        var v = node[n];\n        if (typeof v != \"object\") {\n          if (v != node2[n]) {\n            node2[n] = v;\n          }\n        }\n      }\n    }\n    if (node.childNodes) {\n      node2.childNodes = new NodeList();\n    }\n    node2.ownerDocument = doc;\n    switch (node2.nodeType) {\n      case ELEMENT_NODE:\n        var attrs = node.attributes;\n        var attrs2 = node2.attributes = new NamedNodeMap();\n        var len = attrs.length;\n        attrs2._ownerElement = node2;\n        for (var i = 0; i < len; i++) {\n          node2.setAttributeNode(cloneNode(doc, attrs.item(i), true));\n        }\n        break;\n      case ATTRIBUTE_NODE:\n        deep = true;\n    }\n    if (deep) {\n      var child = node.firstChild;\n      while (child) {\n        node2.appendChild(cloneNode(doc, child, deep));\n        child = child.nextSibling;\n      }\n    }\n    return node2;\n  }\n  function __set__(object, key, value) {\n    object[key] = value;\n  }\n  //do dynamic\n  try {\n    if (Object.defineProperty) {\n      Object.defineProperty(LiveNodeList.prototype, 'length', {\n        get: function () {\n          _updateLiveList(this);\n          return this.$$length;\n        }\n      });\n      Object.defineProperty(Node.prototype, 'textContent', {\n        get: function () {\n          return getTextContent(this);\n        },\n        set: function (data) {\n          switch (this.nodeType) {\n            case ELEMENT_NODE:\n            case DOCUMENT_FRAGMENT_NODE:\n              while (this.firstChild) {\n                this.removeChild(this.firstChild);\n              }\n              if (data || String(data)) {\n                this.appendChild(this.ownerDocument.createTextNode(data));\n              }\n              break;\n            default:\n              this.data = data;\n              this.value = data;\n              this.nodeValue = data;\n          }\n        }\n      });\n      function getTextContent(node) {\n        switch (node.nodeType) {\n          case ELEMENT_NODE:\n          case DOCUMENT_FRAGMENT_NODE:\n            var buf = [];\n            node = node.firstChild;\n            while (node) {\n              if (node.nodeType !== 7 && node.nodeType !== 8) {\n                buf.push(getTextContent(node));\n              }\n              node = node.nextSibling;\n            }\n            return buf.join('');\n          default:\n            return node.nodeValue;\n        }\n      }\n      __set__ = function (object, key, value) {\n        //console.log(value)\n        object['$$' + key] = value;\n      };\n    }\n  } catch (e) {//ie8\n  }\n\n  //if(typeof require == 'function'){\n  var DocumentType_1 = DocumentType;\n  var DOMException_1 = DOMException;\n  var DOMImplementation_1 = DOMImplementation$1;\n  var Element_1 = Element;\n  var Node_1 = Node;\n  var NodeList_1 = NodeList;\n  var XMLSerializer_1 = XMLSerializer;\n  //}\n\n  var dom = {\n    DocumentType: DocumentType_1,\n    DOMException: DOMException_1,\n    DOMImplementation: DOMImplementation_1,\n    Element: Element_1,\n    Node: Node_1,\n    NodeList: NodeList_1,\n    XMLSerializer: XMLSerializer_1\n  };\n\n  var entities = createCommonjsModule(function (module, exports) {\n\n    var freeze = conventions.freeze;\n\n    /**\n     * The entities that are predefined in every XML document.\n     *\n     * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1\n     * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0\n     * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia\n     */\n    exports.XML_ENTITIES = freeze({\n      amp: '&',\n      apos: \"'\",\n      gt: '>',\n      lt: '<',\n      quot: '\"'\n    });\n\n    /**\n     * A map of all entities that are detected in an HTML document.\n     * They contain all entries from `XML_ENTITIES`.\n     *\n     * @see XML_ENTITIES\n     * @see DOMParser.parseFromString\n     * @see DOMImplementation.prototype.createHTMLDocument\n     * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n     * @see https://html.spec.whatwg.org/entities.json JSON\n     * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n     * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n     * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n     * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n     */\n    exports.HTML_ENTITIES = freeze({\n      Aacute: '\\u00C1',\n      aacute: '\\u00E1',\n      Abreve: '\\u0102',\n      abreve: '\\u0103',\n      ac: '\\u223E',\n      acd: '\\u223F',\n      acE: '\\u223E\\u0333',\n      Acirc: '\\u00C2',\n      acirc: '\\u00E2',\n      acute: '\\u00B4',\n      Acy: '\\u0410',\n      acy: '\\u0430',\n      AElig: '\\u00C6',\n      aelig: '\\u00E6',\n      af: '\\u2061',\n      Afr: '\\uD835\\uDD04',\n      afr: '\\uD835\\uDD1E',\n      Agrave: '\\u00C0',\n      agrave: '\\u00E0',\n      alefsym: '\\u2135',\n      aleph: '\\u2135',\n      Alpha: '\\u0391',\n      alpha: '\\u03B1',\n      Amacr: '\\u0100',\n      amacr: '\\u0101',\n      amalg: '\\u2A3F',\n      AMP: '\\u0026',\n      amp: '\\u0026',\n      And: '\\u2A53',\n      and: '\\u2227',\n      andand: '\\u2A55',\n      andd: '\\u2A5C',\n      andslope: '\\u2A58',\n      andv: '\\u2A5A',\n      ang: '\\u2220',\n      ange: '\\u29A4',\n      angle: '\\u2220',\n      angmsd: '\\u2221',\n      angmsdaa: '\\u29A8',\n      angmsdab: '\\u29A9',\n      angmsdac: '\\u29AA',\n      angmsdad: '\\u29AB',\n      angmsdae: '\\u29AC',\n      angmsdaf: '\\u29AD',\n      angmsdag: '\\u29AE',\n      angmsdah: '\\u29AF',\n      angrt: '\\u221F',\n      angrtvb: '\\u22BE',\n      angrtvbd: '\\u299D',\n      angsph: '\\u2222',\n      angst: '\\u00C5',\n      angzarr: '\\u237C',\n      Aogon: '\\u0104',\n      aogon: '\\u0105',\n      Aopf: '\\uD835\\uDD38',\n      aopf: '\\uD835\\uDD52',\n      ap: '\\u2248',\n      apacir: '\\u2A6F',\n      apE: '\\u2A70',\n      ape: '\\u224A',\n      apid: '\\u224B',\n      apos: '\\u0027',\n      ApplyFunction: '\\u2061',\n      approx: '\\u2248',\n      approxeq: '\\u224A',\n      Aring: '\\u00C5',\n      aring: '\\u00E5',\n      Ascr: '\\uD835\\uDC9C',\n      ascr: '\\uD835\\uDCB6',\n      Assign: '\\u2254',\n      ast: '\\u002A',\n      asymp: '\\u2248',\n      asympeq: '\\u224D',\n      Atilde: '\\u00C3',\n      atilde: '\\u00E3',\n      Auml: '\\u00C4',\n      auml: '\\u00E4',\n      awconint: '\\u2233',\n      awint: '\\u2A11',\n      backcong: '\\u224C',\n      backepsilon: '\\u03F6',\n      backprime: '\\u2035',\n      backsim: '\\u223D',\n      backsimeq: '\\u22CD',\n      Backslash: '\\u2216',\n      Barv: '\\u2AE7',\n      barvee: '\\u22BD',\n      Barwed: '\\u2306',\n      barwed: '\\u2305',\n      barwedge: '\\u2305',\n      bbrk: '\\u23B5',\n      bbrktbrk: '\\u23B6',\n      bcong: '\\u224C',\n      Bcy: '\\u0411',\n      bcy: '\\u0431',\n      bdquo: '\\u201E',\n      becaus: '\\u2235',\n      Because: '\\u2235',\n      because: '\\u2235',\n      bemptyv: '\\u29B0',\n      bepsi: '\\u03F6',\n      bernou: '\\u212C',\n      Bernoullis: '\\u212C',\n      Beta: '\\u0392',\n      beta: '\\u03B2',\n      beth: '\\u2136',\n      between: '\\u226C',\n      Bfr: '\\uD835\\uDD05',\n      bfr: '\\uD835\\uDD1F',\n      bigcap: '\\u22C2',\n      bigcirc: '\\u25EF',\n      bigcup: '\\u22C3',\n      bigodot: '\\u2A00',\n      bigoplus: '\\u2A01',\n      bigotimes: '\\u2A02',\n      bigsqcup: '\\u2A06',\n      bigstar: '\\u2605',\n      bigtriangledown: '\\u25BD',\n      bigtriangleup: '\\u25B3',\n      biguplus: '\\u2A04',\n      bigvee: '\\u22C1',\n      bigwedge: '\\u22C0',\n      bkarow: '\\u290D',\n      blacklozenge: '\\u29EB',\n      blacksquare: '\\u25AA',\n      blacktriangle: '\\u25B4',\n      blacktriangledown: '\\u25BE',\n      blacktriangleleft: '\\u25C2',\n      blacktriangleright: '\\u25B8',\n      blank: '\\u2423',\n      blk12: '\\u2592',\n      blk14: '\\u2591',\n      blk34: '\\u2593',\n      block: '\\u2588',\n      bne: '\\u003D\\u20E5',\n      bnequiv: '\\u2261\\u20E5',\n      bNot: '\\u2AED',\n      bnot: '\\u2310',\n      Bopf: '\\uD835\\uDD39',\n      bopf: '\\uD835\\uDD53',\n      bot: '\\u22A5',\n      bottom: '\\u22A5',\n      bowtie: '\\u22C8',\n      boxbox: '\\u29C9',\n      boxDL: '\\u2557',\n      boxDl: '\\u2556',\n      boxdL: '\\u2555',\n      boxdl: '\\u2510',\n      boxDR: '\\u2554',\n      boxDr: '\\u2553',\n      boxdR: '\\u2552',\n      boxdr: '\\u250C',\n      boxH: '\\u2550',\n      boxh: '\\u2500',\n      boxHD: '\\u2566',\n      boxHd: '\\u2564',\n      boxhD: '\\u2565',\n      boxhd: '\\u252C',\n      boxHU: '\\u2569',\n      boxHu: '\\u2567',\n      boxhU: '\\u2568',\n      boxhu: '\\u2534',\n      boxminus: '\\u229F',\n      boxplus: '\\u229E',\n      boxtimes: '\\u22A0',\n      boxUL: '\\u255D',\n      boxUl: '\\u255C',\n      boxuL: '\\u255B',\n      boxul: '\\u2518',\n      boxUR: '\\u255A',\n      boxUr: '\\u2559',\n      boxuR: '\\u2558',\n      boxur: '\\u2514',\n      boxV: '\\u2551',\n      boxv: '\\u2502',\n      boxVH: '\\u256C',\n      boxVh: '\\u256B',\n      boxvH: '\\u256A',\n      boxvh: '\\u253C',\n      boxVL: '\\u2563',\n      boxVl: '\\u2562',\n      boxvL: '\\u2561',\n      boxvl: '\\u2524',\n      boxVR: '\\u2560',\n      boxVr: '\\u255F',\n      boxvR: '\\u255E',\n      boxvr: '\\u251C',\n      bprime: '\\u2035',\n      Breve: '\\u02D8',\n      breve: '\\u02D8',\n      brvbar: '\\u00A6',\n      Bscr: '\\u212C',\n      bscr: '\\uD835\\uDCB7',\n      bsemi: '\\u204F',\n      bsim: '\\u223D',\n      bsime: '\\u22CD',\n      bsol: '\\u005C',\n      bsolb: '\\u29C5',\n      bsolhsub: '\\u27C8',\n      bull: '\\u2022',\n      bullet: '\\u2022',\n      bump: '\\u224E',\n      bumpE: '\\u2AAE',\n      bumpe: '\\u224F',\n      Bumpeq: '\\u224E',\n      bumpeq: '\\u224F',\n      Cacute: '\\u0106',\n      cacute: '\\u0107',\n      Cap: '\\u22D2',\n      cap: '\\u2229',\n      capand: '\\u2A44',\n      capbrcup: '\\u2A49',\n      capcap: '\\u2A4B',\n      capcup: '\\u2A47',\n      capdot: '\\u2A40',\n      CapitalDifferentialD: '\\u2145',\n      caps: '\\u2229\\uFE00',\n      caret: '\\u2041',\n      caron: '\\u02C7',\n      Cayleys: '\\u212D',\n      ccaps: '\\u2A4D',\n      Ccaron: '\\u010C',\n      ccaron: '\\u010D',\n      Ccedil: '\\u00C7',\n      ccedil: '\\u00E7',\n      Ccirc: '\\u0108',\n      ccirc: '\\u0109',\n      Cconint: '\\u2230',\n      ccups: '\\u2A4C',\n      ccupssm: '\\u2A50',\n      Cdot: '\\u010A',\n      cdot: '\\u010B',\n      cedil: '\\u00B8',\n      Cedilla: '\\u00B8',\n      cemptyv: '\\u29B2',\n      cent: '\\u00A2',\n      CenterDot: '\\u00B7',\n      centerdot: '\\u00B7',\n      Cfr: '\\u212D',\n      cfr: '\\uD835\\uDD20',\n      CHcy: '\\u0427',\n      chcy: '\\u0447',\n      check: '\\u2713',\n      checkmark: '\\u2713',\n      Chi: '\\u03A7',\n      chi: '\\u03C7',\n      cir: '\\u25CB',\n      circ: '\\u02C6',\n      circeq: '\\u2257',\n      circlearrowleft: '\\u21BA',\n      circlearrowright: '\\u21BB',\n      circledast: '\\u229B',\n      circledcirc: '\\u229A',\n      circleddash: '\\u229D',\n      CircleDot: '\\u2299',\n      circledR: '\\u00AE',\n      circledS: '\\u24C8',\n      CircleMinus: '\\u2296',\n      CirclePlus: '\\u2295',\n      CircleTimes: '\\u2297',\n      cirE: '\\u29C3',\n      cire: '\\u2257',\n      cirfnint: '\\u2A10',\n      cirmid: '\\u2AEF',\n      cirscir: '\\u29C2',\n      ClockwiseContourIntegral: '\\u2232',\n      CloseCurlyDoubleQuote: '\\u201D',\n      CloseCurlyQuote: '\\u2019',\n      clubs: '\\u2663',\n      clubsuit: '\\u2663',\n      Colon: '\\u2237',\n      colon: '\\u003A',\n      Colone: '\\u2A74',\n      colone: '\\u2254',\n      coloneq: '\\u2254',\n      comma: '\\u002C',\n      commat: '\\u0040',\n      comp: '\\u2201',\n      compfn: '\\u2218',\n      complement: '\\u2201',\n      complexes: '\\u2102',\n      cong: '\\u2245',\n      congdot: '\\u2A6D',\n      Congruent: '\\u2261',\n      Conint: '\\u222F',\n      conint: '\\u222E',\n      ContourIntegral: '\\u222E',\n      Copf: '\\u2102',\n      copf: '\\uD835\\uDD54',\n      coprod: '\\u2210',\n      Coproduct: '\\u2210',\n      COPY: '\\u00A9',\n      copy: '\\u00A9',\n      copysr: '\\u2117',\n      CounterClockwiseContourIntegral: '\\u2233',\n      crarr: '\\u21B5',\n      Cross: '\\u2A2F',\n      cross: '\\u2717',\n      Cscr: '\\uD835\\uDC9E',\n      cscr: '\\uD835\\uDCB8',\n      csub: '\\u2ACF',\n      csube: '\\u2AD1',\n      csup: '\\u2AD0',\n      csupe: '\\u2AD2',\n      ctdot: '\\u22EF',\n      cudarrl: '\\u2938',\n      cudarrr: '\\u2935',\n      cuepr: '\\u22DE',\n      cuesc: '\\u22DF',\n      cularr: '\\u21B6',\n      cularrp: '\\u293D',\n      Cup: '\\u22D3',\n      cup: '\\u222A',\n      cupbrcap: '\\u2A48',\n      CupCap: '\\u224D',\n      cupcap: '\\u2A46',\n      cupcup: '\\u2A4A',\n      cupdot: '\\u228D',\n      cupor: '\\u2A45',\n      cups: '\\u222A\\uFE00',\n      curarr: '\\u21B7',\n      curarrm: '\\u293C',\n      curlyeqprec: '\\u22DE',\n      curlyeqsucc: '\\u22DF',\n      curlyvee: '\\u22CE',\n      curlywedge: '\\u22CF',\n      curren: '\\u00A4',\n      curvearrowleft: '\\u21B6',\n      curvearrowright: '\\u21B7',\n      cuvee: '\\u22CE',\n      cuwed: '\\u22CF',\n      cwconint: '\\u2232',\n      cwint: '\\u2231',\n      cylcty: '\\u232D',\n      Dagger: '\\u2021',\n      dagger: '\\u2020',\n      daleth: '\\u2138',\n      Darr: '\\u21A1',\n      dArr: '\\u21D3',\n      darr: '\\u2193',\n      dash: '\\u2010',\n      Dashv: '\\u2AE4',\n      dashv: '\\u22A3',\n      dbkarow: '\\u290F',\n      dblac: '\\u02DD',\n      Dcaron: '\\u010E',\n      dcaron: '\\u010F',\n      Dcy: '\\u0414',\n      dcy: '\\u0434',\n      DD: '\\u2145',\n      dd: '\\u2146',\n      ddagger: '\\u2021',\n      ddarr: '\\u21CA',\n      DDotrahd: '\\u2911',\n      ddotseq: '\\u2A77',\n      deg: '\\u00B0',\n      Del: '\\u2207',\n      Delta: '\\u0394',\n      delta: '\\u03B4',\n      demptyv: '\\u29B1',\n      dfisht: '\\u297F',\n      Dfr: '\\uD835\\uDD07',\n      dfr: '\\uD835\\uDD21',\n      dHar: '\\u2965',\n      dharl: '\\u21C3',\n      dharr: '\\u21C2',\n      DiacriticalAcute: '\\u00B4',\n      DiacriticalDot: '\\u02D9',\n      DiacriticalDoubleAcute: '\\u02DD',\n      DiacriticalGrave: '\\u0060',\n      DiacriticalTilde: '\\u02DC',\n      diam: '\\u22C4',\n      Diamond: '\\u22C4',\n      diamond: '\\u22C4',\n      diamondsuit: '\\u2666',\n      diams: '\\u2666',\n      die: '\\u00A8',\n      DifferentialD: '\\u2146',\n      digamma: '\\u03DD',\n      disin: '\\u22F2',\n      div: '\\u00F7',\n      divide: '\\u00F7',\n      divideontimes: '\\u22C7',\n      divonx: '\\u22C7',\n      DJcy: '\\u0402',\n      djcy: '\\u0452',\n      dlcorn: '\\u231E',\n      dlcrop: '\\u230D',\n      dollar: '\\u0024',\n      Dopf: '\\uD835\\uDD3B',\n      dopf: '\\uD835\\uDD55',\n      Dot: '\\u00A8',\n      dot: '\\u02D9',\n      DotDot: '\\u20DC',\n      doteq: '\\u2250',\n      doteqdot: '\\u2251',\n      DotEqual: '\\u2250',\n      dotminus: '\\u2238',\n      dotplus: '\\u2214',\n      dotsquare: '\\u22A1',\n      doublebarwedge: '\\u2306',\n      DoubleContourIntegral: '\\u222F',\n      DoubleDot: '\\u00A8',\n      DoubleDownArrow: '\\u21D3',\n      DoubleLeftArrow: '\\u21D0',\n      DoubleLeftRightArrow: '\\u21D4',\n      DoubleLeftTee: '\\u2AE4',\n      DoubleLongLeftArrow: '\\u27F8',\n      DoubleLongLeftRightArrow: '\\u27FA',\n      DoubleLongRightArrow: '\\u27F9',\n      DoubleRightArrow: '\\u21D2',\n      DoubleRightTee: '\\u22A8',\n      DoubleUpArrow: '\\u21D1',\n      DoubleUpDownArrow: '\\u21D5',\n      DoubleVerticalBar: '\\u2225',\n      DownArrow: '\\u2193',\n      Downarrow: '\\u21D3',\n      downarrow: '\\u2193',\n      DownArrowBar: '\\u2913',\n      DownArrowUpArrow: '\\u21F5',\n      DownBreve: '\\u0311',\n      downdownarrows: '\\u21CA',\n      downharpoonleft: '\\u21C3',\n      downharpoonright: '\\u21C2',\n      DownLeftRightVector: '\\u2950',\n      DownLeftTeeVector: '\\u295E',\n      DownLeftVector: '\\u21BD',\n      DownLeftVectorBar: '\\u2956',\n      DownRightTeeVector: '\\u295F',\n      DownRightVector: '\\u21C1',\n      DownRightVectorBar: '\\u2957',\n      DownTee: '\\u22A4',\n      DownTeeArrow: '\\u21A7',\n      drbkarow: '\\u2910',\n      drcorn: '\\u231F',\n      drcrop: '\\u230C',\n      Dscr: '\\uD835\\uDC9F',\n      dscr: '\\uD835\\uDCB9',\n      DScy: '\\u0405',\n      dscy: '\\u0455',\n      dsol: '\\u29F6',\n      Dstrok: '\\u0110',\n      dstrok: '\\u0111',\n      dtdot: '\\u22F1',\n      dtri: '\\u25BF',\n      dtrif: '\\u25BE',\n      duarr: '\\u21F5',\n      duhar: '\\u296F',\n      dwangle: '\\u29A6',\n      DZcy: '\\u040F',\n      dzcy: '\\u045F',\n      dzigrarr: '\\u27FF',\n      Eacute: '\\u00C9',\n      eacute: '\\u00E9',\n      easter: '\\u2A6E',\n      Ecaron: '\\u011A',\n      ecaron: '\\u011B',\n      ecir: '\\u2256',\n      Ecirc: '\\u00CA',\n      ecirc: '\\u00EA',\n      ecolon: '\\u2255',\n      Ecy: '\\u042D',\n      ecy: '\\u044D',\n      eDDot: '\\u2A77',\n      Edot: '\\u0116',\n      eDot: '\\u2251',\n      edot: '\\u0117',\n      ee: '\\u2147',\n      efDot: '\\u2252',\n      Efr: '\\uD835\\uDD08',\n      efr: '\\uD835\\uDD22',\n      eg: '\\u2A9A',\n      Egrave: '\\u00C8',\n      egrave: '\\u00E8',\n      egs: '\\u2A96',\n      egsdot: '\\u2A98',\n      el: '\\u2A99',\n      Element: '\\u2208',\n      elinters: '\\u23E7',\n      ell: '\\u2113',\n      els: '\\u2A95',\n      elsdot: '\\u2A97',\n      Emacr: '\\u0112',\n      emacr: '\\u0113',\n      empty: '\\u2205',\n      emptyset: '\\u2205',\n      EmptySmallSquare: '\\u25FB',\n      emptyv: '\\u2205',\n      EmptyVerySmallSquare: '\\u25AB',\n      emsp: '\\u2003',\n      emsp13: '\\u2004',\n      emsp14: '\\u2005',\n      ENG: '\\u014A',\n      eng: '\\u014B',\n      ensp: '\\u2002',\n      Eogon: '\\u0118',\n      eogon: '\\u0119',\n      Eopf: '\\uD835\\uDD3C',\n      eopf: '\\uD835\\uDD56',\n      epar: '\\u22D5',\n      eparsl: '\\u29E3',\n      eplus: '\\u2A71',\n      epsi: '\\u03B5',\n      Epsilon: '\\u0395',\n      epsilon: '\\u03B5',\n      epsiv: '\\u03F5',\n      eqcirc: '\\u2256',\n      eqcolon: '\\u2255',\n      eqsim: '\\u2242',\n      eqslantgtr: '\\u2A96',\n      eqslantless: '\\u2A95',\n      Equal: '\\u2A75',\n      equals: '\\u003D',\n      EqualTilde: '\\u2242',\n      equest: '\\u225F',\n      Equilibrium: '\\u21CC',\n      equiv: '\\u2261',\n      equivDD: '\\u2A78',\n      eqvparsl: '\\u29E5',\n      erarr: '\\u2971',\n      erDot: '\\u2253',\n      Escr: '\\u2130',\n      escr: '\\u212F',\n      esdot: '\\u2250',\n      Esim: '\\u2A73',\n      esim: '\\u2242',\n      Eta: '\\u0397',\n      eta: '\\u03B7',\n      ETH: '\\u00D0',\n      eth: '\\u00F0',\n      Euml: '\\u00CB',\n      euml: '\\u00EB',\n      euro: '\\u20AC',\n      excl: '\\u0021',\n      exist: '\\u2203',\n      Exists: '\\u2203',\n      expectation: '\\u2130',\n      ExponentialE: '\\u2147',\n      exponentiale: '\\u2147',\n      fallingdotseq: '\\u2252',\n      Fcy: '\\u0424',\n      fcy: '\\u0444',\n      female: '\\u2640',\n      ffilig: '\\uFB03',\n      fflig: '\\uFB00',\n      ffllig: '\\uFB04',\n      Ffr: '\\uD835\\uDD09',\n      ffr: '\\uD835\\uDD23',\n      filig: '\\uFB01',\n      FilledSmallSquare: '\\u25FC',\n      FilledVerySmallSquare: '\\u25AA',\n      fjlig: '\\u0066\\u006A',\n      flat: '\\u266D',\n      fllig: '\\uFB02',\n      fltns: '\\u25B1',\n      fnof: '\\u0192',\n      Fopf: '\\uD835\\uDD3D',\n      fopf: '\\uD835\\uDD57',\n      ForAll: '\\u2200',\n      forall: '\\u2200',\n      fork: '\\u22D4',\n      forkv: '\\u2AD9',\n      Fouriertrf: '\\u2131',\n      fpartint: '\\u2A0D',\n      frac12: '\\u00BD',\n      frac13: '\\u2153',\n      frac14: '\\u00BC',\n      frac15: '\\u2155',\n      frac16: '\\u2159',\n      frac18: '\\u215B',\n      frac23: '\\u2154',\n      frac25: '\\u2156',\n      frac34: '\\u00BE',\n      frac35: '\\u2157',\n      frac38: '\\u215C',\n      frac45: '\\u2158',\n      frac56: '\\u215A',\n      frac58: '\\u215D',\n      frac78: '\\u215E',\n      frasl: '\\u2044',\n      frown: '\\u2322',\n      Fscr: '\\u2131',\n      fscr: '\\uD835\\uDCBB',\n      gacute: '\\u01F5',\n      Gamma: '\\u0393',\n      gamma: '\\u03B3',\n      Gammad: '\\u03DC',\n      gammad: '\\u03DD',\n      gap: '\\u2A86',\n      Gbreve: '\\u011E',\n      gbreve: '\\u011F',\n      Gcedil: '\\u0122',\n      Gcirc: '\\u011C',\n      gcirc: '\\u011D',\n      Gcy: '\\u0413',\n      gcy: '\\u0433',\n      Gdot: '\\u0120',\n      gdot: '\\u0121',\n      gE: '\\u2267',\n      ge: '\\u2265',\n      gEl: '\\u2A8C',\n      gel: '\\u22DB',\n      geq: '\\u2265',\n      geqq: '\\u2267',\n      geqslant: '\\u2A7E',\n      ges: '\\u2A7E',\n      gescc: '\\u2AA9',\n      gesdot: '\\u2A80',\n      gesdoto: '\\u2A82',\n      gesdotol: '\\u2A84',\n      gesl: '\\u22DB\\uFE00',\n      gesles: '\\u2A94',\n      Gfr: '\\uD835\\uDD0A',\n      gfr: '\\uD835\\uDD24',\n      Gg: '\\u22D9',\n      gg: '\\u226B',\n      ggg: '\\u22D9',\n      gimel: '\\u2137',\n      GJcy: '\\u0403',\n      gjcy: '\\u0453',\n      gl: '\\u2277',\n      gla: '\\u2AA5',\n      glE: '\\u2A92',\n      glj: '\\u2AA4',\n      gnap: '\\u2A8A',\n      gnapprox: '\\u2A8A',\n      gnE: '\\u2269',\n      gne: '\\u2A88',\n      gneq: '\\u2A88',\n      gneqq: '\\u2269',\n      gnsim: '\\u22E7',\n      Gopf: '\\uD835\\uDD3E',\n      gopf: '\\uD835\\uDD58',\n      grave: '\\u0060',\n      GreaterEqual: '\\u2265',\n      GreaterEqualLess: '\\u22DB',\n      GreaterFullEqual: '\\u2267',\n      GreaterGreater: '\\u2AA2',\n      GreaterLess: '\\u2277',\n      GreaterSlantEqual: '\\u2A7E',\n      GreaterTilde: '\\u2273',\n      Gscr: '\\uD835\\uDCA2',\n      gscr: '\\u210A',\n      gsim: '\\u2273',\n      gsime: '\\u2A8E',\n      gsiml: '\\u2A90',\n      Gt: '\\u226B',\n      GT: '\\u003E',\n      gt: '\\u003E',\n      gtcc: '\\u2AA7',\n      gtcir: '\\u2A7A',\n      gtdot: '\\u22D7',\n      gtlPar: '\\u2995',\n      gtquest: '\\u2A7C',\n      gtrapprox: '\\u2A86',\n      gtrarr: '\\u2978',\n      gtrdot: '\\u22D7',\n      gtreqless: '\\u22DB',\n      gtreqqless: '\\u2A8C',\n      gtrless: '\\u2277',\n      gtrsim: '\\u2273',\n      gvertneqq: '\\u2269\\uFE00',\n      gvnE: '\\u2269\\uFE00',\n      Hacek: '\\u02C7',\n      hairsp: '\\u200A',\n      half: '\\u00BD',\n      hamilt: '\\u210B',\n      HARDcy: '\\u042A',\n      hardcy: '\\u044A',\n      hArr: '\\u21D4',\n      harr: '\\u2194',\n      harrcir: '\\u2948',\n      harrw: '\\u21AD',\n      Hat: '\\u005E',\n      hbar: '\\u210F',\n      Hcirc: '\\u0124',\n      hcirc: '\\u0125',\n      hearts: '\\u2665',\n      heartsuit: '\\u2665',\n      hellip: '\\u2026',\n      hercon: '\\u22B9',\n      Hfr: '\\u210C',\n      hfr: '\\uD835\\uDD25',\n      HilbertSpace: '\\u210B',\n      hksearow: '\\u2925',\n      hkswarow: '\\u2926',\n      hoarr: '\\u21FF',\n      homtht: '\\u223B',\n      hookleftarrow: '\\u21A9',\n      hookrightarrow: '\\u21AA',\n      Hopf: '\\u210D',\n      hopf: '\\uD835\\uDD59',\n      horbar: '\\u2015',\n      HorizontalLine: '\\u2500',\n      Hscr: '\\u210B',\n      hscr: '\\uD835\\uDCBD',\n      hslash: '\\u210F',\n      Hstrok: '\\u0126',\n      hstrok: '\\u0127',\n      HumpDownHump: '\\u224E',\n      HumpEqual: '\\u224F',\n      hybull: '\\u2043',\n      hyphen: '\\u2010',\n      Iacute: '\\u00CD',\n      iacute: '\\u00ED',\n      ic: '\\u2063',\n      Icirc: '\\u00CE',\n      icirc: '\\u00EE',\n      Icy: '\\u0418',\n      icy: '\\u0438',\n      Idot: '\\u0130',\n      IEcy: '\\u0415',\n      iecy: '\\u0435',\n      iexcl: '\\u00A1',\n      iff: '\\u21D4',\n      Ifr: '\\u2111',\n      ifr: '\\uD835\\uDD26',\n      Igrave: '\\u00CC',\n      igrave: '\\u00EC',\n      ii: '\\u2148',\n      iiiint: '\\u2A0C',\n      iiint: '\\u222D',\n      iinfin: '\\u29DC',\n      iiota: '\\u2129',\n      IJlig: '\\u0132',\n      ijlig: '\\u0133',\n      Im: '\\u2111',\n      Imacr: '\\u012A',\n      imacr: '\\u012B',\n      image: '\\u2111',\n      ImaginaryI: '\\u2148',\n      imagline: '\\u2110',\n      imagpart: '\\u2111',\n      imath: '\\u0131',\n      imof: '\\u22B7',\n      imped: '\\u01B5',\n      Implies: '\\u21D2',\n      in: '\\u2208',\n      incare: '\\u2105',\n      infin: '\\u221E',\n      infintie: '\\u29DD',\n      inodot: '\\u0131',\n      Int: '\\u222C',\n      int: '\\u222B',\n      intcal: '\\u22BA',\n      integers: '\\u2124',\n      Integral: '\\u222B',\n      intercal: '\\u22BA',\n      Intersection: '\\u22C2',\n      intlarhk: '\\u2A17',\n      intprod: '\\u2A3C',\n      InvisibleComma: '\\u2063',\n      InvisibleTimes: '\\u2062',\n      IOcy: '\\u0401',\n      iocy: '\\u0451',\n      Iogon: '\\u012E',\n      iogon: '\\u012F',\n      Iopf: '\\uD835\\uDD40',\n      iopf: '\\uD835\\uDD5A',\n      Iota: '\\u0399',\n      iota: '\\u03B9',\n      iprod: '\\u2A3C',\n      iquest: '\\u00BF',\n      Iscr: '\\u2110',\n      iscr: '\\uD835\\uDCBE',\n      isin: '\\u2208',\n      isindot: '\\u22F5',\n      isinE: '\\u22F9',\n      isins: '\\u22F4',\n      isinsv: '\\u22F3',\n      isinv: '\\u2208',\n      it: '\\u2062',\n      Itilde: '\\u0128',\n      itilde: '\\u0129',\n      Iukcy: '\\u0406',\n      iukcy: '\\u0456',\n      Iuml: '\\u00CF',\n      iuml: '\\u00EF',\n      Jcirc: '\\u0134',\n      jcirc: '\\u0135',\n      Jcy: '\\u0419',\n      jcy: '\\u0439',\n      Jfr: '\\uD835\\uDD0D',\n      jfr: '\\uD835\\uDD27',\n      jmath: '\\u0237',\n      Jopf: '\\uD835\\uDD41',\n      jopf: '\\uD835\\uDD5B',\n      Jscr: '\\uD835\\uDCA5',\n      jscr: '\\uD835\\uDCBF',\n      Jsercy: '\\u0408',\n      jsercy: '\\u0458',\n      Jukcy: '\\u0404',\n      jukcy: '\\u0454',\n      Kappa: '\\u039A',\n      kappa: '\\u03BA',\n      kappav: '\\u03F0',\n      Kcedil: '\\u0136',\n      kcedil: '\\u0137',\n      Kcy: '\\u041A',\n      kcy: '\\u043A',\n      Kfr: '\\uD835\\uDD0E',\n      kfr: '\\uD835\\uDD28',\n      kgreen: '\\u0138',\n      KHcy: '\\u0425',\n      khcy: '\\u0445',\n      KJcy: '\\u040C',\n      kjcy: '\\u045C',\n      Kopf: '\\uD835\\uDD42',\n      kopf: '\\uD835\\uDD5C',\n      Kscr: '\\uD835\\uDCA6',\n      kscr: '\\uD835\\uDCC0',\n      lAarr: '\\u21DA',\n      Lacute: '\\u0139',\n      lacute: '\\u013A',\n      laemptyv: '\\u29B4',\n      lagran: '\\u2112',\n      Lambda: '\\u039B',\n      lambda: '\\u03BB',\n      Lang: '\\u27EA',\n      lang: '\\u27E8',\n      langd: '\\u2991',\n      langle: '\\u27E8',\n      lap: '\\u2A85',\n      Laplacetrf: '\\u2112',\n      laquo: '\\u00AB',\n      Larr: '\\u219E',\n      lArr: '\\u21D0',\n      larr: '\\u2190',\n      larrb: '\\u21E4',\n      larrbfs: '\\u291F',\n      larrfs: '\\u291D',\n      larrhk: '\\u21A9',\n      larrlp: '\\u21AB',\n      larrpl: '\\u2939',\n      larrsim: '\\u2973',\n      larrtl: '\\u21A2',\n      lat: '\\u2AAB',\n      lAtail: '\\u291B',\n      latail: '\\u2919',\n      late: '\\u2AAD',\n      lates: '\\u2AAD\\uFE00',\n      lBarr: '\\u290E',\n      lbarr: '\\u290C',\n      lbbrk: '\\u2772',\n      lbrace: '\\u007B',\n      lbrack: '\\u005B',\n      lbrke: '\\u298B',\n      lbrksld: '\\u298F',\n      lbrkslu: '\\u298D',\n      Lcaron: '\\u013D',\n      lcaron: '\\u013E',\n      Lcedil: '\\u013B',\n      lcedil: '\\u013C',\n      lceil: '\\u2308',\n      lcub: '\\u007B',\n      Lcy: '\\u041B',\n      lcy: '\\u043B',\n      ldca: '\\u2936',\n      ldquo: '\\u201C',\n      ldquor: '\\u201E',\n      ldrdhar: '\\u2967',\n      ldrushar: '\\u294B',\n      ldsh: '\\u21B2',\n      lE: '\\u2266',\n      le: '\\u2264',\n      LeftAngleBracket: '\\u27E8',\n      LeftArrow: '\\u2190',\n      Leftarrow: '\\u21D0',\n      leftarrow: '\\u2190',\n      LeftArrowBar: '\\u21E4',\n      LeftArrowRightArrow: '\\u21C6',\n      leftarrowtail: '\\u21A2',\n      LeftCeiling: '\\u2308',\n      LeftDoubleBracket: '\\u27E6',\n      LeftDownTeeVector: '\\u2961',\n      LeftDownVector: '\\u21C3',\n      LeftDownVectorBar: '\\u2959',\n      LeftFloor: '\\u230A',\n      leftharpoondown: '\\u21BD',\n      leftharpoonup: '\\u21BC',\n      leftleftarrows: '\\u21C7',\n      LeftRightArrow: '\\u2194',\n      Leftrightarrow: '\\u21D4',\n      leftrightarrow: '\\u2194',\n      leftrightarrows: '\\u21C6',\n      leftrightharpoons: '\\u21CB',\n      leftrightsquigarrow: '\\u21AD',\n      LeftRightVector: '\\u294E',\n      LeftTee: '\\u22A3',\n      LeftTeeArrow: '\\u21A4',\n      LeftTeeVector: '\\u295A',\n      leftthreetimes: '\\u22CB',\n      LeftTriangle: '\\u22B2',\n      LeftTriangleBar: '\\u29CF',\n      LeftTriangleEqual: '\\u22B4',\n      LeftUpDownVector: '\\u2951',\n      LeftUpTeeVector: '\\u2960',\n      LeftUpVector: '\\u21BF',\n      LeftUpVectorBar: '\\u2958',\n      LeftVector: '\\u21BC',\n      LeftVectorBar: '\\u2952',\n      lEg: '\\u2A8B',\n      leg: '\\u22DA',\n      leq: '\\u2264',\n      leqq: '\\u2266',\n      leqslant: '\\u2A7D',\n      les: '\\u2A7D',\n      lescc: '\\u2AA8',\n      lesdot: '\\u2A7F',\n      lesdoto: '\\u2A81',\n      lesdotor: '\\u2A83',\n      lesg: '\\u22DA\\uFE00',\n      lesges: '\\u2A93',\n      lessapprox: '\\u2A85',\n      lessdot: '\\u22D6',\n      lesseqgtr: '\\u22DA',\n      lesseqqgtr: '\\u2A8B',\n      LessEqualGreater: '\\u22DA',\n      LessFullEqual: '\\u2266',\n      LessGreater: '\\u2276',\n      lessgtr: '\\u2276',\n      LessLess: '\\u2AA1',\n      lesssim: '\\u2272',\n      LessSlantEqual: '\\u2A7D',\n      LessTilde: '\\u2272',\n      lfisht: '\\u297C',\n      lfloor: '\\u230A',\n      Lfr: '\\uD835\\uDD0F',\n      lfr: '\\uD835\\uDD29',\n      lg: '\\u2276',\n      lgE: '\\u2A91',\n      lHar: '\\u2962',\n      lhard: '\\u21BD',\n      lharu: '\\u21BC',\n      lharul: '\\u296A',\n      lhblk: '\\u2584',\n      LJcy: '\\u0409',\n      ljcy: '\\u0459',\n      Ll: '\\u22D8',\n      ll: '\\u226A',\n      llarr: '\\u21C7',\n      llcorner: '\\u231E',\n      Lleftarrow: '\\u21DA',\n      llhard: '\\u296B',\n      lltri: '\\u25FA',\n      Lmidot: '\\u013F',\n      lmidot: '\\u0140',\n      lmoust: '\\u23B0',\n      lmoustache: '\\u23B0',\n      lnap: '\\u2A89',\n      lnapprox: '\\u2A89',\n      lnE: '\\u2268',\n      lne: '\\u2A87',\n      lneq: '\\u2A87',\n      lneqq: '\\u2268',\n      lnsim: '\\u22E6',\n      loang: '\\u27EC',\n      loarr: '\\u21FD',\n      lobrk: '\\u27E6',\n      LongLeftArrow: '\\u27F5',\n      Longleftarrow: '\\u27F8',\n      longleftarrow: '\\u27F5',\n      LongLeftRightArrow: '\\u27F7',\n      Longleftrightarrow: '\\u27FA',\n      longleftrightarrow: '\\u27F7',\n      longmapsto: '\\u27FC',\n      LongRightArrow: '\\u27F6',\n      Longrightarrow: '\\u27F9',\n      longrightarrow: '\\u27F6',\n      looparrowleft: '\\u21AB',\n      looparrowright: '\\u21AC',\n      lopar: '\\u2985',\n      Lopf: '\\uD835\\uDD43',\n      lopf: '\\uD835\\uDD5D',\n      loplus: '\\u2A2D',\n      lotimes: '\\u2A34',\n      lowast: '\\u2217',\n      lowbar: '\\u005F',\n      LowerLeftArrow: '\\u2199',\n      LowerRightArrow: '\\u2198',\n      loz: '\\u25CA',\n      lozenge: '\\u25CA',\n      lozf: '\\u29EB',\n      lpar: '\\u0028',\n      lparlt: '\\u2993',\n      lrarr: '\\u21C6',\n      lrcorner: '\\u231F',\n      lrhar: '\\u21CB',\n      lrhard: '\\u296D',\n      lrm: '\\u200E',\n      lrtri: '\\u22BF',\n      lsaquo: '\\u2039',\n      Lscr: '\\u2112',\n      lscr: '\\uD835\\uDCC1',\n      Lsh: '\\u21B0',\n      lsh: '\\u21B0',\n      lsim: '\\u2272',\n      lsime: '\\u2A8D',\n      lsimg: '\\u2A8F',\n      lsqb: '\\u005B',\n      lsquo: '\\u2018',\n      lsquor: '\\u201A',\n      Lstrok: '\\u0141',\n      lstrok: '\\u0142',\n      Lt: '\\u226A',\n      LT: '\\u003C',\n      lt: '\\u003C',\n      ltcc: '\\u2AA6',\n      ltcir: '\\u2A79',\n      ltdot: '\\u22D6',\n      lthree: '\\u22CB',\n      ltimes: '\\u22C9',\n      ltlarr: '\\u2976',\n      ltquest: '\\u2A7B',\n      ltri: '\\u25C3',\n      ltrie: '\\u22B4',\n      ltrif: '\\u25C2',\n      ltrPar: '\\u2996',\n      lurdshar: '\\u294A',\n      luruhar: '\\u2966',\n      lvertneqq: '\\u2268\\uFE00',\n      lvnE: '\\u2268\\uFE00',\n      macr: '\\u00AF',\n      male: '\\u2642',\n      malt: '\\u2720',\n      maltese: '\\u2720',\n      Map: '\\u2905',\n      map: '\\u21A6',\n      mapsto: '\\u21A6',\n      mapstodown: '\\u21A7',\n      mapstoleft: '\\u21A4',\n      mapstoup: '\\u21A5',\n      marker: '\\u25AE',\n      mcomma: '\\u2A29',\n      Mcy: '\\u041C',\n      mcy: '\\u043C',\n      mdash: '\\u2014',\n      mDDot: '\\u223A',\n      measuredangle: '\\u2221',\n      MediumSpace: '\\u205F',\n      Mellintrf: '\\u2133',\n      Mfr: '\\uD835\\uDD10',\n      mfr: '\\uD835\\uDD2A',\n      mho: '\\u2127',\n      micro: '\\u00B5',\n      mid: '\\u2223',\n      midast: '\\u002A',\n      midcir: '\\u2AF0',\n      middot: '\\u00B7',\n      minus: '\\u2212',\n      minusb: '\\u229F',\n      minusd: '\\u2238',\n      minusdu: '\\u2A2A',\n      MinusPlus: '\\u2213',\n      mlcp: '\\u2ADB',\n      mldr: '\\u2026',\n      mnplus: '\\u2213',\n      models: '\\u22A7',\n      Mopf: '\\uD835\\uDD44',\n      mopf: '\\uD835\\uDD5E',\n      mp: '\\u2213',\n      Mscr: '\\u2133',\n      mscr: '\\uD835\\uDCC2',\n      mstpos: '\\u223E',\n      Mu: '\\u039C',\n      mu: '\\u03BC',\n      multimap: '\\u22B8',\n      mumap: '\\u22B8',\n      nabla: '\\u2207',\n      Nacute: '\\u0143',\n      nacute: '\\u0144',\n      nang: '\\u2220\\u20D2',\n      nap: '\\u2249',\n      napE: '\\u2A70\\u0338',\n      napid: '\\u224B\\u0338',\n      napos: '\\u0149',\n      napprox: '\\u2249',\n      natur: '\\u266E',\n      natural: '\\u266E',\n      naturals: '\\u2115',\n      nbsp: '\\u00A0',\n      nbump: '\\u224E\\u0338',\n      nbumpe: '\\u224F\\u0338',\n      ncap: '\\u2A43',\n      Ncaron: '\\u0147',\n      ncaron: '\\u0148',\n      Ncedil: '\\u0145',\n      ncedil: '\\u0146',\n      ncong: '\\u2247',\n      ncongdot: '\\u2A6D\\u0338',\n      ncup: '\\u2A42',\n      Ncy: '\\u041D',\n      ncy: '\\u043D',\n      ndash: '\\u2013',\n      ne: '\\u2260',\n      nearhk: '\\u2924',\n      neArr: '\\u21D7',\n      nearr: '\\u2197',\n      nearrow: '\\u2197',\n      nedot: '\\u2250\\u0338',\n      NegativeMediumSpace: '\\u200B',\n      NegativeThickSpace: '\\u200B',\n      NegativeThinSpace: '\\u200B',\n      NegativeVeryThinSpace: '\\u200B',\n      nequiv: '\\u2262',\n      nesear: '\\u2928',\n      nesim: '\\u2242\\u0338',\n      NestedGreaterGreater: '\\u226B',\n      NestedLessLess: '\\u226A',\n      NewLine: '\\u000A',\n      nexist: '\\u2204',\n      nexists: '\\u2204',\n      Nfr: '\\uD835\\uDD11',\n      nfr: '\\uD835\\uDD2B',\n      ngE: '\\u2267\\u0338',\n      nge: '\\u2271',\n      ngeq: '\\u2271',\n      ngeqq: '\\u2267\\u0338',\n      ngeqslant: '\\u2A7E\\u0338',\n      nges: '\\u2A7E\\u0338',\n      nGg: '\\u22D9\\u0338',\n      ngsim: '\\u2275',\n      nGt: '\\u226B\\u20D2',\n      ngt: '\\u226F',\n      ngtr: '\\u226F',\n      nGtv: '\\u226B\\u0338',\n      nhArr: '\\u21CE',\n      nharr: '\\u21AE',\n      nhpar: '\\u2AF2',\n      ni: '\\u220B',\n      nis: '\\u22FC',\n      nisd: '\\u22FA',\n      niv: '\\u220B',\n      NJcy: '\\u040A',\n      njcy: '\\u045A',\n      nlArr: '\\u21CD',\n      nlarr: '\\u219A',\n      nldr: '\\u2025',\n      nlE: '\\u2266\\u0338',\n      nle: '\\u2270',\n      nLeftarrow: '\\u21CD',\n      nleftarrow: '\\u219A',\n      nLeftrightarrow: '\\u21CE',\n      nleftrightarrow: '\\u21AE',\n      nleq: '\\u2270',\n      nleqq: '\\u2266\\u0338',\n      nleqslant: '\\u2A7D\\u0338',\n      nles: '\\u2A7D\\u0338',\n      nless: '\\u226E',\n      nLl: '\\u22D8\\u0338',\n      nlsim: '\\u2274',\n      nLt: '\\u226A\\u20D2',\n      nlt: '\\u226E',\n      nltri: '\\u22EA',\n      nltrie: '\\u22EC',\n      nLtv: '\\u226A\\u0338',\n      nmid: '\\u2224',\n      NoBreak: '\\u2060',\n      NonBreakingSpace: '\\u00A0',\n      Nopf: '\\u2115',\n      nopf: '\\uD835\\uDD5F',\n      Not: '\\u2AEC',\n      not: '\\u00AC',\n      NotCongruent: '\\u2262',\n      NotCupCap: '\\u226D',\n      NotDoubleVerticalBar: '\\u2226',\n      NotElement: '\\u2209',\n      NotEqual: '\\u2260',\n      NotEqualTilde: '\\u2242\\u0338',\n      NotExists: '\\u2204',\n      NotGreater: '\\u226F',\n      NotGreaterEqual: '\\u2271',\n      NotGreaterFullEqual: '\\u2267\\u0338',\n      NotGreaterGreater: '\\u226B\\u0338',\n      NotGreaterLess: '\\u2279',\n      NotGreaterSlantEqual: '\\u2A7E\\u0338',\n      NotGreaterTilde: '\\u2275',\n      NotHumpDownHump: '\\u224E\\u0338',\n      NotHumpEqual: '\\u224F\\u0338',\n      notin: '\\u2209',\n      notindot: '\\u22F5\\u0338',\n      notinE: '\\u22F9\\u0338',\n      notinva: '\\u2209',\n      notinvb: '\\u22F7',\n      notinvc: '\\u22F6',\n      NotLeftTriangle: '\\u22EA',\n      NotLeftTriangleBar: '\\u29CF\\u0338',\n      NotLeftTriangleEqual: '\\u22EC',\n      NotLess: '\\u226E',\n      NotLessEqual: '\\u2270',\n      NotLessGreater: '\\u2278',\n      NotLessLess: '\\u226A\\u0338',\n      NotLessSlantEqual: '\\u2A7D\\u0338',\n      NotLessTilde: '\\u2274',\n      NotNestedGreaterGreater: '\\u2AA2\\u0338',\n      NotNestedLessLess: '\\u2AA1\\u0338',\n      notni: '\\u220C',\n      notniva: '\\u220C',\n      notnivb: '\\u22FE',\n      notnivc: '\\u22FD',\n      NotPrecedes: '\\u2280',\n      NotPrecedesEqual: '\\u2AAF\\u0338',\n      NotPrecedesSlantEqual: '\\u22E0',\n      NotReverseElement: '\\u220C',\n      NotRightTriangle: '\\u22EB',\n      NotRightTriangleBar: '\\u29D0\\u0338',\n      NotRightTriangleEqual: '\\u22ED',\n      NotSquareSubset: '\\u228F\\u0338',\n      NotSquareSubsetEqual: '\\u22E2',\n      NotSquareSuperset: '\\u2290\\u0338',\n      NotSquareSupersetEqual: '\\u22E3',\n      NotSubset: '\\u2282\\u20D2',\n      NotSubsetEqual: '\\u2288',\n      NotSucceeds: '\\u2281',\n      NotSucceedsEqual: '\\u2AB0\\u0338',\n      NotSucceedsSlantEqual: '\\u22E1',\n      NotSucceedsTilde: '\\u227F\\u0338',\n      NotSuperset: '\\u2283\\u20D2',\n      NotSupersetEqual: '\\u2289',\n      NotTilde: '\\u2241',\n      NotTildeEqual: '\\u2244',\n      NotTildeFullEqual: '\\u2247',\n      NotTildeTilde: '\\u2249',\n      NotVerticalBar: '\\u2224',\n      npar: '\\u2226',\n      nparallel: '\\u2226',\n      nparsl: '\\u2AFD\\u20E5',\n      npart: '\\u2202\\u0338',\n      npolint: '\\u2A14',\n      npr: '\\u2280',\n      nprcue: '\\u22E0',\n      npre: '\\u2AAF\\u0338',\n      nprec: '\\u2280',\n      npreceq: '\\u2AAF\\u0338',\n      nrArr: '\\u21CF',\n      nrarr: '\\u219B',\n      nrarrc: '\\u2933\\u0338',\n      nrarrw: '\\u219D\\u0338',\n      nRightarrow: '\\u21CF',\n      nrightarrow: '\\u219B',\n      nrtri: '\\u22EB',\n      nrtrie: '\\u22ED',\n      nsc: '\\u2281',\n      nsccue: '\\u22E1',\n      nsce: '\\u2AB0\\u0338',\n      Nscr: '\\uD835\\uDCA9',\n      nscr: '\\uD835\\uDCC3',\n      nshortmid: '\\u2224',\n      nshortparallel: '\\u2226',\n      nsim: '\\u2241',\n      nsime: '\\u2244',\n      nsimeq: '\\u2244',\n      nsmid: '\\u2224',\n      nspar: '\\u2226',\n      nsqsube: '\\u22E2',\n      nsqsupe: '\\u22E3',\n      nsub: '\\u2284',\n      nsubE: '\\u2AC5\\u0338',\n      nsube: '\\u2288',\n      nsubset: '\\u2282\\u20D2',\n      nsubseteq: '\\u2288',\n      nsubseteqq: '\\u2AC5\\u0338',\n      nsucc: '\\u2281',\n      nsucceq: '\\u2AB0\\u0338',\n      nsup: '\\u2285',\n      nsupE: '\\u2AC6\\u0338',\n      nsupe: '\\u2289',\n      nsupset: '\\u2283\\u20D2',\n      nsupseteq: '\\u2289',\n      nsupseteqq: '\\u2AC6\\u0338',\n      ntgl: '\\u2279',\n      Ntilde: '\\u00D1',\n      ntilde: '\\u00F1',\n      ntlg: '\\u2278',\n      ntriangleleft: '\\u22EA',\n      ntrianglelefteq: '\\u22EC',\n      ntriangleright: '\\u22EB',\n      ntrianglerighteq: '\\u22ED',\n      Nu: '\\u039D',\n      nu: '\\u03BD',\n      num: '\\u0023',\n      numero: '\\u2116',\n      numsp: '\\u2007',\n      nvap: '\\u224D\\u20D2',\n      nVDash: '\\u22AF',\n      nVdash: '\\u22AE',\n      nvDash: '\\u22AD',\n      nvdash: '\\u22AC',\n      nvge: '\\u2265\\u20D2',\n      nvgt: '\\u003E\\u20D2',\n      nvHarr: '\\u2904',\n      nvinfin: '\\u29DE',\n      nvlArr: '\\u2902',\n      nvle: '\\u2264\\u20D2',\n      nvlt: '\\u003C\\u20D2',\n      nvltrie: '\\u22B4\\u20D2',\n      nvrArr: '\\u2903',\n      nvrtrie: '\\u22B5\\u20D2',\n      nvsim: '\\u223C\\u20D2',\n      nwarhk: '\\u2923',\n      nwArr: '\\u21D6',\n      nwarr: '\\u2196',\n      nwarrow: '\\u2196',\n      nwnear: '\\u2927',\n      Oacute: '\\u00D3',\n      oacute: '\\u00F3',\n      oast: '\\u229B',\n      ocir: '\\u229A',\n      Ocirc: '\\u00D4',\n      ocirc: '\\u00F4',\n      Ocy: '\\u041E',\n      ocy: '\\u043E',\n      odash: '\\u229D',\n      Odblac: '\\u0150',\n      odblac: '\\u0151',\n      odiv: '\\u2A38',\n      odot: '\\u2299',\n      odsold: '\\u29BC',\n      OElig: '\\u0152',\n      oelig: '\\u0153',\n      ofcir: '\\u29BF',\n      Ofr: '\\uD835\\uDD12',\n      ofr: '\\uD835\\uDD2C',\n      ogon: '\\u02DB',\n      Ograve: '\\u00D2',\n      ograve: '\\u00F2',\n      ogt: '\\u29C1',\n      ohbar: '\\u29B5',\n      ohm: '\\u03A9',\n      oint: '\\u222E',\n      olarr: '\\u21BA',\n      olcir: '\\u29BE',\n      olcross: '\\u29BB',\n      oline: '\\u203E',\n      olt: '\\u29C0',\n      Omacr: '\\u014C',\n      omacr: '\\u014D',\n      Omega: '\\u03A9',\n      omega: '\\u03C9',\n      Omicron: '\\u039F',\n      omicron: '\\u03BF',\n      omid: '\\u29B6',\n      ominus: '\\u2296',\n      Oopf: '\\uD835\\uDD46',\n      oopf: '\\uD835\\uDD60',\n      opar: '\\u29B7',\n      OpenCurlyDoubleQuote: '\\u201C',\n      OpenCurlyQuote: '\\u2018',\n      operp: '\\u29B9',\n      oplus: '\\u2295',\n      Or: '\\u2A54',\n      or: '\\u2228',\n      orarr: '\\u21BB',\n      ord: '\\u2A5D',\n      order: '\\u2134',\n      orderof: '\\u2134',\n      ordf: '\\u00AA',\n      ordm: '\\u00BA',\n      origof: '\\u22B6',\n      oror: '\\u2A56',\n      orslope: '\\u2A57',\n      orv: '\\u2A5B',\n      oS: '\\u24C8',\n      Oscr: '\\uD835\\uDCAA',\n      oscr: '\\u2134',\n      Oslash: '\\u00D8',\n      oslash: '\\u00F8',\n      osol: '\\u2298',\n      Otilde: '\\u00D5',\n      otilde: '\\u00F5',\n      Otimes: '\\u2A37',\n      otimes: '\\u2297',\n      otimesas: '\\u2A36',\n      Ouml: '\\u00D6',\n      ouml: '\\u00F6',\n      ovbar: '\\u233D',\n      OverBar: '\\u203E',\n      OverBrace: '\\u23DE',\n      OverBracket: '\\u23B4',\n      OverParenthesis: '\\u23DC',\n      par: '\\u2225',\n      para: '\\u00B6',\n      parallel: '\\u2225',\n      parsim: '\\u2AF3',\n      parsl: '\\u2AFD',\n      part: '\\u2202',\n      PartialD: '\\u2202',\n      Pcy: '\\u041F',\n      pcy: '\\u043F',\n      percnt: '\\u0025',\n      period: '\\u002E',\n      permil: '\\u2030',\n      perp: '\\u22A5',\n      pertenk: '\\u2031',\n      Pfr: '\\uD835\\uDD13',\n      pfr: '\\uD835\\uDD2D',\n      Phi: '\\u03A6',\n      phi: '\\u03C6',\n      phiv: '\\u03D5',\n      phmmat: '\\u2133',\n      phone: '\\u260E',\n      Pi: '\\u03A0',\n      pi: '\\u03C0',\n      pitchfork: '\\u22D4',\n      piv: '\\u03D6',\n      planck: '\\u210F',\n      planckh: '\\u210E',\n      plankv: '\\u210F',\n      plus: '\\u002B',\n      plusacir: '\\u2A23',\n      plusb: '\\u229E',\n      pluscir: '\\u2A22',\n      plusdo: '\\u2214',\n      plusdu: '\\u2A25',\n      pluse: '\\u2A72',\n      PlusMinus: '\\u00B1',\n      plusmn: '\\u00B1',\n      plussim: '\\u2A26',\n      plustwo: '\\u2A27',\n      pm: '\\u00B1',\n      Poincareplane: '\\u210C',\n      pointint: '\\u2A15',\n      Popf: '\\u2119',\n      popf: '\\uD835\\uDD61',\n      pound: '\\u00A3',\n      Pr: '\\u2ABB',\n      pr: '\\u227A',\n      prap: '\\u2AB7',\n      prcue: '\\u227C',\n      prE: '\\u2AB3',\n      pre: '\\u2AAF',\n      prec: '\\u227A',\n      precapprox: '\\u2AB7',\n      preccurlyeq: '\\u227C',\n      Precedes: '\\u227A',\n      PrecedesEqual: '\\u2AAF',\n      PrecedesSlantEqual: '\\u227C',\n      PrecedesTilde: '\\u227E',\n      preceq: '\\u2AAF',\n      precnapprox: '\\u2AB9',\n      precneqq: '\\u2AB5',\n      precnsim: '\\u22E8',\n      precsim: '\\u227E',\n      Prime: '\\u2033',\n      prime: '\\u2032',\n      primes: '\\u2119',\n      prnap: '\\u2AB9',\n      prnE: '\\u2AB5',\n      prnsim: '\\u22E8',\n      prod: '\\u220F',\n      Product: '\\u220F',\n      profalar: '\\u232E',\n      profline: '\\u2312',\n      profsurf: '\\u2313',\n      prop: '\\u221D',\n      Proportion: '\\u2237',\n      Proportional: '\\u221D',\n      propto: '\\u221D',\n      prsim: '\\u227E',\n      prurel: '\\u22B0',\n      Pscr: '\\uD835\\uDCAB',\n      pscr: '\\uD835\\uDCC5',\n      Psi: '\\u03A8',\n      psi: '\\u03C8',\n      puncsp: '\\u2008',\n      Qfr: '\\uD835\\uDD14',\n      qfr: '\\uD835\\uDD2E',\n      qint: '\\u2A0C',\n      Qopf: '\\u211A',\n      qopf: '\\uD835\\uDD62',\n      qprime: '\\u2057',\n      Qscr: '\\uD835\\uDCAC',\n      qscr: '\\uD835\\uDCC6',\n      quaternions: '\\u210D',\n      quatint: '\\u2A16',\n      quest: '\\u003F',\n      questeq: '\\u225F',\n      QUOT: '\\u0022',\n      quot: '\\u0022',\n      rAarr: '\\u21DB',\n      race: '\\u223D\\u0331',\n      Racute: '\\u0154',\n      racute: '\\u0155',\n      radic: '\\u221A',\n      raemptyv: '\\u29B3',\n      Rang: '\\u27EB',\n      rang: '\\u27E9',\n      rangd: '\\u2992',\n      range: '\\u29A5',\n      rangle: '\\u27E9',\n      raquo: '\\u00BB',\n      Rarr: '\\u21A0',\n      rArr: '\\u21D2',\n      rarr: '\\u2192',\n      rarrap: '\\u2975',\n      rarrb: '\\u21E5',\n      rarrbfs: '\\u2920',\n      rarrc: '\\u2933',\n      rarrfs: '\\u291E',\n      rarrhk: '\\u21AA',\n      rarrlp: '\\u21AC',\n      rarrpl: '\\u2945',\n      rarrsim: '\\u2974',\n      Rarrtl: '\\u2916',\n      rarrtl: '\\u21A3',\n      rarrw: '\\u219D',\n      rAtail: '\\u291C',\n      ratail: '\\u291A',\n      ratio: '\\u2236',\n      rationals: '\\u211A',\n      RBarr: '\\u2910',\n      rBarr: '\\u290F',\n      rbarr: '\\u290D',\n      rbbrk: '\\u2773',\n      rbrace: '\\u007D',\n      rbrack: '\\u005D',\n      rbrke: '\\u298C',\n      rbrksld: '\\u298E',\n      rbrkslu: '\\u2990',\n      Rcaron: '\\u0158',\n      rcaron: '\\u0159',\n      Rcedil: '\\u0156',\n      rcedil: '\\u0157',\n      rceil: '\\u2309',\n      rcub: '\\u007D',\n      Rcy: '\\u0420',\n      rcy: '\\u0440',\n      rdca: '\\u2937',\n      rdldhar: '\\u2969',\n      rdquo: '\\u201D',\n      rdquor: '\\u201D',\n      rdsh: '\\u21B3',\n      Re: '\\u211C',\n      real: '\\u211C',\n      realine: '\\u211B',\n      realpart: '\\u211C',\n      reals: '\\u211D',\n      rect: '\\u25AD',\n      REG: '\\u00AE',\n      reg: '\\u00AE',\n      ReverseElement: '\\u220B',\n      ReverseEquilibrium: '\\u21CB',\n      ReverseUpEquilibrium: '\\u296F',\n      rfisht: '\\u297D',\n      rfloor: '\\u230B',\n      Rfr: '\\u211C',\n      rfr: '\\uD835\\uDD2F',\n      rHar: '\\u2964',\n      rhard: '\\u21C1',\n      rharu: '\\u21C0',\n      rharul: '\\u296C',\n      Rho: '\\u03A1',\n      rho: '\\u03C1',\n      rhov: '\\u03F1',\n      RightAngleBracket: '\\u27E9',\n      RightArrow: '\\u2192',\n      Rightarrow: '\\u21D2',\n      rightarrow: '\\u2192',\n      RightArrowBar: '\\u21E5',\n      RightArrowLeftArrow: '\\u21C4',\n      rightarrowtail: '\\u21A3',\n      RightCeiling: '\\u2309',\n      RightDoubleBracket: '\\u27E7',\n      RightDownTeeVector: '\\u295D',\n      RightDownVector: '\\u21C2',\n      RightDownVectorBar: '\\u2955',\n      RightFloor: '\\u230B',\n      rightharpoondown: '\\u21C1',\n      rightharpoonup: '\\u21C0',\n      rightleftarrows: '\\u21C4',\n      rightleftharpoons: '\\u21CC',\n      rightrightarrows: '\\u21C9',\n      rightsquigarrow: '\\u219D',\n      RightTee: '\\u22A2',\n      RightTeeArrow: '\\u21A6',\n      RightTeeVector: '\\u295B',\n      rightthreetimes: '\\u22CC',\n      RightTriangle: '\\u22B3',\n      RightTriangleBar: '\\u29D0',\n      RightTriangleEqual: '\\u22B5',\n      RightUpDownVector: '\\u294F',\n      RightUpTeeVector: '\\u295C',\n      RightUpVector: '\\u21BE',\n      RightUpVectorBar: '\\u2954',\n      RightVector: '\\u21C0',\n      RightVectorBar: '\\u2953',\n      ring: '\\u02DA',\n      risingdotseq: '\\u2253',\n      rlarr: '\\u21C4',\n      rlhar: '\\u21CC',\n      rlm: '\\u200F',\n      rmoust: '\\u23B1',\n      rmoustache: '\\u23B1',\n      rnmid: '\\u2AEE',\n      roang: '\\u27ED',\n      roarr: '\\u21FE',\n      robrk: '\\u27E7',\n      ropar: '\\u2986',\n      Ropf: '\\u211D',\n      ropf: '\\uD835\\uDD63',\n      roplus: '\\u2A2E',\n      rotimes: '\\u2A35',\n      RoundImplies: '\\u2970',\n      rpar: '\\u0029',\n      rpargt: '\\u2994',\n      rppolint: '\\u2A12',\n      rrarr: '\\u21C9',\n      Rrightarrow: '\\u21DB',\n      rsaquo: '\\u203A',\n      Rscr: '\\u211B',\n      rscr: '\\uD835\\uDCC7',\n      Rsh: '\\u21B1',\n      rsh: '\\u21B1',\n      rsqb: '\\u005D',\n      rsquo: '\\u2019',\n      rsquor: '\\u2019',\n      rthree: '\\u22CC',\n      rtimes: '\\u22CA',\n      rtri: '\\u25B9',\n      rtrie: '\\u22B5',\n      rtrif: '\\u25B8',\n      rtriltri: '\\u29CE',\n      RuleDelayed: '\\u29F4',\n      ruluhar: '\\u2968',\n      rx: '\\u211E',\n      Sacute: '\\u015A',\n      sacute: '\\u015B',\n      sbquo: '\\u201A',\n      Sc: '\\u2ABC',\n      sc: '\\u227B',\n      scap: '\\u2AB8',\n      Scaron: '\\u0160',\n      scaron: '\\u0161',\n      sccue: '\\u227D',\n      scE: '\\u2AB4',\n      sce: '\\u2AB0',\n      Scedil: '\\u015E',\n      scedil: '\\u015F',\n      Scirc: '\\u015C',\n      scirc: '\\u015D',\n      scnap: '\\u2ABA',\n      scnE: '\\u2AB6',\n      scnsim: '\\u22E9',\n      scpolint: '\\u2A13',\n      scsim: '\\u227F',\n      Scy: '\\u0421',\n      scy: '\\u0441',\n      sdot: '\\u22C5',\n      sdotb: '\\u22A1',\n      sdote: '\\u2A66',\n      searhk: '\\u2925',\n      seArr: '\\u21D8',\n      searr: '\\u2198',\n      searrow: '\\u2198',\n      sect: '\\u00A7',\n      semi: '\\u003B',\n      seswar: '\\u2929',\n      setminus: '\\u2216',\n      setmn: '\\u2216',\n      sext: '\\u2736',\n      Sfr: '\\uD835\\uDD16',\n      sfr: '\\uD835\\uDD30',\n      sfrown: '\\u2322',\n      sharp: '\\u266F',\n      SHCHcy: '\\u0429',\n      shchcy: '\\u0449',\n      SHcy: '\\u0428',\n      shcy: '\\u0448',\n      ShortDownArrow: '\\u2193',\n      ShortLeftArrow: '\\u2190',\n      shortmid: '\\u2223',\n      shortparallel: '\\u2225',\n      ShortRightArrow: '\\u2192',\n      ShortUpArrow: '\\u2191',\n      shy: '\\u00AD',\n      Sigma: '\\u03A3',\n      sigma: '\\u03C3',\n      sigmaf: '\\u03C2',\n      sigmav: '\\u03C2',\n      sim: '\\u223C',\n      simdot: '\\u2A6A',\n      sime: '\\u2243',\n      simeq: '\\u2243',\n      simg: '\\u2A9E',\n      simgE: '\\u2AA0',\n      siml: '\\u2A9D',\n      simlE: '\\u2A9F',\n      simne: '\\u2246',\n      simplus: '\\u2A24',\n      simrarr: '\\u2972',\n      slarr: '\\u2190',\n      SmallCircle: '\\u2218',\n      smallsetminus: '\\u2216',\n      smashp: '\\u2A33',\n      smeparsl: '\\u29E4',\n      smid: '\\u2223',\n      smile: '\\u2323',\n      smt: '\\u2AAA',\n      smte: '\\u2AAC',\n      smtes: '\\u2AAC\\uFE00',\n      SOFTcy: '\\u042C',\n      softcy: '\\u044C',\n      sol: '\\u002F',\n      solb: '\\u29C4',\n      solbar: '\\u233F',\n      Sopf: '\\uD835\\uDD4A',\n      sopf: '\\uD835\\uDD64',\n      spades: '\\u2660',\n      spadesuit: '\\u2660',\n      spar: '\\u2225',\n      sqcap: '\\u2293',\n      sqcaps: '\\u2293\\uFE00',\n      sqcup: '\\u2294',\n      sqcups: '\\u2294\\uFE00',\n      Sqrt: '\\u221A',\n      sqsub: '\\u228F',\n      sqsube: '\\u2291',\n      sqsubset: '\\u228F',\n      sqsubseteq: '\\u2291',\n      sqsup: '\\u2290',\n      sqsupe: '\\u2292',\n      sqsupset: '\\u2290',\n      sqsupseteq: '\\u2292',\n      squ: '\\u25A1',\n      Square: '\\u25A1',\n      square: '\\u25A1',\n      SquareIntersection: '\\u2293',\n      SquareSubset: '\\u228F',\n      SquareSubsetEqual: '\\u2291',\n      SquareSuperset: '\\u2290',\n      SquareSupersetEqual: '\\u2292',\n      SquareUnion: '\\u2294',\n      squarf: '\\u25AA',\n      squf: '\\u25AA',\n      srarr: '\\u2192',\n      Sscr: '\\uD835\\uDCAE',\n      sscr: '\\uD835\\uDCC8',\n      ssetmn: '\\u2216',\n      ssmile: '\\u2323',\n      sstarf: '\\u22C6',\n      Star: '\\u22C6',\n      star: '\\u2606',\n      starf: '\\u2605',\n      straightepsilon: '\\u03F5',\n      straightphi: '\\u03D5',\n      strns: '\\u00AF',\n      Sub: '\\u22D0',\n      sub: '\\u2282',\n      subdot: '\\u2ABD',\n      subE: '\\u2AC5',\n      sube: '\\u2286',\n      subedot: '\\u2AC3',\n      submult: '\\u2AC1',\n      subnE: '\\u2ACB',\n      subne: '\\u228A',\n      subplus: '\\u2ABF',\n      subrarr: '\\u2979',\n      Subset: '\\u22D0',\n      subset: '\\u2282',\n      subseteq: '\\u2286',\n      subseteqq: '\\u2AC5',\n      SubsetEqual: '\\u2286',\n      subsetneq: '\\u228A',\n      subsetneqq: '\\u2ACB',\n      subsim: '\\u2AC7',\n      subsub: '\\u2AD5',\n      subsup: '\\u2AD3',\n      succ: '\\u227B',\n      succapprox: '\\u2AB8',\n      succcurlyeq: '\\u227D',\n      Succeeds: '\\u227B',\n      SucceedsEqual: '\\u2AB0',\n      SucceedsSlantEqual: '\\u227D',\n      SucceedsTilde: '\\u227F',\n      succeq: '\\u2AB0',\n      succnapprox: '\\u2ABA',\n      succneqq: '\\u2AB6',\n      succnsim: '\\u22E9',\n      succsim: '\\u227F',\n      SuchThat: '\\u220B',\n      Sum: '\\u2211',\n      sum: '\\u2211',\n      sung: '\\u266A',\n      Sup: '\\u22D1',\n      sup: '\\u2283',\n      sup1: '\\u00B9',\n      sup2: '\\u00B2',\n      sup3: '\\u00B3',\n      supdot: '\\u2ABE',\n      supdsub: '\\u2AD8',\n      supE: '\\u2AC6',\n      supe: '\\u2287',\n      supedot: '\\u2AC4',\n      Superset: '\\u2283',\n      SupersetEqual: '\\u2287',\n      suphsol: '\\u27C9',\n      suphsub: '\\u2AD7',\n      suplarr: '\\u297B',\n      supmult: '\\u2AC2',\n      supnE: '\\u2ACC',\n      supne: '\\u228B',\n      supplus: '\\u2AC0',\n      Supset: '\\u22D1',\n      supset: '\\u2283',\n      supseteq: '\\u2287',\n      supseteqq: '\\u2AC6',\n      supsetneq: '\\u228B',\n      supsetneqq: '\\u2ACC',\n      supsim: '\\u2AC8',\n      supsub: '\\u2AD4',\n      supsup: '\\u2AD6',\n      swarhk: '\\u2926',\n      swArr: '\\u21D9',\n      swarr: '\\u2199',\n      swarrow: '\\u2199',\n      swnwar: '\\u292A',\n      szlig: '\\u00DF',\n      Tab: '\\u0009',\n      target: '\\u2316',\n      Tau: '\\u03A4',\n      tau: '\\u03C4',\n      tbrk: '\\u23B4',\n      Tcaron: '\\u0164',\n      tcaron: '\\u0165',\n      Tcedil: '\\u0162',\n      tcedil: '\\u0163',\n      Tcy: '\\u0422',\n      tcy: '\\u0442',\n      tdot: '\\u20DB',\n      telrec: '\\u2315',\n      Tfr: '\\uD835\\uDD17',\n      tfr: '\\uD835\\uDD31',\n      there4: '\\u2234',\n      Therefore: '\\u2234',\n      therefore: '\\u2234',\n      Theta: '\\u0398',\n      theta: '\\u03B8',\n      thetasym: '\\u03D1',\n      thetav: '\\u03D1',\n      thickapprox: '\\u2248',\n      thicksim: '\\u223C',\n      ThickSpace: '\\u205F\\u200A',\n      thinsp: '\\u2009',\n      ThinSpace: '\\u2009',\n      thkap: '\\u2248',\n      thksim: '\\u223C',\n      THORN: '\\u00DE',\n      thorn: '\\u00FE',\n      Tilde: '\\u223C',\n      tilde: '\\u02DC',\n      TildeEqual: '\\u2243',\n      TildeFullEqual: '\\u2245',\n      TildeTilde: '\\u2248',\n      times: '\\u00D7',\n      timesb: '\\u22A0',\n      timesbar: '\\u2A31',\n      timesd: '\\u2A30',\n      tint: '\\u222D',\n      toea: '\\u2928',\n      top: '\\u22A4',\n      topbot: '\\u2336',\n      topcir: '\\u2AF1',\n      Topf: '\\uD835\\uDD4B',\n      topf: '\\uD835\\uDD65',\n      topfork: '\\u2ADA',\n      tosa: '\\u2929',\n      tprime: '\\u2034',\n      TRADE: '\\u2122',\n      trade: '\\u2122',\n      triangle: '\\u25B5',\n      triangledown: '\\u25BF',\n      triangleleft: '\\u25C3',\n      trianglelefteq: '\\u22B4',\n      triangleq: '\\u225C',\n      triangleright: '\\u25B9',\n      trianglerighteq: '\\u22B5',\n      tridot: '\\u25EC',\n      trie: '\\u225C',\n      triminus: '\\u2A3A',\n      TripleDot: '\\u20DB',\n      triplus: '\\u2A39',\n      trisb: '\\u29CD',\n      tritime: '\\u2A3B',\n      trpezium: '\\u23E2',\n      Tscr: '\\uD835\\uDCAF',\n      tscr: '\\uD835\\uDCC9',\n      TScy: '\\u0426',\n      tscy: '\\u0446',\n      TSHcy: '\\u040B',\n      tshcy: '\\u045B',\n      Tstrok: '\\u0166',\n      tstrok: '\\u0167',\n      twixt: '\\u226C',\n      twoheadleftarrow: '\\u219E',\n      twoheadrightarrow: '\\u21A0',\n      Uacute: '\\u00DA',\n      uacute: '\\u00FA',\n      Uarr: '\\u219F',\n      uArr: '\\u21D1',\n      uarr: '\\u2191',\n      Uarrocir: '\\u2949',\n      Ubrcy: '\\u040E',\n      ubrcy: '\\u045E',\n      Ubreve: '\\u016C',\n      ubreve: '\\u016D',\n      Ucirc: '\\u00DB',\n      ucirc: '\\u00FB',\n      Ucy: '\\u0423',\n      ucy: '\\u0443',\n      udarr: '\\u21C5',\n      Udblac: '\\u0170',\n      udblac: '\\u0171',\n      udhar: '\\u296E',\n      ufisht: '\\u297E',\n      Ufr: '\\uD835\\uDD18',\n      ufr: '\\uD835\\uDD32',\n      Ugrave: '\\u00D9',\n      ugrave: '\\u00F9',\n      uHar: '\\u2963',\n      uharl: '\\u21BF',\n      uharr: '\\u21BE',\n      uhblk: '\\u2580',\n      ulcorn: '\\u231C',\n      ulcorner: '\\u231C',\n      ulcrop: '\\u230F',\n      ultri: '\\u25F8',\n      Umacr: '\\u016A',\n      umacr: '\\u016B',\n      uml: '\\u00A8',\n      UnderBar: '\\u005F',\n      UnderBrace: '\\u23DF',\n      UnderBracket: '\\u23B5',\n      UnderParenthesis: '\\u23DD',\n      Union: '\\u22C3',\n      UnionPlus: '\\u228E',\n      Uogon: '\\u0172',\n      uogon: '\\u0173',\n      Uopf: '\\uD835\\uDD4C',\n      uopf: '\\uD835\\uDD66',\n      UpArrow: '\\u2191',\n      Uparrow: '\\u21D1',\n      uparrow: '\\u2191',\n      UpArrowBar: '\\u2912',\n      UpArrowDownArrow: '\\u21C5',\n      UpDownArrow: '\\u2195',\n      Updownarrow: '\\u21D5',\n      updownarrow: '\\u2195',\n      UpEquilibrium: '\\u296E',\n      upharpoonleft: '\\u21BF',\n      upharpoonright: '\\u21BE',\n      uplus: '\\u228E',\n      UpperLeftArrow: '\\u2196',\n      UpperRightArrow: '\\u2197',\n      Upsi: '\\u03D2',\n      upsi: '\\u03C5',\n      upsih: '\\u03D2',\n      Upsilon: '\\u03A5',\n      upsilon: '\\u03C5',\n      UpTee: '\\u22A5',\n      UpTeeArrow: '\\u21A5',\n      upuparrows: '\\u21C8',\n      urcorn: '\\u231D',\n      urcorner: '\\u231D',\n      urcrop: '\\u230E',\n      Uring: '\\u016E',\n      uring: '\\u016F',\n      urtri: '\\u25F9',\n      Uscr: '\\uD835\\uDCB0',\n      uscr: '\\uD835\\uDCCA',\n      utdot: '\\u22F0',\n      Utilde: '\\u0168',\n      utilde: '\\u0169',\n      utri: '\\u25B5',\n      utrif: '\\u25B4',\n      uuarr: '\\u21C8',\n      Uuml: '\\u00DC',\n      uuml: '\\u00FC',\n      uwangle: '\\u29A7',\n      vangrt: '\\u299C',\n      varepsilon: '\\u03F5',\n      varkappa: '\\u03F0',\n      varnothing: '\\u2205',\n      varphi: '\\u03D5',\n      varpi: '\\u03D6',\n      varpropto: '\\u221D',\n      vArr: '\\u21D5',\n      varr: '\\u2195',\n      varrho: '\\u03F1',\n      varsigma: '\\u03C2',\n      varsubsetneq: '\\u228A\\uFE00',\n      varsubsetneqq: '\\u2ACB\\uFE00',\n      varsupsetneq: '\\u228B\\uFE00',\n      varsupsetneqq: '\\u2ACC\\uFE00',\n      vartheta: '\\u03D1',\n      vartriangleleft: '\\u22B2',\n      vartriangleright: '\\u22B3',\n      Vbar: '\\u2AEB',\n      vBar: '\\u2AE8',\n      vBarv: '\\u2AE9',\n      Vcy: '\\u0412',\n      vcy: '\\u0432',\n      VDash: '\\u22AB',\n      Vdash: '\\u22A9',\n      vDash: '\\u22A8',\n      vdash: '\\u22A2',\n      Vdashl: '\\u2AE6',\n      Vee: '\\u22C1',\n      vee: '\\u2228',\n      veebar: '\\u22BB',\n      veeeq: '\\u225A',\n      vellip: '\\u22EE',\n      Verbar: '\\u2016',\n      verbar: '\\u007C',\n      Vert: '\\u2016',\n      vert: '\\u007C',\n      VerticalBar: '\\u2223',\n      VerticalLine: '\\u007C',\n      VerticalSeparator: '\\u2758',\n      VerticalTilde: '\\u2240',\n      VeryThinSpace: '\\u200A',\n      Vfr: '\\uD835\\uDD19',\n      vfr: '\\uD835\\uDD33',\n      vltri: '\\u22B2',\n      vnsub: '\\u2282\\u20D2',\n      vnsup: '\\u2283\\u20D2',\n      Vopf: '\\uD835\\uDD4D',\n      vopf: '\\uD835\\uDD67',\n      vprop: '\\u221D',\n      vrtri: '\\u22B3',\n      Vscr: '\\uD835\\uDCB1',\n      vscr: '\\uD835\\uDCCB',\n      vsubnE: '\\u2ACB\\uFE00',\n      vsubne: '\\u228A\\uFE00',\n      vsupnE: '\\u2ACC\\uFE00',\n      vsupne: '\\u228B\\uFE00',\n      Vvdash: '\\u22AA',\n      vzigzag: '\\u299A',\n      Wcirc: '\\u0174',\n      wcirc: '\\u0175',\n      wedbar: '\\u2A5F',\n      Wedge: '\\u22C0',\n      wedge: '\\u2227',\n      wedgeq: '\\u2259',\n      weierp: '\\u2118',\n      Wfr: '\\uD835\\uDD1A',\n      wfr: '\\uD835\\uDD34',\n      Wopf: '\\uD835\\uDD4E',\n      wopf: '\\uD835\\uDD68',\n      wp: '\\u2118',\n      wr: '\\u2240',\n      wreath: '\\u2240',\n      Wscr: '\\uD835\\uDCB2',\n      wscr: '\\uD835\\uDCCC',\n      xcap: '\\u22C2',\n      xcirc: '\\u25EF',\n      xcup: '\\u22C3',\n      xdtri: '\\u25BD',\n      Xfr: '\\uD835\\uDD1B',\n      xfr: '\\uD835\\uDD35',\n      xhArr: '\\u27FA',\n      xharr: '\\u27F7',\n      Xi: '\\u039E',\n      xi: '\\u03BE',\n      xlArr: '\\u27F8',\n      xlarr: '\\u27F5',\n      xmap: '\\u27FC',\n      xnis: '\\u22FB',\n      xodot: '\\u2A00',\n      Xopf: '\\uD835\\uDD4F',\n      xopf: '\\uD835\\uDD69',\n      xoplus: '\\u2A01',\n      xotime: '\\u2A02',\n      xrArr: '\\u27F9',\n      xrarr: '\\u27F6',\n      Xscr: '\\uD835\\uDCB3',\n      xscr: '\\uD835\\uDCCD',\n      xsqcup: '\\u2A06',\n      xuplus: '\\u2A04',\n      xutri: '\\u25B3',\n      xvee: '\\u22C1',\n      xwedge: '\\u22C0',\n      Yacute: '\\u00DD',\n      yacute: '\\u00FD',\n      YAcy: '\\u042F',\n      yacy: '\\u044F',\n      Ycirc: '\\u0176',\n      ycirc: '\\u0177',\n      Ycy: '\\u042B',\n      ycy: '\\u044B',\n      yen: '\\u00A5',\n      Yfr: '\\uD835\\uDD1C',\n      yfr: '\\uD835\\uDD36',\n      YIcy: '\\u0407',\n      yicy: '\\u0457',\n      Yopf: '\\uD835\\uDD50',\n      yopf: '\\uD835\\uDD6A',\n      Yscr: '\\uD835\\uDCB4',\n      yscr: '\\uD835\\uDCCE',\n      YUcy: '\\u042E',\n      yucy: '\\u044E',\n      Yuml: '\\u0178',\n      yuml: '\\u00FF',\n      Zacute: '\\u0179',\n      zacute: '\\u017A',\n      Zcaron: '\\u017D',\n      zcaron: '\\u017E',\n      Zcy: '\\u0417',\n      zcy: '\\u0437',\n      Zdot: '\\u017B',\n      zdot: '\\u017C',\n      zeetrf: '\\u2128',\n      ZeroWidthSpace: '\\u200B',\n      Zeta: '\\u0396',\n      zeta: '\\u03B6',\n      Zfr: '\\u2128',\n      zfr: '\\uD835\\uDD37',\n      ZHcy: '\\u0416',\n      zhcy: '\\u0436',\n      zigrarr: '\\u21DD',\n      Zopf: '\\u2124',\n      zopf: '\\uD835\\uDD6B',\n      Zscr: '\\uD835\\uDCB5',\n      zscr: '\\uD835\\uDCCF',\n      zwj: '\\u200D',\n      zwnj: '\\u200C'\n    });\n\n    /**\n     * @deprecated use `HTML_ENTITIES` instead\n     * @see HTML_ENTITIES\n     */\n    exports.entityMap = exports.HTML_ENTITIES;\n  });\n  entities.XML_ENTITIES;\n  entities.HTML_ENTITIES;\n  entities.entityMap;\n\n  var NAMESPACE$1 = conventions.NAMESPACE;\n\n  //[4]   \tNameStartChar\t   ::=   \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n  //[4a]   \tNameChar\t   ::=   \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n  //[5]   \tName\t   ::=   \tNameStartChar (NameChar)*\n  var nameStartChar = /[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]/; //\\u10000-\\uEFFFF\n  var nameChar = new RegExp(\"[\\\\-\\\\.0-9\" + nameStartChar.source.slice(1, -1) + \"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\n  var tagNamePattern = new RegExp('^' + nameStartChar.source + nameChar.source + '*(?:\\:' + nameStartChar.source + nameChar.source + '*)?$');\n  //var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n  //S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n  //S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n  var S_TAG = 0; //tag name offerring\n  var S_ATTR = 1; //attr name offerring\n  var S_ATTR_SPACE = 2; //attr name end and space offer\n  var S_EQ = 3; //=space?\n  var S_ATTR_NOQUOT_VALUE = 4; //attr value(no quot value only)\n  var S_ATTR_END = 5; //attr value end and no space(quot end)\n  var S_TAG_SPACE = 6; //(attr value end || tag end ) && (space offer)\n  var S_TAG_CLOSE = 7; //closed el<el />\n\n  /**\n   * Creates an error that will not be caught by XMLReader aka the SAX parser.\n   *\n   * @param {string} message\n   * @param {any?} locator Optional, can provide details about the location in the source\n   * @constructor\n   */\n  function ParseError$1(message, locator) {\n    this.message = message;\n    this.locator = locator;\n    if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError$1);\n  }\n  ParseError$1.prototype = new Error();\n  ParseError$1.prototype.name = ParseError$1.name;\n  function XMLReader$1() {}\n  XMLReader$1.prototype = {\n    parse: function (source, defaultNSMap, entityMap) {\n      var domBuilder = this.domBuilder;\n      domBuilder.startDocument();\n      _copy(defaultNSMap, defaultNSMap = {});\n      parse$1(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);\n      domBuilder.endDocument();\n    }\n  };\n  function parse$1(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {\n    function fixedFromCharCode(code) {\n      // String.prototype.fromCharCode does not supports\n      // > 2 bytes unicode chars directly\n      if (code > 0xffff) {\n        code -= 0x10000;\n        var surrogate1 = 0xd800 + (code >> 10),\n          surrogate2 = 0xdc00 + (code & 0x3ff);\n        return String.fromCharCode(surrogate1, surrogate2);\n      } else {\n        return String.fromCharCode(code);\n      }\n    }\n    function entityReplacer(a) {\n      var k = a.slice(1, -1);\n      if (Object.hasOwnProperty.call(entityMap, k)) {\n        return entityMap[k];\n      } else if (k.charAt(0) === '#') {\n        return fixedFromCharCode(parseInt(k.substr(1).replace('x', '0x')));\n      } else {\n        errorHandler.error('entity not found:' + a);\n        return a;\n      }\n    }\n    function appendText(end) {\n      //has some bugs\n      if (end > start) {\n        var xt = source.substring(start, end).replace(/&#?\\w+;/g, entityReplacer);\n        locator && position(start);\n        domBuilder.characters(xt, 0, end - start);\n        start = end;\n      }\n    }\n    function position(p, m) {\n      while (p >= lineEnd && (m = linePattern.exec(source))) {\n        lineStart = m.index;\n        lineEnd = lineStart + m[0].length;\n        locator.lineNumber++;\n        //console.log('line++:',locator,startPos,endPos)\n      }\n      locator.columnNumber = p - lineStart + 1;\n    }\n    var lineStart = 0;\n    var lineEnd = 0;\n    var linePattern = /.*(?:\\r\\n?|\\n)|.*$/g;\n    var locator = domBuilder.locator;\n    var parseStack = [{\n      currentNSMap: defaultNSMapCopy\n    }];\n    var closeMap = {};\n    var start = 0;\n    while (true) {\n      try {\n        var tagStart = source.indexOf('<', start);\n        if (tagStart < 0) {\n          if (!source.substr(start).match(/^\\s*$/)) {\n            var doc = domBuilder.doc;\n            var text = doc.createTextNode(source.substr(start));\n            doc.appendChild(text);\n            domBuilder.currentElement = text;\n          }\n          return;\n        }\n        if (tagStart > start) {\n          appendText(tagStart);\n        }\n        switch (source.charAt(tagStart + 1)) {\n          case '/':\n            var end = source.indexOf('>', tagStart + 3);\n            var tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n            var config = parseStack.pop();\n            if (end < 0) {\n              tagName = source.substring(tagStart + 2).replace(/[\\s<].*/, '');\n              errorHandler.error(\"end tag name: \" + tagName + ' is not complete:' + config.tagName);\n              end = tagStart + 1 + tagName.length;\n            } else if (tagName.match(/\\s</)) {\n              tagName = tagName.replace(/[\\s<].*/, '');\n              errorHandler.error(\"end tag name: \" + tagName + ' maybe not complete');\n              end = tagStart + 1 + tagName.length;\n            }\n            var localNSMap = config.localNSMap;\n            var endMatch = config.tagName == tagName;\n            var endIgnoreCaseMach = endMatch || config.tagName && config.tagName.toLowerCase() == tagName.toLowerCase();\n            if (endIgnoreCaseMach) {\n              domBuilder.endElement(config.uri, config.localName, tagName);\n              if (localNSMap) {\n                for (var prefix in localNSMap) {\n                  if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n                    domBuilder.endPrefixMapping(prefix);\n                  }\n                }\n              }\n              if (!endMatch) {\n                errorHandler.fatalError(\"end tag name: \" + tagName + ' is not match the current start tagName:' + config.tagName); // No known test case\n              }\n            } else {\n              parseStack.push(config);\n            }\n            end++;\n            break;\n          // end elment\n          case '?':\n            // <?...?>\n            locator && position(tagStart);\n            end = parseInstruction(source, tagStart, domBuilder);\n            break;\n          case '!':\n            // <!doctype,<![CDATA,<!--\n            locator && position(tagStart);\n            end = parseDCC(source, tagStart, domBuilder, errorHandler);\n            break;\n          default:\n            locator && position(tagStart);\n            var el = new ElementAttributes();\n            var currentNSMap = parseStack[parseStack.length - 1].currentNSMap;\n            //elStartEnd\n            var end = parseElementStartPart(source, tagStart, el, currentNSMap, entityReplacer, errorHandler);\n            var len = el.length;\n            if (!el.closed && fixSelfClosed(source, end, el.tagName, closeMap)) {\n              el.closed = true;\n              if (!entityMap.nbsp) {\n                errorHandler.warning('unclosed xml attribute');\n              }\n            }\n            if (locator && len) {\n              var locator2 = copyLocator(locator, {});\n              //try{//attribute position fixed\n              for (var i = 0; i < len; i++) {\n                var a = el[i];\n                position(a.offset);\n                a.locator = copyLocator(locator, {});\n              }\n              domBuilder.locator = locator2;\n              if (appendElement$1(el, domBuilder, currentNSMap)) {\n                parseStack.push(el);\n              }\n              domBuilder.locator = locator;\n            } else {\n              if (appendElement$1(el, domBuilder, currentNSMap)) {\n                parseStack.push(el);\n              }\n            }\n            if (NAMESPACE$1.isHTML(el.uri) && !el.closed) {\n              end = parseHtmlSpecialContent(source, end, el.tagName, entityReplacer, domBuilder);\n            } else {\n              end++;\n            }\n        }\n      } catch (e) {\n        if (e instanceof ParseError$1) {\n          throw e;\n        }\n        errorHandler.error('element parse error: ' + e);\n        end = -1;\n      }\n      if (end > start) {\n        start = end;\n      } else {\n        //TODO: 这里有可能sax回退,有位置错误风险\n        appendText(Math.max(tagStart, start) + 1);\n      }\n    }\n  }\n  function copyLocator(f, t) {\n    t.lineNumber = f.lineNumber;\n    t.columnNumber = f.columnNumber;\n    return t;\n  }\n\n  /**\n   * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n   * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n   */\n  function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) {\n    /**\n     * @param {string} qname\n     * @param {string} value\n     * @param {number} startIndex\n     */\n    function addAttribute(qname, value, startIndex) {\n      if (el.attributeNames.hasOwnProperty(qname)) {\n        errorHandler.fatalError('Attribute ' + qname + ' redefined');\n      }\n      el.addValue(qname,\n      // @see https://www.w3.org/TR/xml/#AVNormalize\n      // since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n      // - recursive replacement of (DTD) entity references\n      // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n      value.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer), startIndex);\n    }\n    var attrName;\n    var value;\n    var p = ++start;\n    var s = S_TAG; //status\n    while (true) {\n      var c = source.charAt(p);\n      switch (c) {\n        case '=':\n          if (s === S_ATTR) {\n            //attrName\n            attrName = source.slice(start, p);\n            s = S_EQ;\n          } else if (s === S_ATTR_SPACE) {\n            s = S_EQ;\n          } else {\n            //fatalError: equal must after attrName or space after attrName\n            throw new Error('attribute equal must after attrName'); // No known test case\n          }\n          break;\n        case '\\'':\n        case '\"':\n          if (s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n          ) {\n            //equal\n            if (s === S_ATTR) {\n              errorHandler.warning('attribute value must after \"=\"');\n              attrName = source.slice(start, p);\n            }\n            start = p + 1;\n            p = source.indexOf(c, start);\n            if (p > 0) {\n              value = source.slice(start, p);\n              addAttribute(attrName, value, start - 1);\n              s = S_ATTR_END;\n            } else {\n              //fatalError: no end quot match\n              throw new Error('attribute value no end \\'' + c + '\\' match');\n            }\n          } else if (s == S_ATTR_NOQUOT_VALUE) {\n            value = source.slice(start, p);\n            addAttribute(attrName, value, start);\n            errorHandler.warning('attribute \"' + attrName + '\" missed start quot(' + c + ')!!');\n            start = p + 1;\n            s = S_ATTR_END;\n          } else {\n            //fatalError: no equal before\n            throw new Error('attribute value must after \"=\"'); // No known test case\n          }\n          break;\n        case '/':\n          switch (s) {\n            case S_TAG:\n              el.setTagName(source.slice(start, p));\n            case S_ATTR_END:\n            case S_TAG_SPACE:\n            case S_TAG_CLOSE:\n              s = S_TAG_CLOSE;\n              el.closed = true;\n            case S_ATTR_NOQUOT_VALUE:\n            case S_ATTR:\n              break;\n            case S_ATTR_SPACE:\n              el.closed = true;\n              break;\n            //case S_EQ:\n            default:\n              throw new Error(\"attribute invalid close char('/')\");\n            // No known test case\n          }\n          break;\n        case '':\n          //end document\n          errorHandler.error('unexpected end of input');\n          if (s == S_TAG) {\n            el.setTagName(source.slice(start, p));\n          }\n          return p;\n        case '>':\n          switch (s) {\n            case S_TAG:\n              el.setTagName(source.slice(start, p));\n            case S_ATTR_END:\n            case S_TAG_SPACE:\n            case S_TAG_CLOSE:\n              break;\n            //normal\n            case S_ATTR_NOQUOT_VALUE: //Compatible state\n            case S_ATTR:\n              value = source.slice(start, p);\n              if (value.slice(-1) === '/') {\n                el.closed = true;\n                value = value.slice(0, -1);\n              }\n            case S_ATTR_SPACE:\n              if (s === S_ATTR_SPACE) {\n                value = attrName;\n              }\n              if (s == S_ATTR_NOQUOT_VALUE) {\n                errorHandler.warning('attribute \"' + value + '\" missed quot(\")!');\n                addAttribute(attrName, value, start);\n              } else {\n                if (!NAMESPACE$1.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)) {\n                  errorHandler.warning('attribute \"' + value + '\" missed value!! \"' + value + '\" instead!!');\n                }\n                addAttribute(value, value, start);\n              }\n              break;\n            case S_EQ:\n              throw new Error('attribute value missed!!');\n          }\n          //\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n          return p;\n        /*xml space '\\x20' | #x9 | #xD | #xA; */\n        case '\\u0080':\n          c = ' ';\n        default:\n          if (c <= ' ') {\n            //space\n            switch (s) {\n              case S_TAG:\n                el.setTagName(source.slice(start, p)); //tagName\n                s = S_TAG_SPACE;\n                break;\n              case S_ATTR:\n                attrName = source.slice(start, p);\n                s = S_ATTR_SPACE;\n                break;\n              case S_ATTR_NOQUOT_VALUE:\n                var value = source.slice(start, p);\n                errorHandler.warning('attribute \"' + value + '\" missed quot(\")!!');\n                addAttribute(attrName, value, start);\n              case S_ATTR_END:\n                s = S_TAG_SPACE;\n                break;\n              //case S_TAG_SPACE:\n              //case S_EQ:\n              //case S_ATTR_SPACE:\n              //\tvoid();break;\n              //case S_TAG_CLOSE:\n              //ignore warning\n            }\n          } else {\n            //not space\n            //S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n            //S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n            switch (s) {\n              //case S_TAG:void();break;\n              //case S_ATTR:void();break;\n              //case S_ATTR_NOQUOT_VALUE:void();break;\n              case S_ATTR_SPACE:\n                el.tagName;\n                if (!NAMESPACE$1.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n                  errorHandler.warning('attribute \"' + attrName + '\" missed value!! \"' + attrName + '\" instead2!!');\n                }\n                addAttribute(attrName, attrName, start);\n                start = p;\n                s = S_ATTR;\n                break;\n              case S_ATTR_END:\n                errorHandler.warning('attribute space is required\"' + attrName + '\"!!');\n              case S_TAG_SPACE:\n                s = S_ATTR;\n                start = p;\n                break;\n              case S_EQ:\n                s = S_ATTR_NOQUOT_VALUE;\n                start = p;\n                break;\n              case S_TAG_CLOSE:\n                throw new Error(\"elements closed character '/' and '>' must be connected to\");\n            }\n          }\n      } //end outer switch\n      //console.log('p++',p)\n      p++;\n    }\n  }\n  /**\n   * @return true if has new namespace define\n   */\n  function appendElement$1(el, domBuilder, currentNSMap) {\n    var tagName = el.tagName;\n    var localNSMap = null;\n    //var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n    var i = el.length;\n    while (i--) {\n      var a = el[i];\n      var qName = a.qName;\n      var value = a.value;\n      var nsp = qName.indexOf(':');\n      if (nsp > 0) {\n        var prefix = a.prefix = qName.slice(0, nsp);\n        var localName = qName.slice(nsp + 1);\n        var nsPrefix = prefix === 'xmlns' && localName;\n      } else {\n        localName = qName;\n        prefix = null;\n        nsPrefix = qName === 'xmlns' && '';\n      }\n      //can not set prefix,because prefix !== ''\n      a.localName = localName;\n      //prefix == null for no ns prefix attribute\n      if (nsPrefix !== false) {\n        //hack!!\n        if (localNSMap == null) {\n          localNSMap = {};\n          //console.log(currentNSMap,0)\n          _copy(currentNSMap, currentNSMap = {});\n          //console.log(currentNSMap,1)\n        }\n        currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n        a.uri = NAMESPACE$1.XMLNS;\n        domBuilder.startPrefixMapping(nsPrefix, value);\n      }\n    }\n    var i = el.length;\n    while (i--) {\n      a = el[i];\n      var prefix = a.prefix;\n      if (prefix) {\n        //no prefix attribute has no namespace\n        if (prefix === 'xml') {\n          a.uri = NAMESPACE$1.XML;\n        }\n        if (prefix !== 'xmlns') {\n          a.uri = currentNSMap[prefix || ''];\n\n          //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n        }\n      }\n    }\n    var nsp = tagName.indexOf(':');\n    if (nsp > 0) {\n      prefix = el.prefix = tagName.slice(0, nsp);\n      localName = el.localName = tagName.slice(nsp + 1);\n    } else {\n      prefix = null; //important!!\n      localName = el.localName = tagName;\n    }\n    //no prefix element has default namespace\n    var ns = el.uri = currentNSMap[prefix || ''];\n    domBuilder.startElement(ns, localName, tagName, el);\n    //endPrefixMapping and startPrefixMapping have not any help for dom builder\n    //localNSMap = null\n    if (el.closed) {\n      domBuilder.endElement(ns, localName, tagName);\n      if (localNSMap) {\n        for (prefix in localNSMap) {\n          if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n            domBuilder.endPrefixMapping(prefix);\n          }\n        }\n      }\n    } else {\n      el.currentNSMap = currentNSMap;\n      el.localNSMap = localNSMap;\n      //parseStack.push(el);\n      return true;\n    }\n  }\n  function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) {\n    if (/^(?:script|textarea)$/i.test(tagName)) {\n      var elEndStart = source.indexOf('</' + tagName + '>', elStartEnd);\n      var text = source.substring(elStartEnd + 1, elEndStart);\n      if (/[&<]/.test(text)) {\n        if (/^script$/i.test(tagName)) {\n          //if(!/\\]\\]>/.test(text)){\n          //lexHandler.startCDATA();\n          domBuilder.characters(text, 0, text.length);\n          //lexHandler.endCDATA();\n          return elEndStart;\n          //}\n        } //}else{//text area\n        text = text.replace(/&#?\\w+;/g, entityReplacer);\n        domBuilder.characters(text, 0, text.length);\n        return elEndStart;\n        //}\n      }\n    }\n    return elStartEnd + 1;\n  }\n  function fixSelfClosed(source, elStartEnd, tagName, closeMap) {\n    //if(tagName in closeMap){\n    var pos = closeMap[tagName];\n    if (pos == null) {\n      //console.log(tagName)\n      pos = source.lastIndexOf('</' + tagName + '>');\n      if (pos < elStartEnd) {\n        //忘记闭合\n        pos = source.lastIndexOf('</' + tagName);\n      }\n      closeMap[tagName] = pos;\n    }\n    return pos < elStartEnd;\n    //}\n  }\n  function _copy(source, target) {\n    for (var n in source) {\n      if (Object.prototype.hasOwnProperty.call(source, n)) {\n        target[n] = source[n];\n      }\n    }\n  }\n  function parseDCC(source, start, domBuilder, errorHandler) {\n    //sure start with '<!'\n    var next = source.charAt(start + 2);\n    switch (next) {\n      case '-':\n        if (source.charAt(start + 3) === '-') {\n          var end = source.indexOf('-->', start + 4);\n          //append comment source.substring(4,end)//<!--\n          if (end > start) {\n            domBuilder.comment(source, start + 4, end - start - 4);\n            return end + 3;\n          } else {\n            errorHandler.error(\"Unclosed comment\");\n            return -1;\n          }\n        } else {\n          //error\n          return -1;\n        }\n      default:\n        if (source.substr(start + 3, 6) == 'CDATA[') {\n          var end = source.indexOf(']]>', start + 9);\n          domBuilder.startCDATA();\n          domBuilder.characters(source, start + 9, end - start - 9);\n          domBuilder.endCDATA();\n          return end + 3;\n        }\n        //<!DOCTYPE\n        //startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)\n        var matchs = split(source, start);\n        var len = matchs.length;\n        if (len > 1 && /!doctype/i.test(matchs[0][0])) {\n          var name = matchs[1][0];\n          var pubid = false;\n          var sysid = false;\n          if (len > 3) {\n            if (/^public$/i.test(matchs[2][0])) {\n              pubid = matchs[3][0];\n              sysid = len > 4 && matchs[4][0];\n            } else if (/^system$/i.test(matchs[2][0])) {\n              sysid = matchs[3][0];\n            }\n          }\n          var lastMatch = matchs[len - 1];\n          domBuilder.startDTD(name, pubid, sysid);\n          domBuilder.endDTD();\n          return lastMatch.index + lastMatch[0].length;\n        }\n    }\n    return -1;\n  }\n  function parseInstruction(source, start, domBuilder) {\n    var end = source.indexOf('?>', start);\n    if (end) {\n      var match = source.substring(start, end).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n      if (match) {\n        match[0].length;\n        domBuilder.processingInstruction(match[1], match[2]);\n        return end + 2;\n      } else {\n        //error\n        return -1;\n      }\n    }\n    return -1;\n  }\n  function ElementAttributes() {\n    this.attributeNames = {};\n  }\n  ElementAttributes.prototype = {\n    setTagName: function (tagName) {\n      if (!tagNamePattern.test(tagName)) {\n        throw new Error('invalid tagName:' + tagName);\n      }\n      this.tagName = tagName;\n    },\n    addValue: function (qName, value, offset) {\n      if (!tagNamePattern.test(qName)) {\n        throw new Error('invalid attribute:' + qName);\n      }\n      this.attributeNames[qName] = this.length;\n      this[this.length++] = {\n        qName: qName,\n        value: value,\n        offset: offset\n      };\n    },\n    length: 0,\n    getLocalName: function (i) {\n      return this[i].localName;\n    },\n    getLocator: function (i) {\n      return this[i].locator;\n    },\n    getQName: function (i) {\n      return this[i].qName;\n    },\n    getURI: function (i) {\n      return this[i].uri;\n    },\n    getValue: function (i) {\n      return this[i].value;\n    }\n    //\t,getIndex:function(uri, localName)){\n    //\t\tif(localName){\n    //\n    //\t\t}else{\n    //\t\t\tvar qName = uri\n    //\t\t}\n    //\t},\n    //\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\n    //\tgetType:function(uri,localName){}\n    //\tgetType:function(i){},\n  };\n  function split(source, start) {\n    var match;\n    var buf = [];\n    var reg = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n    reg.lastIndex = start;\n    reg.exec(source); //skip <\n    while (match = reg.exec(source)) {\n      buf.push(match);\n      if (match[1]) return buf;\n    }\n  }\n  var XMLReader_1 = XMLReader$1;\n  var ParseError_1 = ParseError$1;\n  var sax = {\n    XMLReader: XMLReader_1,\n    ParseError: ParseError_1\n  };\n\n  var DOMImplementation = dom.DOMImplementation;\n  var NAMESPACE = conventions.NAMESPACE;\n  var ParseError = sax.ParseError;\n  var XMLReader = sax.XMLReader;\n\n  /**\n   * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n   *\n   * > XML parsed entities are often stored in computer files which,\n   * > for editing convenience, are organized into lines.\n   * > These lines are typically separated by some combination\n   * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n   * >\n   * > To simplify the tasks of applications, the XML processor must behave\n   * > as if it normalized all line breaks in external parsed entities (including the document entity)\n   * > on input, before parsing, by translating all of the following to a single #xA character:\n   * >\n   * > 1. the two-character sequence #xD #xA\n   * > 2. the two-character sequence #xD #x85\n   * > 3. the single character #x85\n   * > 4. the single character #x2028\n   * > 5. any #xD character that is not immediately followed by #xA or #x85.\n   *\n   * @param {string} input\n   * @returns {string}\n   */\n  function normalizeLineEndings(input) {\n    return input.replace(/\\r[\\n\\u0085]/g, '\\n').replace(/[\\r\\u0085\\u2028]/g, '\\n');\n  }\n\n  /**\n   * @typedef Locator\n   * @property {number} [columnNumber]\n   * @property {number} [lineNumber]\n   */\n\n  /**\n   * @typedef DOMParserOptions\n   * @property {DOMHandler} [domBuilder]\n   * @property {Function} [errorHandler]\n   * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n   * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n   * @property {Locator} [locator]\n   * @property {Record<string, string>} [xmlns]\n   *\n   * @see normalizeLineEndings\n   */\n\n  /**\n   * The DOMParser interface provides the ability to parse XML or HTML source code\n   * from a string into a DOM `Document`.\n   *\n   * _xmldom is different from the spec in that it allows an `options` parameter,\n   * to override the default behavior._\n   *\n   * @param {DOMParserOptions} [options]\n   * @constructor\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n   * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n   */\n  function DOMParser$1(options) {\n    this.options = options || {\n      locator: {}\n    };\n  }\n  DOMParser$1.prototype.parseFromString = function (source, mimeType) {\n    var options = this.options;\n    var sax = new XMLReader();\n    var domBuilder = options.domBuilder || new DOMHandler(); //contentHandler and LexicalHandler\n    var errorHandler = options.errorHandler;\n    var locator = options.locator;\n    var defaultNSMap = options.xmlns || {};\n    var isHTML = /\\/x?html?$/.test(mimeType); //mimeType.toLowerCase().indexOf('html') > -1;\n    var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n    if (locator) {\n      domBuilder.setDocumentLocator(locator);\n    }\n    sax.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator);\n    sax.domBuilder = options.domBuilder || domBuilder;\n    if (isHTML) {\n      defaultNSMap[''] = NAMESPACE.HTML;\n    }\n    defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n    var normalize = options.normalizeLineEndings || normalizeLineEndings;\n    if (source && typeof source === 'string') {\n      sax.parse(normalize(source), defaultNSMap, entityMap);\n    } else {\n      sax.errorHandler.error('invalid doc source');\n    }\n    return domBuilder.doc;\n  };\n  function buildErrorHandler(errorImpl, domBuilder, locator) {\n    if (!errorImpl) {\n      if (domBuilder instanceof DOMHandler) {\n        return domBuilder;\n      }\n      errorImpl = domBuilder;\n    }\n    var errorHandler = {};\n    var isCallback = errorImpl instanceof Function;\n    locator = locator || {};\n    function build(key) {\n      var fn = errorImpl[key];\n      if (!fn && isCallback) {\n        fn = errorImpl.length == 2 ? function (msg) {\n          errorImpl(key, msg);\n        } : errorImpl;\n      }\n      errorHandler[key] = fn && function (msg) {\n        fn('[xmldom ' + key + ']\\t' + msg + _locator(locator));\n      } || function () {};\n    }\n    build('warning');\n    build('error');\n    build('fatalError');\n    return errorHandler;\n  }\n\n  //console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n  /**\n   * +ContentHandler+ErrorHandler\n   * +LexicalHandler+EntityResolver2\n   * -DeclHandler-DTDHandler\n   *\n   * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n   * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n   * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n   */\n  function DOMHandler() {\n    this.cdata = false;\n  }\n  function position(locator, node) {\n    node.lineNumber = locator.lineNumber;\n    node.columnNumber = locator.columnNumber;\n  }\n  /**\n   * @see org.xml.sax.ContentHandler#startDocument\n   * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n   */\n  DOMHandler.prototype = {\n    startDocument: function () {\n      this.doc = new DOMImplementation().createDocument(null, null, null);\n      if (this.locator) {\n        this.doc.documentURI = this.locator.systemId;\n      }\n    },\n    startElement: function (namespaceURI, localName, qName, attrs) {\n      var doc = this.doc;\n      var el = doc.createElementNS(namespaceURI, qName || localName);\n      var len = attrs.length;\n      appendElement(this, el);\n      this.currentElement = el;\n      this.locator && position(this.locator, el);\n      for (var i = 0; i < len; i++) {\n        var namespaceURI = attrs.getURI(i);\n        var value = attrs.getValue(i);\n        var qName = attrs.getQName(i);\n        var attr = doc.createAttributeNS(namespaceURI, qName);\n        this.locator && position(attrs.getLocator(i), attr);\n        attr.value = attr.nodeValue = value;\n        el.setAttributeNode(attr);\n      }\n    },\n    endElement: function (namespaceURI, localName, qName) {\n      var current = this.currentElement;\n      current.tagName;\n      this.currentElement = current.parentNode;\n    },\n    startPrefixMapping: function (prefix, uri) {},\n    endPrefixMapping: function (prefix) {},\n    processingInstruction: function (target, data) {\n      var ins = this.doc.createProcessingInstruction(target, data);\n      this.locator && position(this.locator, ins);\n      appendElement(this, ins);\n    },\n    ignorableWhitespace: function (ch, start, length) {},\n    characters: function (chars, start, length) {\n      chars = _toString.apply(this, arguments);\n      //console.log(chars)\n      if (chars) {\n        if (this.cdata) {\n          var charNode = this.doc.createCDATASection(chars);\n        } else {\n          var charNode = this.doc.createTextNode(chars);\n        }\n        if (this.currentElement) {\n          this.currentElement.appendChild(charNode);\n        } else if (/^\\s*$/.test(chars)) {\n          this.doc.appendChild(charNode);\n          //process xml\n        }\n        this.locator && position(this.locator, charNode);\n      }\n    },\n    skippedEntity: function (name) {},\n    endDocument: function () {\n      this.doc.normalize();\n    },\n    setDocumentLocator: function (locator) {\n      if (this.locator = locator) {\n        // && !('lineNumber' in locator)){\n        locator.lineNumber = 0;\n      }\n    },\n    //LexicalHandler\n    comment: function (chars, start, length) {\n      chars = _toString.apply(this, arguments);\n      var comm = this.doc.createComment(chars);\n      this.locator && position(this.locator, comm);\n      appendElement(this, comm);\n    },\n    startCDATA: function () {\n      //used in characters() methods\n      this.cdata = true;\n    },\n    endCDATA: function () {\n      this.cdata = false;\n    },\n    startDTD: function (name, publicId, systemId) {\n      var impl = this.doc.implementation;\n      if (impl && impl.createDocumentType) {\n        var dt = impl.createDocumentType(name, publicId, systemId);\n        this.locator && position(this.locator, dt);\n        appendElement(this, dt);\n        this.doc.doctype = dt;\n      }\n    },\n    /**\n     * @see org.xml.sax.ErrorHandler\n     * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n     */\n    warning: function (error) {\n      console.warn('[xmldom warning]\\t' + error, _locator(this.locator));\n    },\n    error: function (error) {\n      console.error('[xmldom error]\\t' + error, _locator(this.locator));\n    },\n    fatalError: function (error) {\n      throw new ParseError(error, this.locator);\n    }\n  };\n  function _locator(l) {\n    if (l) {\n      return '\\n@' + (l.systemId || '') + '#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']';\n    }\n  }\n  function _toString(chars, start, length) {\n    if (typeof chars == 'string') {\n      return chars.substr(start, length);\n    } else {\n      //java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n      if (chars.length >= start + length || start) {\n        return new java.lang.String(chars, start, length) + '';\n      }\n      return chars;\n    }\n  }\n\n  /*\n   * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n   * used method of org.xml.sax.ext.LexicalHandler:\n   *  #comment(chars, start, length)\n   *  #startCDATA()\n   *  #endCDATA()\n   *  #startDTD(name, publicId, systemId)\n   *\n   *\n   * IGNORED method of org.xml.sax.ext.LexicalHandler:\n   *  #endDTD()\n   *  #startEntity(name)\n   *  #endEntity(name)\n   *\n   *\n   * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n   * IGNORED method of org.xml.sax.ext.DeclHandler\n   * \t#attributeDecl(eName, aName, type, mode, value)\n   *  #elementDecl(name, model)\n   *  #externalEntityDecl(name, publicId, systemId)\n   *  #internalEntityDecl(name, value)\n   * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n   * IGNORED method of org.xml.sax.EntityResolver2\n   *  #resolveEntity(String name,String publicId,String baseURI,String systemId)\n   *  #resolveEntity(publicId, systemId)\n   *  #getExternalSubset(name, baseURI)\n   * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n   * IGNORED method of org.xml.sax.DTDHandler\n   *  #notationDecl(name, publicId, systemId) {};\n   *  #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n   */\n  \"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g, function (key) {\n    DOMHandler.prototype[key] = function () {\n      return null;\n    };\n  });\n\n  /* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\n  function appendElement(hander, node) {\n    if (!hander.currentElement) {\n      hander.doc.appendChild(node);\n    } else {\n      hander.currentElement.appendChild(node);\n    }\n  } //appendChild and setAttributeNS are preformance key\n\n  var __DOMHandler = DOMHandler;\n  var normalizeLineEndings_1 = normalizeLineEndings;\n  var DOMParser_1 = DOMParser$1;\n  var domParser = {\n    __DOMHandler: __DOMHandler,\n    normalizeLineEndings: normalizeLineEndings_1,\n    DOMParser: DOMParser_1\n  };\n\n  var DOMParser = domParser.DOMParser;\n\n  /*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */\n  const isObject = obj => {\n    return !!obj && typeof obj === 'object';\n  };\n  const merge$1 = (...objects) => {\n    return objects.reduce((result, source) => {\n      if (typeof source !== 'object') {\n        return result;\n      }\n      Object.keys(source).forEach(key => {\n        if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n          result[key] = result[key].concat(source[key]);\n        } else if (isObject(result[key]) && isObject(source[key])) {\n          result[key] = merge$1(result[key], source[key]);\n        } else {\n          result[key] = source[key];\n        }\n      });\n      return result;\n    }, {});\n  };\n  const values = o => Object.keys(o).map(k => o[k]);\n  const range = (start, end) => {\n    const result = [];\n    for (let i = start; i < end; i++) {\n      result.push(i);\n    }\n    return result;\n  };\n  const flatten = lists => lists.reduce((x, y) => x.concat(y), []);\n  const from = list => {\n    if (!list.length) {\n      return [];\n    }\n    const result = [];\n    for (let i = 0; i < list.length; i++) {\n      result.push(list[i]);\n    }\n    return result;\n  };\n  const findIndexes = (l, key) => l.reduce((a, e, i) => {\n    if (e[key]) {\n      a.push(i);\n    }\n    return a;\n  }, []);\n  /**\n   * Returns a union of the included lists provided each element can be identified by a key.\n   *\n   * @param {Array} list - list of lists to get the union of\n   * @param {Function} keyFunction - the function to use as a key for each element\n   *\n   * @return {Array} the union of the arrays\n   */\n\n  const union = (lists, keyFunction) => {\n    return values(lists.reduce((acc, list) => {\n      list.forEach(el => {\n        acc[keyFunction(el)] = el;\n      });\n      return acc;\n    }, {}));\n  };\n  var errors = {\n    INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n    INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING',\n    DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n    DASH_INVALID_XML: 'DASH_INVALID_XML',\n    NO_BASE_URL: 'NO_BASE_URL',\n    MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n    SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n    UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n  };\n\n  /**\n   * @typedef {Object} SingleUri\n   * @property {string} uri - relative location of segment\n   * @property {string} resolvedUri - resolved location of segment\n   * @property {Object} byterange - Object containing information on how to make byte range\n   *   requests following byte-range-spec per RFC2616.\n   * @property {String} byterange.length - length of range request\n   * @property {String} byterange.offset - byte offset of range request\n   *\n   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n   */\n\n  /**\n   * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n   * that conforms to how m3u8-parser is structured\n   *\n   * @see https://github.com/videojs/m3u8-parser\n   *\n   * @param {string} baseUrl - baseUrl provided by <BaseUrl> nodes\n   * @param {string} source - source url for segment\n   * @param {string} range - optional range used for range calls,\n   *   follows  RFC 2616, Clause 14.35.1\n   * @return {SingleUri} full segment information transformed into a format similar\n   *   to m3u8-parser\n   */\n\n  const urlTypeToSegment = ({\n    baseUrl = '',\n    source = '',\n    range = '',\n    indexRange = ''\n  }) => {\n    const segment = {\n      uri: source,\n      resolvedUri: resolveUrl$1(baseUrl || '', source)\n    };\n    if (range || indexRange) {\n      const rangeStr = range ? range : indexRange;\n      const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n      let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n      let endRange = window.BigInt ? window.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n      if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n        startRange = Number(startRange);\n      }\n      if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n        endRange = Number(endRange);\n      }\n      let length;\n      if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n        length = window.BigInt(endRange) - window.BigInt(startRange) + window.BigInt(1);\n      } else {\n        length = endRange - startRange + 1;\n      }\n      if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n        length = Number(length);\n      } // byterange should be inclusive according to\n      // RFC 2616, Clause 14.35.1\n\n      segment.byterange = {\n        length,\n        offset: startRange\n      };\n    }\n    return segment;\n  };\n  const byteRangeToString = byterange => {\n    // `endRange` is one less than `offset + length` because the HTTP range\n    // header uses inclusive ranges\n    let endRange;\n    if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n      endRange = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n    } else {\n      endRange = byterange.offset + byterange.length - 1;\n    }\n    return `${byterange.offset}-${endRange}`;\n  };\n\n  /**\n   * parse the end number attribue that can be a string\n   * number, or undefined.\n   *\n   * @param {string|number|undefined} endNumber\n   *        The end number attribute.\n   *\n   * @return {number|null}\n   *          The result of parsing the end number.\n   */\n\n  const parseEndNumber = endNumber => {\n    if (endNumber && typeof endNumber !== 'number') {\n      endNumber = parseInt(endNumber, 10);\n    }\n    if (isNaN(endNumber)) {\n      return null;\n    }\n    return endNumber;\n  };\n  /**\n   * Functions for calculating the range of available segments in static and dynamic\n   * manifests.\n   */\n\n  const segmentRange = {\n    /**\n     * Returns the entire range of available segments for a static MPD\n     *\n     * @param {Object} attributes\n     *        Inheritied MPD attributes\n     * @return {{ start: number, end: number }}\n     *         The start and end numbers for available segments\n     */\n    static(attributes) {\n      const {\n        duration,\n        timescale = 1,\n        sourceDuration,\n        periodDuration\n      } = attributes;\n      const endNumber = parseEndNumber(attributes.endNumber);\n      const segmentDuration = duration / timescale;\n      if (typeof endNumber === 'number') {\n        return {\n          start: 0,\n          end: endNumber\n        };\n      }\n      if (typeof periodDuration === 'number') {\n        return {\n          start: 0,\n          end: periodDuration / segmentDuration\n        };\n      }\n      return {\n        start: 0,\n        end: sourceDuration / segmentDuration\n      };\n    },\n    /**\n     * Returns the current live window range of available segments for a dynamic MPD\n     *\n     * @param {Object} attributes\n     *        Inheritied MPD attributes\n     * @return {{ start: number, end: number }}\n     *         The start and end numbers for available segments\n     */\n    dynamic(attributes) {\n      const {\n        NOW,\n        clientOffset,\n        availabilityStartTime,\n        timescale = 1,\n        duration,\n        periodStart = 0,\n        minimumUpdatePeriod = 0,\n        timeShiftBufferDepth = Infinity\n      } = attributes;\n      const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n      // after retrieving UTC server time.\n\n      const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n      // Convert the period start time to EPOCH.\n\n      const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n      const periodEndWC = now + minimumUpdatePeriod;\n      const periodDuration = periodEndWC - periodStartWC;\n      const segmentCount = Math.ceil(periodDuration * timescale / duration);\n      const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n      const availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n      return {\n        start: Math.max(0, availableStart),\n        end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n      };\n    }\n  };\n  /**\n   * Maps a range of numbers to objects with information needed to build the corresponding\n   * segment list\n   *\n   * @name toSegmentsCallback\n   * @function\n   * @param {number} number\n   *        Number of the segment\n   * @param {number} index\n   *        Index of the number in the range list\n   * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n   *         Object with segment timing and duration info\n   */\n\n  /**\n   * Returns a callback for Array.prototype.map for mapping a range of numbers to\n   * information needed to build the segment list.\n   *\n   * @param {Object} attributes\n   *        Inherited MPD attributes\n   * @return {toSegmentsCallback}\n   *         Callback map function\n   */\n\n  const toSegments = attributes => number => {\n    const {\n      duration,\n      timescale = 1,\n      periodStart,\n      startNumber = 1\n    } = attributes;\n    return {\n      number: startNumber + number,\n      duration: duration / timescale,\n      timeline: periodStart,\n      time: number * duration\n    };\n  };\n  /**\n   * Returns a list of objects containing segment timing and duration info used for\n   * building the list of segments. This uses the @duration attribute specified\n   * in the MPD manifest to derive the range of segments.\n   *\n   * @param {Object} attributes\n   *        Inherited MPD attributes\n   * @return {{number: number, duration: number, time: number, timeline: number}[]}\n   *         List of Objects with segment timing and duration info\n   */\n\n  const parseByDuration = attributes => {\n    const {\n      type,\n      duration,\n      timescale = 1,\n      periodDuration,\n      sourceDuration\n    } = attributes;\n    const {\n      start,\n      end\n    } = segmentRange[type](attributes);\n    const segments = range(start, end).map(toSegments(attributes));\n    if (type === 'static') {\n      const index = segments.length - 1; // section is either a period or the full source\n\n      const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n      segments[index].duration = sectionDuration - duration / timescale * index;\n    }\n    return segments;\n  };\n\n  /**\n   * Translates SegmentBase into a set of segments.\n   * (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\n   * node should be translated into segment.\n   *\n   * @param {Object} attributes\n   *   Object containing all inherited attributes from parent elements with attribute\n   *   names as keys\n   * @return {Object.<Array>} list of segments\n   */\n\n  const segmentsFromBase = attributes => {\n    const {\n      baseUrl,\n      initialization = {},\n      sourceDuration,\n      indexRange = '',\n      periodStart,\n      presentationTime,\n      number = 0,\n      duration\n    } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n    if (!baseUrl) {\n      throw new Error(errors.NO_BASE_URL);\n    }\n    const initSegment = urlTypeToSegment({\n      baseUrl,\n      source: initialization.sourceURL,\n      range: initialization.range\n    });\n    const segment = urlTypeToSegment({\n      baseUrl,\n      source: baseUrl,\n      indexRange\n    });\n    segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n    // (since SegmentBase is only for one total segment)\n\n    if (duration) {\n      const segmentTimeInfo = parseByDuration(attributes);\n      if (segmentTimeInfo.length) {\n        segment.duration = segmentTimeInfo[0].duration;\n        segment.timeline = segmentTimeInfo[0].timeline;\n      }\n    } else if (sourceDuration) {\n      segment.duration = sourceDuration;\n      segment.timeline = periodStart;\n    } // If presentation time is provided, these segments are being generated by SIDX\n    // references, and should use the time provided. For the general case of SegmentBase,\n    // there should only be one segment in the period, so its presentation time is the same\n    // as its period start.\n\n    segment.presentationTime = presentationTime || periodStart;\n    segment.number = number;\n    return [segment];\n  };\n  /**\n   * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n   * according to the sidx information given.\n   *\n   * playlist.sidx has metadadata about the sidx where-as the sidx param\n   * is the parsed sidx box itself.\n   *\n   * @param {Object} playlist the playlist to update the sidx information for\n   * @param {Object} sidx the parsed sidx box\n   * @return {Object} the playlist object with the updated sidx information\n   */\n\n  const addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n    // Retain init segment information\n    const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n    const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n    const timeline = playlist.timeline || 0;\n    const sidxByteRange = playlist.sidx.byterange;\n    const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n    const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n    const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n    const segments = [];\n    const type = playlist.endList ? 'static' : 'dynamic';\n    const periodStart = playlist.sidx.timeline;\n    let presentationTime = periodStart;\n    let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n    let startIndex; // eslint-disable-next-line\n\n    if (typeof sidx.firstOffset === 'bigint') {\n      startIndex = window.BigInt(sidxEnd) + sidx.firstOffset;\n    } else {\n      startIndex = sidxEnd + sidx.firstOffset;\n    }\n    for (let i = 0; i < mediaReferences.length; i++) {\n      const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n      const size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\n      // this will be converted to seconds when generating segments\n\n      const duration = reference.subsegmentDuration; // should be an inclusive range\n\n      let endIndex; // eslint-disable-next-line\n\n      if (typeof startIndex === 'bigint') {\n        endIndex = startIndex + window.BigInt(size) - window.BigInt(1);\n      } else {\n        endIndex = startIndex + size - 1;\n      }\n      const indexRange = `${startIndex}-${endIndex}`;\n      const attributes = {\n        baseUrl,\n        timescale,\n        timeline,\n        periodStart,\n        presentationTime,\n        number,\n        duration,\n        sourceDuration,\n        indexRange,\n        type\n      };\n      const segment = segmentsFromBase(attributes)[0];\n      if (initSegment) {\n        segment.map = initSegment;\n      }\n      segments.push(segment);\n      if (typeof startIndex === 'bigint') {\n        startIndex += window.BigInt(size);\n      } else {\n        startIndex += size;\n      }\n      presentationTime += duration / timescale;\n      number++;\n    }\n    playlist.segments = segments;\n    return playlist;\n  };\n  const SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\n  const TIME_FUDGE = 1 / 60;\n  /**\n   * Given a list of timelineStarts, combines, dedupes, and sorts them.\n   *\n   * @param {TimelineStart[]} timelineStarts - list of timeline starts\n   *\n   * @return {TimelineStart[]} the combined and deduped timeline starts\n   */\n\n  const getUniqueTimelineStarts = timelineStarts => {\n    return union(timelineStarts, ({\n      timeline\n    }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\n  };\n  /**\n   * Finds the playlist with the matching NAME attribute.\n   *\n   * @param {Array} playlists - playlists to search through\n   * @param {string} name - the NAME attribute to search for\n   *\n   * @return {Object|null} the matching playlist object, or null\n   */\n\n  const findPlaylistWithName = (playlists, name) => {\n    for (let i = 0; i < playlists.length; i++) {\n      if (playlists[i].attributes.NAME === name) {\n        return playlists[i];\n      }\n    }\n    return null;\n  };\n  /**\n   * Gets a flattened array of media group playlists.\n   *\n   * @param {Object} manifest - the main manifest object\n   *\n   * @return {Array} the media group playlists\n   */\n\n  const getMediaGroupPlaylists = manifest => {\n    let mediaGroupPlaylists = [];\n    forEachMediaGroup$1(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => {\n      mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n    });\n    return mediaGroupPlaylists;\n  };\n  /**\n   * Updates the playlist's media sequence numbers.\n   *\n   * @param {Object} config - options object\n   * @param {Object} config.playlist - the playlist to update\n   * @param {number} config.mediaSequence - the mediaSequence number to start with\n   */\n\n  const updateMediaSequenceForPlaylist = ({\n    playlist,\n    mediaSequence\n  }) => {\n    playlist.mediaSequence = mediaSequence;\n    playlist.segments.forEach((segment, index) => {\n      segment.number = playlist.mediaSequence + index;\n    });\n  };\n  /**\n   * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n   * and a complete list of timeline starts.\n   *\n   * If no matching playlist is found, only the discontinuity sequence number of the playlist\n   * will be updated.\n   *\n   * Since early available timelines are not supported, at least one segment must be present.\n   *\n   * @param {Object} config - options object\n   * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n   * @param {Object[]} newPlaylists - the new playlists to update\n   * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n   */\n\n  const updateSequenceNumbers = ({\n    oldPlaylists,\n    newPlaylists,\n    timelineStarts\n  }) => {\n    newPlaylists.forEach(playlist => {\n      playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n        timeline\n      }) {\n        return timeline === playlist.timeline;\n      }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n      // (see ISO_23009-1-2012 5.3.5.2).\n      //\n      // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n      const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n      if (!oldPlaylist) {\n        // Since this is a new playlist, the media sequence values can start from 0 without\n        // consequence.\n        return;\n      } // TODO better support for live SIDX\n      //\n      // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n      // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n      // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n      // not supported when the SIDX properties change on refreshes.\n      //\n      // In the future, if support needs to be added, the merging logic here can be called\n      // after SIDX references are resolved. For now, exit early to prevent exceptions being\n      // thrown due to undefined references.\n\n      if (playlist.sidx) {\n        return;\n      } // Since we don't yet support early available timelines, we don't need to support\n      // playlists with no segments.\n\n      const firstNewSegment = playlist.segments[0];\n      const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) {\n        return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n      }); // No matching segment from the old playlist means the entire playlist was refreshed.\n      // In this case the media sequence should account for this update, and the new segments\n      // should be marked as discontinuous from the prior content, since the last prior\n      // timeline was removed.\n\n      if (oldMatchingSegmentIndex === -1) {\n        updateMediaSequenceForPlaylist({\n          playlist,\n          mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n        });\n        playlist.segments[0].discontinuity = true;\n        playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n        //\n        // If the new playlist's timeline is the same as the last seen segment's timeline,\n        // then a discontinuity can be added to identify that there's potentially missing\n        // content. If there's no missing content, the discontinuity should still be rather\n        // harmless. It's possible that if segment durations are accurate enough, that the\n        // existence of a gap can be determined using the presentation times and durations,\n        // but if the segment timing info is off, it may introduce more problems than simply\n        // adding the discontinuity.\n        //\n        // If the new playlist's timeline is different from the last seen segment's timeline,\n        // then a discontinuity can be added to identify that this is the first seen segment\n        // of a new timeline. However, the logic at the start of this function that\n        // determined the disconinuity sequence by timeline index is now off by one (the\n        // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n        // we added it), so the disconinuity sequence must be decremented.\n        //\n        // A period may also have a duration of zero, so the case of no segments is handled\n        // here even though we don't yet support early available periods.\n\n        if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n          playlist.discontinuitySequence--;\n        }\n        return;\n      } // If the first segment matched with a prior segment on a discontinuity (it's matching\n      // on the first segment of a period), then the discontinuitySequence shouldn't be the\n      // timeline's matching one, but instead should be the one prior, and the first segment\n      // of the new manifest should be marked with a discontinuity.\n      //\n      // The reason for this special case is that discontinuity sequence shows how many\n      // discontinuities have fallen off of the playlist, and discontinuities are marked on\n      // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n      // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n      // sequence, and that first segment is an indicator, but can be removed before that\n      // timeline is gone.\n\n      const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n      if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n        firstNewSegment.discontinuity = true;\n        playlist.discontinuityStarts.unshift(0);\n        playlist.discontinuitySequence--;\n      }\n      updateMediaSequenceForPlaylist({\n        playlist,\n        mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n      });\n    });\n  };\n  /**\n   * Given an old parsed manifest object and a new parsed manifest object, updates the\n   * sequence and timing values within the new manifest to ensure that it lines up with the\n   * old.\n   *\n   * @param {Array} oldManifest - the old main manifest object\n   * @param {Array} newManifest - the new main manifest object\n   *\n   * @return {Object} the updated new manifest object\n   */\n\n  const positionManifestOnTimeline = ({\n    oldManifest,\n    newManifest\n  }) => {\n    // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n    //\n    // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n    //\n    // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n    //\n    // Because of this change, and the difficulty of supporting periods with changing start\n    // times, periods with changing start times are not supported. This makes the logic much\n    // simpler, since periods with the same start time can be considerred the same period\n    // across refreshes.\n    //\n    // To give an example as to the difficulty of handling periods where the start time may\n    // change, if a single period manifest is refreshed with another manifest with a single\n    // period, and both the start and end times are increased, then the only way to determine\n    // if it's a new period or an old one that has changed is to look through the segments of\n    // each playlist and determine the presentation time bounds to find a match. In addition,\n    // if the period start changed to exceed the old period end, then there would be no\n    // match, and it would not be possible to determine whether the refreshed period is a new\n    // one or the old one.\n    const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n    const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n    // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n    // of properties are saved for each seen Period. Even long running live streams won't\n    // generate too many Periods, unless the stream is watched for decades. In the future,\n    // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n    // but it may not become an issue, and the additional info can be useful for debugging.\n\n    newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n    updateSequenceNumbers({\n      oldPlaylists,\n      newPlaylists,\n      timelineStarts: newManifest.timelineStarts\n    });\n    return newManifest;\n  };\n  const generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n  const mergeDiscontiguousPlaylists = playlists => {\n    // Break out playlists into groups based on their baseUrl\n    const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n      if (!acc[cur.attributes.baseUrl]) {\n        acc[cur.attributes.baseUrl] = [];\n      }\n      acc[cur.attributes.baseUrl].push(cur);\n      return acc;\n    }, {});\n    let allPlaylists = [];\n    Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n      const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => {\n        // assuming playlist IDs are the same across periods\n        // TODO: handle multiperiod where representation sets are not the same\n        // across periods\n        const name = playlist.attributes.id + (playlist.attributes.lang || '');\n        if (!acc[name]) {\n          // First Period\n          acc[name] = playlist;\n          acc[name].attributes.timelineStarts = [];\n        } else {\n          // Subsequent Periods\n          if (playlist.segments) {\n            // first segment of subsequent periods signal a discontinuity\n            if (playlist.segments[0]) {\n              playlist.segments[0].discontinuity = true;\n            }\n            acc[name].segments.push(...playlist.segments);\n          } // bubble up contentProtection, this assumes all DRM content\n          // has the same contentProtection\n\n          if (playlist.attributes.contentProtection) {\n            acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n          }\n        }\n        acc[name].attributes.timelineStarts.push({\n          // Although they represent the same number, it's important to have both to make it\n          // compatible with HLS potentially having a similar attribute.\n          start: playlist.attributes.periodStart,\n          timeline: playlist.attributes.periodStart\n        });\n        return acc;\n      }, {}));\n      allPlaylists = allPlaylists.concat(mergedPlaylists);\n    });\n    return allPlaylists.map(playlist => {\n      playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n      return playlist;\n    });\n  };\n  const addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n    const sidxKey = generateSidxKey(playlist.sidx);\n    const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n    if (sidxMatch) {\n      addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n    }\n    return playlist;\n  };\n  const addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n    if (!Object.keys(sidxMapping).length) {\n      return playlists;\n    }\n    for (const i in playlists) {\n      playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n    }\n    return playlists;\n  };\n  const formatAudioPlaylist = ({\n    attributes,\n    segments,\n    sidx,\n    mediaSequence,\n    discontinuitySequence,\n    discontinuityStarts\n  }, isAudioOnly) => {\n    const playlist = {\n      attributes: {\n        NAME: attributes.id,\n        BANDWIDTH: attributes.bandwidth,\n        CODECS: attributes.codecs,\n        ['PROGRAM-ID']: 1\n      },\n      uri: '',\n      endList: attributes.type === 'static',\n      timeline: attributes.periodStart,\n      resolvedUri: attributes.baseUrl || '',\n      targetDuration: attributes.duration,\n      discontinuitySequence,\n      discontinuityStarts,\n      timelineStarts: attributes.timelineStarts,\n      mediaSequence,\n      segments\n    };\n    if (attributes.contentProtection) {\n      playlist.contentProtection = attributes.contentProtection;\n    }\n    if (attributes.serviceLocation) {\n      playlist.attributes.serviceLocation = attributes.serviceLocation;\n    }\n    if (sidx) {\n      playlist.sidx = sidx;\n    }\n    if (isAudioOnly) {\n      playlist.attributes.AUDIO = 'audio';\n      playlist.attributes.SUBTITLES = 'subs';\n    }\n    return playlist;\n  };\n  const formatVttPlaylist = ({\n    attributes,\n    segments,\n    mediaSequence,\n    discontinuityStarts,\n    discontinuitySequence\n  }) => {\n    if (typeof segments === 'undefined') {\n      // vtt tracks may use single file in BaseURL\n      segments = [{\n        uri: attributes.baseUrl,\n        timeline: attributes.periodStart,\n        resolvedUri: attributes.baseUrl || '',\n        duration: attributes.sourceDuration,\n        number: 0\n      }]; // targetDuration should be the same duration as the only segment\n\n      attributes.duration = attributes.sourceDuration;\n    }\n    const m3u8Attributes = {\n      NAME: attributes.id,\n      BANDWIDTH: attributes.bandwidth,\n      ['PROGRAM-ID']: 1\n    };\n    if (attributes.codecs) {\n      m3u8Attributes.CODECS = attributes.codecs;\n    }\n    const vttPlaylist = {\n      attributes: m3u8Attributes,\n      uri: '',\n      endList: attributes.type === 'static',\n      timeline: attributes.periodStart,\n      resolvedUri: attributes.baseUrl || '',\n      targetDuration: attributes.duration,\n      timelineStarts: attributes.timelineStarts,\n      discontinuityStarts,\n      discontinuitySequence,\n      mediaSequence,\n      segments\n    };\n    if (attributes.serviceLocation) {\n      vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n    }\n    return vttPlaylist;\n  };\n  const organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n    let mainPlaylist;\n    const formattedPlaylists = playlists.reduce((a, playlist) => {\n      const role = playlist.attributes.role && playlist.attributes.role.value || '';\n      const language = playlist.attributes.lang || '';\n      let label = playlist.attributes.label || 'main';\n      if (language && !playlist.attributes.label) {\n        const roleLabel = role ? ` (${role})` : '';\n        label = `${playlist.attributes.lang}${roleLabel}`;\n      }\n      if (!a[label]) {\n        a[label] = {\n          language,\n          autoselect: true,\n          default: role === 'main',\n          playlists: [],\n          uri: ''\n        };\n      }\n      const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n      a[label].playlists.push(formatted);\n      if (typeof mainPlaylist === 'undefined' && role === 'main') {\n        mainPlaylist = playlist;\n        mainPlaylist.default = true;\n      }\n      return a;\n    }, {}); // if no playlists have role \"main\", mark the first as main\n\n    if (!mainPlaylist) {\n      const firstLabel = Object.keys(formattedPlaylists)[0];\n      formattedPlaylists[firstLabel].default = true;\n    }\n    return formattedPlaylists;\n  };\n  const organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n    return playlists.reduce((a, playlist) => {\n      const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n      const language = playlist.attributes.lang || 'und';\n      if (!a[label]) {\n        a[label] = {\n          language,\n          default: false,\n          autoselect: false,\n          playlists: [],\n          uri: ''\n        };\n      }\n      a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n      return a;\n    }, {});\n  };\n  const organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n    if (!svc) {\n      return svcObj;\n    }\n    svc.forEach(service => {\n      const {\n        channel,\n        language\n      } = service;\n      svcObj[language] = {\n        autoselect: false,\n        default: false,\n        instreamId: channel,\n        language\n      };\n      if (service.hasOwnProperty('aspectRatio')) {\n        svcObj[language].aspectRatio = service.aspectRatio;\n      }\n      if (service.hasOwnProperty('easyReader')) {\n        svcObj[language].easyReader = service.easyReader;\n      }\n      if (service.hasOwnProperty('3D')) {\n        svcObj[language]['3D'] = service['3D'];\n      }\n    });\n    return svcObj;\n  }, {});\n  const formatVideoPlaylist = ({\n    attributes,\n    segments,\n    sidx,\n    discontinuityStarts\n  }) => {\n    const playlist = {\n      attributes: {\n        NAME: attributes.id,\n        AUDIO: 'audio',\n        SUBTITLES: 'subs',\n        RESOLUTION: {\n          width: attributes.width,\n          height: attributes.height\n        },\n        CODECS: attributes.codecs,\n        BANDWIDTH: attributes.bandwidth,\n        ['PROGRAM-ID']: 1\n      },\n      uri: '',\n      endList: attributes.type === 'static',\n      timeline: attributes.periodStart,\n      resolvedUri: attributes.baseUrl || '',\n      targetDuration: attributes.duration,\n      discontinuityStarts,\n      timelineStarts: attributes.timelineStarts,\n      segments\n    };\n    if (attributes.frameRate) {\n      playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n    }\n    if (attributes.contentProtection) {\n      playlist.contentProtection = attributes.contentProtection;\n    }\n    if (attributes.serviceLocation) {\n      playlist.attributes.serviceLocation = attributes.serviceLocation;\n    }\n    if (sidx) {\n      playlist.sidx = sidx;\n    }\n    return playlist;\n  };\n  const videoOnly = ({\n    attributes\n  }) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n  const audioOnly = ({\n    attributes\n  }) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n  const vttOnly = ({\n    attributes\n  }) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n  /**\n   * Contains start and timeline properties denoting a timeline start. For DASH, these will\n   * be the same number.\n   *\n   * @typedef {Object} TimelineStart\n   * @property {number} start - the start time of the timeline\n   * @property {number} timeline - the timeline number\n   */\n\n  /**\n   * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n   *\n   * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n   * DASH specific attribute used in constructing segment URI's from templates. However, from\n   * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n   * value, which should start at the original media sequence value (or 0) and increment by 1\n   * for each segment thereafter. Since DASH's `startNumber` values are independent per\n   * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n   * from a 0 mediaSequence value and increment from there.\n   *\n   * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n   * debugging and making sense of the manifest.\n   *\n   * For live playlists, to account for values increasing in manifests when periods are\n   * removed on refreshes, merging logic should be used to update the numbers to their\n   * appropriate values (to ensure they're sequential and increasing).\n   *\n   * @param {Object[]} playlists - the playlists to update\n   * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n   */\n\n  const addMediaSequenceValues = (playlists, timelineStarts) => {\n    // increment all segments sequentially\n    playlists.forEach(playlist => {\n      playlist.mediaSequence = 0;\n      playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n        timeline\n      }) {\n        return timeline === playlist.timeline;\n      });\n      if (!playlist.segments) {\n        return;\n      }\n      playlist.segments.forEach((segment, index) => {\n        segment.number = index;\n      });\n    });\n  };\n  /**\n   * Given a media group object, flattens all playlists within the media group into a single\n   * array.\n   *\n   * @param {Object} mediaGroupObject - the media group object\n   *\n   * @return {Object[]}\n   *         The media group playlists\n   */\n\n  const flattenMediaGroupPlaylists = mediaGroupObject => {\n    if (!mediaGroupObject) {\n      return [];\n    }\n    return Object.keys(mediaGroupObject).reduce((acc, label) => {\n      const labelContents = mediaGroupObject[label];\n      return acc.concat(labelContents.playlists);\n    }, []);\n  };\n  const toM3u8 = ({\n    dashPlaylists,\n    locations,\n    contentSteering,\n    sidxMapping = {},\n    previousManifest,\n    eventStream\n  }) => {\n    if (!dashPlaylists.length) {\n      return {};\n    } // grab all main manifest attributes\n\n    const {\n      sourceDuration: duration,\n      type,\n      suggestedPresentationDelay,\n      minimumUpdatePeriod\n    } = dashPlaylists[0].attributes;\n    const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n    const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n    const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n    const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n    const manifest = {\n      allowCache: true,\n      discontinuityStarts: [],\n      segments: [],\n      endList: true,\n      mediaGroups: {\n        AUDIO: {},\n        VIDEO: {},\n        ['CLOSED-CAPTIONS']: {},\n        SUBTITLES: {}\n      },\n      uri: '',\n      duration,\n      playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n    };\n    if (minimumUpdatePeriod >= 0) {\n      manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n    }\n    if (locations) {\n      manifest.locations = locations;\n    }\n    if (contentSteering) {\n      manifest.contentSteering = contentSteering;\n    }\n    if (type === 'dynamic') {\n      manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n    }\n    if (eventStream && eventStream.length > 0) {\n      manifest.eventStream = eventStream;\n    }\n    const isAudioOnly = manifest.playlists.length === 0;\n    const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n    const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n    const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n    const playlistTimelineStarts = formattedPlaylists.map(({\n      timelineStarts\n    }) => timelineStarts);\n    manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n    addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n    if (organizedAudioGroup) {\n      manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n    }\n    if (organizedVttGroup) {\n      manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n    }\n    if (captions.length) {\n      manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n    }\n    if (previousManifest) {\n      return positionManifestOnTimeline({\n        oldManifest: previousManifest,\n        newManifest: manifest\n      });\n    }\n    return manifest;\n  };\n\n  /**\n   * Calculates the R (repetition) value for a live stream (for the final segment\n   * in a manifest where the r value is negative 1)\n   *\n   * @param {Object} attributes\n   *        Object containing all inherited attributes from parent elements with attribute\n   *        names as keys\n   * @param {number} time\n   *        current time (typically the total time up until the final segment)\n   * @param {number} duration\n   *        duration property for the given <S />\n   *\n   * @return {number}\n   *        R value to reach the end of the given period\n   */\n  const getLiveRValue = (attributes, time, duration) => {\n    const {\n      NOW,\n      clientOffset,\n      availabilityStartTime,\n      timescale = 1,\n      periodStart = 0,\n      minimumUpdatePeriod = 0\n    } = attributes;\n    const now = (NOW + clientOffset) / 1000;\n    const periodStartWC = availabilityStartTime + periodStart;\n    const periodEndWC = now + minimumUpdatePeriod;\n    const periodDuration = periodEndWC - periodStartWC;\n    return Math.ceil((periodDuration * timescale - time) / duration);\n  };\n  /**\n   * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n   * timing and duration\n   *\n   * @param {Object} attributes\n   *        Object containing all inherited attributes from parent elements with attribute\n   *        names as keys\n   * @param {Object[]} segmentTimeline\n   *        List of objects representing the attributes of each S element contained within\n   *\n   * @return {{number: number, duration: number, time: number, timeline: number}[]}\n   *         List of Objects with segment timing and duration info\n   */\n\n  const parseByTimeline = (attributes, segmentTimeline) => {\n    const {\n      type,\n      minimumUpdatePeriod = 0,\n      media = '',\n      sourceDuration,\n      timescale = 1,\n      startNumber = 1,\n      periodStart: timeline\n    } = attributes;\n    const segments = [];\n    let time = -1;\n    for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n      const S = segmentTimeline[sIndex];\n      const duration = S.d;\n      const repeat = S.r || 0;\n      const segmentTime = S.t || 0;\n      if (time < 0) {\n        // first segment\n        time = segmentTime;\n      }\n      if (segmentTime && segmentTime > time) {\n        // discontinuity\n        // TODO: How to handle this type of discontinuity\n        // timeline++ here would treat it like HLS discontuity and content would\n        // get appended without gap\n        // E.G.\n        //  <S t=\"0\" d=\"1\" />\n        //  <S d=\"1\" />\n        //  <S d=\"1\" />\n        //  <S t=\"5\" d=\"1\" />\n        // would have $Time$ values of [0, 1, 2, 5]\n        // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n        // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n        // does the value of sourceDuration consider this when calculating arbitrary\n        // negative @r repeat value?\n        // E.G. Same elements as above with this added at the end\n        //  <S d=\"1\" r=\"-1\" />\n        //  with a sourceDuration of 10\n        // Would the 2 gaps be included in the time duration calculations resulting in\n        // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n        // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n        time = segmentTime;\n      }\n      let count;\n      if (repeat < 0) {\n        const nextS = sIndex + 1;\n        if (nextS === segmentTimeline.length) {\n          // last segment\n          if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n            count = getLiveRValue(attributes, time, duration);\n          } else {\n            // TODO: This may be incorrect depending on conclusion of TODO above\n            count = (sourceDuration * timescale - time) / duration;\n          }\n        } else {\n          count = (segmentTimeline[nextS].t - time) / duration;\n        }\n      } else {\n        count = repeat + 1;\n      }\n      const end = startNumber + segments.length + count;\n      let number = startNumber + segments.length;\n      while (number < end) {\n        segments.push({\n          number,\n          duration: duration / timescale,\n          time,\n          timeline\n        });\n        time += duration;\n        number++;\n      }\n    }\n    return segments;\n  };\n  const identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n  /**\n   * Replaces template identifiers with corresponding values. To be used as the callback\n   * for String.prototype.replace\n   *\n   * @name replaceCallback\n   * @function\n   * @param {string} match\n   *        Entire match of identifier\n   * @param {string} identifier\n   *        Name of matched identifier\n   * @param {string} format\n   *        Format tag string. Its presence indicates that padding is expected\n   * @param {string} width\n   *        Desired length of the replaced value. Values less than this width shall be left\n   *        zero padded\n   * @return {string}\n   *         Replacement for the matched identifier\n   */\n\n  /**\n   * Returns a function to be used as a callback for String.prototype.replace to replace\n   * template identifiers\n   *\n   * @param {Obect} values\n   *        Object containing values that shall be used to replace known identifiers\n   * @param {number} values.RepresentationID\n   *        Value of the Representation@id attribute\n   * @param {number} values.Number\n   *        Number of the corresponding segment\n   * @param {number} values.Bandwidth\n   *        Value of the Representation@bandwidth attribute.\n   * @param {number} values.Time\n   *        Timestamp value of the corresponding segment\n   * @return {replaceCallback}\n   *         Callback to be used with String.prototype.replace to replace identifiers\n   */\n\n  const identifierReplacement = values => (match, identifier, format, width) => {\n    if (match === '$$') {\n      // escape sequence\n      return '$';\n    }\n    if (typeof values[identifier] === 'undefined') {\n      return match;\n    }\n    const value = '' + values[identifier];\n    if (identifier === 'RepresentationID') {\n      // Format tag shall not be present with RepresentationID\n      return value;\n    }\n    if (!format) {\n      width = 1;\n    } else {\n      width = parseInt(width, 10);\n    }\n    if (value.length >= width) {\n      return value;\n    }\n    return `${new Array(width - value.length + 1).join('0')}${value}`;\n  };\n  /**\n   * Constructs a segment url from a template string\n   *\n   * @param {string} url\n   *        Template string to construct url from\n   * @param {Obect} values\n   *        Object containing values that shall be used to replace known identifiers\n   * @param {number} values.RepresentationID\n   *        Value of the Representation@id attribute\n   * @param {number} values.Number\n   *        Number of the corresponding segment\n   * @param {number} values.Bandwidth\n   *        Value of the Representation@bandwidth attribute.\n   * @param {number} values.Time\n   *        Timestamp value of the corresponding segment\n   * @return {string}\n   *         Segment url with identifiers replaced\n   */\n\n  const constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\n  /**\n   * Generates a list of objects containing timing and duration information about each\n   * segment needed to generate segment uris and the complete segment object\n   *\n   * @param {Object} attributes\n   *        Object containing all inherited attributes from parent elements with attribute\n   *        names as keys\n   * @param {Object[]|undefined} segmentTimeline\n   *        List of objects representing the attributes of each S element contained within\n   *        the SegmentTimeline element\n   * @return {{number: number, duration: number, time: number, timeline: number}[]}\n   *         List of Objects with segment timing and duration info\n   */\n\n  const parseTemplateInfo = (attributes, segmentTimeline) => {\n    if (!attributes.duration && !segmentTimeline) {\n      // if neither @duration or SegmentTimeline are present, then there shall be exactly\n      // one media segment\n      return [{\n        number: attributes.startNumber || 1,\n        duration: attributes.sourceDuration,\n        time: 0,\n        timeline: attributes.periodStart\n      }];\n    }\n    if (attributes.duration) {\n      return parseByDuration(attributes);\n    }\n    return parseByTimeline(attributes, segmentTimeline);\n  };\n  /**\n   * Generates a list of segments using information provided by the SegmentTemplate element\n   *\n   * @param {Object} attributes\n   *        Object containing all inherited attributes from parent elements with attribute\n   *        names as keys\n   * @param {Object[]|undefined} segmentTimeline\n   *        List of objects representing the attributes of each S element contained within\n   *        the SegmentTimeline element\n   * @return {Object[]}\n   *         List of segment objects\n   */\n\n  const segmentsFromTemplate = (attributes, segmentTimeline) => {\n    const templateValues = {\n      RepresentationID: attributes.id,\n      Bandwidth: attributes.bandwidth || 0\n    };\n    const {\n      initialization = {\n        sourceURL: '',\n        range: ''\n      }\n    } = attributes;\n    const mapSegment = urlTypeToSegment({\n      baseUrl: attributes.baseUrl,\n      source: constructTemplateUrl(initialization.sourceURL, templateValues),\n      range: initialization.range\n    });\n    const segments = parseTemplateInfo(attributes, segmentTimeline);\n    return segments.map(segment => {\n      templateValues.Number = segment.number;\n      templateValues.Time = segment.time;\n      const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n      // - if timescale isn't present on any level, default to 1.\n\n      const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n      const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n      const presentationTime =\n      // Even if the @t attribute is not specified for the segment, segment.time is\n      // calculated in mpd-parser prior to this, so it's assumed to be available.\n      attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n      const map = {\n        uri,\n        timeline: segment.timeline,\n        duration: segment.duration,\n        resolvedUri: resolveUrl$1(attributes.baseUrl || '', uri),\n        map: mapSegment,\n        number: segment.number,\n        presentationTime\n      };\n      return map;\n    });\n  };\n\n  /**\n   * Converts a <SegmentUrl> (of type URLType from the DASH spec 5.3.9.2 Table 14)\n   * to an object that matches the output of a segment in videojs/mpd-parser\n   *\n   * @param {Object} attributes\n   *   Object containing all inherited attributes from parent elements with attribute\n   *   names as keys\n   * @param {Object} segmentUrl\n   *   <SegmentURL> node to translate into a segment object\n   * @return {Object} translated segment object\n   */\n\n  const SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n    const {\n      baseUrl,\n      initialization = {}\n    } = attributes;\n    const initSegment = urlTypeToSegment({\n      baseUrl,\n      source: initialization.sourceURL,\n      range: initialization.range\n    });\n    const segment = urlTypeToSegment({\n      baseUrl,\n      source: segmentUrl.media,\n      range: segmentUrl.mediaRange\n    });\n    segment.map = initSegment;\n    return segment;\n  };\n  /**\n   * Generates a list of segments using information provided by the SegmentList element\n   * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\n   * node should be translated into segment.\n   *\n   * @param {Object} attributes\n   *   Object containing all inherited attributes from parent elements with attribute\n   *   names as keys\n   * @param {Object[]|undefined} segmentTimeline\n   *        List of objects representing the attributes of each S element contained within\n   *        the SegmentTimeline element\n   * @return {Object.<Array>} list of segments\n   */\n\n  const segmentsFromList = (attributes, segmentTimeline) => {\n    const {\n      duration,\n      segmentUrls = [],\n      periodStart\n    } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n    // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n    if (!duration && !segmentTimeline || duration && segmentTimeline) {\n      throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n    }\n    const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n    let segmentTimeInfo;\n    if (duration) {\n      segmentTimeInfo = parseByDuration(attributes);\n    }\n    if (segmentTimeline) {\n      segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n    }\n    const segments = segmentTimeInfo.map((segmentTime, index) => {\n      if (segmentUrlMap[index]) {\n        const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n        // - if timescale isn't present on any level, default to 1.\n\n        const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n        const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n        segment.timeline = segmentTime.timeline;\n        segment.duration = segmentTime.duration;\n        segment.number = segmentTime.number;\n        segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n        return segment;\n      } // Since we're mapping we should get rid of any blank segments (in case\n      // the given SegmentTimeline is handling for more elements than we have\n      // SegmentURLs for).\n    }).filter(segment => segment);\n    return segments;\n  };\n  const generateSegments = ({\n    attributes,\n    segmentInfo\n  }) => {\n    let segmentAttributes;\n    let segmentsFn;\n    if (segmentInfo.template) {\n      segmentsFn = segmentsFromTemplate;\n      segmentAttributes = merge$1(attributes, segmentInfo.template);\n    } else if (segmentInfo.base) {\n      segmentsFn = segmentsFromBase;\n      segmentAttributes = merge$1(attributes, segmentInfo.base);\n    } else if (segmentInfo.list) {\n      segmentsFn = segmentsFromList;\n      segmentAttributes = merge$1(attributes, segmentInfo.list);\n    }\n    const segmentsInfo = {\n      attributes\n    };\n    if (!segmentsFn) {\n      return segmentsInfo;\n    }\n    const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n    // must be in seconds. Since we've generated the segment list, we no longer need\n    // @duration to be in @timescale units, so we can convert it here.\n\n    if (segmentAttributes.duration) {\n      const {\n        duration,\n        timescale = 1\n      } = segmentAttributes;\n      segmentAttributes.duration = duration / timescale;\n    } else if (segments.length) {\n      // if there is no @duration attribute, use the largest segment duration as\n      // as target duration\n      segmentAttributes.duration = segments.reduce((max, segment) => {\n        return Math.max(max, Math.ceil(segment.duration));\n      }, 0);\n    } else {\n      segmentAttributes.duration = 0;\n    }\n    segmentsInfo.attributes = segmentAttributes;\n    segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n    if (segmentInfo.base && segmentAttributes.indexRange) {\n      segmentsInfo.sidx = segments[0];\n      segmentsInfo.segments = [];\n    }\n    return segmentsInfo;\n  };\n  const toPlaylists = representations => representations.map(generateSegments);\n  const findChildren = (element, name) => from(element.childNodes).filter(({\n    tagName\n  }) => tagName === name);\n  const getContent = element => element.textContent.trim();\n\n  /**\n   * Converts the provided string that may contain a division operation to a number.\n   *\n   * @param {string} value - the provided string value\n   *\n   * @return {number} the parsed string value\n   */\n  const parseDivisionValue = value => {\n    return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n  };\n  const parseDuration = str => {\n    const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n    const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n    const SECONDS_IN_DAY = 24 * 60 * 60;\n    const SECONDS_IN_HOUR = 60 * 60;\n    const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n    const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n    const match = durationRegex.exec(str);\n    if (!match) {\n      return 0;\n    }\n    const [year, month, day, hour, minute, second] = match.slice(1);\n    return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n  };\n  const parseDate = str => {\n    // Date format without timezone according to ISO 8601\n    // YYY-MM-DDThh:mm:ss.ssssss\n    const dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n    // expressed by ending with 'Z'\n\n    if (dateRegex.test(str)) {\n      str += 'Z';\n    }\n    return Date.parse(str);\n  };\n  const parsers = {\n    /**\n     * Specifies the duration of the entire Media Presentation. Format is a duration string\n     * as specified in ISO 8601\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The duration in seconds\n     */\n    mediaPresentationDuration(value) {\n      return parseDuration(value);\n    },\n    /**\n     * Specifies the Segment availability start time for all Segments referred to in this\n     * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n     * time. Format is a date string as specified in ISO 8601\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The date as seconds from unix epoch\n     */\n    availabilityStartTime(value) {\n      return parseDate(value) / 1000;\n    },\n    /**\n     * Specifies the smallest period between potential changes to the MPD. Format is a\n     * duration string as specified in ISO 8601\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The duration in seconds\n     */\n    minimumUpdatePeriod(value) {\n      return parseDuration(value);\n    },\n    /**\n     * Specifies the suggested presentation delay. Format is a\n     * duration string as specified in ISO 8601\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The duration in seconds\n     */\n    suggestedPresentationDelay(value) {\n      return parseDuration(value);\n    },\n    /**\n     * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     *\n     * @return {string}\n     *         The type as a string\n     */\n    type(value) {\n      return value;\n    },\n    /**\n     * Specifies the duration of the smallest time shifting buffer for any Representation\n     * in the MPD. Format is a duration string as specified in ISO 8601\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The duration in seconds\n     */\n    timeShiftBufferDepth(value) {\n      return parseDuration(value);\n    },\n    /**\n     * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n     * Format is a duration string as specified in ISO 8601\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The duration in seconds\n     */\n    start(value) {\n      return parseDuration(value);\n    },\n    /**\n     * Specifies the width of the visual presentation\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed width\n     */\n    width(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the height of the visual presentation\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed height\n     */\n    height(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the bitrate of the representation\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed bandwidth\n     */\n    bandwidth(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the frame rate of the representation\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed frame rate\n     */\n    frameRate(value) {\n      return parseDivisionValue(value);\n    },\n    /**\n     * Specifies the number of the first Media Segment in this Representation in the Period\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed number\n     */\n    startNumber(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the timescale in units per seconds\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed timescale\n     */\n    timescale(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the presentationTimeOffset.\n     *\n     * @param {string} value\n     *        value of the attribute as a string\n     *\n     * @return {number}\n     *         The parsed presentationTimeOffset\n     */\n    presentationTimeOffset(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the constant approximate Segment duration\n     * NOTE: The <Period> element also contains an @duration attribute. This duration\n     *       specifies the duration of the Period. This attribute is currently not\n     *       supported by the rest of the parser, however we still check for it to prevent\n     *       errors.\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed duration\n     */\n    duration(value) {\n      const parsedValue = parseInt(value, 10);\n      if (isNaN(parsedValue)) {\n        return parseDuration(value);\n      }\n      return parsedValue;\n    },\n    /**\n     * Specifies the Segment duration, in units of the value of the @timescale.\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed duration\n     */\n    d(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the MPD start time, in @timescale units, the first Segment in the series\n     * starts relative to the beginning of the Period\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed time\n     */\n    t(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the repeat count of the number of following contiguous Segments with the\n     * same duration expressed by the value of @d\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {number}\n     *         The parsed number\n     */\n    r(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Specifies the presentationTime.\n     *\n     * @param {string} value\n     *        value of the attribute as a string\n     *\n     * @return {number}\n     *         The parsed presentationTime\n     */\n    presentationTime(value) {\n      return parseInt(value, 10);\n    },\n    /**\n     * Default parser for all other attributes. Acts as a no-op and just returns the value\n     * as a string\n     *\n     * @param {string} value\n     *        value of attribute as a string\n     * @return {string}\n     *         Unparsed value\n     */\n    DEFAULT(value) {\n      return value;\n    }\n  };\n  /**\n   * Gets all the attributes and values of the provided node, parses attributes with known\n   * types, and returns an object with attribute names mapped to values.\n   *\n   * @param {Node} el\n   *        The node to parse attributes from\n   * @return {Object}\n   *         Object with all attributes of el parsed\n   */\n\n  const parseAttributes = el => {\n    if (!(el && el.attributes)) {\n      return {};\n    }\n    return from(el.attributes).reduce((a, e) => {\n      const parseFn = parsers[e.name] || parsers.DEFAULT;\n      a[e.name] = parseFn(e.value);\n      return a;\n    }, {});\n  };\n  const keySystemsMap = {\n    'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n    'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n    'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n    'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime',\n    // ISO_IEC 23009-1_2022 5.8.5.2.2 The mp4 Protection Scheme\n    'urn:mpeg:dash:mp4protection:2011': 'mp4protection'\n  };\n  /**\n   * Builds a list of urls that is the product of the reference urls and BaseURL values\n   *\n   * @param {Object[]} references\n   *        List of objects containing the reference URL as well as its attributes\n   * @param {Node[]} baseUrlElements\n   *        List of BaseURL nodes from the mpd\n   * @return {Object[]}\n   *         List of objects with resolved urls and attributes\n   */\n\n  const buildBaseUrls = (references, baseUrlElements) => {\n    if (!baseUrlElements.length) {\n      return references;\n    }\n    return flatten(references.map(function (reference) {\n      return baseUrlElements.map(function (baseUrlElement) {\n        const initialBaseUrl = getContent(baseUrlElement);\n        const resolvedBaseUrl = resolveUrl$1(reference.baseUrl, initialBaseUrl);\n        const finalBaseUrl = merge$1(parseAttributes(baseUrlElement), {\n          baseUrl: resolvedBaseUrl\n        }); // If the URL is resolved, we want to get the serviceLocation from the reference\n        // assuming there is no serviceLocation on the initialBaseUrl\n\n        if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) {\n          finalBaseUrl.serviceLocation = reference.serviceLocation;\n        }\n        return finalBaseUrl;\n      });\n    }));\n  };\n  /**\n   * Contains all Segment information for its containing AdaptationSet\n   *\n   * @typedef {Object} SegmentInformation\n   * @property {Object|undefined} template\n   *           Contains the attributes for the SegmentTemplate node\n   * @property {Object[]|undefined} segmentTimeline\n   *           Contains a list of atrributes for each S node within the SegmentTimeline node\n   * @property {Object|undefined} list\n   *           Contains the attributes for the SegmentList node\n   * @property {Object|undefined} base\n   *           Contains the attributes for the SegmentBase node\n   */\n\n  /**\n   * Returns all available Segment information contained within the AdaptationSet node\n   *\n   * @param {Node} adaptationSet\n   *        The AdaptationSet node to get Segment information from\n   * @return {SegmentInformation}\n   *         The Segment information contained within the provided AdaptationSet\n   */\n\n  const getSegmentInformation = adaptationSet => {\n    const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n    const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n    const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge$1({\n      tag: 'SegmentURL'\n    }, parseAttributes(s)));\n    const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n    const segmentTimelineParentNode = segmentList || segmentTemplate;\n    const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n    const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n    const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n    // @initialization and an <Initialization> node.  @initialization can be templated,\n    // while the node can have a url and range specified.  If the <SegmentTemplate> has\n    // both @initialization and an <Initialization> subelement we opt to override with\n    // the node, as this interaction is not defined in the spec.\n\n    const template = segmentTemplate && parseAttributes(segmentTemplate);\n    if (template && segmentInitialization) {\n      template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n    } else if (template && template.initialization) {\n      // If it is @initialization we convert it to an object since this is the format that\n      // later functions will rely on for the initialization segment.  This is only valid\n      // for <SegmentTemplate>\n      template.initialization = {\n        sourceURL: template.initialization\n      };\n    }\n    const segmentInfo = {\n      template,\n      segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n      list: segmentList && merge$1(parseAttributes(segmentList), {\n        segmentUrls,\n        initialization: parseAttributes(segmentInitialization)\n      }),\n      base: segmentBase && merge$1(parseAttributes(segmentBase), {\n        initialization: parseAttributes(segmentInitialization)\n      })\n    };\n    Object.keys(segmentInfo).forEach(key => {\n      if (!segmentInfo[key]) {\n        delete segmentInfo[key];\n      }\n    });\n    return segmentInfo;\n  };\n  /**\n   * Contains Segment information and attributes needed to construct a Playlist object\n   * from a Representation\n   *\n   * @typedef {Object} RepresentationInformation\n   * @property {SegmentInformation} segmentInfo\n   *           Segment information for this Representation\n   * @property {Object} attributes\n   *           Inherited attributes for this Representation\n   */\n\n  /**\n   * Maps a Representation node to an object containing Segment information and attributes\n   *\n   * @name inheritBaseUrlsCallback\n   * @function\n   * @param {Node} representation\n   *        Representation node from the mpd\n   * @return {RepresentationInformation}\n   *         Representation information needed to construct a Playlist object\n   */\n\n  /**\n   * Returns a callback for Array.prototype.map for mapping Representation nodes to\n   * Segment information and attributes using inherited BaseURL nodes.\n   *\n   * @param {Object} adaptationSetAttributes\n   *        Contains attributes inherited by the AdaptationSet\n   * @param {Object[]} adaptationSetBaseUrls\n   *        List of objects containing resolved base URLs and attributes\n   *        inherited by the AdaptationSet\n   * @param {SegmentInformation} adaptationSetSegmentInfo\n   *        Contains Segment information for the AdaptationSet\n   * @return {inheritBaseUrlsCallback}\n   *         Callback map function\n   */\n\n  const inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n    const repBaseUrlElements = findChildren(representation, 'BaseURL');\n    const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n    const attributes = merge$1(adaptationSetAttributes, parseAttributes(representation));\n    const representationSegmentInfo = getSegmentInformation(representation);\n    return repBaseUrls.map(baseUrl => {\n      return {\n        segmentInfo: merge$1(adaptationSetSegmentInfo, representationSegmentInfo),\n        attributes: merge$1(attributes, baseUrl)\n      };\n    });\n  };\n  /**\n   * Tranforms a series of content protection nodes to\n   * an object containing pssh data by key system\n   *\n   * @param {Node[]} contentProtectionNodes\n   *        Content protection nodes\n   * @return {Object}\n   *        Object containing pssh data by key system\n   */\n\n  const generateKeySystemInformation = contentProtectionNodes => {\n    return contentProtectionNodes.reduce((acc, node) => {\n      const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n      // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n      // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n      // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n      if (attributes.schemeIdUri) {\n        attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n      }\n      const keySystem = keySystemsMap[attributes.schemeIdUri];\n      if (keySystem) {\n        acc[keySystem] = {\n          attributes\n        };\n        const psshNode = findChildren(node, 'cenc:pssh')[0];\n        if (psshNode) {\n          const pssh = getContent(psshNode);\n          acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n        }\n      }\n      return acc;\n    }, {});\n  }; // defined in ANSI_SCTE 214-1 2016\n\n  const parseCaptionServiceMetadata = service => {\n    // 608 captions\n    if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n      const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n      return values.map(value => {\n        let channel;\n        let language; // default language to value\n\n        language = value;\n        if (/^CC\\d=/.test(value)) {\n          [channel, language] = value.split('=');\n        } else if (/^CC\\d$/.test(value)) {\n          channel = value;\n        }\n        return {\n          channel,\n          language\n        };\n      });\n    } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n      const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n      return values.map(value => {\n        const flags = {\n          // service or channel number 1-63\n          'channel': undefined,\n          // language is a 3ALPHA per ISO 639.2/B\n          // field is required\n          'language': undefined,\n          // BIT 1/0 or ?\n          // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n          'aspectRatio': 1,\n          // BIT 1/0\n          // easy reader flag indicated the text is tailed to the needs of beginning readers\n          // default 0, or off\n          'easyReader': 0,\n          // BIT 1/0\n          // If 3d metadata is present (CEA-708.1) then 1\n          // default 0\n          '3D': 0\n        };\n        if (/=/.test(value)) {\n          const [channel, opts = ''] = value.split('=');\n          flags.channel = channel;\n          flags.language = value;\n          opts.split(',').forEach(opt => {\n            const [name, val] = opt.split(':');\n            if (name === 'lang') {\n              flags.language = val; // er for easyReadery\n            } else if (name === 'er') {\n              flags.easyReader = Number(val); // war for wide aspect ratio\n            } else if (name === 'war') {\n              flags.aspectRatio = Number(val);\n            } else if (name === '3D') {\n              flags['3D'] = Number(val);\n            }\n          });\n        } else {\n          flags.language = value;\n        }\n        if (flags.channel) {\n          flags.channel = 'SERVICE' + flags.channel;\n        }\n        return flags;\n      });\n    }\n  };\n  /**\n   * A map callback that will parse all event stream data for a collection of periods\n   * DASH ISO_IEC_23009 5.10.2.2\n   * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing\n   *\n   * @param {PeriodInformation} period object containing necessary period information\n   * @return a collection of parsed eventstream event objects\n   */\n\n  const toEventStream = period => {\n    // get and flatten all EventStreams tags and parse attributes and children\n    return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n      const eventStreamAttributes = parseAttributes(eventStream);\n      const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n      return findChildren(eventStream, 'Event').map(event => {\n        const eventAttributes = parseAttributes(event);\n        const presentationTime = eventAttributes.presentationTime || 0;\n        const timescale = eventStreamAttributes.timescale || 1;\n        const duration = eventAttributes.duration || 0;\n        const start = presentationTime / timescale + period.attributes.start;\n        return {\n          schemeIdUri,\n          value: eventStreamAttributes.value,\n          id: eventAttributes.id,\n          start,\n          end: start + duration / timescale,\n          messageData: getContent(event) || eventAttributes.messageData,\n          contentEncoding: eventStreamAttributes.contentEncoding,\n          presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0\n        };\n      });\n    }));\n  };\n  /**\n   * Maps an AdaptationSet node to a list of Representation information objects\n   *\n   * @name toRepresentationsCallback\n   * @function\n   * @param {Node} adaptationSet\n   *        AdaptationSet node from the mpd\n   * @return {RepresentationInformation[]}\n   *         List of objects containing Representaion information\n   */\n\n  /**\n   * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n   * Representation information objects\n   *\n   * @param {Object} periodAttributes\n   *        Contains attributes inherited by the Period\n   * @param {Object[]} periodBaseUrls\n   *        Contains list of objects with resolved base urls and attributes\n   *        inherited by the Period\n   * @param {string[]} periodSegmentInfo\n   *        Contains Segment Information at the period level\n   * @return {toRepresentationsCallback}\n   *         Callback map function\n   */\n\n  const toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n    const adaptationSetAttributes = parseAttributes(adaptationSet);\n    const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n    const role = findChildren(adaptationSet, 'Role')[0];\n    const roleAttributes = {\n      role: parseAttributes(role)\n    };\n    let attrs = merge$1(periodAttributes, adaptationSetAttributes, roleAttributes);\n    const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n    const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n    if (captionServices) {\n      attrs = merge$1(attrs, {\n        captionServices\n      });\n    }\n    const label = findChildren(adaptationSet, 'Label')[0];\n    if (label && label.childNodes.length) {\n      const labelVal = label.childNodes[0].nodeValue.trim();\n      attrs = merge$1(attrs, {\n        label: labelVal\n      });\n    }\n    const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n    if (Object.keys(contentProtection).length) {\n      attrs = merge$1(attrs, {\n        contentProtection\n      });\n    }\n    const segmentInfo = getSegmentInformation(adaptationSet);\n    const representations = findChildren(adaptationSet, 'Representation');\n    const adaptationSetSegmentInfo = merge$1(periodSegmentInfo, segmentInfo);\n    return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n  };\n  /**\n   * Contains all period information for mapping nodes onto adaptation sets.\n   *\n   * @typedef {Object} PeriodInformation\n   * @property {Node} period.node\n   *           Period node from the mpd\n   * @property {Object} period.attributes\n   *           Parsed period attributes from node plus any added\n   */\n\n  /**\n   * Maps a PeriodInformation object to a list of Representation information objects for all\n   * AdaptationSet nodes contained within the Period.\n   *\n   * @name toAdaptationSetsCallback\n   * @function\n   * @param {PeriodInformation} period\n   *        Period object containing necessary period information\n   * @param {number} periodStart\n   *        Start time of the Period within the mpd\n   * @return {RepresentationInformation[]}\n   *         List of objects containing Representaion information\n   */\n\n  /**\n   * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n   * Representation information objects\n   *\n   * @param {Object} mpdAttributes\n   *        Contains attributes inherited by the mpd\n    * @param {Object[]} mpdBaseUrls\n   *        Contains list of objects with resolved base urls and attributes\n   *        inherited by the mpd\n   * @return {toAdaptationSetsCallback}\n   *         Callback map function\n   */\n\n  const toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n    const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n    const periodAttributes = merge$1(mpdAttributes, {\n      periodStart: period.attributes.start\n    });\n    if (typeof period.attributes.duration === 'number') {\n      periodAttributes.periodDuration = period.attributes.duration;\n    }\n    const adaptationSets = findChildren(period.node, 'AdaptationSet');\n    const periodSegmentInfo = getSegmentInformation(period.node);\n    return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n  };\n  /**\n   * Tranforms an array of content steering nodes into an object\n   * containing CDN content steering information from the MPD manifest.\n   *\n   * For more information on the DASH spec for Content Steering parsing, see:\n   * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n   *\n   * @param {Node[]} contentSteeringNodes\n   *        Content steering nodes\n   * @param {Function} eventHandler\n   *        The event handler passed into the parser options to handle warnings\n   * @return {Object}\n   *        Object containing content steering data\n   */\n\n  const generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => {\n    // If there are more than one ContentSteering tags, throw an error\n    if (contentSteeringNodes.length > 1) {\n      eventHandler({\n        type: 'warn',\n        message: 'The MPD manifest should contain no more than one ContentSteering tag'\n      });\n    } // Return a null value if there are no ContentSteering tags\n\n    if (!contentSteeringNodes.length) {\n      return null;\n    }\n    const infoFromContentSteeringTag = merge$1({\n      serverURL: getContent(contentSteeringNodes[0])\n    }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value\n    // to `false` if it doesn't exist\n\n    infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true';\n    return infoFromContentSteeringTag;\n  };\n  /**\n   * Gets Period@start property for a given period.\n   *\n   * @param {Object} options\n   *        Options object\n   * @param {Object} options.attributes\n   *        Period attributes\n   * @param {Object} [options.priorPeriodAttributes]\n   *        Prior period attributes (if prior period is available)\n   * @param {string} options.mpdType\n   *        The MPD@type these periods came from\n   * @return {number|null}\n   *         The period start, or null if it's an early available period or error\n   */\n\n  const getPeriodStart = ({\n    attributes,\n    priorPeriodAttributes,\n    mpdType\n  }) => {\n    // Summary of period start time calculation from DASH spec section 5.3.2.1\n    //\n    // A period's start is the first period's start + time elapsed after playing all\n    // prior periods to this one. Periods continue one after the other in time (without\n    // gaps) until the end of the presentation.\n    //\n    // The value of Period@start should be:\n    // 1. if Period@start is present: value of Period@start\n    // 2. if previous period exists and it has @duration: previous Period@start +\n    //    previous Period@duration\n    // 3. if this is first period and MPD@type is 'static': 0\n    // 4. in all other cases, consider the period an \"early available period\" (note: not\n    //    currently supported)\n    // (1)\n    if (typeof attributes.start === 'number') {\n      return attributes.start;\n    } // (2)\n\n    if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n      return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n    } // (3)\n\n    if (!priorPeriodAttributes && mpdType === 'static') {\n      return 0;\n    } // (4)\n    // There is currently no logic for calculating the Period@start value if there is\n    // no Period@start or prior Period@start and Period@duration available. This is not made\n    // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n    // nothing about any other resolution strategies, it's implied. Thus, this case should\n    // be considered an early available period, or error, and null should suffice for both\n    // of those cases.\n\n    return null;\n  };\n  /**\n   * Traverses the mpd xml tree to generate a list of Representation information objects\n   * that have inherited attributes from parent nodes\n   *\n   * @param {Node} mpd\n   *        The root node of the mpd\n   * @param {Object} options\n   *        Available options for inheritAttributes\n   * @param {string} options.manifestUri\n   *        The uri source of the mpd\n   * @param {number} options.NOW\n   *        Current time per DASH IOP.  Default is current time in ms since epoch\n   * @param {number} options.clientOffset\n   *        Client time difference from NOW (in milliseconds)\n   * @return {RepresentationInformation[]}\n   *         List of objects containing Representation information\n   */\n\n  const inheritAttributes = (mpd, options = {}) => {\n    const {\n      manifestUri = '',\n      NOW = Date.now(),\n      clientOffset = 0,\n      // TODO: For now, we are expecting an eventHandler callback function\n      // to be passed into the mpd parser as an option.\n      // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n      // This will support new features including a standardized event handler.\n      // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n      // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n      eventHandler = function () {}\n    } = options;\n    const periodNodes = findChildren(mpd, 'Period');\n    if (!periodNodes.length) {\n      throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n    }\n    const locations = findChildren(mpd, 'Location');\n    const mpdAttributes = parseAttributes(mpd);\n    const mpdBaseUrls = buildBaseUrls([{\n      baseUrl: manifestUri\n    }], findChildren(mpd, 'BaseURL'));\n    const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n    mpdAttributes.type = mpdAttributes.type || 'static';\n    mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n    mpdAttributes.NOW = NOW;\n    mpdAttributes.clientOffset = clientOffset;\n    if (locations.length) {\n      mpdAttributes.locations = locations.map(getContent);\n    }\n    const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n    // adding properties that require looking at prior periods is to parse attributes and add\n    // missing ones before toAdaptationSets is called. If more such properties are added, it\n    // may be better to refactor toAdaptationSets.\n\n    periodNodes.forEach((node, index) => {\n      const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n      // for this period.\n\n      const priorPeriod = periods[index - 1];\n      attributes.start = getPeriodStart({\n        attributes,\n        priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n        mpdType: mpdAttributes.type\n      });\n      periods.push({\n        node,\n        attributes\n      });\n    });\n    return {\n      locations: mpdAttributes.locations,\n      contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler),\n      // TODO: There are occurences where this `representationInfo` array contains undesired\n      // duplicates. This generally occurs when there are multiple BaseURL nodes that are\n      // direct children of the MPD node. When we attempt to resolve URLs from a combination of the\n      // parent BaseURL and a child BaseURL, and the value does not resolve,\n      // we end up returning the child BaseURL multiple times.\n      // We need to determine a way to remove these duplicates in a safe way.\n      // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527\n      representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))),\n      eventStream: flatten(periods.map(toEventStream))\n    };\n  };\n  const stringToMpdXml = manifestString => {\n    if (manifestString === '') {\n      throw new Error(errors.DASH_EMPTY_MANIFEST);\n    }\n    const parser = new DOMParser();\n    let xml;\n    let mpd;\n    try {\n      xml = parser.parseFromString(manifestString, 'application/xml');\n      mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n    } catch (e) {// ie 11 throws on invalid xml\n    }\n    if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n      throw new Error(errors.DASH_INVALID_XML);\n    }\n    return mpd;\n  };\n\n  /**\n   * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n   *\n   * @param {string} mpd\n   *        XML string of the MPD manifest\n   * @return {Object|null}\n   *         Attributes of UTCTiming node specified in the manifest. Null if none found\n   */\n\n  const parseUTCTimingScheme = mpd => {\n    const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n    if (!UTCTimingNode) {\n      return null;\n    }\n    const attributes = parseAttributes(UTCTimingNode);\n    switch (attributes.schemeIdUri) {\n      case 'urn:mpeg:dash:utc:http-head:2014':\n      case 'urn:mpeg:dash:utc:http-head:2012':\n        attributes.method = 'HEAD';\n        break;\n      case 'urn:mpeg:dash:utc:http-xsdate:2014':\n      case 'urn:mpeg:dash:utc:http-iso:2014':\n      case 'urn:mpeg:dash:utc:http-xsdate:2012':\n      case 'urn:mpeg:dash:utc:http-iso:2012':\n        attributes.method = 'GET';\n        break;\n      case 'urn:mpeg:dash:utc:direct:2014':\n      case 'urn:mpeg:dash:utc:direct:2012':\n        attributes.method = 'DIRECT';\n        attributes.value = Date.parse(attributes.value);\n        break;\n      case 'urn:mpeg:dash:utc:http-ntp:2014':\n      case 'urn:mpeg:dash:utc:ntp:2014':\n      case 'urn:mpeg:dash:utc:sntp:2014':\n      default:\n        throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n    }\n    return attributes;\n  };\n  /*\n   * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n   * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n   *\n   * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n   * parsed DASH manifest will have its media sequence and discontinuity sequence values\n   * updated to reflect its position relative to the prior manifest.\n   *\n   * @param {string} manifestString - the DASH manifest as a string\n   * @param {options} [options] - any options\n   *\n   * @return {Object} the manifest object\n   */\n\n  const parse = (manifestString, options = {}) => {\n    const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n    const playlists = toPlaylists(parsedManifestInfo.representationInfo);\n    return toM3u8({\n      dashPlaylists: playlists,\n      locations: parsedManifestInfo.locations,\n      contentSteering: parsedManifestInfo.contentSteeringInfo,\n      sidxMapping: options.sidxMapping,\n      previousManifest: options.previousManifest,\n      eventStream: parsedManifestInfo.eventStream\n    });\n  };\n  /**\n   * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n   *\n   * @param {string} manifestString\n   *        XML string of the MPD manifest\n   * @return {Object|null}\n   *         Attributes of UTCTiming node specified in the manifest. Null if none found\n   */\n\n  const parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\n  var MAX_UINT32 = Math.pow(2, 32);\n  var getUint64$1 = function (uint8) {\n    var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n    var value;\n    if (dv.getBigUint64) {\n      value = dv.getBigUint64(0);\n      if (value < Number.MAX_SAFE_INTEGER) {\n        return Number(value);\n      }\n      return value;\n    }\n    return dv.getUint32(0) * MAX_UINT32 + dv.getUint32(4);\n  };\n  var numbers = {\n    getUint64: getUint64$1,\n    MAX_UINT32: MAX_UINT32\n  };\n\n  var getUint64 = numbers.getUint64;\n  var parseSidx = function (data) {\n    var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n      result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4)),\n        references: [],\n        referenceId: view.getUint32(4),\n        timescale: view.getUint32(8)\n      },\n      i = 12;\n    if (result.version === 0) {\n      result.earliestPresentationTime = view.getUint32(i);\n      result.firstOffset = view.getUint32(i + 4);\n      i += 8;\n    } else {\n      // read 64 bits\n      result.earliestPresentationTime = getUint64(data.subarray(i));\n      result.firstOffset = getUint64(data.subarray(i + 8));\n      i += 16;\n    }\n    i += 2; // reserved\n\n    var referenceCount = view.getUint16(i);\n    i += 2; // start of references\n\n    for (; referenceCount > 0; i += 12, referenceCount--) {\n      result.references.push({\n        referenceType: (data[i] & 0x80) >>> 7,\n        referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n        subsegmentDuration: view.getUint32(i + 4),\n        startsWithSap: !!(data[i + 8] & 0x80),\n        sapType: (data[i + 8] & 0x70) >>> 4,\n        sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n      });\n    }\n    return result;\n  };\n  var parseSidx_1 = parseSidx;\n\n  var ID3 = toUint8([0x49, 0x44, 0x33]);\n  var getId3Size = function getId3Size(bytes, offset) {\n    if (offset === void 0) {\n      offset = 0;\n    }\n    bytes = toUint8(bytes);\n    var flags = bytes[offset + 5];\n    var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n    var footerPresent = (flags & 16) >> 4;\n    if (footerPresent) {\n      return returnSize + 20;\n    }\n    return returnSize + 10;\n  };\n  var getId3Offset = function getId3Offset(bytes, offset) {\n    if (offset === void 0) {\n      offset = 0;\n    }\n    bytes = toUint8(bytes);\n    if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n      offset: offset\n    })) {\n      return offset;\n    }\n    offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n    // have multiple ID3 tag sections even though\n    // they should not.\n\n    return getId3Offset(bytes, offset);\n  };\n\n  var normalizePath$1 = function normalizePath(path) {\n    if (typeof path === 'string') {\n      return stringToBytes(path);\n    }\n    if (typeof path === 'number') {\n      return path;\n    }\n    return path;\n  };\n  var normalizePaths$1 = function normalizePaths(paths) {\n    if (!Array.isArray(paths)) {\n      return [normalizePath$1(paths)];\n    }\n    return paths.map(function (p) {\n      return normalizePath$1(p);\n    });\n  };\n  /**\n   * find any number of boxes by name given a path to it in an iso bmff\n   * such as mp4.\n   *\n   * @param {TypedArray} bytes\n   *        bytes for the iso bmff to search for boxes in\n   *\n   * @param {Uint8Array[]|string[]|string|Uint8Array} name\n   *        An array of paths or a single path representing the name\n   *        of boxes to search through in bytes. Paths may be\n   *        uint8 (character codes) or strings.\n   *\n   * @param {boolean} [complete=false]\n   *        Should we search only for complete boxes on the final path.\n   *        This is very useful when you do not want to get back partial boxes\n   *        in the case of streaming files.\n   *\n   * @return {Uint8Array[]}\n   *         An array of the end paths that we found.\n   */\n\n  var findBox = function findBox(bytes, paths, complete) {\n    if (complete === void 0) {\n      complete = false;\n    }\n    paths = normalizePaths$1(paths);\n    bytes = toUint8(bytes);\n    var results = [];\n    if (!paths.length) {\n      // short-circuit the search for empty paths\n      return results;\n    }\n    var i = 0;\n    while (i < bytes.length) {\n      var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n      var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n      if (size === 0) {\n        break;\n      }\n      var end = i + size;\n      if (end > bytes.length) {\n        // this box is bigger than the number of bytes we have\n        // and complete is set, we cannot find any more boxes.\n        if (complete) {\n          break;\n        }\n        end = bytes.length;\n      }\n      var data = bytes.subarray(i + 8, end);\n      if (bytesMatch(type, paths[0])) {\n        if (paths.length === 1) {\n          // this is the end of the path and we've found the box we were\n          // looking for\n          results.push(data);\n        } else {\n          // recursively search for the next box along the path\n          results.push.apply(results, findBox(data, paths.slice(1), complete));\n        }\n      }\n      i = end;\n    } // we've finished searching all of bytes\n\n    return results;\n  };\n\n  // https://matroska-org.github.io/libebml/specs.html\n  // https://www.matroska.org/technical/elements.html\n  // https://www.webmproject.org/docs/container/\n\n  var EBML_TAGS = {\n    EBML: toUint8([0x1A, 0x45, 0xDF, 0xA3]),\n    DocType: toUint8([0x42, 0x82]),\n    Segment: toUint8([0x18, 0x53, 0x80, 0x67]),\n    SegmentInfo: toUint8([0x15, 0x49, 0xA9, 0x66]),\n    Tracks: toUint8([0x16, 0x54, 0xAE, 0x6B]),\n    Track: toUint8([0xAE]),\n    TrackNumber: toUint8([0xd7]),\n    DefaultDuration: toUint8([0x23, 0xe3, 0x83]),\n    TrackEntry: toUint8([0xAE]),\n    TrackType: toUint8([0x83]),\n    FlagDefault: toUint8([0x88]),\n    CodecID: toUint8([0x86]),\n    CodecPrivate: toUint8([0x63, 0xA2]),\n    VideoTrack: toUint8([0xe0]),\n    AudioTrack: toUint8([0xe1]),\n    // Not used yet, but will be used for live webm/mkv\n    // see https://www.matroska.org/technical/basics.html#block-structure\n    // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n    Cluster: toUint8([0x1F, 0x43, 0xB6, 0x75]),\n    Timestamp: toUint8([0xE7]),\n    TimestampScale: toUint8([0x2A, 0xD7, 0xB1]),\n    BlockGroup: toUint8([0xA0]),\n    BlockDuration: toUint8([0x9B]),\n    Block: toUint8([0xA1]),\n    SimpleBlock: toUint8([0xA3])\n  };\n  /**\n   * This is a simple table to determine the length\n   * of things in ebml. The length is one based (starts at 1,\n   * rather than zero) and for every zero bit before a one bit\n   * we add one to length. We also need this table because in some\n   * case we have to xor all the length bits from another value.\n   */\n\n  var LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n  var getLength = function getLength(byte) {\n    var len = 1;\n    for (var i = 0; i < LENGTH_TABLE.length; i++) {\n      if (byte & LENGTH_TABLE[i]) {\n        break;\n      }\n      len++;\n    }\n    return len;\n  }; // length in ebml is stored in the first 4 to 8 bits\n  // of the first byte. 4 for the id length and 8 for the\n  // data size length. Length is measured by converting the number to binary\n  // then 1 + the number of zeros before a 1 is encountered starting\n  // from the left.\n\n  var getvint = function getvint(bytes, offset, removeLength, signed) {\n    if (removeLength === void 0) {\n      removeLength = true;\n    }\n    if (signed === void 0) {\n      signed = false;\n    }\n    var length = getLength(bytes[offset]);\n    var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n    // as they will be modified below to remove the dataSizeLen bits and we do not\n    // want to modify the original data. normally we could just call slice on\n    // uint8array but ie 11 does not support that...\n\n    if (removeLength) {\n      valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n      valueBytes[0] ^= LENGTH_TABLE[length - 1];\n    }\n    return {\n      length: length,\n      value: bytesToNumber(valueBytes, {\n        signed: signed\n      }),\n      bytes: valueBytes\n    };\n  };\n  var normalizePath = function normalizePath(path) {\n    if (typeof path === 'string') {\n      return path.match(/.{1,2}/g).map(function (p) {\n        return normalizePath(p);\n      });\n    }\n    if (typeof path === 'number') {\n      return numberToBytes(path);\n    }\n    return path;\n  };\n  var normalizePaths = function normalizePaths(paths) {\n    if (!Array.isArray(paths)) {\n      return [normalizePath(paths)];\n    }\n    return paths.map(function (p) {\n      return normalizePath(p);\n    });\n  };\n  var getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n    if (offset >= bytes.length) {\n      return bytes.length;\n    }\n    var innerid = getvint(bytes, offset, false);\n    if (bytesMatch(id.bytes, innerid.bytes)) {\n      return offset;\n    }\n    var dataHeader = getvint(bytes, offset + innerid.length);\n    return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n  };\n  /**\n   * Notes on the EBLM format.\n   *\n   * EBLM uses \"vints\" tags. Every vint tag contains\n   * two parts\n   *\n   * 1. The length from the first byte. You get this by\n   *    converting the byte to binary and counting the zeros\n   *    before a 1. Then you add 1 to that. Examples\n   *    00011111 = length 4 because there are 3 zeros before a 1.\n   *    00100000 = length 3 because there are 2 zeros before a 1.\n   *    00000011 = length 7 because there are 6 zeros before a 1.\n   *\n   * 2. The bits used for length are removed from the first byte\n   *    Then all the bytes are merged into a value. NOTE: this\n   *    is not the case for id ebml tags as there id includes\n   *    length bits.\n   *\n   */\n\n  var findEbml = function findEbml(bytes, paths) {\n    paths = normalizePaths(paths);\n    bytes = toUint8(bytes);\n    var results = [];\n    if (!paths.length) {\n      return results;\n    }\n    var i = 0;\n    while (i < bytes.length) {\n      var id = getvint(bytes, i, false);\n      var dataHeader = getvint(bytes, i + id.length);\n      var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n      if (dataHeader.value === 0x7f) {\n        dataHeader.value = getInfinityDataSize(id, bytes, dataStart);\n        if (dataHeader.value !== bytes.length) {\n          dataHeader.value -= dataStart;\n        }\n      }\n      var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n      var data = bytes.subarray(dataStart, dataEnd);\n      if (bytesMatch(paths[0], id.bytes)) {\n        if (paths.length === 1) {\n          // this is the end of the paths and we've found the tag we were\n          // looking for\n          results.push(data);\n        } else {\n          // recursively search for the next tag inside of the data\n          // of this one\n          results = results.concat(findEbml(data, paths.slice(1)));\n        }\n      }\n      var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n      i += totalLength;\n    }\n    return results;\n  }; // see https://www.matroska.org/technical/basics.html#block-structure\n\n  var NAL_TYPE_ONE = toUint8([0x00, 0x00, 0x00, 0x01]);\n  var NAL_TYPE_TWO = toUint8([0x00, 0x00, 0x01]);\n  var EMULATION_PREVENTION = toUint8([0x00, 0x00, 0x03]);\n  /**\n   * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n   * Sequence Payload\"\n   *\n   * @param data {Uint8Array} the bytes of a RBSP from a NAL\n   * unit\n   * @return {Uint8Array} the RBSP without any Emulation\n   * Prevention Bytes\n   */\n\n  var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n    var positions = [];\n    var i = 1; // Find all `Emulation Prevention Bytes`\n\n    while (i < bytes.length - 2) {\n      if (bytesMatch(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n        positions.push(i + 2);\n        i++;\n      }\n      i++;\n    } // If no Emulation Prevention Bytes were found just return the original\n    // array\n\n    if (positions.length === 0) {\n      return bytes;\n    } // Create a new array to hold the NAL unit data\n\n    var newLength = bytes.length - positions.length;\n    var newData = new Uint8Array(newLength);\n    var sourceIndex = 0;\n    for (i = 0; i < newLength; sourceIndex++, i++) {\n      if (sourceIndex === positions[0]) {\n        // Skip this byte\n        sourceIndex++; // Remove this position index\n\n        positions.shift();\n      }\n      newData[i] = bytes[sourceIndex];\n    }\n    return newData;\n  };\n  var findNal = function findNal(bytes, dataType, types, nalLimit) {\n    if (nalLimit === void 0) {\n      nalLimit = Infinity;\n    }\n    bytes = toUint8(bytes);\n    types = [].concat(types);\n    var i = 0;\n    var nalStart;\n    var nalsFound = 0; // keep searching until:\n    // we reach the end of bytes\n    // we reach the maximum number of nals they want to seach\n    // NOTE: that we disregard nalLimit when we have found the start\n    // of the nal we want so that we can find the end of the nal we want.\n\n    while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n      var nalOffset = void 0;\n      if (bytesMatch(bytes.subarray(i), NAL_TYPE_ONE)) {\n        nalOffset = 4;\n      } else if (bytesMatch(bytes.subarray(i), NAL_TYPE_TWO)) {\n        nalOffset = 3;\n      } // we are unsynced,\n      // find the next nal unit\n\n      if (!nalOffset) {\n        i++;\n        continue;\n      }\n      nalsFound++;\n      if (nalStart) {\n        return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n      }\n      var nalType = void 0;\n      if (dataType === 'h264') {\n        nalType = bytes[i + nalOffset] & 0x1f;\n      } else if (dataType === 'h265') {\n        nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n      }\n      if (types.indexOf(nalType) !== -1) {\n        nalStart = i + nalOffset;\n      } // nal header is 1 length for h264, and 2 for h265\n\n      i += nalOffset + (dataType === 'h264' ? 1 : 2);\n    }\n    return bytes.subarray(0, 0);\n  };\n  var findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n    return findNal(bytes, 'h264', type, nalLimit);\n  };\n  var findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n    return findNal(bytes, 'h265', type, nalLimit);\n  };\n\n  var CONSTANTS = {\n    // \"webm\" string literal in hex\n    'webm': toUint8([0x77, 0x65, 0x62, 0x6d]),\n    // \"matroska\" string literal in hex\n    'matroska': toUint8([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n    // \"fLaC\" string literal in hex\n    'flac': toUint8([0x66, 0x4c, 0x61, 0x43]),\n    // \"OggS\" string literal in hex\n    'ogg': toUint8([0x4f, 0x67, 0x67, 0x53]),\n    // ac-3 sync byte, also works for ec-3 as that is simply a codec\n    // of ac-3\n    'ac3': toUint8([0x0b, 0x77]),\n    // \"RIFF\" string literal in hex used for wav and avi\n    'riff': toUint8([0x52, 0x49, 0x46, 0x46]),\n    // \"AVI\" string literal in hex\n    'avi': toUint8([0x41, 0x56, 0x49]),\n    // \"WAVE\" string literal in hex\n    'wav': toUint8([0x57, 0x41, 0x56, 0x45]),\n    // \"ftyp3g\" string literal in hex\n    '3gp': toUint8([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n    // \"ftyp\" string literal in hex\n    'mp4': toUint8([0x66, 0x74, 0x79, 0x70]),\n    // \"styp\" string literal in hex\n    'fmp4': toUint8([0x73, 0x74, 0x79, 0x70]),\n    // \"ftypqt\" string literal in hex\n    'mov': toUint8([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n    // moov string literal in hex\n    'moov': toUint8([0x6D, 0x6F, 0x6F, 0x76]),\n    // moof string literal in hex\n    'moof': toUint8([0x6D, 0x6F, 0x6F, 0x66])\n  };\n  var _isLikely = {\n    aac: function aac(bytes) {\n      var offset = getId3Offset(bytes);\n      return bytesMatch(bytes, [0xFF, 0x10], {\n        offset: offset,\n        mask: [0xFF, 0x16]\n      });\n    },\n    mp3: function mp3(bytes) {\n      var offset = getId3Offset(bytes);\n      return bytesMatch(bytes, [0xFF, 0x02], {\n        offset: offset,\n        mask: [0xFF, 0x06]\n      });\n    },\n    webm: function webm(bytes) {\n      var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n      return bytesMatch(docType, CONSTANTS.webm);\n    },\n    mkv: function mkv(bytes) {\n      var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n      return bytesMatch(docType, CONSTANTS.matroska);\n    },\n    mp4: function mp4(bytes) {\n      // if this file is another base media file format, it is not mp4\n      if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n        return false;\n      } // if this file starts with a ftyp or styp box its mp4\n\n      if (bytesMatch(bytes, CONSTANTS.mp4, {\n        offset: 4\n      }) || bytesMatch(bytes, CONSTANTS.fmp4, {\n        offset: 4\n      })) {\n        return true;\n      } // if this file starts with a moof/moov box its mp4\n\n      if (bytesMatch(bytes, CONSTANTS.moof, {\n        offset: 4\n      }) || bytesMatch(bytes, CONSTANTS.moov, {\n        offset: 4\n      })) {\n        return true;\n      }\n    },\n    mov: function mov(bytes) {\n      return bytesMatch(bytes, CONSTANTS.mov, {\n        offset: 4\n      });\n    },\n    '3gp': function gp(bytes) {\n      return bytesMatch(bytes, CONSTANTS['3gp'], {\n        offset: 4\n      });\n    },\n    ac3: function ac3(bytes) {\n      var offset = getId3Offset(bytes);\n      return bytesMatch(bytes, CONSTANTS.ac3, {\n        offset: offset\n      });\n    },\n    ts: function ts(bytes) {\n      if (bytes.length < 189 && bytes.length >= 1) {\n        return bytes[0] === 0x47;\n      }\n      var i = 0; // check the first 376 bytes for two matching sync bytes\n\n      while (i + 188 < bytes.length && i < 188) {\n        if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n          return true;\n        }\n        i += 1;\n      }\n      return false;\n    },\n    flac: function flac(bytes) {\n      var offset = getId3Offset(bytes);\n      return bytesMatch(bytes, CONSTANTS.flac, {\n        offset: offset\n      });\n    },\n    ogg: function ogg(bytes) {\n      return bytesMatch(bytes, CONSTANTS.ogg);\n    },\n    avi: function avi(bytes) {\n      return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.avi, {\n        offset: 8\n      });\n    },\n    wav: function wav(bytes) {\n      return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.wav, {\n        offset: 8\n      });\n    },\n    'h264': function h264(bytes) {\n      // find seq_parameter_set_rbsp\n      return findH264Nal(bytes, 7, 3).length;\n    },\n    'h265': function h265(bytes) {\n      // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n      return findH265Nal(bytes, [32, 33], 3).length;\n    }\n  }; // get all the isLikely functions\n  // but make sure 'ts' is above h264 and h265\n  // but below everything else as it is the least specific\n\n  var isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n  .filter(function (t) {\n    return t !== 'ts' && t !== 'h264' && t !== 'h265';\n  }) // add it back to the bottom\n  .concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\n  isLikelyTypes.forEach(function (type) {\n    var isLikelyFn = _isLikely[type];\n    _isLikely[type] = function (bytes) {\n      return isLikelyFn(toUint8(bytes));\n    };\n  }); // export after wrapping\n\n  var isLikely = _isLikely; // A useful list of file signatures can be found here\n  // https://en.wikipedia.org/wiki/List_of_file_signatures\n\n  var detectContainerForBytes = function detectContainerForBytes(bytes) {\n    bytes = toUint8(bytes);\n    for (var i = 0; i < isLikelyTypes.length; i++) {\n      var type = isLikelyTypes[i];\n      if (isLikely[type](bytes)) {\n        return type;\n      }\n    }\n    return '';\n  }; // fmp4 is not a container\n\n  var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n    return findBox(bytes, ['moof']).length > 0;\n  };\n\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n  var ONE_SECOND_IN_TS = 90000,\n    // 90kHz clock\n    secondsToVideoTs,\n    secondsToAudioTs,\n    videoTsToSeconds,\n    audioTsToSeconds,\n    audioTsToVideoTs,\n    videoTsToAudioTs,\n    metadataTsToSeconds;\n  secondsToVideoTs = function (seconds) {\n    return seconds * ONE_SECOND_IN_TS;\n  };\n  secondsToAudioTs = function (seconds, sampleRate) {\n    return seconds * sampleRate;\n  };\n  videoTsToSeconds = function (timestamp) {\n    return timestamp / ONE_SECOND_IN_TS;\n  };\n  audioTsToSeconds = function (timestamp, sampleRate) {\n    return timestamp / sampleRate;\n  };\n  audioTsToVideoTs = function (timestamp, sampleRate) {\n    return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n  };\n  videoTsToAudioTs = function (timestamp, sampleRate) {\n    return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n  };\n\n  /**\n   * Adjust ID3 tag or caption timing information by the timeline pts values\n   * (if keepOriginalTimestamps is false) and convert to seconds\n   */\n  metadataTsToSeconds = function (timestamp, timelineStartPts, keepOriginalTimestamps) {\n    return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n  };\n  var clock = {\n    ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\n    secondsToVideoTs: secondsToVideoTs,\n    secondsToAudioTs: secondsToAudioTs,\n    videoTsToSeconds: videoTsToSeconds,\n    audioTsToSeconds: audioTsToSeconds,\n    audioTsToVideoTs: audioTsToVideoTs,\n    videoTsToAudioTs: videoTsToAudioTs,\n    metadataTsToSeconds: metadataTsToSeconds\n  };\n  var clock_1 = clock.ONE_SECOND_IN_TS;\n\n  /*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\n\n  /**\n   * @file resolve-url.js - Handling how URLs are resolved and manipulated\n   */\n  const resolveUrl = resolveUrl$1;\n  /**\n   * If the xhr request was redirected, return the responseURL, otherwise,\n   * return the original url.\n   *\n   * @api private\n   *\n   * @param  {string} url - an url being requested\n   * @param  {XMLHttpRequest} req - xhr request result\n   *\n   * @return {string}\n   */\n\n  const resolveManifestRedirect = (url, req) => {\n    // To understand how the responseURL below is set and generated:\n    // - https://fetch.spec.whatwg.org/#concept-response-url\n    // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\n    if (req && req.responseURL && url !== req.responseURL) {\n      return req.responseURL;\n    }\n    return url;\n  };\n  const logger = source => {\n    if (videojs.log.debug) {\n      return videojs.log.debug.bind(videojs, 'VHS:', `${source} >`);\n    }\n    return function () {};\n  };\n\n  /**\n   * Provides a compatibility layer between Video.js 7 and 8 API changes for VHS.\n   */\n  /**\n   * Delegates to videojs.obj.merge (Video.js 8) or\n   * videojs.mergeOptions (Video.js 7).\n   */\n\n  function merge(...args) {\n    const context = videojs.obj || videojs;\n    const fn = context.merge || context.mergeOptions;\n    return fn.apply(context, args);\n  }\n  /**\n   * Delegates to videojs.time.createTimeRanges (Video.js 8) or\n   * videojs.createTimeRanges (Video.js 7).\n   */\n\n  function createTimeRanges(...args) {\n    const context = videojs.time || videojs;\n    const fn = context.createTimeRanges || context.createTimeRanges;\n    return fn.apply(context, args);\n  }\n  /**\n   * Converts provided buffered ranges to a descriptive string\n   *\n   * @param {TimeRanges} buffered - received buffered time ranges\n   *\n   * @return {string} - descriptive string\n   */\n\n  function bufferedRangesToString(buffered) {\n    if (buffered.length === 0) {\n      return 'Buffered Ranges are empty';\n    }\n    let bufferedRangesStr = 'Buffered Ranges: \\n';\n    for (let i = 0; i < buffered.length; i++) {\n      const start = buffered.start(i);\n      const end = buffered.end(i);\n      bufferedRangesStr += `${start} --> ${end}. Duration (${end - start})\\n`;\n    }\n    return bufferedRangesStr;\n  }\n\n  /**\n   * ranges\n   *\n   * Utilities for working with TimeRanges.\n   *\n   */\n\n  const TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\n  // can be misleading because of precision differences or when the current media has poorly\n  // aligned audio and video, which can cause values to be slightly off from what you would\n  // expect. This value is what we consider to be safe to use in such comparisons to account\n  // for these scenarios.\n\n  const SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\n  const filterRanges = function (timeRanges, predicate) {\n    const results = [];\n    let i;\n    if (timeRanges && timeRanges.length) {\n      // Search for ranges that match the predicate\n      for (i = 0; i < timeRanges.length; i++) {\n        if (predicate(timeRanges.start(i), timeRanges.end(i))) {\n          results.push([timeRanges.start(i), timeRanges.end(i)]);\n        }\n      }\n    }\n    return createTimeRanges(results);\n  };\n  /**\n   * Attempts to find the buffered TimeRange that contains the specified\n   * time.\n   *\n   * @param {TimeRanges} buffered - the TimeRanges object to query\n   * @param {number} time  - the time to filter on.\n   * @return {TimeRanges} a new TimeRanges object\n   */\n\n  const findRange = function (buffered, time) {\n    return filterRanges(buffered, function (start, end) {\n      return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\n    });\n  };\n  /**\n   * Returns the TimeRanges that begin later than the specified time.\n   *\n   * @param {TimeRanges} timeRanges - the TimeRanges object to query\n   * @param {number} time - the time to filter on.\n   * @return {TimeRanges} a new TimeRanges object.\n   */\n\n  const findNextRange = function (timeRanges, time) {\n    return filterRanges(timeRanges, function (start) {\n      return start - TIME_FUDGE_FACTOR >= time;\n    });\n  };\n  /**\n   * Returns gaps within a list of TimeRanges\n   *\n   * @param {TimeRanges} buffered - the TimeRanges object\n   * @return {TimeRanges} a TimeRanges object of gaps\n   */\n\n  const findGaps = function (buffered) {\n    if (buffered.length < 2) {\n      return createTimeRanges();\n    }\n    const ranges = [];\n    for (let i = 1; i < buffered.length; i++) {\n      const start = buffered.end(i - 1);\n      const end = buffered.start(i);\n      ranges.push([start, end]);\n    }\n    return createTimeRanges(ranges);\n  };\n  /**\n   * Calculate the intersection of two TimeRanges\n   *\n   * @param {TimeRanges} bufferA\n   * @param {TimeRanges} bufferB\n   * @return {TimeRanges} The interesection of `bufferA` with `bufferB`\n   */\n\n  const bufferIntersection = function (bufferA, bufferB) {\n    let start = null;\n    let end = null;\n    let arity = 0;\n    const extents = [];\n    const ranges = [];\n    if (!bufferA || !bufferA.length || !bufferB || !bufferB.length) {\n      return createTimeRanges();\n    } // Handle the case where we have both buffers and create an\n    // intersection of the two\n\n    let count = bufferA.length; // A) Gather up all start and end times\n\n    while (count--) {\n      extents.push({\n        time: bufferA.start(count),\n        type: 'start'\n      });\n      extents.push({\n        time: bufferA.end(count),\n        type: 'end'\n      });\n    }\n    count = bufferB.length;\n    while (count--) {\n      extents.push({\n        time: bufferB.start(count),\n        type: 'start'\n      });\n      extents.push({\n        time: bufferB.end(count),\n        type: 'end'\n      });\n    } // B) Sort them by time\n\n    extents.sort(function (a, b) {\n      return a.time - b.time;\n    }); // C) Go along one by one incrementing arity for start and decrementing\n    //    arity for ends\n\n    for (count = 0; count < extents.length; count++) {\n      if (extents[count].type === 'start') {\n        arity++; // D) If arity is ever incremented to 2 we are entering an\n        //    overlapping range\n\n        if (arity === 2) {\n          start = extents[count].time;\n        }\n      } else if (extents[count].type === 'end') {\n        arity--; // E) If arity is ever decremented to 1 we leaving an\n        //    overlapping range\n\n        if (arity === 1) {\n          end = extents[count].time;\n        }\n      } // F) Record overlapping ranges\n\n      if (start !== null && end !== null) {\n        ranges.push([start, end]);\n        start = null;\n        end = null;\n      }\n    }\n    return createTimeRanges(ranges);\n  };\n  /**\n   * Gets a human readable string for a TimeRange\n   *\n   * @param {TimeRange} range\n   * @return {string} a human readable string\n   */\n\n  const printableRange = range => {\n    const strArr = [];\n    if (!range || !range.length) {\n      return '';\n    }\n    for (let i = 0; i < range.length; i++) {\n      strArr.push(range.start(i) + ' => ' + range.end(i));\n    }\n    return strArr.join(', ');\n  };\n  /**\n   * Calculates the amount of time left in seconds until the player hits the end of the\n   * buffer and causes a rebuffer\n   *\n   * @param {TimeRange} buffered\n   *        The state of the buffer\n   * @param {Numnber} currentTime\n   *        The current time of the player\n   * @param {number} playbackRate\n   *        The current playback rate of the player. Defaults to 1.\n   * @return {number}\n   *         Time until the player has to start rebuffering in seconds.\n   * @function timeUntilRebuffer\n   */\n\n  const timeUntilRebuffer = function (buffered, currentTime, playbackRate = 1) {\n    const bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\n    return (bufferedEnd - currentTime) / playbackRate;\n  };\n  /**\n   * Converts a TimeRanges object into an array representation\n   *\n   * @param {TimeRanges} timeRanges\n   * @return {Array}\n   */\n\n  const timeRangesToArray = timeRanges => {\n    const timeRangesList = [];\n    for (let i = 0; i < timeRanges.length; i++) {\n      timeRangesList.push({\n        start: timeRanges.start(i),\n        end: timeRanges.end(i)\n      });\n    }\n    return timeRangesList;\n  };\n  /**\n   * Determines if two time range objects are different.\n   *\n   * @param {TimeRange} a\n   *        the first time range object to check\n   *\n   * @param {TimeRange} b\n   *        the second time range object to check\n   *\n   * @return {Boolean}\n   *         Whether the time range objects differ\n   */\n\n  const isRangeDifferent = function (a, b) {\n    // same object\n    if (a === b) {\n      return false;\n    } // one or the other is undefined\n\n    if (!a && b || !b && a) {\n      return true;\n    } // length is different\n\n    if (a.length !== b.length) {\n      return true;\n    } // see if any start/end pair is different\n\n    for (let i = 0; i < a.length; i++) {\n      if (a.start(i) !== b.start(i) || a.end(i) !== b.end(i)) {\n        return true;\n      }\n    } // if the length and every pair is the same\n    // this is the same time range\n\n    return false;\n  };\n  const lastBufferedEnd = function (a) {\n    if (!a || !a.length || !a.end) {\n      return;\n    }\n    return a.end(a.length - 1);\n  };\n  /**\n   * A utility function to add up the amount of time in a timeRange\n   * after a specified startTime.\n   * ie:[[0, 10], [20, 40], [50, 60]] with a startTime 0\n   *     would return 40 as there are 40s seconds after 0 in the timeRange\n   *\n   * @param {TimeRange} range\n   *        The range to check against\n   * @param {number} startTime\n   *        The time in the time range that you should start counting from\n   *\n   * @return {number}\n   *          The number of seconds in the buffer passed the specified time.\n   */\n\n  const timeAheadOf = function (range, startTime) {\n    let time = 0;\n    if (!range || !range.length) {\n      return time;\n    }\n    for (let i = 0; i < range.length; i++) {\n      const start = range.start(i);\n      const end = range.end(i); // startTime is after this range entirely\n\n      if (startTime > end) {\n        continue;\n      } // startTime is within this range\n\n      if (startTime > start && startTime <= end) {\n        time += end - startTime;\n        continue;\n      } // startTime is before this range.\n\n      time += end - start;\n    }\n    return time;\n  };\n\n  /**\n   * @file playlist.js\n   *\n   * Playlist related utilities.\n   */\n  /**\n   * Get the duration of a segment, with special cases for\n   * llhls segments that do not have a duration yet.\n   *\n   * @param {Object} playlist\n   *        the playlist that the segment belongs to.\n   * @param {Object} segment\n   *        the segment to get a duration for.\n   *\n   * @return {number}\n   *          the segment duration\n   */\n\n  const segmentDurationWithParts = (playlist, segment) => {\n    // if this isn't a preload segment\n    // then we will have a segment duration that is accurate.\n    if (!segment.preload) {\n      return segment.duration;\n    } // otherwise we have to add up parts and preload hints\n    // to get an up to date duration.\n\n    let result = 0;\n    (segment.parts || []).forEach(function (p) {\n      result += p.duration;\n    }); // for preload hints we have to use partTargetDuration\n    // as they won't even have a duration yet.\n\n    (segment.preloadHints || []).forEach(function (p) {\n      if (p.type === 'PART') {\n        result += playlist.partTargetDuration;\n      }\n    });\n    return result;\n  };\n  /**\n   * A function to get a combined list of parts and segments with durations\n   * and indexes.\n   *\n   * @param {Playlist} playlist the playlist to get the list for.\n   *\n   * @return {Array} The part/segment list.\n   */\n\n  const getPartsAndSegments = playlist => (playlist.segments || []).reduce((acc, segment, si) => {\n    if (segment.parts) {\n      segment.parts.forEach(function (part, pi) {\n        acc.push({\n          duration: part.duration,\n          segmentIndex: si,\n          partIndex: pi,\n          part,\n          segment\n        });\n      });\n    } else {\n      acc.push({\n        duration: segment.duration,\n        segmentIndex: si,\n        partIndex: null,\n        segment,\n        part: null\n      });\n    }\n    return acc;\n  }, []);\n  const getLastParts = media => {\n    const lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n    return lastSegment && lastSegment.parts || [];\n  };\n  const getKnownPartCount = ({\n    preloadSegment\n  }) => {\n    if (!preloadSegment) {\n      return;\n    }\n    const {\n      parts,\n      preloadHints\n    } = preloadSegment;\n    let partCount = (preloadHints || []).reduce((count, hint) => count + (hint.type === 'PART' ? 1 : 0), 0);\n    partCount += parts && parts.length ? parts.length : 0;\n    return partCount;\n  };\n  /**\n   * Get the number of seconds to delay from the end of a\n   * live playlist.\n   *\n   * @param {Playlist} main the main playlist\n   * @param {Playlist} media the media playlist\n   * @return {number} the hold back in seconds.\n   */\n\n  const liveEdgeDelay = (main, media) => {\n    if (media.endList) {\n      return 0;\n    } // dash suggestedPresentationDelay trumps everything\n\n    if (main && main.suggestedPresentationDelay) {\n      return main.suggestedPresentationDelay;\n    }\n    const hasParts = getLastParts(media).length > 0; // look for \"part\" delays from ll-hls first\n\n    if (hasParts && media.serverControl && media.serverControl.partHoldBack) {\n      return media.serverControl.partHoldBack;\n    } else if (hasParts && media.partTargetDuration) {\n      return media.partTargetDuration * 3; // finally look for full segment delays\n    } else if (media.serverControl && media.serverControl.holdBack) {\n      return media.serverControl.holdBack;\n    } else if (media.targetDuration) {\n      return media.targetDuration * 3;\n    }\n    return 0;\n  };\n  /**\n   * walk backward until we find a duration we can use\n   * or return a failure\n   *\n   * @param {Playlist} playlist the playlist to walk through\n   * @param {Number} endSequence the mediaSequence to stop walking on\n   */\n\n  const backwardDuration = function (playlist, endSequence) {\n    let result = 0;\n    let i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n    // the interval, use it\n\n    let segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\n    // information that is earlier than endSequence\n\n    if (segment) {\n      if (typeof segment.start !== 'undefined') {\n        return {\n          result: segment.start,\n          precise: true\n        };\n      }\n      if (typeof segment.end !== 'undefined') {\n        return {\n          result: segment.end - segment.duration,\n          precise: true\n        };\n      }\n    }\n    while (i--) {\n      segment = playlist.segments[i];\n      if (typeof segment.end !== 'undefined') {\n        return {\n          result: result + segment.end,\n          precise: true\n        };\n      }\n      result += segmentDurationWithParts(playlist, segment);\n      if (typeof segment.start !== 'undefined') {\n        return {\n          result: result + segment.start,\n          precise: true\n        };\n      }\n    }\n    return {\n      result,\n      precise: false\n    };\n  };\n  /**\n   * walk forward until we find a duration we can use\n   * or return a failure\n   *\n   * @param {Playlist} playlist the playlist to walk through\n   * @param {number} endSequence the mediaSequence to stop walking on\n   */\n\n  const forwardDuration = function (playlist, endSequence) {\n    let result = 0;\n    let segment;\n    let i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\n    // information\n\n    for (; i < playlist.segments.length; i++) {\n      segment = playlist.segments[i];\n      if (typeof segment.start !== 'undefined') {\n        return {\n          result: segment.start - result,\n          precise: true\n        };\n      }\n      result += segmentDurationWithParts(playlist, segment);\n      if (typeof segment.end !== 'undefined') {\n        return {\n          result: segment.end - result,\n          precise: true\n        };\n      }\n    } // indicate we didn't find a useful duration estimate\n\n    return {\n      result: -1,\n      precise: false\n    };\n  };\n  /**\n    * Calculate the media duration from the segments associated with a\n    * playlist. The duration of a subinterval of the available segments\n    * may be calculated by specifying an end index.\n    *\n    * @param {Object} playlist a media playlist object\n    * @param {number=} endSequence an exclusive upper boundary\n    * for the playlist.  Defaults to playlist length.\n    * @param {number} expired the amount of time that has dropped\n    * off the front of the playlist in a live scenario\n    * @return {number} the duration between the first available segment\n    * and end index.\n    */\n\n  const intervalDuration = function (playlist, endSequence, expired) {\n    if (typeof endSequence === 'undefined') {\n      endSequence = playlist.mediaSequence + playlist.segments.length;\n    }\n    if (endSequence < playlist.mediaSequence) {\n      return 0;\n    } // do a backward walk to estimate the duration\n\n    const backward = backwardDuration(playlist, endSequence);\n    if (backward.precise) {\n      // if we were able to base our duration estimate on timing\n      // information provided directly from the Media Source, return\n      // it\n      return backward.result;\n    } // walk forward to see if a precise duration estimate can be made\n    // that way\n\n    const forward = forwardDuration(playlist, endSequence);\n    if (forward.precise) {\n      // we found a segment that has been buffered and so it's\n      // position is known precisely\n      return forward.result;\n    } // return the less-precise, playlist-based duration estimate\n\n    return backward.result + expired;\n  };\n  /**\n    * Calculates the duration of a playlist. If a start and end index\n    * are specified, the duration will be for the subset of the media\n    * timeline between those two indices. The total duration for live\n    * playlists is always Infinity.\n    *\n    * @param {Object} playlist a media playlist object\n    * @param {number=} endSequence an exclusive upper\n    * boundary for the playlist. Defaults to the playlist media\n    * sequence number plus its length.\n    * @param {number=} expired the amount of time that has\n    * dropped off the front of the playlist in a live scenario\n    * @return {number} the duration between the start index and end\n    * index.\n    */\n\n  const duration = function (playlist, endSequence, expired) {\n    if (!playlist) {\n      return 0;\n    }\n    if (typeof expired !== 'number') {\n      expired = 0;\n    } // if a slice of the total duration is not requested, use\n    // playlist-level duration indicators when they're present\n\n    if (typeof endSequence === 'undefined') {\n      // if present, use the duration specified in the playlist\n      if (playlist.totalDuration) {\n        return playlist.totalDuration;\n      } // duration should be Infinity for live playlists\n\n      if (!playlist.endList) {\n        return window.Infinity;\n      }\n    } // calculate the total duration based on the segment durations\n\n    return intervalDuration(playlist, endSequence, expired);\n  };\n  /**\n    * Calculate the time between two indexes in the current playlist\n    * neight the start- nor the end-index need to be within the current\n    * playlist in which case, the targetDuration of the playlist is used\n    * to approximate the durations of the segments\n    *\n    * @param {Array} options.durationList list to iterate over for durations.\n    * @param {number} options.defaultDuration duration to use for elements before or after the durationList\n    * @param {number} options.startIndex partsAndSegments index to start\n    * @param {number} options.endIndex partsAndSegments index to end.\n    * @return {number} the number of seconds between startIndex and endIndex\n    */\n\n  const sumDurations = function ({\n    defaultDuration,\n    durationList,\n    startIndex,\n    endIndex\n  }) {\n    let durations = 0;\n    if (startIndex > endIndex) {\n      [startIndex, endIndex] = [endIndex, startIndex];\n    }\n    if (startIndex < 0) {\n      for (let i = startIndex; i < Math.min(0, endIndex); i++) {\n        durations += defaultDuration;\n      }\n      startIndex = 0;\n    }\n    for (let i = startIndex; i < endIndex; i++) {\n      durations += durationList[i].duration;\n    }\n    return durations;\n  };\n  /**\n   * Calculates the playlist end time\n   *\n   * @param {Object} playlist a media playlist object\n   * @param {number=} expired the amount of time that has\n   *                  dropped off the front of the playlist in a live scenario\n   * @param {boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\n   *                        playlist end calculation should consider the safe live end\n   *                        (truncate the playlist end by three segments). This is normally\n   *                        used for calculating the end of the playlist's seekable range.\n   *                        This takes into account the value of liveEdgePadding.\n   *                        Setting liveEdgePadding to 0 is equivalent to setting this to false.\n   * @param {number} liveEdgePadding a number indicating how far from the end of the playlist we should be in seconds.\n   *                 If this is provided, it is used in the safe live end calculation.\n   *                 Setting useSafeLiveEnd=false or liveEdgePadding=0 are equivalent.\n   *                 Corresponds to suggestedPresentationDelay in DASH manifests.\n   * @return {number} the end time of playlist\n   * @function playlistEnd\n   */\n\n  const playlistEnd = function (playlist, expired, useSafeLiveEnd, liveEdgePadding) {\n    if (!playlist || !playlist.segments) {\n      return null;\n    }\n    if (playlist.endList) {\n      return duration(playlist);\n    }\n    if (expired === null) {\n      return null;\n    }\n    expired = expired || 0;\n    let lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);\n    if (useSafeLiveEnd) {\n      liveEdgePadding = typeof liveEdgePadding === 'number' ? liveEdgePadding : liveEdgeDelay(null, playlist);\n      lastSegmentEndTime -= liveEdgePadding;\n    } // don't return a time less than zero\n\n    return Math.max(0, lastSegmentEndTime);\n  };\n  /**\n    * Calculates the interval of time that is currently seekable in a\n    * playlist. The returned time ranges are relative to the earliest\n    * moment in the specified playlist that is still available. A full\n    * seekable implementation for live streams would need to offset\n    * these values by the duration of content that has expired from the\n    * stream.\n    *\n    * @param {Object} playlist a media playlist object\n    * dropped off the front of the playlist in a live scenario\n    * @param {number=} expired the amount of time that has\n    * dropped off the front of the playlist in a live scenario\n    * @param {number} liveEdgePadding how far from the end of the playlist we should be in seconds.\n    *        Corresponds to suggestedPresentationDelay in DASH manifests.\n    * @return {TimeRanges} the periods of time that are valid targets\n    * for seeking\n    */\n\n  const seekable = function (playlist, expired, liveEdgePadding) {\n    const useSafeLiveEnd = true;\n    const seekableStart = expired || 0;\n    let seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\n    if (seekableEnd === null) {\n      return createTimeRanges();\n    } // Clamp seekable end since it can not be less than the seekable start\n\n    if (seekableEnd < seekableStart) {\n      seekableEnd = seekableStart;\n    }\n    return createTimeRanges(seekableStart, seekableEnd);\n  };\n  /**\n   * Determine the index and estimated starting time of the segment that\n   * contains a specified playback position in a media playlist.\n   *\n   * @param {Object} options.playlist the media playlist to query\n   * @param {number} options.currentTime The number of seconds since the earliest\n   * possible position to determine the containing segment for\n   * @param {number} options.startTime the time when the segment/part starts\n   * @param {number} options.startingSegmentIndex the segment index to start looking at.\n   * @param {number?} [options.startingPartIndex] the part index to look at within the segment.\n   *\n   * @return {Object} an object with partIndex, segmentIndex, and startTime.\n   */\n\n  const getMediaInfoForTime = function ({\n    playlist,\n    currentTime,\n    startingSegmentIndex,\n    startingPartIndex,\n    startTime,\n    exactManifestTimings\n  }) {\n    let time = currentTime - startTime;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    let startIndex = 0;\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      const partAndSegment = partsAndSegments[i];\n      if (startingSegmentIndex !== partAndSegment.segmentIndex) {\n        continue;\n      } // skip this if part index does not match.\n\n      if (typeof startingPartIndex === 'number' && typeof partAndSegment.partIndex === 'number' && startingPartIndex !== partAndSegment.partIndex) {\n        continue;\n      }\n      startIndex = i;\n      break;\n    }\n    if (time < 0) {\n      // Walk backward from startIndex in the playlist, adding durations\n      // until we find a segment that contains `time` and return it\n      if (startIndex > 0) {\n        for (let i = startIndex - 1; i >= 0; i--) {\n          const partAndSegment = partsAndSegments[i];\n          time += partAndSegment.duration;\n          if (exactManifestTimings) {\n            if (time < 0) {\n              continue;\n            }\n          } else if (time + TIME_FUDGE_FACTOR <= 0) {\n            continue;\n          }\n          return {\n            partIndex: partAndSegment.partIndex,\n            segmentIndex: partAndSegment.segmentIndex,\n            startTime: startTime - sumDurations({\n              defaultDuration: playlist.targetDuration,\n              durationList: partsAndSegments,\n              startIndex,\n              endIndex: i\n            })\n          };\n        }\n      } // We were unable to find a good segment within the playlist\n      // so select the first segment\n\n      return {\n        partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n        segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n        startTime: currentTime\n      };\n    } // When startIndex is negative, we first walk forward to first segment\n    // adding target durations. If we \"run out of time\" before getting to\n    // the first segment, return the first segment\n\n    if (startIndex < 0) {\n      for (let i = startIndex; i < 0; i++) {\n        time -= playlist.targetDuration;\n        if (time < 0) {\n          return {\n            partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n            segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n            startTime: currentTime\n          };\n        }\n      }\n      startIndex = 0;\n    } // Walk forward from startIndex in the playlist, subtracting durations\n    // until we find a segment that contains `time` and return it\n\n    for (let i = startIndex; i < partsAndSegments.length; i++) {\n      const partAndSegment = partsAndSegments[i];\n      time -= partAndSegment.duration;\n      const canUseFudgeFactor = partAndSegment.duration > TIME_FUDGE_FACTOR;\n      const isExactlyAtTheEnd = time === 0;\n      const isExtremelyCloseToTheEnd = canUseFudgeFactor && time + TIME_FUDGE_FACTOR >= 0;\n      if (isExactlyAtTheEnd || isExtremelyCloseToTheEnd) {\n        // 1) We are exactly at the end of the current segment.\n        // 2) We are extremely close to the end of the current segment (The difference is less than  1 / 30).\n        //    We may encounter this situation when\n        //    we don't have exact match between segment duration info in the manifest and the actual duration of the segment\n        //    For example:\n        //    We appended 3 segments 10 seconds each, meaning we should have 30 sec buffered,\n        //    but we the actual buffered is 29.99999\n        //\n        // In both cases:\n        // if we passed current time -> it means that we already played current segment\n        // if we passed buffered.end -> it means that this segment is already loaded and buffered\n        // we should select the next segment if we have one:\n        if (i !== partsAndSegments.length - 1) {\n          continue;\n        }\n      }\n      if (exactManifestTimings) {\n        if (time > 0) {\n          continue;\n        }\n      } else if (time - TIME_FUDGE_FACTOR >= 0) {\n        continue;\n      }\n      return {\n        partIndex: partAndSegment.partIndex,\n        segmentIndex: partAndSegment.segmentIndex,\n        startTime: startTime + sumDurations({\n          defaultDuration: playlist.targetDuration,\n          durationList: partsAndSegments,\n          startIndex,\n          endIndex: i\n        })\n      };\n    } // We are out of possible candidates so load the last one...\n\n    return {\n      segmentIndex: partsAndSegments[partsAndSegments.length - 1].segmentIndex,\n      partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex,\n      startTime: currentTime\n    };\n  };\n  /**\n   * Check whether the playlist is excluded or not.\n   *\n   * @param {Object} playlist the media playlist object\n   * @return {boolean} whether the playlist is excluded or not\n   * @function isExcluded\n   */\n\n  const isExcluded = function (playlist) {\n    return playlist.excludeUntil && playlist.excludeUntil > Date.now();\n  };\n  /**\n   * Check whether the playlist is compatible with current playback configuration or has\n   * been excluded permanently for being incompatible.\n   *\n   * @param {Object} playlist the media playlist object\n   * @return {boolean} whether the playlist is incompatible or not\n   * @function isIncompatible\n   */\n\n  const isIncompatible = function (playlist) {\n    return playlist.excludeUntil && playlist.excludeUntil === Infinity;\n  };\n  /**\n   * Check whether the playlist is enabled or not.\n   *\n   * @param {Object} playlist the media playlist object\n   * @return {boolean} whether the playlist is enabled or not\n   * @function isEnabled\n   */\n\n  const isEnabled = function (playlist) {\n    const excluded = isExcluded(playlist);\n    return !playlist.disabled && !excluded;\n  };\n  /**\n   * Check whether the playlist has been manually disabled through the representations api.\n   *\n   * @param {Object} playlist the media playlist object\n   * @return {boolean} whether the playlist is disabled manually or not\n   * @function isDisabled\n   */\n\n  const isDisabled = function (playlist) {\n    return playlist.disabled;\n  };\n  /**\n   * Returns whether the current playlist is an AES encrypted HLS stream\n   *\n   * @return {boolean} true if it's an AES encrypted HLS stream\n   */\n\n  const isAes = function (media) {\n    for (let i = 0; i < media.segments.length; i++) {\n      if (media.segments[i].key) {\n        return true;\n      }\n    }\n    return false;\n  };\n  /**\n   * Checks if the playlist has a value for the specified attribute\n   *\n   * @param {string} attr\n   *        Attribute to check for\n   * @param {Object} playlist\n   *        The media playlist object\n   * @return {boolean}\n   *         Whether the playlist contains a value for the attribute or not\n   * @function hasAttribute\n   */\n\n  const hasAttribute = function (attr, playlist) {\n    return playlist.attributes && playlist.attributes[attr];\n  };\n  /**\n   * Estimates the time required to complete a segment download from the specified playlist\n   *\n   * @param {number} segmentDuration\n   *        Duration of requested segment\n   * @param {number} bandwidth\n   *        Current measured bandwidth of the player\n   * @param {Object} playlist\n   *        The media playlist object\n   * @param {number=} bytesReceived\n   *        Number of bytes already received for the request. Defaults to 0\n   * @return {number|NaN}\n   *         The estimated time to request the segment. NaN if bandwidth information for\n   *         the given playlist is unavailable\n   * @function estimateSegmentRequestTime\n   */\n\n  const estimateSegmentRequestTime = function (segmentDuration, bandwidth, playlist, bytesReceived = 0) {\n    if (!hasAttribute('BANDWIDTH', playlist)) {\n      return NaN;\n    }\n    const size = segmentDuration * playlist.attributes.BANDWIDTH;\n    return (size - bytesReceived * 8) / bandwidth;\n  };\n  /*\n   * Returns whether the current playlist is the lowest rendition\n   *\n   * @return {Boolean} true if on lowest rendition\n   */\n\n  const isLowestEnabledRendition = (main, media) => {\n    if (main.playlists.length === 1) {\n      return true;\n    }\n    const currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n    return main.playlists.filter(playlist => {\n      if (!isEnabled(playlist)) {\n        return false;\n      }\n      return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n    }).length === 0;\n  };\n  const playlistMatch = (a, b) => {\n    // both playlits are null\n    // or only one playlist is non-null\n    // no match\n    if (!a && !b || !a && b || a && !b) {\n      return false;\n    } // playlist objects are the same, match\n\n    if (a === b) {\n      return true;\n    } // first try to use id as it should be the most\n    // accurate\n\n    if (a.id && b.id && a.id === b.id) {\n      return true;\n    } // next try to use reslovedUri as it should be the\n    // second most accurate.\n\n    if (a.resolvedUri && b.resolvedUri && a.resolvedUri === b.resolvedUri) {\n      return true;\n    } // finally try to use uri as it should be accurate\n    // but might miss a few cases for relative uris\n\n    if (a.uri && b.uri && a.uri === b.uri) {\n      return true;\n    }\n    return false;\n  };\n  const someAudioVariant = function (main, callback) {\n    const AUDIO = main && main.mediaGroups && main.mediaGroups.AUDIO || {};\n    let found = false;\n    for (const groupName in AUDIO) {\n      for (const label in AUDIO[groupName]) {\n        found = callback(AUDIO[groupName][label]);\n        if (found) {\n          break;\n        }\n      }\n      if (found) {\n        break;\n      }\n    }\n    return !!found;\n  };\n  const isAudioOnly = main => {\n    // we are audio only if we have no main playlists but do\n    // have media group playlists.\n    if (!main || !main.playlists || !main.playlists.length) {\n      // without audio variants or playlists this\n      // is not an audio only main.\n      const found = someAudioVariant(main, variant => variant.playlists && variant.playlists.length || variant.uri);\n      return found;\n    } // if every playlist has only an audio codec it is audio only\n\n    for (let i = 0; i < main.playlists.length; i++) {\n      const playlist = main.playlists[i];\n      const CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n      if (CODECS && CODECS.split(',').every(c => isAudioCodec(c))) {\n        continue;\n      } // playlist is in an audio group it is audio only\n\n      const found = someAudioVariant(main, variant => playlistMatch(playlist, variant));\n      if (found) {\n        continue;\n      } // if we make it here this playlist isn't audio and we\n      // are not audio only\n\n      return false;\n    } // if we make it past every playlist without returning, then\n    // this is an audio only playlist.\n\n    return true;\n  }; // exports\n\n  var Playlist = {\n    liveEdgeDelay,\n    duration,\n    seekable,\n    getMediaInfoForTime,\n    isEnabled,\n    isDisabled,\n    isExcluded,\n    isIncompatible,\n    playlistEnd,\n    isAes,\n    hasAttribute,\n    estimateSegmentRequestTime,\n    isLowestEnabledRendition,\n    isAudioOnly,\n    playlistMatch,\n    segmentDurationWithParts\n  };\n  const {\n    log\n  } = videojs;\n  const createPlaylistID = (index, uri) => {\n    return `${index}-${uri}`;\n  }; // default function for creating a group id\n\n  const groupID = (type, group, label) => {\n    return `placeholder-uri-${type}-${group}-${label}`;\n  };\n  /**\n   * Parses a given m3u8 playlist\n   *\n   * @param {Function} [onwarn]\n   *        a function to call when the parser triggers a warning event.\n   * @param {Function} [oninfo]\n   *        a function to call when the parser triggers an info event.\n   * @param {string} manifestString\n   *        The downloaded manifest string\n   * @param {Object[]} [customTagParsers]\n   *        An array of custom tag parsers for the m3u8-parser instance\n   * @param {Object[]} [customTagMappers]\n   *        An array of custom tag mappers for the m3u8-parser instance\n   * @param {boolean} [llhls]\n   *        Whether to keep ll-hls features in the manifest after parsing.\n   * @return {Object}\n   *         The manifest object\n   */\n\n  const parseManifest = ({\n    onwarn,\n    oninfo,\n    manifestString,\n    customTagParsers = [],\n    customTagMappers = [],\n    llhls\n  }) => {\n    const parser = new Parser();\n    if (onwarn) {\n      parser.on('warn', onwarn);\n    }\n    if (oninfo) {\n      parser.on('info', oninfo);\n    }\n    customTagParsers.forEach(customParser => parser.addParser(customParser));\n    customTagMappers.forEach(mapper => parser.addTagMapper(mapper));\n    parser.push(manifestString);\n    parser.end();\n    const manifest = parser.manifest; // remove llhls features from the parsed manifest\n    // if we don't want llhls support.\n\n    if (!llhls) {\n      ['preloadSegment', 'skip', 'serverControl', 'renditionReports', 'partInf', 'partTargetDuration'].forEach(function (k) {\n        if (manifest.hasOwnProperty(k)) {\n          delete manifest[k];\n        }\n      });\n      if (manifest.segments) {\n        manifest.segments.forEach(function (segment) {\n          ['parts', 'preloadHints'].forEach(function (k) {\n            if (segment.hasOwnProperty(k)) {\n              delete segment[k];\n            }\n          });\n        });\n      }\n    }\n    if (!manifest.targetDuration) {\n      let targetDuration = 10;\n      if (manifest.segments && manifest.segments.length) {\n        targetDuration = manifest.segments.reduce((acc, s) => Math.max(acc, s.duration), 0);\n      }\n      if (onwarn) {\n        onwarn({\n          message: `manifest has no targetDuration defaulting to ${targetDuration}`\n        });\n      }\n      manifest.targetDuration = targetDuration;\n    }\n    const parts = getLastParts(manifest);\n    if (parts.length && !manifest.partTargetDuration) {\n      const partTargetDuration = parts.reduce((acc, p) => Math.max(acc, p.duration), 0);\n      if (onwarn) {\n        onwarn({\n          message: `manifest has no partTargetDuration defaulting to ${partTargetDuration}`\n        });\n        log.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.');\n      }\n      manifest.partTargetDuration = partTargetDuration;\n    }\n    return manifest;\n  };\n  /**\n   * Loops through all supported media groups in main and calls the provided\n   * callback for each group\n   *\n   * @param {Object} main\n   *        The parsed main manifest object\n   * @param {Function} callback\n   *        Callback to call for each media group\n   */\n\n  const forEachMediaGroup = (main, callback) => {\n    if (!main.mediaGroups) {\n      return;\n    }\n    ['AUDIO', 'SUBTITLES'].forEach(mediaType => {\n      if (!main.mediaGroups[mediaType]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n          const mediaProperties = main.mediaGroups[mediaType][groupKey][labelKey];\n          callback(mediaProperties, mediaType, groupKey, labelKey);\n        }\n      }\n    });\n  };\n  /**\n   * Adds properties and attributes to the playlist to keep consistent functionality for\n   * playlists throughout VHS.\n   *\n   * @param {Object} config\n   *        Arguments object\n   * @param {Object} config.playlist\n   *        The media playlist\n   * @param {string} [config.uri]\n   *        The uri to the media playlist (if media playlist is not from within a main\n   *        playlist)\n   * @param {string} id\n   *        ID to use for the playlist\n   */\n\n  const setupMediaPlaylist = ({\n    playlist,\n    uri,\n    id\n  }) => {\n    playlist.id = id;\n    playlist.playlistErrors_ = 0;\n    if (uri) {\n      // For media playlists, m3u8-parser does not have access to a URI, as HLS media\n      // playlists do not contain their own source URI, but one is needed for consistency in\n      // VHS.\n      playlist.uri = uri;\n    } // For HLS main playlists, even though certain attributes MUST be defined, the\n    // stream may still be played without them.\n    // For HLS media playlists, m3u8-parser does not attach an attributes object to the\n    // manifest.\n    //\n    // To avoid undefined reference errors through the project, and make the code easier\n    // to write/read, add an empty attributes object for these cases.\n\n    playlist.attributes = playlist.attributes || {};\n  };\n  /**\n   * Adds ID, resolvedUri, and attributes properties to each playlist of the main, where\n   * necessary. In addition, creates playlist IDs for each playlist and adds playlist ID to\n   * playlist references to the playlists array.\n   *\n   * @param {Object} main\n   *        The main playlist\n   */\n\n  const setupMediaPlaylists = main => {\n    let i = main.playlists.length;\n    while (i--) {\n      const playlist = main.playlists[i];\n      setupMediaPlaylist({\n        playlist,\n        id: createPlaylistID(i, playlist.uri)\n      });\n      playlist.resolvedUri = resolveUrl(main.uri, playlist.uri);\n      main.playlists[playlist.id] = playlist; // URI reference added for backwards compatibility\n\n      main.playlists[playlist.uri] = playlist; // Although the spec states an #EXT-X-STREAM-INF tag MUST have a BANDWIDTH attribute,\n      // the stream can be played without it. Although an attributes property may have been\n      // added to the playlist to prevent undefined references, issue a warning to fix the\n      // manifest.\n\n      if (!playlist.attributes.BANDWIDTH) {\n        log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\n      }\n    }\n  };\n  /**\n   * Adds resolvedUri properties to each media group.\n   *\n   * @param {Object} main\n   *        The main playlist\n   */\n\n  const resolveMediaGroupUris = main => {\n    forEachMediaGroup(main, properties => {\n      if (properties.uri) {\n        properties.resolvedUri = resolveUrl(main.uri, properties.uri);\n      }\n    });\n  };\n  /**\n   * Creates a main playlist wrapper to insert a sole media playlist into.\n   *\n   * @param {Object} media\n   *        Media playlist\n   * @param {string} uri\n   *        The media URI\n   *\n   * @return {Object}\n   *         main playlist\n   */\n\n  const mainForMedia = (media, uri) => {\n    const id = createPlaylistID(0, uri);\n    const main = {\n      mediaGroups: {\n        'AUDIO': {},\n        'VIDEO': {},\n        'CLOSED-CAPTIONS': {},\n        'SUBTITLES': {}\n      },\n      uri: window.location.href,\n      resolvedUri: window.location.href,\n      playlists: [{\n        uri,\n        id,\n        resolvedUri: uri,\n        // m3u8-parser does not attach an attributes property to media playlists so make\n        // sure that the property is attached to avoid undefined reference errors\n        attributes: {}\n      }]\n    }; // set up ID reference\n\n    main.playlists[id] = main.playlists[0]; // URI reference added for backwards compatibility\n\n    main.playlists[uri] = main.playlists[0];\n    return main;\n  };\n  /**\n   * Does an in-place update of the main manifest to add updated playlist URI references\n   * as well as other properties needed by VHS that aren't included by the parser.\n   *\n   * @param {Object} main\n   *        main manifest object\n   * @param {string} uri\n   *        The source URI\n   * @param {function} createGroupID\n   *        A function to determine how to create the groupID for mediaGroups\n   */\n\n  const addPropertiesToMain = (main, uri, createGroupID = groupID) => {\n    main.uri = uri;\n    for (let i = 0; i < main.playlists.length; i++) {\n      if (!main.playlists[i].uri) {\n        // Set up phony URIs for the playlists since playlists are referenced by their URIs\n        // throughout VHS, but some formats (e.g., DASH) don't have external URIs\n        // TODO: consider adding dummy URIs in mpd-parser\n        const phonyUri = `placeholder-uri-${i}`;\n        main.playlists[i].uri = phonyUri;\n      }\n    }\n    const audioOnlyMain = isAudioOnly(main);\n    forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n      // add a playlist array under properties\n      if (!properties.playlists || !properties.playlists.length) {\n        // If the manifest is audio only and this media group does not have a uri, check\n        // if the media group is located in the main list of playlists. If it is, don't add\n        // placeholder properties as it shouldn't be considered an alternate audio track.\n        if (audioOnlyMain && mediaType === 'AUDIO' && !properties.uri) {\n          for (let i = 0; i < main.playlists.length; i++) {\n            const p = main.playlists[i];\n            if (p.attributes && p.attributes.AUDIO && p.attributes.AUDIO === groupKey) {\n              return;\n            }\n          }\n        }\n        properties.playlists = [_extends$1({}, properties)];\n      }\n      properties.playlists.forEach(function (p, i) {\n        const groupId = createGroupID(mediaType, groupKey, labelKey, p);\n        const id = createPlaylistID(i, groupId);\n        if (p.uri) {\n          p.resolvedUri = p.resolvedUri || resolveUrl(main.uri, p.uri);\n        } else {\n          // DEPRECATED, this has been added to prevent a breaking change.\n          // previously we only ever had a single media group playlist, so\n          // we mark the first playlist uri without prepending the index as we used to\n          // ideally we would do all of the playlists the same way.\n          p.uri = i === 0 ? groupId : id; // don't resolve a placeholder uri to an absolute url, just use\n          // the placeholder again\n\n          p.resolvedUri = p.uri;\n        }\n        p.id = p.id || id; // add an empty attributes object, all playlists are\n        // expected to have this.\n\n        p.attributes = p.attributes || {}; // setup ID and URI references (URI for backwards compatibility)\n\n        main.playlists[p.id] = p;\n        main.playlists[p.uri] = p;\n      });\n    });\n    setupMediaPlaylists(main);\n    resolveMediaGroupUris(main);\n  };\n  class DateRangesStorage {\n    constructor() {\n      this.offset_ = null;\n      this.pendingDateRanges_ = new Map();\n      this.processedDateRanges_ = new Map();\n    }\n    setOffset(segments = []) {\n      // already set\n      if (this.offset_ !== null) {\n        return;\n      } // no segment to process\n\n      if (!segments.length) {\n        return;\n      }\n      const [firstSegment] = segments; // no program date time\n\n      if (firstSegment.programDateTime === undefined) {\n        return;\n      } // Set offset as ProgramDateTime for the very first segment of the very first playlist load:\n\n      this.offset_ = firstSegment.programDateTime / 1000;\n    }\n    setPendingDateRanges(dateRanges = []) {\n      if (!dateRanges.length) {\n        return;\n      }\n      const [dateRange] = dateRanges;\n      const startTime = dateRange.startDate.getTime();\n      this.trimProcessedDateRanges_(startTime);\n      this.pendingDateRanges_ = dateRanges.reduce((map, pendingDateRange) => {\n        map.set(pendingDateRange.id, pendingDateRange);\n        return map;\n      }, new Map());\n    }\n    processDateRange(dateRange) {\n      this.pendingDateRanges_.delete(dateRange.id);\n      this.processedDateRanges_.set(dateRange.id, dateRange);\n    }\n    getDateRangesToProcess() {\n      if (this.offset_ === null) {\n        return [];\n      }\n      const dateRangeClasses = {};\n      const dateRangesToProcess = [];\n      this.pendingDateRanges_.forEach((dateRange, id) => {\n        if (this.processedDateRanges_.has(id)) {\n          return;\n        }\n        dateRange.startTime = dateRange.startDate.getTime() / 1000 - this.offset_;\n        dateRange.processDateRange = () => this.processDateRange(dateRange);\n        dateRangesToProcess.push(dateRange);\n        if (!dateRange.class) {\n          return;\n        }\n        if (dateRangeClasses[dateRange.class]) {\n          const length = dateRangeClasses[dateRange.class].push(dateRange);\n          dateRange.classListIndex = length - 1;\n        } else {\n          dateRangeClasses[dateRange.class] = [dateRange];\n          dateRange.classListIndex = 0;\n        }\n      });\n      for (const dateRange of dateRangesToProcess) {\n        const classList = dateRangeClasses[dateRange.class] || [];\n        if (dateRange.endDate) {\n          dateRange.endTime = dateRange.endDate.getTime() / 1000 - this.offset_;\n        } else if (dateRange.endOnNext && classList[dateRange.classListIndex + 1]) {\n          dateRange.endTime = classList[dateRange.classListIndex + 1].startTime;\n        } else if (dateRange.duration) {\n          dateRange.endTime = dateRange.startTime + dateRange.duration;\n        } else if (dateRange.plannedDuration) {\n          dateRange.endTime = dateRange.startTime + dateRange.plannedDuration;\n        } else {\n          dateRange.endTime = dateRange.startTime;\n        }\n      }\n      return dateRangesToProcess;\n    }\n    trimProcessedDateRanges_(startTime) {\n      const copy = new Map(this.processedDateRanges_);\n      copy.forEach((dateRange, id) => {\n        if (dateRange.startDate.getTime() < startTime) {\n          this.processedDateRanges_.delete(id);\n        }\n      });\n    }\n  }\n  const QUOTA_EXCEEDED_ERR = 22;\n  const getStreamingNetworkErrorMetadata = ({\n    requestType,\n    request,\n    error,\n    parseFailure\n  }) => {\n    const isBadStatus = request.status < 200 || request.status > 299;\n    const isFailure = request.status >= 400 && request.status <= 499;\n    const errorMetadata = {\n      uri: request.uri,\n      requestType\n    };\n    const isBadStatusOrParseFailure = isBadStatus && !isFailure || parseFailure;\n    if (error && isFailure) {\n      // copy original error and add to the metadata.\n      errorMetadata.error = _extends$1({}, error);\n      errorMetadata.errorType = videojs.Error.NetworkRequestFailed;\n    } else if (request.aborted) {\n      errorMetadata.errorType = videojs.Error.NetworkRequestAborted;\n    } else if (request.timedout) {\n      errorMetadata.erroType = videojs.Error.NetworkRequestTimeout;\n    } else if (isBadStatusOrParseFailure) {\n      const errorType = parseFailure ? videojs.Error.NetworkBodyParserFailed : videojs.Error.NetworkBadStatus;\n      errorMetadata.errorType = errorType;\n      errorMetadata.status = request.status;\n      errorMetadata.headers = request.headers;\n    }\n    return errorMetadata;\n  };\n\n  /**\n   * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n   * codec strings, or translating codec strings into objects that can be examined.\n   */\n  const logFn$1 = logger('CodecUtils');\n  /**\n   * Returns a set of codec strings parsed from the playlist or the default\n   * codec strings if no codecs were specified in the playlist\n   *\n   * @param {Playlist} media the current media playlist\n   * @return {Object} an object with the video and audio codecs\n   */\n\n  const getCodecs = function (media) {\n    // if the codecs were explicitly specified, use them instead of the\n    // defaults\n    const mediaAttributes = media.attributes || {};\n    if (mediaAttributes.CODECS) {\n      return parseCodecs(mediaAttributes.CODECS);\n    }\n  };\n  const isMaat = (main, media) => {\n    const mediaAttributes = media.attributes || {};\n    return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n  };\n  const isMuxed = (main, media) => {\n    if (!isMaat(main, media)) {\n      return true;\n    }\n    const mediaAttributes = media.attributes || {};\n    const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n    for (const groupId in audioGroup) {\n      // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n      // or there are listed playlists (the case for DASH, as the manifest will have already\n      // provided all of the details necessary to generate the audio playlist, as opposed to\n      // HLS' externally requested playlists), then the content is demuxed.\n      if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n        return true;\n      }\n    }\n    return false;\n  };\n  const unwrapCodecList = function (codecList) {\n    const codecs = {};\n    codecList.forEach(({\n      mediaType,\n      type,\n      details\n    }) => {\n      codecs[mediaType] = codecs[mediaType] || [];\n      codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n    });\n    Object.keys(codecs).forEach(function (mediaType) {\n      if (codecs[mediaType].length > 1) {\n        logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`);\n        codecs[mediaType] = null;\n        return;\n      }\n      codecs[mediaType] = codecs[mediaType][0];\n    });\n    return codecs;\n  };\n  const codecCount = function (codecObj) {\n    let count = 0;\n    if (codecObj.audio) {\n      count++;\n    }\n    if (codecObj.video) {\n      count++;\n    }\n    return count;\n  };\n  /**\n   * Calculates the codec strings for a working configuration of\n   * SourceBuffers to play variant streams in a main playlist. If\n   * there is no possible working configuration, an empty object will be\n   * returned.\n   *\n   * @param main {Object} the m3u8 object for the main playlist\n   * @param media {Object} the m3u8 object for the variant playlist\n   * @return {Object} the codec strings.\n   *\n   * @private\n   */\n\n  const codecsForPlaylist = function (main, media) {\n    const mediaAttributes = media.attributes || {};\n    const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n    // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n    if (isMaat(main, media) && !codecInfo.audio) {\n      if (!isMuxed(main, media)) {\n        // It is possible for codecs to be specified on the audio media group playlist but\n        // not on the rendition playlist. This is mostly the case for DASH, where audio and\n        // video are always separate (and separately specified).\n        const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n        if (defaultCodecs.audio) {\n          codecInfo.audio = defaultCodecs.audio;\n        }\n      }\n    }\n    return codecInfo;\n  };\n  const {\n    EventTarget: EventTarget$1\n  } = videojs;\n  const addLLHLSQueryDirectives = (uri, media) => {\n    if (media.endList || !media.serverControl) {\n      return uri;\n    }\n    const parameters = {};\n    if (media.serverControl.canBlockReload) {\n      const {\n        preloadSegment\n      } = media; // next msn is a zero based value, length is not.\n\n      let nextMSN = media.mediaSequence + media.segments.length; // If preload segment has parts then it is likely\n      // that we are going to request a part of that preload segment.\n      // the logic below is used to determine that.\n\n      if (preloadSegment) {\n        const parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n        const nextPart = getKnownPartCount(media) - 1; // if nextPart is > -1 and not equal to just the\n        // length of parts, then we know we had part preload hints\n        // and we need to add the _HLS_part= query\n\n        if (nextPart > -1 && nextPart !== parts.length - 1) {\n          // add existing parts to our preload hints\n          // eslint-disable-next-line\n          parameters._HLS_part = nextPart;\n        } // this if statement makes sure that we request the msn\n        // of the preload segment if:\n        // 1. the preload segment had parts (and was not yet a full segment)\n        //    but was added to our segments array\n        // 2. the preload segment had preload hints for parts that are not in\n        //    the manifest yet.\n        // in all other cases we want the segment after the preload segment\n        // which will be given by using media.segments.length because it is 1 based\n        // rather than 0 based.\n\n        if (nextPart > -1 || parts.length) {\n          nextMSN--;\n        }\n      } // add _HLS_msn= in front of any _HLS_part query\n      // eslint-disable-next-line\n\n      parameters._HLS_msn = nextMSN;\n    }\n    if (media.serverControl && media.serverControl.canSkipUntil) {\n      // add _HLS_skip= infront of all other queries.\n      // eslint-disable-next-line\n      parameters._HLS_skip = media.serverControl.canSkipDateranges ? 'v2' : 'YES';\n    }\n    if (Object.keys(parameters).length) {\n      const parsedUri = new window.URL(uri);\n      ['_HLS_skip', '_HLS_msn', '_HLS_part'].forEach(function (name) {\n        if (!parameters.hasOwnProperty(name)) {\n          return;\n        }\n        parsedUri.searchParams.set(name, parameters[name]);\n      });\n      uri = parsedUri.toString();\n    }\n    return uri;\n  };\n  /**\n   * Returns a new segment object with properties and\n   * the parts array merged.\n   *\n   * @param {Object} a the old segment\n   * @param {Object} b the new segment\n   *\n   * @return {Object} the merged segment\n   */\n\n  const updateSegment = (a, b) => {\n    if (!a) {\n      return b;\n    }\n    const result = merge(a, b); // if only the old segment has preload hints\n    // and the new one does not, remove preload hints.\n\n    if (a.preloadHints && !b.preloadHints) {\n      delete result.preloadHints;\n    } // if only the old segment has parts\n    // then the parts are no longer valid\n\n    if (a.parts && !b.parts) {\n      delete result.parts; // if both segments have parts\n      // copy part propeties from the old segment\n      // to the new one.\n    } else if (a.parts && b.parts) {\n      for (let i = 0; i < b.parts.length; i++) {\n        if (a.parts && a.parts[i]) {\n          result.parts[i] = merge(a.parts[i], b.parts[i]);\n        }\n      }\n    } // set skipped to false for segments that have\n    // have had information merged from the old segment.\n\n    if (!a.skipped && b.skipped) {\n      result.skipped = false;\n    } // set preload to false for segments that have\n    // had information added in the new segment.\n\n    if (a.preload && !b.preload) {\n      result.preload = false;\n    }\n    return result;\n  };\n  /**\n   * Returns a new array of segments that is the result of merging\n   * properties from an older list of segments onto an updated\n   * list. No properties on the updated playlist will be ovewritten.\n   *\n   * @param {Array} original the outdated list of segments\n   * @param {Array} update the updated list of segments\n   * @param {number=} offset the index of the first update\n   * segment in the original segment list. For non-live playlists,\n   * this should always be zero and does not need to be\n   * specified. For live playlists, it should be the difference\n   * between the media sequence numbers in the original and updated\n   * playlists.\n   * @return {Array} a list of merged segment objects\n   */\n\n  const updateSegments = (original, update, offset) => {\n    const oldSegments = original.slice();\n    const newSegments = update.slice();\n    offset = offset || 0;\n    const result = [];\n    let currentMap;\n    for (let newIndex = 0; newIndex < newSegments.length; newIndex++) {\n      const oldSegment = oldSegments[newIndex + offset];\n      const newSegment = newSegments[newIndex];\n      if (oldSegment) {\n        currentMap = oldSegment.map || currentMap;\n        result.push(updateSegment(oldSegment, newSegment));\n      } else {\n        // carry over map to new segment if it is missing\n        if (currentMap && !newSegment.map) {\n          newSegment.map = currentMap;\n        }\n        result.push(newSegment);\n      }\n    }\n    return result;\n  };\n  const resolveSegmentUris = (segment, baseUri) => {\n    // preloadSegment will not have a uri at all\n    // as the segment isn't actually in the manifest yet, only parts\n    if (!segment.resolvedUri && segment.uri) {\n      segment.resolvedUri = resolveUrl(baseUri, segment.uri);\n    }\n    if (segment.key && !segment.key.resolvedUri) {\n      segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\n    }\n    if (segment.map && !segment.map.resolvedUri) {\n      segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\n    }\n    if (segment.map && segment.map.key && !segment.map.key.resolvedUri) {\n      segment.map.key.resolvedUri = resolveUrl(baseUri, segment.map.key.uri);\n    }\n    if (segment.parts && segment.parts.length) {\n      segment.parts.forEach(p => {\n        if (p.resolvedUri) {\n          return;\n        }\n        p.resolvedUri = resolveUrl(baseUri, p.uri);\n      });\n    }\n    if (segment.preloadHints && segment.preloadHints.length) {\n      segment.preloadHints.forEach(p => {\n        if (p.resolvedUri) {\n          return;\n        }\n        p.resolvedUri = resolveUrl(baseUri, p.uri);\n      });\n    }\n  };\n  const getAllSegments = function (media) {\n    const segments = media.segments || [];\n    const preloadSegment = media.preloadSegment; // a preloadSegment with only preloadHints is not currently\n    // a usable segment, only include a preloadSegment that has\n    // parts.\n\n    if (preloadSegment && preloadSegment.parts && preloadSegment.parts.length) {\n      // if preloadHints has a MAP that means that the\n      // init segment is going to change. We cannot use any of the parts\n      // from this preload segment.\n      if (preloadSegment.preloadHints) {\n        for (let i = 0; i < preloadSegment.preloadHints.length; i++) {\n          if (preloadSegment.preloadHints[i].type === 'MAP') {\n            return segments;\n          }\n        }\n      } // set the duration for our preload segment to target duration.\n\n      preloadSegment.duration = media.targetDuration;\n      preloadSegment.preload = true;\n      segments.push(preloadSegment);\n    }\n    return segments;\n  }; // consider the playlist unchanged if the playlist object is the same or\n  // the number of segments is equal, the media sequence number is unchanged,\n  // and this playlist hasn't become the end of the playlist\n\n  const isPlaylistUnchanged = (a, b) => a === b || a.segments && b.segments && a.segments.length === b.segments.length && a.endList === b.endList && a.mediaSequence === b.mediaSequence && a.preloadSegment === b.preloadSegment;\n  /**\n    * Returns a new main playlist that is the result of merging an\n    * updated media playlist into the original version. If the\n    * updated media playlist does not match any of the playlist\n    * entries in the original main playlist, null is returned.\n    *\n    * @param {Object} main a parsed main M3U8 object\n    * @param {Object} media a parsed media M3U8 object\n    * @return {Object} a new object that represents the original\n    * main playlist with the updated media playlist merged in, or\n    * null if the merge produced no change.\n    */\n\n  const updateMain$1 = (main, newMedia, unchangedCheck = isPlaylistUnchanged) => {\n    const result = merge(main, {});\n    const oldMedia = result.playlists[newMedia.id];\n    if (!oldMedia) {\n      return null;\n    }\n    if (unchangedCheck(oldMedia, newMedia)) {\n      return null;\n    }\n    newMedia.segments = getAllSegments(newMedia);\n    const mergedPlaylist = merge(oldMedia, newMedia); // always use the new media's preload segment\n\n    if (mergedPlaylist.preloadSegment && !newMedia.preloadSegment) {\n      delete mergedPlaylist.preloadSegment;\n    } // if the update could overlap existing segment information, merge the two segment lists\n\n    if (oldMedia.segments) {\n      if (newMedia.skip) {\n        newMedia.segments = newMedia.segments || []; // add back in objects for skipped segments, so that we merge\n        // old properties into the new segments\n\n        for (let i = 0; i < newMedia.skip.skippedSegments; i++) {\n          newMedia.segments.unshift({\n            skipped: true\n          });\n        }\n      }\n      mergedPlaylist.segments = updateSegments(oldMedia.segments, newMedia.segments, newMedia.mediaSequence - oldMedia.mediaSequence);\n    } // resolve any segment URIs to prevent us from having to do it later\n\n    mergedPlaylist.segments.forEach(segment => {\n      resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\n    }); // TODO Right now in the playlists array there are two references to each playlist, one\n    // that is referenced by index, and one by URI. The index reference may no longer be\n    // necessary.\n\n    for (let i = 0; i < result.playlists.length; i++) {\n      if (result.playlists[i].id === newMedia.id) {\n        result.playlists[i] = mergedPlaylist;\n      }\n    }\n    result.playlists[newMedia.id] = mergedPlaylist; // URI reference added for backwards compatibility\n\n    result.playlists[newMedia.uri] = mergedPlaylist; // update media group playlist references.\n\n    forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n      if (!properties.playlists) {\n        return;\n      }\n      for (let i = 0; i < properties.playlists.length; i++) {\n        if (newMedia.id === properties.playlists[i].id) {\n          properties.playlists[i] = mergedPlaylist;\n        }\n      }\n    });\n    return result;\n  };\n  /**\n   * Calculates the time to wait before refreshing a live playlist\n   *\n   * @param {Object} media\n   *        The current media\n   * @param {boolean} update\n   *        True if there were any updates from the last refresh, false otherwise\n   * @return {number}\n   *         The time in ms to wait before refreshing the live playlist\n   */\n\n  const refreshDelay = (media, update) => {\n    const segments = media.segments || [];\n    const lastSegment = segments[segments.length - 1];\n    const lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n    const lastDuration = lastPart && lastPart.duration || lastSegment && lastSegment.duration;\n    if (update && lastDuration) {\n      return lastDuration * 1000;\n    } // if the playlist is unchanged since the last reload or last segment duration\n    // cannot be determined, try again after half the target duration\n\n    return (media.partTargetDuration || media.targetDuration || 10) * 500;\n  };\n  const playlistMetadataPayload = (playlists, type, isLive) => {\n    if (!playlists) {\n      return;\n    }\n    const renditions = [];\n    playlists.forEach(playlist => {\n      // we need attributes to populate rendition data.\n      if (!playlist.attributes) {\n        return;\n      }\n      const {\n        BANDWIDTH,\n        RESOLUTION,\n        CODECS\n      } = playlist.attributes;\n      renditions.push({\n        id: playlist.id,\n        bandwidth: BANDWIDTH,\n        resolution: RESOLUTION,\n        codecs: CODECS\n      });\n    });\n    return {\n      type,\n      isLive,\n      renditions\n    };\n  };\n  /**\n   * Load a playlist from a remote location\n   *\n   * @class PlaylistLoader\n   * @extends Stream\n   * @param {string|Object} src url or object of manifest\n   * @param {boolean} withCredentials the withCredentials xhr option\n   * @class\n   */\n\n  class PlaylistLoader extends EventTarget$1 {\n    constructor(src, vhs, options = {}) {\n      super();\n      if (!src) {\n        throw new Error('A non-empty playlist URL or object is required');\n      }\n      this.logger_ = logger('PlaylistLoader');\n      const {\n        withCredentials = false\n      } = options;\n      this.src = src;\n      this.vhs_ = vhs;\n      this.withCredentials = withCredentials;\n      this.addDateRangesToTextTrack_ = options.addDateRangesToTextTrack;\n      const vhsOptions = vhs.options_;\n      this.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n      this.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n      this.llhls = vhsOptions && vhsOptions.llhls;\n      this.dateRangesStorage_ = new DateRangesStorage(); // initialize the loader state\n\n      this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n      this.handleMediaupdatetimeout_ = this.handleMediaupdatetimeout_.bind(this);\n      this.on('mediaupdatetimeout', this.handleMediaupdatetimeout_);\n      this.on('loadedplaylist', this.handleLoadedPlaylist_.bind(this));\n    }\n    handleLoadedPlaylist_() {\n      const mediaPlaylist = this.media();\n      if (!mediaPlaylist) {\n        return;\n      }\n      this.dateRangesStorage_.setOffset(mediaPlaylist.segments);\n      this.dateRangesStorage_.setPendingDateRanges(mediaPlaylist.dateRanges);\n      const availableDateRanges = this.dateRangesStorage_.getDateRangesToProcess();\n      if (!availableDateRanges.length || !this.addDateRangesToTextTrack_) {\n        return;\n      }\n      this.addDateRangesToTextTrack_(availableDateRanges);\n    }\n    handleMediaupdatetimeout_() {\n      if (this.state !== 'HAVE_METADATA') {\n        // only refresh the media playlist if no other activity is going on\n        return;\n      }\n      const media = this.media();\n      let uri = resolveUrl(this.main.uri, media.uri);\n      if (this.llhls) {\n        uri = addLLHLSQueryDirectives(uri, media);\n      }\n      this.state = 'HAVE_CURRENT_METADATA';\n      this.request = this.vhs_.xhr({\n        uri,\n        withCredentials: this.withCredentials,\n        requestType: 'hls-playlist'\n      }, (error, req) => {\n        // disposed\n        if (!this.request) {\n          return;\n        }\n        if (error) {\n          return this.playlistRequestError(this.request, this.media(), 'HAVE_METADATA');\n        }\n        this.haveMetadata({\n          playlistString: this.request.responseText,\n          url: this.media().uri,\n          id: this.media().id\n        });\n      });\n    }\n    playlistRequestError(xhr, playlist, startingState) {\n      const {\n        uri,\n        id\n      } = playlist; // any in-flight request is now finished\n\n      this.request = null;\n      if (startingState) {\n        this.state = startingState;\n      }\n      this.error = {\n        playlist: this.main.playlists[id],\n        status: xhr.status,\n        message: `HLS playlist request error at URL: ${uri}.`,\n        responseText: xhr.responseText,\n        code: xhr.status >= 500 ? 4 : 2,\n        metadata: getStreamingNetworkErrorMetadata({\n          requestType: xhr.requestType,\n          request: xhr,\n          error: xhr.error\n        })\n      };\n      this.trigger('error');\n    }\n    parseManifest_({\n      url,\n      manifestString\n    }) {\n      try {\n        const parsed = parseManifest({\n          onwarn: ({\n            message\n          }) => this.logger_(`m3u8-parser warn for ${url}: ${message}`),\n          oninfo: ({\n            message\n          }) => this.logger_(`m3u8-parser info for ${url}: ${message}`),\n          manifestString,\n          customTagParsers: this.customTagParsers,\n          customTagMappers: this.customTagMappers,\n          llhls: this.llhls\n        });\n        /**\n         * VHS does not support switching between variants with and without audio and video\n         * so we want to filter out audio-only variants when variants with video and(or) audio are also detected.\n         */\n\n        if (!parsed.playlists || !parsed.playlists.length) {\n          return parsed;\n        }\n        this.excludeAudioOnlyVariants(parsed.playlists);\n        return parsed;\n      } catch (error) {\n        this.error = error;\n        this.error.metadata = {\n          errorType: videojs.Error.StreamingHlsPlaylistParserError,\n          error\n        };\n      }\n    }\n    excludeAudioOnlyVariants(playlists) {\n      // helper function\n      const hasVideo = playlist => {\n        const attributes = playlist.attributes || {};\n        const {\n          width,\n          height\n        } = attributes.RESOLUTION || {};\n        if (width && height) {\n          return true;\n        } // parse codecs string from playlist attributes\n\n        const codecsList = getCodecs(playlist) || []; // unwrap list\n\n        const codecsInfo = unwrapCodecList(codecsList);\n        return Boolean(codecsInfo.video);\n      };\n      if (playlists.some(hasVideo)) {\n        playlists.forEach(playlist => {\n          if (!hasVideo(playlist)) {\n            playlist.excludeUntil = Infinity;\n          }\n        });\n      }\n    }\n    /**\n     * Update the playlist loader's state in response to a new or updated playlist.\n     *\n     * @param {string} [playlistString]\n     *        Playlist string (if playlistObject is not provided)\n     * @param {Object} [playlistObject]\n     *        Playlist object (if playlistString is not provided)\n     * @param {string} url\n     *        URL of playlist\n     * @param {string} id\n     *        ID to use for playlist\n     */\n\n    haveMetadata({\n      playlistString,\n      playlistObject,\n      url,\n      id\n    }) {\n      // any in-flight request is now finished\n      this.request = null;\n      this.state = 'HAVE_METADATA';\n      const metadata = {\n        playlistInfo: {\n          type: 'media',\n          uri: url\n        }\n      };\n      this.trigger({\n        type: 'playlistparsestart',\n        metadata\n      });\n      const playlist = playlistObject || this.parseManifest_({\n        url,\n        manifestString: playlistString\n      });\n      playlist.lastRequest = Date.now();\n      setupMediaPlaylist({\n        playlist,\n        uri: url,\n        id\n      }); // merge this playlist into the main manifest\n\n      const update = updateMain$1(this.main, playlist);\n      this.targetDuration = playlist.partTargetDuration || playlist.targetDuration;\n      this.pendingMedia_ = null;\n      if (update) {\n        this.main = update;\n        this.media_ = this.main.playlists[id];\n      } else {\n        this.trigger('playlistunchanged');\n      }\n      this.updateMediaUpdateTimeout_(refreshDelay(this.media(), !!update));\n      metadata.parsedPlaylist = playlistMetadataPayload(this.main.playlists, metadata.playlistInfo.type, !this.media_.endList);\n      this.trigger({\n        type: 'playlistparsecomplete',\n        metadata\n      });\n      this.trigger('loadedplaylist');\n    }\n    /**\n      * Abort any outstanding work and clean up.\n      */\n\n    dispose() {\n      this.trigger('dispose');\n      this.stopRequest();\n      window.clearTimeout(this.mediaUpdateTimeout);\n      window.clearTimeout(this.finalRenditionTimeout);\n      this.dateRangesStorage_ = new DateRangesStorage();\n      this.off();\n    }\n    stopRequest() {\n      if (this.request) {\n        const oldRequest = this.request;\n        this.request = null;\n        oldRequest.onreadystatechange = null;\n        oldRequest.abort();\n      }\n    }\n    /**\n      * When called without any arguments, returns the currently\n      * active media playlist. When called with a single argument,\n      * triggers the playlist loader to asynchronously switch to the\n      * specified media playlist. Calling this method while the\n      * loader is in the HAVE_NOTHING causes an error to be emitted\n      * but otherwise has no effect.\n      *\n      * @param {Object=} playlist the parsed media playlist\n      * object to switch to\n      * @param {boolean=} shouldDelay whether we should delay the request by half target duration\n      *\n      * @return {Playlist} the current loaded media\n      */\n\n    media(playlist, shouldDelay) {\n      // getter\n      if (!playlist) {\n        return this.media_;\n      } // setter\n\n      if (this.state === 'HAVE_NOTHING') {\n        throw new Error('Cannot switch media playlist from ' + this.state);\n      } // find the playlist object if the target playlist has been\n      // specified by URI\n\n      if (typeof playlist === 'string') {\n        if (!this.main.playlists[playlist]) {\n          throw new Error('Unknown playlist URI: ' + playlist);\n        }\n        playlist = this.main.playlists[playlist];\n      }\n      window.clearTimeout(this.finalRenditionTimeout);\n      if (shouldDelay) {\n        const delay = (playlist.partTargetDuration || playlist.targetDuration) / 2 * 1000 || 5 * 1000;\n        this.finalRenditionTimeout = window.setTimeout(this.media.bind(this, playlist, false), delay);\n        return;\n      }\n      const startingState = this.state;\n      const mediaChange = !this.media_ || playlist.id !== this.media_.id;\n      const mainPlaylistRef = this.main.playlists[playlist.id]; // switch to fully loaded playlists immediately\n\n      if (mainPlaylistRef && mainPlaylistRef.endList ||\n      // handle the case of a playlist object (e.g., if using vhs-json with a resolved\n      // media playlist or, for the case of demuxed audio, a resolved audio media group)\n      playlist.endList && playlist.segments.length) {\n        // abort outstanding playlist requests\n        if (this.request) {\n          this.request.onreadystatechange = null;\n          this.request.abort();\n          this.request = null;\n        }\n        this.state = 'HAVE_METADATA';\n        this.media_ = playlist; // trigger media change if the active media has been updated\n\n        if (mediaChange) {\n          this.trigger('mediachanging');\n          if (startingState === 'HAVE_MAIN_MANIFEST') {\n            // The initial playlist was a main manifest, and the first media selected was\n            // also provided (in the form of a resolved playlist object) as part of the\n            // source object (rather than just a URL). Therefore, since the media playlist\n            // doesn't need to be requested, loadedmetadata won't trigger as part of the\n            // normal flow, and needs an explicit trigger here.\n            this.trigger('loadedmetadata');\n          } else {\n            this.trigger('mediachange');\n          }\n        }\n        return;\n      } // We update/set the timeout here so that live playlists\n      // that are not a media change will \"start\" the loader as expected.\n      // We expect that this function will start the media update timeout\n      // cycle again. This also prevents a playlist switch failure from\n      // causing us to stall during live.\n\n      this.updateMediaUpdateTimeout_(refreshDelay(playlist, true)); // switching to the active playlist is a no-op\n\n      if (!mediaChange) {\n        return;\n      }\n      this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\n\n      if (this.request) {\n        if (playlist.resolvedUri === this.request.url) {\n          // requesting to switch to the same playlist multiple times\n          // has no effect after the first\n          return;\n        }\n        this.request.onreadystatechange = null;\n        this.request.abort();\n        this.request = null;\n      } // request the new playlist\n\n      if (this.media_) {\n        this.trigger('mediachanging');\n      }\n      this.pendingMedia_ = playlist;\n      const metadata = {\n        playlistInfo: {\n          type: 'media',\n          uri: playlist.uri\n        }\n      };\n      this.trigger({\n        type: 'playlistrequeststart',\n        metadata\n      });\n      this.request = this.vhs_.xhr({\n        uri: playlist.resolvedUri,\n        withCredentials: this.withCredentials,\n        requestType: 'hls-playlist'\n      }, (error, req) => {\n        // disposed\n        if (!this.request) {\n          return;\n        }\n        playlist.lastRequest = Date.now();\n        playlist.resolvedUri = resolveManifestRedirect(playlist.resolvedUri, req);\n        if (error) {\n          return this.playlistRequestError(this.request, playlist, startingState);\n        }\n        this.trigger({\n          type: 'playlistrequestcomplete',\n          metadata\n        });\n        this.haveMetadata({\n          playlistString: req.responseText,\n          url: playlist.uri,\n          id: playlist.id\n        }); // fire loadedmetadata the first time a media playlist is loaded\n\n        if (startingState === 'HAVE_MAIN_MANIFEST') {\n          this.trigger('loadedmetadata');\n        } else {\n          this.trigger('mediachange');\n        }\n      });\n    }\n    /**\n     * pause loading of the playlist\n     */\n\n    pause() {\n      if (this.mediaUpdateTimeout) {\n        window.clearTimeout(this.mediaUpdateTimeout);\n        this.mediaUpdateTimeout = null;\n      }\n      this.stopRequest();\n      if (this.state === 'HAVE_NOTHING') {\n        // If we pause the loader before any data has been retrieved, its as if we never\n        // started, so reset to an unstarted state.\n        this.started = false;\n      } // Need to restore state now that no activity is happening\n\n      if (this.state === 'SWITCHING_MEDIA') {\n        // if the loader was in the process of switching media, it should either return to\n        // HAVE_MAIN_MANIFEST or HAVE_METADATA depending on if the loader has loaded a media\n        // playlist yet. This is determined by the existence of loader.media_\n        if (this.media_) {\n          this.state = 'HAVE_METADATA';\n        } else {\n          this.state = 'HAVE_MAIN_MANIFEST';\n        }\n      } else if (this.state === 'HAVE_CURRENT_METADATA') {\n        this.state = 'HAVE_METADATA';\n      }\n    }\n    /**\n     * start loading of the playlist\n     */\n\n    load(shouldDelay) {\n      if (this.mediaUpdateTimeout) {\n        window.clearTimeout(this.mediaUpdateTimeout);\n        this.mediaUpdateTimeout = null;\n      }\n      const media = this.media();\n      if (shouldDelay) {\n        const delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n        this.mediaUpdateTimeout = window.setTimeout(() => {\n          this.mediaUpdateTimeout = null;\n          this.load();\n        }, delay);\n        return;\n      }\n      if (!this.started) {\n        this.start();\n        return;\n      }\n      if (media && !media.endList) {\n        this.trigger('mediaupdatetimeout');\n      } else {\n        this.trigger('loadedplaylist');\n      }\n    }\n    updateMediaUpdateTimeout_(delay) {\n      if (this.mediaUpdateTimeout) {\n        window.clearTimeout(this.mediaUpdateTimeout);\n        this.mediaUpdateTimeout = null;\n      } // we only have use mediaupdatetimeout for live playlists.\n\n      if (!this.media() || this.media().endList) {\n        return;\n      }\n      this.mediaUpdateTimeout = window.setTimeout(() => {\n        this.mediaUpdateTimeout = null;\n        this.trigger('mediaupdatetimeout');\n        this.updateMediaUpdateTimeout_(delay);\n      }, delay);\n    }\n    /**\n     * start loading of the playlist\n     */\n\n    start() {\n      this.started = true;\n      if (typeof this.src === 'object') {\n        // in the case of an entirely constructed manifest object (meaning there's no actual\n        // manifest on a server), default the uri to the page's href\n        if (!this.src.uri) {\n          this.src.uri = window.location.href;\n        } // resolvedUri is added on internally after the initial request. Since there's no\n        // request for pre-resolved manifests, add on resolvedUri here.\n\n        this.src.resolvedUri = this.src.uri; // Since a manifest object was passed in as the source (instead of a URL), the first\n        // request can be skipped (since the top level of the manifest, at a minimum, is\n        // already available as a parsed manifest object). However, if the manifest object\n        // represents a main playlist, some media playlists may need to be resolved before\n        // the starting segment list is available. Therefore, go directly to setup of the\n        // initial playlist, and let the normal flow continue from there.\n        //\n        // Note that the call to setup is asynchronous, as other sections of VHS may assume\n        // that the first request is asynchronous.\n\n        setTimeout(() => {\n          this.setupInitialPlaylist(this.src);\n        }, 0);\n        return;\n      }\n      const metadata = {\n        playlistInfo: {\n          type: 'multivariant',\n          uri: this.src\n        }\n      };\n      this.trigger({\n        type: 'playlistrequeststart',\n        metadata\n      }); // request the specified URL\n\n      this.request = this.vhs_.xhr({\n        uri: this.src,\n        withCredentials: this.withCredentials,\n        requestType: 'hls-playlist'\n      }, (error, req) => {\n        // disposed\n        if (!this.request) {\n          return;\n        } // clear the loader's request reference\n\n        this.request = null;\n        if (error) {\n          this.error = {\n            status: req.status,\n            message: `HLS playlist request error at URL: ${this.src}.`,\n            responseText: req.responseText,\n            // MEDIA_ERR_NETWORK\n            code: 2,\n            metadata: getStreamingNetworkErrorMetadata({\n              requestType: req.requestType,\n              request: req,\n              error\n            })\n          };\n          if (this.state === 'HAVE_NOTHING') {\n            this.started = false;\n          }\n          return this.trigger('error');\n        }\n        this.trigger({\n          type: 'playlistrequestcomplete',\n          metadata\n        });\n        this.src = resolveManifestRedirect(this.src, req);\n        this.trigger({\n          type: 'playlistparsestart',\n          metadata\n        });\n        const manifest = this.parseManifest_({\n          manifestString: req.responseText,\n          url: this.src\n        }); // we haven't loaded any variant playlists here so we default to false for isLive.\n\n        metadata.parsedPlaylist = playlistMetadataPayload(manifest.playlists, metadata.playlistInfo.type, false);\n        this.trigger({\n          type: 'playlistparsecomplete',\n          metadata\n        });\n        this.setupInitialPlaylist(manifest);\n      });\n    }\n    srcUri() {\n      return typeof this.src === 'string' ? this.src : this.src.uri;\n    }\n    /**\n     * Given a manifest object that's either a main or media playlist, trigger the proper\n     * events and set the state of the playlist loader.\n     *\n     * If the manifest object represents a main playlist, `loadedplaylist` will be\n     * triggered to allow listeners to select a playlist. If none is selected, the loader\n     * will default to the first one in the playlists array.\n     *\n     * If the manifest object represents a media playlist, `loadedplaylist` will be\n     * triggered followed by `loadedmetadata`, as the only available playlist is loaded.\n     *\n     * In the case of a media playlist, a main playlist object wrapper with one playlist\n     * will be created so that all logic can handle playlists in the same fashion (as an\n     * assumed manifest object schema).\n     *\n     * @param {Object} manifest\n     *        The parsed manifest object\n     */\n\n    setupInitialPlaylist(manifest) {\n      this.state = 'HAVE_MAIN_MANIFEST';\n      if (manifest.playlists) {\n        this.main = manifest;\n        addPropertiesToMain(this.main, this.srcUri()); // If the initial main playlist has playlists wtih segments already resolved,\n        // then resolve URIs in advance, as they are usually done after a playlist request,\n        // which may not happen if the playlist is resolved.\n\n        manifest.playlists.forEach(playlist => {\n          playlist.segments = getAllSegments(playlist);\n          playlist.segments.forEach(segment => {\n            resolveSegmentUris(segment, playlist.resolvedUri);\n          });\n        });\n        this.trigger('loadedplaylist');\n        if (!this.request) {\n          // no media playlist was specifically selected so start\n          // from the first listed one\n          this.media(this.main.playlists[0]);\n        }\n        return;\n      } // In order to support media playlists passed in as vhs-json, the case where the uri\n      // is not provided as part of the manifest should be considered, and an appropriate\n      // default used.\n\n      const uri = this.srcUri() || window.location.href;\n      this.main = mainForMedia(manifest, uri);\n      this.haveMetadata({\n        playlistObject: manifest,\n        url: uri,\n        id: this.main.playlists[0].id\n      });\n      this.trigger('loadedmetadata');\n    }\n    /**\n     * Updates or deletes a preexisting pathway clone.\n     * Ensures that all playlists related to the old pathway clone are\n     * either updated or deleted.\n     *\n     * @param {Object} clone On update, the pathway clone object for the newly updated pathway clone.\n     *        On delete, the old pathway clone object to be deleted.\n     * @param {boolean} isUpdate True if the pathway is to be updated,\n     *        false if it is meant to be deleted.\n     */\n\n    updateOrDeleteClone(clone, isUpdate) {\n      const main = this.main;\n      const pathway = clone.ID;\n      let i = main.playlists.length; // Iterate backwards through the playlist so we can remove playlists if necessary.\n\n      while (i--) {\n        const p = main.playlists[i];\n        if (p.attributes['PATHWAY-ID'] === pathway) {\n          const oldPlaylistUri = p.resolvedUri;\n          const oldPlaylistId = p.id; // update the indexed playlist and add new playlists by ID and URI\n\n          if (isUpdate) {\n            const newPlaylistUri = this.createCloneURI_(p.resolvedUri, clone);\n            const newPlaylistId = createPlaylistID(pathway, newPlaylistUri);\n            const attributes = this.createCloneAttributes_(pathway, p.attributes);\n            const updatedPlaylist = this.createClonePlaylist_(p, newPlaylistId, clone, attributes);\n            main.playlists[i] = updatedPlaylist;\n            main.playlists[newPlaylistId] = updatedPlaylist;\n            main.playlists[newPlaylistUri] = updatedPlaylist;\n          } else {\n            // Remove the indexed playlist.\n            main.playlists.splice(i, 1);\n          } // Remove playlists by the old ID and URI.\n\n          delete main.playlists[oldPlaylistId];\n          delete main.playlists[oldPlaylistUri];\n        }\n      }\n      this.updateOrDeleteCloneMedia(clone, isUpdate);\n    }\n    /**\n     * Updates or deletes media data based on the pathway clone object.\n     * Due to the complexity of the media groups and playlists, in all cases\n     * we remove all of the old media groups and playlists.\n     * On updates, we then create new media groups and playlists based on the\n     * new pathway clone object.\n     *\n     * @param {Object} clone The pathway clone object for the newly updated pathway clone.\n     * @param {boolean} isUpdate True if the pathway is to be updated,\n     *        false if it is meant to be deleted.\n     */\n\n    updateOrDeleteCloneMedia(clone, isUpdate) {\n      const main = this.main;\n      const id = clone.ID;\n      ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n        if (!main.mediaGroups[mediaType] || !main.mediaGroups[mediaType][id]) {\n          return;\n        }\n        for (const groupKey in main.mediaGroups[mediaType]) {\n          // Remove all media playlists for the media group for this pathway clone.\n          if (groupKey === id) {\n            for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n              const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n              oldMedia.playlists.forEach((p, i) => {\n                const oldMediaPlaylist = main.playlists[p.id];\n                const oldPlaylistId = oldMediaPlaylist.id;\n                const oldPlaylistUri = oldMediaPlaylist.resolvedUri;\n                delete main.playlists[oldPlaylistId];\n                delete main.playlists[oldPlaylistUri];\n              });\n            } // Delete the old media group.\n\n            delete main.mediaGroups[mediaType][groupKey];\n          }\n        }\n      }); // Create the new media groups and playlists if there is an update.\n\n      if (isUpdate) {\n        this.createClonedMediaGroups_(clone);\n      }\n    }\n    /**\n     * Given a pathway clone object, clones all necessary playlists.\n     *\n     * @param {Object} clone The pathway clone object.\n     * @param {Object} basePlaylist The original playlist to clone from.\n     */\n\n    addClonePathway(clone, basePlaylist = {}) {\n      const main = this.main;\n      const index = main.playlists.length;\n      const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n      const playlistId = createPlaylistID(clone.ID, uri);\n      const attributes = this.createCloneAttributes_(clone.ID, basePlaylist.attributes);\n      const playlist = this.createClonePlaylist_(basePlaylist, playlistId, clone, attributes);\n      main.playlists[index] = playlist; // add playlist by ID and URI\n\n      main.playlists[playlistId] = playlist;\n      main.playlists[uri] = playlist;\n      this.createClonedMediaGroups_(clone);\n    }\n    /**\n     * Given a pathway clone object we create clones of all media.\n     * In this function, all necessary information and updated playlists\n     * are added to the `mediaGroup` object.\n     * Playlists are also added to the `playlists` array so the media groups\n     * will be properly linked.\n     *\n     * @param {Object} clone The pathway clone object.\n     */\n\n    createClonedMediaGroups_(clone) {\n      const id = clone.ID;\n      const baseID = clone['BASE-ID'];\n      const main = this.main;\n      ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n        // If the media type doesn't exist, or there is already a clone, skip\n        // to the next media type.\n        if (!main.mediaGroups[mediaType] || main.mediaGroups[mediaType][id]) {\n          return;\n        }\n        for (const groupKey in main.mediaGroups[mediaType]) {\n          if (groupKey === baseID) {\n            // Create the group.\n            main.mediaGroups[mediaType][id] = {};\n          } else {\n            // There is no need to iterate over label keys in this case.\n            continue;\n          }\n          for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n            const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n            main.mediaGroups[mediaType][id][labelKey] = _extends$1({}, oldMedia);\n            const newMedia = main.mediaGroups[mediaType][id][labelKey]; // update URIs on the media\n\n            const newUri = this.createCloneURI_(oldMedia.resolvedUri, clone);\n            newMedia.resolvedUri = newUri;\n            newMedia.uri = newUri; // Reset playlists in the new media group.\n\n            newMedia.playlists = []; // Create new playlists in the newly cloned media group.\n\n            oldMedia.playlists.forEach((p, i) => {\n              const oldMediaPlaylist = main.playlists[p.id];\n              const group = groupID(mediaType, id, labelKey);\n              const newPlaylistID = createPlaylistID(id, group); // Check to see if it already exists\n\n              if (oldMediaPlaylist && !main.playlists[newPlaylistID]) {\n                const newMediaPlaylist = this.createClonePlaylist_(oldMediaPlaylist, newPlaylistID, clone);\n                const newPlaylistUri = newMediaPlaylist.resolvedUri;\n                main.playlists[newPlaylistID] = newMediaPlaylist;\n                main.playlists[newPlaylistUri] = newMediaPlaylist;\n              }\n              newMedia.playlists[i] = this.createClonePlaylist_(p, newPlaylistID, clone);\n            });\n          }\n        }\n      });\n    }\n    /**\n     * Using the original playlist to be cloned, and the pathway clone object\n     * information, we create a new playlist.\n     *\n     * @param {Object} basePlaylist  The original playlist to be cloned from.\n     * @param {string} id The desired id of the newly cloned playlist.\n     * @param {Object} clone The pathway clone object.\n     * @param {Object} attributes An optional object to populate the `attributes` property in the playlist.\n     *\n     * @return {Object} The combined cloned playlist.\n     */\n\n    createClonePlaylist_(basePlaylist, id, clone, attributes) {\n      const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n      const newProps = {\n        resolvedUri: uri,\n        uri,\n        id\n      }; // Remove all segments from previous playlist in the clone.\n\n      if (basePlaylist.segments) {\n        newProps.segments = [];\n      }\n      if (attributes) {\n        newProps.attributes = attributes;\n      }\n      return merge(basePlaylist, newProps);\n    }\n    /**\n     * Generates an updated URI for a cloned pathway based on the original\n     * pathway's URI and the paramaters from the pathway clone object in the\n     * content steering server response.\n     *\n     * @param {string} baseUri URI to be updated in the cloned pathway.\n     * @param {Object} clone The pathway clone object.\n     *\n     * @return {string} The updated URI for the cloned pathway.\n     */\n\n    createCloneURI_(baseURI, clone) {\n      const uri = new URL(baseURI);\n      uri.hostname = clone['URI-REPLACEMENT'].HOST;\n      const params = clone['URI-REPLACEMENT'].PARAMS; // Add params to the cloned URL.\n\n      for (const key of Object.keys(params)) {\n        uri.searchParams.set(key, params[key]);\n      }\n      return uri.href;\n    }\n    /**\n     * Helper function to create the attributes needed for the new clone.\n     * This mainly adds the necessary media attributes.\n     *\n     * @param {string} id The pathway clone object ID.\n     * @param {Object} oldAttributes The old attributes to compare to.\n     * @return {Object} The new attributes to add to the playlist.\n     */\n\n    createCloneAttributes_(id, oldAttributes) {\n      const attributes = {\n        ['PATHWAY-ID']: id\n      };\n      ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n        if (oldAttributes[mediaType]) {\n          attributes[mediaType] = id;\n        }\n      });\n      return attributes;\n    }\n    /**\n     * Returns the key ID set from a playlist\n     *\n     * @param {playlist} playlist to fetch the key ID set from.\n     * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n     */\n\n    getKeyIdSet(playlist) {\n      if (playlist.contentProtection) {\n        const keyIds = new Set();\n        for (const keysystem in playlist.contentProtection) {\n          const keyId = playlist.contentProtection[keysystem].attributes.keyId;\n          if (keyId) {\n            keyIds.add(keyId.toLowerCase());\n          }\n        }\n        return keyIds;\n      }\n    }\n  }\n\n  /**\n   * @file xhr.js\n   */\n\n  const callbackWrapper = function (request, error, response, callback) {\n    const reqResponse = request.responseType === 'arraybuffer' ? request.response : request.responseText;\n    if (!error && reqResponse) {\n      request.responseTime = Date.now();\n      request.roundTripTime = request.responseTime - request.requestTime;\n      request.bytesReceived = reqResponse.byteLength || reqResponse.length;\n      if (!request.bandwidth) {\n        request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\n      }\n    }\n    if (response.headers) {\n      request.responseHeaders = response.headers;\n    } // videojs.xhr now uses a specific code on the error\n    // object to signal that a request has timed out instead\n    // of setting a boolean on the request object\n\n    if (error && error.code === 'ETIMEDOUT') {\n      request.timedout = true;\n    } // videojs.xhr no longer considers status codes outside of 200 and 0\n    // (for file uris) to be errors, but the old XHR did, so emulate that\n    // behavior. Status 206 may be used in response to byterange requests.\n\n    if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\n      error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\n    }\n    callback(error, request);\n  };\n  /**\n   * Iterates over the request hooks Set and calls them in order\n   *\n   * @param {Set} hooks the hook Set to iterate over\n   * @param {Object} options the request options to pass to the xhr wrapper\n   * @return the callback hook function return value, the modified or new options Object.\n   */\n\n  const callAllRequestHooks = (requestSet, options) => {\n    if (!requestSet || !requestSet.size) {\n      return;\n    }\n    let newOptions = options;\n    requestSet.forEach(requestCallback => {\n      newOptions = requestCallback(newOptions);\n    });\n    return newOptions;\n  };\n  /**\n   * Iterates over the response hooks Set and calls them in order.\n   *\n   * @param {Set} hooks the hook Set to iterate over\n   * @param {Object} request the xhr request object\n   * @param {Object} error the xhr error object\n   * @param {Object} response the xhr response object\n   */\n\n  const callAllResponseHooks = (responseSet, request, error, response) => {\n    if (!responseSet || !responseSet.size) {\n      return;\n    }\n    responseSet.forEach(responseCallback => {\n      responseCallback(request, error, response);\n    });\n  };\n  const xhrFactory = function () {\n    const xhr = function XhrFunction(options, callback) {\n      // Add a default timeout\n      options = merge({\n        timeout: 45e3\n      }, options); // Allow an optional user-specified function to modify the option\n      // object before we construct the xhr request\n      // TODO: Remove beforeRequest in the next major release.\n\n      const beforeRequest = XhrFunction.beforeRequest || videojs.Vhs.xhr.beforeRequest; // onRequest and onResponse hooks as a Set, at either the player or global level.\n      // TODO: new Set added here for beforeRequest alias. Remove this when beforeRequest is removed.\n\n      const _requestCallbackSet = XhrFunction._requestCallbackSet || videojs.Vhs.xhr._requestCallbackSet || new Set();\n      const _responseCallbackSet = XhrFunction._responseCallbackSet || videojs.Vhs.xhr._responseCallbackSet;\n      if (beforeRequest && typeof beforeRequest === 'function') {\n        videojs.log.warn('beforeRequest is deprecated, use onRequest instead.');\n        _requestCallbackSet.add(beforeRequest);\n      } // Use the standard videojs.xhr() method unless `videojs.Vhs.xhr` has been overriden\n      // TODO: switch back to videojs.Vhs.xhr.name === 'XhrFunction' when we drop IE11\n\n      const xhrMethod = videojs.Vhs.xhr.original === true ? videojs.xhr : videojs.Vhs.xhr; // call all registered onRequest hooks, assign new options.\n\n      const beforeRequestOptions = callAllRequestHooks(_requestCallbackSet, options); // Remove the beforeRequest function from the hooks set so stale beforeRequest functions are not called.\n\n      _requestCallbackSet.delete(beforeRequest); // xhrMethod will call XMLHttpRequest.open and XMLHttpRequest.send\n\n      const request = xhrMethod(beforeRequestOptions || options, function (error, response) {\n        // call all registered onResponse hooks\n        callAllResponseHooks(_responseCallbackSet, request, error, response);\n        return callbackWrapper(request, error, response, callback);\n      });\n      const originalAbort = request.abort;\n      request.abort = function () {\n        request.aborted = true;\n        return originalAbort.apply(request, arguments);\n      };\n      request.uri = options.uri;\n      request.requestType = options.requestType;\n      request.requestTime = Date.now();\n      return request;\n    };\n    xhr.original = true;\n    return xhr;\n  };\n  /**\n   * Turns segment byterange into a string suitable for use in\n   * HTTP Range requests\n   *\n   * @param {Object} byterange - an object with two values defining the start and end\n   *                             of a byte-range\n   */\n\n  const byterangeStr = function (byterange) {\n    // `byterangeEnd` is one less than `offset + length` because the HTTP range\n    // header uses inclusive ranges\n    let byterangeEnd;\n    const byterangeStart = byterange.offset;\n    if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n      byterangeEnd = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n    } else {\n      byterangeEnd = byterange.offset + byterange.length - 1;\n    }\n    return 'bytes=' + byterangeStart + '-' + byterangeEnd;\n  };\n  /**\n   * Defines headers for use in the xhr request for a particular segment.\n   *\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   */\n\n  const segmentXhrHeaders = function (segment) {\n    const headers = {};\n    if (segment.byterange) {\n      headers.Range = byterangeStr(segment.byterange);\n    }\n    return headers;\n  };\n\n  /**\n   * @file bin-utils.js\n   */\n\n  /**\n   * convert a TimeRange to text\n   *\n   * @param {TimeRange} range the timerange to use for conversion\n   * @param {number} i the iterator on the range to convert\n   * @return {string} the range in string format\n   */\n\n  const textRange = function (range, i) {\n    return range.start(i) + '-' + range.end(i);\n  };\n  /**\n   * format a number as hex string\n   *\n   * @param {number} e The number\n   * @param {number} i the iterator\n   * @return {string} the hex formatted number as a string\n   */\n\n  const formatHexString = function (e, i) {\n    const value = e.toString(16);\n    return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n  };\n  const formatAsciiString = function (e) {\n    if (e >= 0x20 && e < 0x7e) {\n      return String.fromCharCode(e);\n    }\n    return '.';\n  };\n  /**\n   * Creates an object for sending to a web worker modifying properties that are TypedArrays\n   * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n   *\n   * @param {Object} message\n   *        Object of properties and values to send to the web worker\n   * @return {Object}\n   *         Modified message with TypedArray values expanded\n   * @function createTransferableMessage\n   */\n\n  const createTransferableMessage = function (message) {\n    const transferable = {};\n    Object.keys(message).forEach(key => {\n      const value = message[key];\n      if (isArrayBufferView(value)) {\n        transferable[key] = {\n          bytes: value.buffer,\n          byteOffset: value.byteOffset,\n          byteLength: value.byteLength\n        };\n      } else {\n        transferable[key] = value;\n      }\n    });\n    return transferable;\n  };\n  /**\n   * Returns a unique string identifier for a media initialization\n   * segment.\n   *\n   * @param {Object} initSegment\n   *        the init segment object.\n   *\n   * @return {string} the generated init segment id\n   */\n\n  const initSegmentId = function (initSegment) {\n    const byterange = initSegment.byterange || {\n      length: Infinity,\n      offset: 0\n    };\n    return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\n  };\n  /**\n   * Returns a unique string identifier for a media segment key.\n   *\n   * @param {Object} key the encryption key\n   * @return {string} the unique id for the media segment key.\n   */\n\n  const segmentKeyId = function (key) {\n    return key.resolvedUri;\n  };\n  /**\n   * utils to help dump binary data to the console\n   *\n   * @param {Array|TypedArray} data\n   *        data to dump to a string\n   *\n   * @return {string} the data as a hex string.\n   */\n\n  const hexDump = data => {\n    const bytes = Array.prototype.slice.call(data);\n    const step = 16;\n    let result = '';\n    let hex;\n    let ascii;\n    for (let j = 0; j < bytes.length / step; j++) {\n      hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\n      ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\n      result += hex + ' ' + ascii + '\\n';\n    }\n    return result;\n  };\n  const tagDump = ({\n    bytes\n  }) => hexDump(bytes);\n  const textRanges = ranges => {\n    let result = '';\n    let i;\n    for (i = 0; i < ranges.length; i++) {\n      result += textRange(ranges, i) + ' ';\n    }\n    return result;\n  };\n  var utils = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    createTransferableMessage: createTransferableMessage,\n    initSegmentId: initSegmentId,\n    segmentKeyId: segmentKeyId,\n    hexDump: hexDump,\n    tagDump: tagDump,\n    textRanges: textRanges\n  });\n\n  // TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\n  // 25% was arbitrarily chosen, and may need to be refined over time.\n\n  const SEGMENT_END_FUDGE_PERCENT = 0.25;\n  /**\n   * Converts a player time (any time that can be gotten/set from player.currentTime(),\n   * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\n   * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\n   *\n   * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \"anchor\n   * point\" (a point where we have a mapping from program time to player time, with player\n   * time being the post transmux start of the segment).\n   *\n   * For more details, see [this doc](../../docs/program-time-from-player-time.md).\n   *\n   * @param {number} playerTime the player time\n   * @param {Object} segment the segment which contains the player time\n   * @return {Date} program time\n   */\n\n  const playerTimeToProgramTime = (playerTime, segment) => {\n    if (!segment.dateTimeObject) {\n      // Can't convert without an \"anchor point\" for the program time (i.e., a time that can\n      // be used to map the start of a segment with a real world time).\n      return null;\n    }\n    const transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n    const transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n    const startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n    const offsetFromSegmentStart = playerTime - startOfSegment;\n    return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n  };\n  const originalSegmentVideoDuration = videoTimingInfo => {\n    return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\n  };\n  /**\n   * Finds a segment that contains the time requested given as an ISO-8601 string. The\n   * returned segment might be an estimate or an accurate match.\n   *\n   * @param {string} programTime The ISO-8601 programTime to find a match for\n   * @param {Object} playlist A playlist object to search within\n   */\n\n  const findSegmentForProgramTime = (programTime, playlist) => {\n    // Assumptions:\n    //  - verifyProgramDateTimeTags has already been run\n    //  - live streams have been started\n    let dateTimeObject;\n    try {\n      dateTimeObject = new Date(programTime);\n    } catch (e) {\n      return null;\n    }\n    if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n      return null;\n    }\n    let segment = playlist.segments[0];\n    if (dateTimeObject < new Date(segment.dateTimeObject)) {\n      // Requested time is before stream start.\n      return null;\n    }\n    for (let i = 0; i < playlist.segments.length - 1; i++) {\n      segment = playlist.segments[i];\n      const nextSegmentStart = new Date(playlist.segments[i + 1].dateTimeObject);\n      if (dateTimeObject < nextSegmentStart) {\n        break;\n      }\n    }\n    const lastSegment = playlist.segments[playlist.segments.length - 1];\n    const lastSegmentStart = lastSegment.dateTimeObject;\n    const lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n    const lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\n    if (dateTimeObject > lastSegmentEnd) {\n      // Beyond the end of the stream, or our best guess of the end of the stream.\n      return null;\n    }\n    if (dateTimeObject > new Date(lastSegmentStart)) {\n      segment = lastSegment;\n    }\n    return {\n      segment,\n      estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\n      // Although, given that all segments have accurate date time objects, the segment\n      // selected should be accurate, unless the video has been transmuxed at some point\n      // (determined by the presence of the videoTimingInfo object), the segment's \"player\n      // time\" (the start time in the player) can't be considered accurate.\n      type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n    };\n  };\n  /**\n   * Finds a segment that contains the given player time(in seconds).\n   *\n   * @param {number} time The player time to find a match for\n   * @param {Object} playlist A playlist object to search within\n   */\n\n  const findSegmentForPlayerTime = (time, playlist) => {\n    // Assumptions:\n    // - there will always be a segment.duration\n    // - we can start from zero\n    // - segments are in time order\n    if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n      return null;\n    }\n    let segmentEnd = 0;\n    let segment;\n    for (let i = 0; i < playlist.segments.length; i++) {\n      segment = playlist.segments[i]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\n      // should contain the most accurate values we have for the segment's player times.\n      //\n      // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\n      // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\n      // calculate an end value.\n\n      segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\n      if (time <= segmentEnd) {\n        break;\n      }\n    }\n    const lastSegment = playlist.segments[playlist.segments.length - 1];\n    if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\n      // The time requested is beyond the stream end.\n      return null;\n    }\n    if (time > segmentEnd) {\n      // The time is within or beyond the last segment.\n      //\n      // Check to see if the time is beyond a reasonable guess of the end of the stream.\n      if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\n        // Technically, because the duration value is only an estimate, the time may still\n        // exist in the last segment, however, there isn't enough information to make even\n        // a reasonable estimate.\n        return null;\n      }\n      segment = lastSegment;\n    }\n    return {\n      segment,\n      estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\n      // Because videoTimingInfo is only set after transmux, it is the only way to get\n      // accurate timing values.\n      type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n    };\n  };\n  /**\n   * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\n   * If the offset returned is positive, the programTime occurs after the\n   * comparisonTimestamp.\n   * If the offset is negative, the programTime occurs before the comparisonTimestamp.\n   *\n   * @param {string} comparisonTimeStamp An ISO-8601 timestamp to compare against\n   * @param {string} programTime The programTime as an ISO-8601 string\n   * @return {number} offset\n   */\n\n  const getOffsetFromTimestamp = (comparisonTimeStamp, programTime) => {\n    let segmentDateTime;\n    let programDateTime;\n    try {\n      segmentDateTime = new Date(comparisonTimeStamp);\n      programDateTime = new Date(programTime);\n    } catch (e) {// TODO handle error\n    }\n    const segmentTimeEpoch = segmentDateTime.getTime();\n    const programTimeEpoch = programDateTime.getTime();\n    return (programTimeEpoch - segmentTimeEpoch) / 1000;\n  };\n  /**\n   * Checks that all segments in this playlist have programDateTime tags.\n   *\n   * @param {Object} playlist A playlist object\n   */\n\n  const verifyProgramDateTimeTags = playlist => {\n    if (!playlist.segments || playlist.segments.length === 0) {\n      return false;\n    }\n    for (let i = 0; i < playlist.segments.length; i++) {\n      const segment = playlist.segments[i];\n      if (!segment.dateTimeObject) {\n        return false;\n      }\n    }\n    return true;\n  };\n  /**\n   * Returns the programTime of the media given a playlist and a playerTime.\n   * The playlist must have programDateTime tags for a programDateTime tag to be returned.\n   * If the segments containing the time requested have not been buffered yet, an estimate\n   * may be returned to the callback.\n   *\n   * @param {Object} args\n   * @param {Object} args.playlist A playlist object to search within\n   * @param {number} time A playerTime in seconds\n   * @param {Function} callback(err, programTime)\n   * @return {string} err.message A detailed error message\n   * @return {Object} programTime\n   * @return {number} programTime.mediaSeconds The streamTime in seconds\n   * @return {string} programTime.programDateTime The programTime as an ISO-8601 String\n   */\n\n  const getProgramTime = ({\n    playlist,\n    time = undefined,\n    callback\n  }) => {\n    if (!callback) {\n      throw new Error('getProgramTime: callback must be provided');\n    }\n    if (!playlist || time === undefined) {\n      return callback({\n        message: 'getProgramTime: playlist and time must be provided'\n      });\n    }\n    const matchedSegment = findSegmentForPlayerTime(time, playlist);\n    if (!matchedSegment) {\n      return callback({\n        message: 'valid programTime was not found'\n      });\n    }\n    if (matchedSegment.type === 'estimate') {\n      return callback({\n        message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\n        seekTime: matchedSegment.estimatedStart\n      });\n    }\n    const programTimeObject = {\n      mediaSeconds: time\n    };\n    const programTime = playerTimeToProgramTime(time, matchedSegment.segment);\n    if (programTime) {\n      programTimeObject.programDateTime = programTime.toISOString();\n    }\n    return callback(null, programTimeObject);\n  };\n  /**\n   * Seeks in the player to a time that matches the given programTime ISO-8601 string.\n   *\n   * @param {Object} args\n   * @param {string} args.programTime A programTime to seek to as an ISO-8601 String\n   * @param {Object} args.playlist A playlist to look within\n   * @param {number} args.retryCount The number of times to try for an accurate seek. Default is 2.\n   * @param {Function} args.seekTo A method to perform a seek\n   * @param {boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\n   * @param {Object} args.tech The tech to seek on\n   * @param {Function} args.callback(err, newTime) A callback to return the new time to\n   * @return {string} err.message A detailed error message\n   * @return {number} newTime The exact time that was seeked to in seconds\n   */\n\n  const seekToProgramTime = ({\n    programTime,\n    playlist,\n    retryCount = 2,\n    seekTo,\n    pauseAfterSeek = true,\n    tech,\n    callback\n  }) => {\n    if (!callback) {\n      throw new Error('seekToProgramTime: callback must be provided');\n    }\n    if (typeof programTime === 'undefined' || !playlist || !seekTo) {\n      return callback({\n        message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\n      });\n    }\n    if (!playlist.endList && !tech.hasStarted_) {\n      return callback({\n        message: 'player must be playing a live stream to start buffering'\n      });\n    }\n    if (!verifyProgramDateTimeTags(playlist)) {\n      return callback({\n        message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\n      });\n    }\n    const matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n    if (!matchedSegment) {\n      return callback({\n        message: `${programTime} was not found in the stream`\n      });\n    }\n    const segment = matchedSegment.segment;\n    const mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\n    if (matchedSegment.type === 'estimate') {\n      // we've run out of retries\n      if (retryCount === 0) {\n        return callback({\n          message: `${programTime} is not buffered yet. Try again`\n        });\n      }\n      seekTo(matchedSegment.estimatedStart + mediaOffset);\n      tech.one('seeked', () => {\n        seekToProgramTime({\n          programTime,\n          playlist,\n          retryCount: retryCount - 1,\n          seekTo,\n          pauseAfterSeek,\n          tech,\n          callback\n        });\n      });\n      return;\n    } // Since the segment.start value is determined from the buffered end or ending time\n    // of the prior segment, the seekToTime doesn't need to account for any transmuxer\n    // modifications.\n\n    const seekToTime = segment.start + mediaOffset;\n    const seekedCallback = () => {\n      return callback(null, tech.currentTime());\n    }; // listen for seeked event\n\n    tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\n\n    if (pauseAfterSeek) {\n      tech.pause();\n    }\n    seekTo(seekToTime);\n  };\n\n  // which will only happen if the request is complete.\n\n  const callbackOnCompleted = (request, cb) => {\n    if (request.readyState === 4) {\n      return cb();\n    }\n    return;\n  };\n  const containerRequest = (uri, xhr, cb, requestType) => {\n    let bytes = [];\n    let id3Offset;\n    let finished = false;\n    const endRequestAndCallback = function (err, req, type, _bytes) {\n      req.abort();\n      finished = true;\n      return cb(err, req, type, _bytes);\n    };\n    const progressListener = function (error, request) {\n      if (finished) {\n        return;\n      }\n      if (error) {\n        error.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request,\n          error\n        });\n        return endRequestAndCallback(error, request, '', bytes);\n      } // grap the new part of content that was just downloaded\n\n      const newPart = request.responseText.substring(bytes && bytes.byteLength || 0, request.responseText.length); // add that onto bytes\n\n      bytes = concatTypedArrays(bytes, stringToBytes(newPart, true));\n      id3Offset = id3Offset || getId3Offset(bytes); // we need at least 10 bytes to determine a type\n      // or we need at least two bytes after an id3Offset\n\n      if (bytes.length < 10 || id3Offset && bytes.length < id3Offset + 2) {\n        return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n      }\n      const type = detectContainerForBytes(bytes); // if this looks like a ts segment but we don't have enough data\n      // to see the second sync byte, wait until we have enough data\n      // before declaring it ts\n\n      if (type === 'ts' && bytes.length < 188) {\n        return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n      } // this may be an unsynced ts segment\n      // wait for 376 bytes before detecting no container\n\n      if (!type && bytes.length < 376) {\n        return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n      }\n      return endRequestAndCallback(null, request, type, bytes);\n    };\n    const options = {\n      uri,\n      beforeSend(request) {\n        // this forces the browser to pass the bytes to us unprocessed\n        request.overrideMimeType('text/plain; charset=x-user-defined');\n        request.addEventListener('progress', function ({\n          total,\n          loaded\n        }) {\n          return callbackWrapper(request, null, {\n            statusCode: request.status\n          }, progressListener);\n        });\n      }\n    };\n    const request = xhr(options, function (error, response) {\n      return callbackWrapper(request, error, response, progressListener);\n    });\n    return request;\n  };\n  const {\n    EventTarget\n  } = videojs;\n  const dashPlaylistUnchanged = function (a, b) {\n    if (!isPlaylistUnchanged(a, b)) {\n      return false;\n    } // for dash the above check will often return true in scenarios where\n    // the playlist actually has changed because mediaSequence isn't a\n    // dash thing, and we often set it to 1. So if the playlists have the same amount\n    // of segments we return true.\n    // So for dash we need to make sure that the underlying segments are different.\n    // if sidx changed then the playlists are different.\n\n    if (a.sidx && b.sidx && (a.sidx.offset !== b.sidx.offset || a.sidx.length !== b.sidx.length)) {\n      return false;\n    } else if (!a.sidx && b.sidx || a.sidx && !b.sidx) {\n      return false;\n    } // one or the other does not have segments\n    // there was a change.\n\n    if (a.segments && !b.segments || !a.segments && b.segments) {\n      return false;\n    } // neither has segments nothing changed\n\n    if (!a.segments && !b.segments) {\n      return true;\n    } // check segments themselves\n\n    for (let i = 0; i < a.segments.length; i++) {\n      const aSegment = a.segments[i];\n      const bSegment = b.segments[i]; // if uris are different between segments there was a change\n\n      if (aSegment.uri !== bSegment.uri) {\n        return false;\n      } // neither segment has a byterange, there will be no byterange change.\n\n      if (!aSegment.byterange && !bSegment.byterange) {\n        continue;\n      }\n      const aByterange = aSegment.byterange;\n      const bByterange = bSegment.byterange; // if byterange only exists on one of the segments, there was a change.\n\n      if (aByterange && !bByterange || !aByterange && bByterange) {\n        return false;\n      } // if both segments have byterange with different offsets, there was a change.\n\n      if (aByterange.offset !== bByterange.offset || aByterange.length !== bByterange.length) {\n        return false;\n      }\n    } // if everything was the same with segments, this is the same playlist.\n\n    return true;\n  };\n  /**\n   * Use the representation IDs from the mpd object to create groupIDs, the NAME is set to mandatory representation\n   * ID in the parser. This allows for continuous playout across periods with the same representation IDs\n   * (continuous periods as defined in DASH-IF 3.2.12). This is assumed in the mpd-parser as well. If we want to support\n   * periods without continuous playback this function may need modification as well as the parser.\n   */\n\n  const dashGroupId = (type, group, label, playlist) => {\n    // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n    const playlistId = playlist.attributes.NAME || label;\n    return `placeholder-uri-${type}-${group}-${playlistId}`;\n  };\n  /**\n   * Parses the main XML string and updates playlist URI references.\n   *\n   * @param {Object} config\n   *        Object of arguments\n   * @param {string} config.mainXml\n   *        The mpd XML\n   * @param {string} config.srcUrl\n   *        The mpd URL\n   * @param {Date} config.clientOffset\n   *         A time difference between server and client\n   * @param {Object} config.sidxMapping\n   *        SIDX mappings for moof/mdat URIs and byte ranges\n   * @return {Object}\n   *         The parsed mpd manifest object\n   */\n\n  const parseMainXml = ({\n    mainXml,\n    srcUrl,\n    clientOffset,\n    sidxMapping,\n    previousManifest\n  }) => {\n    const manifest = parse(mainXml, {\n      manifestUri: srcUrl,\n      clientOffset,\n      sidxMapping,\n      previousManifest\n    });\n    addPropertiesToMain(manifest, srcUrl, dashGroupId);\n    return manifest;\n  };\n  /**\n   * Removes any mediaGroup labels that no longer exist in the newMain\n   *\n   * @param {Object} update\n   *         The previous mpd object being updated\n   * @param {Object} newMain\n   *         The new mpd object\n   */\n\n  const removeOldMediaGroupLabels = (update, newMain) => {\n    forEachMediaGroup(update, (properties, type, group, label) => {\n      if (!newMain.mediaGroups[type][group] || !(label in newMain.mediaGroups[type][group])) {\n        delete update.mediaGroups[type][group][label];\n      }\n    });\n  };\n  /**\n   * Returns a new main manifest that is the result of merging an updated main manifest\n   * into the original version.\n   *\n   * @param {Object} oldMain\n   *        The old parsed mpd object\n   * @param {Object} newMain\n   *        The updated parsed mpd object\n   * @return {Object}\n   *         A new object representing the original main manifest with the updated media\n   *         playlists merged in\n   */\n\n  const updateMain = (oldMain, newMain, sidxMapping) => {\n    let noChanges = true;\n    let update = merge(oldMain, {\n      // These are top level properties that can be updated\n      duration: newMain.duration,\n      minimumUpdatePeriod: newMain.minimumUpdatePeriod,\n      timelineStarts: newMain.timelineStarts\n    }); // First update the playlists in playlist list\n\n    for (let i = 0; i < newMain.playlists.length; i++) {\n      const playlist = newMain.playlists[i];\n      if (playlist.sidx) {\n        const sidxKey = generateSidxKey(playlist.sidx); // add sidx segments to the playlist if we have all the sidx info already\n\n        if (sidxMapping && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx) {\n          addSidxSegmentsToPlaylist$1(playlist, sidxMapping[sidxKey].sidx, playlist.sidx.resolvedUri);\n        }\n      }\n      const playlistUpdate = updateMain$1(update, playlist, dashPlaylistUnchanged);\n      if (playlistUpdate) {\n        update = playlistUpdate;\n        noChanges = false;\n      }\n    } // Then update media group playlists\n\n    forEachMediaGroup(newMain, (properties, type, group, label) => {\n      if (properties.playlists && properties.playlists.length) {\n        const id = properties.playlists[0].id;\n        const playlistUpdate = updateMain$1(update, properties.playlists[0], dashPlaylistUnchanged);\n        if (playlistUpdate) {\n          update = playlistUpdate; // add new mediaGroup label if it doesn't exist and assign the new mediaGroup.\n\n          if (!(label in update.mediaGroups[type][group])) {\n            update.mediaGroups[type][group][label] = properties;\n          } // update the playlist reference within media groups\n\n          update.mediaGroups[type][group][label].playlists[0] = update.playlists[id];\n          noChanges = false;\n        }\n      }\n    }); // remove mediaGroup labels and references that no longer exist in the newMain\n\n    removeOldMediaGroupLabels(update, newMain);\n    if (newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n      noChanges = false;\n    }\n    if (noChanges) {\n      return null;\n    }\n    return update;\n  }; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\n  // If the SIDXs have maps, the two maps should match,\n  // both `a` and `b` missing SIDXs is considered matching.\n  // If `a` or `b` but not both have a map, they aren't matching.\n\n  const equivalentSidx = (a, b) => {\n    const neitherMap = Boolean(!a.map && !b.map);\n    const equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\n    return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\n  }; // exported for testing\n\n  const compareSidxEntry = (playlists, oldSidxMapping) => {\n    const newSidxMapping = {};\n    for (const id in playlists) {\n      const playlist = playlists[id];\n      const currentSidxInfo = playlist.sidx;\n      if (currentSidxInfo) {\n        const key = generateSidxKey(currentSidxInfo);\n        if (!oldSidxMapping[key]) {\n          break;\n        }\n        const savedSidxInfo = oldSidxMapping[key].sidxInfo;\n        if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\n          newSidxMapping[key] = oldSidxMapping[key];\n        }\n      }\n    }\n    return newSidxMapping;\n  };\n  /**\n   *  A function that filters out changed items as they need to be requested separately.\n   *\n   *  The method is exported for testing\n   *\n   *  @param {Object} main the parsed mpd XML returned via mpd-parser\n   *  @param {Object} oldSidxMapping the SIDX to compare against\n   */\n\n  const filterChangedSidxMappings = (main, oldSidxMapping) => {\n    const videoSidx = compareSidxEntry(main.playlists, oldSidxMapping);\n    let mediaGroupSidx = videoSidx;\n    forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n      if (properties.playlists && properties.playlists.length) {\n        const playlists = properties.playlists;\n        mediaGroupSidx = merge(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n      }\n    });\n    return mediaGroupSidx;\n  };\n  class DashPlaylistLoader extends EventTarget {\n    // DashPlaylistLoader must accept either a src url or a playlist because subsequent\n    // playlist loader setups from media groups will expect to be able to pass a playlist\n    // (since there aren't external URLs to media playlists with DASH)\n    constructor(srcUrlOrPlaylist, vhs, options = {}, mainPlaylistLoader) {\n      super();\n      this.isPaused_ = true;\n      this.mainPlaylistLoader_ = mainPlaylistLoader || this;\n      if (!mainPlaylistLoader) {\n        this.isMain_ = true;\n      }\n      const {\n        withCredentials = false\n      } = options;\n      this.vhs_ = vhs;\n      this.withCredentials = withCredentials;\n      this.addMetadataToTextTrack = options.addMetadataToTextTrack;\n      if (!srcUrlOrPlaylist) {\n        throw new Error('A non-empty playlist URL or object is required');\n      } // event naming?\n\n      this.on('minimumUpdatePeriod', () => {\n        this.refreshXml_();\n      }); // live playlist staleness timeout\n\n      this.on('mediaupdatetimeout', () => {\n        this.refreshMedia_(this.media().id);\n      });\n      this.state = 'HAVE_NOTHING';\n      this.loadedPlaylists_ = {};\n      this.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n      // The mainPlaylistLoader will be created with a string\n\n      if (this.isMain_) {\n        this.mainPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n        // once multi-period is refactored\n\n        this.mainPlaylistLoader_.sidxMapping_ = {};\n      } else {\n        this.childPlaylist_ = srcUrlOrPlaylist;\n      }\n    }\n    get isPaused() {\n      return this.isPaused_;\n    }\n    requestErrored_(err, request, startingState) {\n      // disposed\n      if (!this.request) {\n        return true;\n      } // pending request is cleared\n\n      this.request = null;\n      if (err) {\n        // use the provided error object or create one\n        // based on the request/response\n        this.error = typeof err === 'object' && !(err instanceof Error) ? err : {\n          status: request.status,\n          message: 'DASH request error at URL: ' + request.uri,\n          response: request.response,\n          // MEDIA_ERR_NETWORK\n          code: 2,\n          metadata: err.metadata\n        };\n        if (startingState) {\n          this.state = startingState;\n        }\n        this.trigger('error');\n        return true;\n      }\n    }\n    /**\n     * Verify that the container of the sidx segment can be parsed\n     * and if it can, get and parse that segment.\n     */\n\n    addSidxSegments_(playlist, startingState, cb) {\n      const sidxKey = playlist.sidx && generateSidxKey(playlist.sidx); // playlist lacks sidx or sidx segments were added to this playlist already.\n\n      if (!playlist.sidx || !sidxKey || this.mainPlaylistLoader_.sidxMapping_[sidxKey]) {\n        // keep this function async\n        window.clearTimeout(this.mediaRequest_);\n        this.mediaRequest_ = window.setTimeout(() => cb(false), 0);\n        return;\n      } // resolve the segment URL relative to the playlist\n\n      const uri = resolveManifestRedirect(playlist.sidx.resolvedUri);\n      const fin = (err, request) => {\n        if (this.requestErrored_(err, request, startingState)) {\n          return;\n        }\n        const sidxMapping = this.mainPlaylistLoader_.sidxMapping_;\n        const {\n          requestType\n        } = request;\n        let sidx;\n        try {\n          sidx = parseSidx_1(toUint8(request.response).subarray(8));\n        } catch (e) {\n          e.metadata = getStreamingNetworkErrorMetadata({\n            requestType,\n            request,\n            parseFailure: true\n          }); // sidx parsing failed.\n\n          this.requestErrored_(e, request, startingState);\n          return;\n        }\n        sidxMapping[sidxKey] = {\n          sidxInfo: playlist.sidx,\n          sidx\n        };\n        addSidxSegmentsToPlaylist$1(playlist, sidx, playlist.sidx.resolvedUri);\n        return cb(true);\n      };\n      const REQUEST_TYPE = 'dash-sidx';\n      this.request = containerRequest(uri, this.vhs_.xhr, (err, request, container, bytes) => {\n        if (err) {\n          return fin(err, request);\n        }\n        if (!container || container !== 'mp4') {\n          const sidxContainer = container || 'unknown';\n          return fin({\n            status: request.status,\n            message: `Unsupported ${sidxContainer} container type for sidx segment at URL: ${uri}`,\n            // response is just bytes in this case\n            // but we really don't want to return that.\n            response: '',\n            playlist,\n            internal: true,\n            playlistExclusionDuration: Infinity,\n            // MEDIA_ERR_NETWORK\n            code: 2\n          }, request);\n        } // if we already downloaded the sidx bytes in the container request, use them\n\n        const {\n          offset,\n          length\n        } = playlist.sidx.byterange;\n        if (bytes.length >= length + offset) {\n          return fin(err, {\n            response: bytes.subarray(offset, offset + length),\n            status: request.status,\n            uri: request.uri\n          });\n        } // otherwise request sidx bytes\n\n        this.request = this.vhs_.xhr({\n          uri,\n          responseType: 'arraybuffer',\n          requestType: 'dash-sidx',\n          headers: segmentXhrHeaders({\n            byterange: playlist.sidx.byterange\n          })\n        }, fin);\n      }, REQUEST_TYPE);\n    }\n    dispose() {\n      this.isPaused_ = true;\n      this.trigger('dispose');\n      this.stopRequest();\n      this.loadedPlaylists_ = {};\n      window.clearTimeout(this.minimumUpdatePeriodTimeout_);\n      window.clearTimeout(this.mediaRequest_);\n      window.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n      this.mediaRequest_ = null;\n      this.minimumUpdatePeriodTimeout_ = null;\n      if (this.mainPlaylistLoader_.createMupOnMedia_) {\n        this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n        this.mainPlaylistLoader_.createMupOnMedia_ = null;\n      }\n      this.off();\n    }\n    hasPendingRequest() {\n      return this.request || this.mediaRequest_;\n    }\n    stopRequest() {\n      if (this.request) {\n        const oldRequest = this.request;\n        this.request = null;\n        oldRequest.onreadystatechange = null;\n        oldRequest.abort();\n      }\n    }\n    media(playlist) {\n      // getter\n      if (!playlist) {\n        return this.media_;\n      } // setter\n\n      if (this.state === 'HAVE_NOTHING') {\n        throw new Error('Cannot switch media playlist from ' + this.state);\n      }\n      const startingState = this.state; // find the playlist object if the target playlist has been specified by URI\n\n      if (typeof playlist === 'string') {\n        if (!this.mainPlaylistLoader_.main.playlists[playlist]) {\n          throw new Error('Unknown playlist URI: ' + playlist);\n        }\n        playlist = this.mainPlaylistLoader_.main.playlists[playlist];\n      }\n      const mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to previously loaded playlists immediately\n\n      if (mediaChange && this.loadedPlaylists_[playlist.id] && this.loadedPlaylists_[playlist.id].endList) {\n        this.state = 'HAVE_METADATA';\n        this.media_ = playlist; // trigger media change if the active media has been updated\n\n        if (mediaChange) {\n          this.trigger('mediachanging');\n          this.trigger('mediachange');\n        }\n        return;\n      } // switching to the active playlist is a no-op\n\n      if (!mediaChange) {\n        return;\n      } // switching from an already loaded playlist\n\n      if (this.media_) {\n        this.trigger('mediachanging');\n      }\n      this.addSidxSegments_(playlist, startingState, sidxChanged => {\n        // everything is ready just continue to haveMetadata\n        this.haveMetadata({\n          startingState,\n          playlist\n        });\n      });\n    }\n    haveMetadata({\n      startingState,\n      playlist\n    }) {\n      this.state = 'HAVE_METADATA';\n      this.loadedPlaylists_[playlist.id] = playlist;\n      window.clearTimeout(this.mediaRequest_);\n      this.mediaRequest_ = null; // This will trigger loadedplaylist\n\n      this.refreshMedia_(playlist.id); // fire loadedmetadata the first time a media playlist is loaded\n      // to resolve setup of media groups\n\n      if (startingState === 'HAVE_MAIN_MANIFEST') {\n        this.trigger('loadedmetadata');\n      } else {\n        // trigger media change if the active media has been updated\n        this.trigger('mediachange');\n      }\n    }\n    pause() {\n      this.isPaused_ = true;\n      if (this.mainPlaylistLoader_.createMupOnMedia_) {\n        this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n        this.mainPlaylistLoader_.createMupOnMedia_ = null;\n      }\n      this.stopRequest();\n      window.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n      if (this.isMain_) {\n        window.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_);\n        this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_ = null;\n      }\n      if (this.state === 'HAVE_NOTHING') {\n        // If we pause the loader before any data has been retrieved, its as if we never\n        // started, so reset to an unstarted state.\n        this.started = false;\n      }\n    }\n    load(isFinalRendition) {\n      this.isPaused_ = false;\n      window.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n      const media = this.media();\n      if (isFinalRendition) {\n        const delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n        this.mediaUpdateTimeout = window.setTimeout(() => this.load(), delay);\n        return;\n      } // because the playlists are internal to the manifest, load should either load the\n      // main manifest, or do nothing but trigger an event\n\n      if (!this.started) {\n        this.start();\n        return;\n      }\n      if (media && !media.endList) {\n        // Check to see if this is the main loader and the MUP was cleared (this happens\n        // when the loader was paused). `media` should be set at this point since one is always\n        // set during `start()`.\n        if (this.isMain_ && !this.minimumUpdatePeriodTimeout_) {\n          // Trigger minimumUpdatePeriod to refresh the main manifest\n          this.trigger('minimumUpdatePeriod'); // Since there was no prior minimumUpdatePeriodTimeout it should be recreated\n\n          this.updateMinimumUpdatePeriodTimeout_();\n        }\n        this.trigger('mediaupdatetimeout');\n      } else {\n        this.trigger('loadedplaylist');\n      }\n    }\n    start() {\n      this.started = true; // We don't need to request the main manifest again\n      // Call this asynchronously to match the xhr request behavior below\n\n      if (!this.isMain_) {\n        window.clearTimeout(this.mediaRequest_);\n        this.mediaRequest_ = window.setTimeout(() => this.haveMain_(), 0);\n        return;\n      }\n      this.requestMain_((req, mainChanged) => {\n        this.haveMain_();\n        if (!this.hasPendingRequest() && !this.media_) {\n          this.media(this.mainPlaylistLoader_.main.playlists[0]);\n        }\n      });\n    }\n    requestMain_(cb) {\n      const metadata = {\n        manifestInfo: {\n          uri: this.mainPlaylistLoader_.srcUrl\n        }\n      };\n      this.trigger({\n        type: 'manifestrequeststart',\n        metadata\n      });\n      this.request = this.vhs_.xhr({\n        uri: this.mainPlaylistLoader_.srcUrl,\n        withCredentials: this.withCredentials,\n        requestType: 'dash-manifest'\n      }, (error, req) => {\n        if (error) {\n          const {\n            requestType\n          } = req;\n          error.metadata = getStreamingNetworkErrorMetadata({\n            requestType,\n            request: req,\n            error\n          });\n        }\n        if (this.requestErrored_(error, req)) {\n          if (this.state === 'HAVE_NOTHING') {\n            this.started = false;\n          }\n          return;\n        }\n        this.trigger({\n          type: 'manifestrequestcomplete',\n          metadata\n        });\n        const mainChanged = req.responseText !== this.mainPlaylistLoader_.mainXml_;\n        this.mainPlaylistLoader_.mainXml_ = req.responseText;\n        if (req.responseHeaders && req.responseHeaders.date) {\n          this.mainLoaded_ = Date.parse(req.responseHeaders.date);\n        } else {\n          this.mainLoaded_ = Date.now();\n        }\n        this.mainPlaylistLoader_.srcUrl = resolveManifestRedirect(this.mainPlaylistLoader_.srcUrl, req);\n        if (mainChanged) {\n          this.handleMain_();\n          this.syncClientServerClock_(() => {\n            return cb(req, mainChanged);\n          });\n          return;\n        }\n        return cb(req, mainChanged);\n      });\n    }\n    /**\n     * Parses the main xml for UTCTiming node to sync the client clock to the server\n     * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\n     *\n     * @param {Function} done\n     *        Function to call when clock sync has completed\n     */\n\n    syncClientServerClock_(done) {\n      const utcTiming = parseUTCTiming(this.mainPlaylistLoader_.mainXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\n      // server clock\n\n      if (utcTiming === null) {\n        this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n        return done();\n      }\n      if (utcTiming.method === 'DIRECT') {\n        this.mainPlaylistLoader_.clientOffset_ = utcTiming.value - Date.now();\n        return done();\n      }\n      this.request = this.vhs_.xhr({\n        uri: resolveUrl(this.mainPlaylistLoader_.srcUrl, utcTiming.value),\n        method: utcTiming.method,\n        withCredentials: this.withCredentials,\n        requestType: 'dash-clock-sync'\n      }, (error, req) => {\n        // disposed\n        if (!this.request) {\n          return;\n        }\n        if (error) {\n          const {\n            requestType\n          } = req;\n          this.error.metadata = getStreamingNetworkErrorMetadata({\n            requestType,\n            request: req,\n            error\n          }); // sync request failed, fall back to using date header from mpd\n          // TODO: log warning\n\n          this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n          return done();\n        }\n        let serverTime;\n        if (utcTiming.method === 'HEAD') {\n          if (!req.responseHeaders || !req.responseHeaders.date) {\n            // expected date header not preset, fall back to using date header from mpd\n            // TODO: log warning\n            serverTime = this.mainLoaded_;\n          } else {\n            serverTime = Date.parse(req.responseHeaders.date);\n          }\n        } else {\n          serverTime = Date.parse(req.responseText);\n        }\n        this.mainPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n        done();\n      });\n    }\n    haveMain_() {\n      this.state = 'HAVE_MAIN_MANIFEST';\n      if (this.isMain_) {\n        // We have the main playlist at this point, so\n        // trigger this to allow PlaylistController\n        // to make an initial playlist selection\n        this.trigger('loadedplaylist');\n      } else if (!this.media_) {\n        // no media playlist was specifically selected so select\n        // the one the child playlist loader was created with\n        this.media(this.childPlaylist_);\n      }\n    }\n    handleMain_() {\n      // clear media request\n      window.clearTimeout(this.mediaRequest_);\n      this.mediaRequest_ = null;\n      const oldMain = this.mainPlaylistLoader_.main;\n      const metadata = {\n        manifestInfo: {\n          uri: this.mainPlaylistLoader_.srcUrl\n        }\n      };\n      this.trigger({\n        type: 'manifestparsestart',\n        metadata\n      });\n      let newMain;\n      try {\n        newMain = parseMainXml({\n          mainXml: this.mainPlaylistLoader_.mainXml_,\n          srcUrl: this.mainPlaylistLoader_.srcUrl,\n          clientOffset: this.mainPlaylistLoader_.clientOffset_,\n          sidxMapping: this.mainPlaylistLoader_.sidxMapping_,\n          previousManifest: oldMain\n        });\n      } catch (error) {\n        this.error = error;\n        this.error.metadata = {\n          errorType: videojs.Error.StreamingDashManifestParserError,\n          error\n        };\n        this.trigger('error');\n      } // if we have an old main to compare the new main against\n\n      if (oldMain) {\n        newMain = updateMain(oldMain, newMain, this.mainPlaylistLoader_.sidxMapping_);\n      } // only update main if we have a new main\n\n      this.mainPlaylistLoader_.main = newMain ? newMain : oldMain;\n      const location = this.mainPlaylistLoader_.main.locations && this.mainPlaylistLoader_.main.locations[0];\n      if (location && location !== this.mainPlaylistLoader_.srcUrl) {\n        this.mainPlaylistLoader_.srcUrl = location;\n      }\n      if (!oldMain || newMain && newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n        this.updateMinimumUpdatePeriodTimeout_();\n      }\n      this.addEventStreamToMetadataTrack_(newMain);\n      if (newMain) {\n        const {\n          duration,\n          endList\n        } = newMain;\n        const renditions = [];\n        newMain.playlists.forEach(playlist => {\n          renditions.push({\n            id: playlist.id,\n            bandwidth: playlist.attributes.BANDWIDTH,\n            resolution: playlist.attributes.RESOLUTION,\n            codecs: playlist.attributes.CODECS\n          });\n        });\n        const parsedManifest = {\n          duration,\n          isLive: !endList,\n          renditions\n        };\n        metadata.parsedManifest = parsedManifest;\n        this.trigger({\n          type: 'manifestparsecomplete',\n          metadata\n        });\n      }\n      return Boolean(newMain);\n    }\n    updateMinimumUpdatePeriodTimeout_() {\n      const mpl = this.mainPlaylistLoader_; // cancel any pending creation of mup on media\n      // a new one will be added if needed.\n\n      if (mpl.createMupOnMedia_) {\n        mpl.off('loadedmetadata', mpl.createMupOnMedia_);\n        mpl.createMupOnMedia_ = null;\n      } // clear any pending timeouts\n\n      if (mpl.minimumUpdatePeriodTimeout_) {\n        window.clearTimeout(mpl.minimumUpdatePeriodTimeout_);\n        mpl.minimumUpdatePeriodTimeout_ = null;\n      }\n      let mup = mpl.main && mpl.main.minimumUpdatePeriod; // If the minimumUpdatePeriod has a value of 0, that indicates that the current\n      // MPD has no future validity, so a new one will need to be acquired when new\n      // media segments are to be made available. Thus, we use the target duration\n      // in this case\n\n      if (mup === 0) {\n        if (mpl.media()) {\n          mup = mpl.media().targetDuration * 1000;\n        } else {\n          mpl.createMupOnMedia_ = mpl.updateMinimumUpdatePeriodTimeout_;\n          mpl.one('loadedmetadata', mpl.createMupOnMedia_);\n        }\n      } // if minimumUpdatePeriod is invalid or <= zero, which\n      // can happen when a live video becomes VOD. skip timeout\n      // creation.\n\n      if (typeof mup !== 'number' || mup <= 0) {\n        if (mup < 0) {\n          this.logger_(`found invalid minimumUpdatePeriod of ${mup}, not setting a timeout`);\n        }\n        return;\n      }\n      this.createMUPTimeout_(mup);\n    }\n    createMUPTimeout_(mup) {\n      const mpl = this.mainPlaylistLoader_;\n      mpl.minimumUpdatePeriodTimeout_ = window.setTimeout(() => {\n        mpl.minimumUpdatePeriodTimeout_ = null;\n        mpl.trigger('minimumUpdatePeriod');\n        mpl.createMUPTimeout_(mup);\n      }, mup);\n    }\n    /**\n     * Sends request to refresh the main xml and updates the parsed main manifest\n     */\n\n    refreshXml_() {\n      this.requestMain_((req, mainChanged) => {\n        if (!mainChanged) {\n          return;\n        }\n        if (this.media_) {\n          this.media_ = this.mainPlaylistLoader_.main.playlists[this.media_.id];\n        } // This will filter out updated sidx info from the mapping\n\n        this.mainPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.sidxMapping_);\n        this.addSidxSegments_(this.media(), this.state, sidxChanged => {\n          // TODO: do we need to reload the current playlist?\n          this.refreshMedia_(this.media().id);\n        });\n      });\n    }\n    /**\n     * Refreshes the media playlist by re-parsing the main xml and updating playlist\n     * references. If this is an alternate loader, the updated parsed manifest is retrieved\n     * from the main loader.\n     */\n\n    refreshMedia_(mediaID) {\n      if (!mediaID) {\n        throw new Error('refreshMedia_ must take a media id');\n      } // for main we have to reparse the main xml\n      // to re-create segments based on current timing values\n      // which may change media. We only skip updating the main manifest\n      // if this is the first time this.media_ is being set.\n      // as main was just parsed in that case.\n\n      if (this.media_ && this.isMain_) {\n        this.handleMain_();\n      }\n      const playlists = this.mainPlaylistLoader_.main.playlists;\n      const mediaChanged = !this.media_ || this.media_ !== playlists[mediaID];\n      if (mediaChanged) {\n        this.media_ = playlists[mediaID];\n      } else {\n        this.trigger('playlistunchanged');\n      }\n      if (!this.mediaUpdateTimeout) {\n        const createMediaUpdateTimeout = () => {\n          if (this.media().endList) {\n            return;\n          }\n          this.mediaUpdateTimeout = window.setTimeout(() => {\n            this.trigger('mediaupdatetimeout');\n            createMediaUpdateTimeout();\n          }, refreshDelay(this.media(), Boolean(mediaChanged)));\n        };\n        createMediaUpdateTimeout();\n      }\n      this.trigger('loadedplaylist');\n    }\n    /**\n     * Takes eventstream data from a parsed DASH manifest and adds it to the metadata text track.\n     *\n     * @param {manifest} newMain the newly parsed manifest\n     */\n\n    addEventStreamToMetadataTrack_(newMain) {\n      // Only add new event stream metadata if we have a new manifest.\n      if (newMain && this.mainPlaylistLoader_.main.eventStream) {\n        // convert EventStream to ID3-like data.\n        const metadataArray = this.mainPlaylistLoader_.main.eventStream.map(eventStreamNode => {\n          return {\n            cueTime: eventStreamNode.start,\n            frames: [{\n              data: eventStreamNode.messageData\n            }]\n          };\n        });\n        this.addMetadataToTextTrack('EventStream', metadataArray, this.mainPlaylistLoader_.main.duration);\n      }\n    }\n    /**\n     * Returns the key ID set from a playlist\n     *\n     * @param {playlist} playlist to fetch the key ID set from.\n     * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n     */\n\n    getKeyIdSet(playlist) {\n      if (playlist.contentProtection) {\n        const keyIds = new Set();\n        for (const keysystem in playlist.contentProtection) {\n          const defaultKID = playlist.contentProtection[keysystem].attributes['cenc:default_KID'];\n          if (defaultKID) {\n            // DASH keyIds are separated by dashes.\n            keyIds.add(defaultKID.replace(/-/g, '').toLowerCase());\n          }\n        }\n        return keyIds;\n      }\n    }\n  }\n  var Config = {\n    GOAL_BUFFER_LENGTH: 30,\n    MAX_GOAL_BUFFER_LENGTH: 60,\n    BACK_BUFFER_LENGTH: 30,\n    GOAL_BUFFER_LENGTH_RATE: 1,\n    // 0.5 MB/s\n    INITIAL_BANDWIDTH: 4194304,\n    // A fudge factor to apply to advertised playlist bitrates to account for\n    // temporary flucations in client bandwidth\n    BANDWIDTH_VARIANCE: 1.2,\n    // How much of the buffer must be filled before we consider upswitching\n    BUFFER_LOW_WATER_LINE: 0,\n    MAX_BUFFER_LOW_WATER_LINE: 30,\n    // TODO: Remove this when experimentalBufferBasedABR is removed\n    EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE: 16,\n    BUFFER_LOW_WATER_LINE_RATE: 1,\n    // If the buffer is greater than the high water line, we won't switch down\n    BUFFER_HIGH_WATER_LINE: 30\n  };\n  const stringToArrayBuffer = string => {\n    const view = new Uint8Array(new ArrayBuffer(string.length));\n    for (let i = 0; i < string.length; i++) {\n      view[i] = string.charCodeAt(i);\n    }\n    return view.buffer;\n  };\n\n  /* global Blob, BlobBuilder, Worker */\n  // unify worker interface\n  const browserWorkerPolyFill = function (workerObj) {\n    // node only supports on/off\n    workerObj.on = workerObj.addEventListener;\n    workerObj.off = workerObj.removeEventListener;\n    return workerObj;\n  };\n  const createObjectURL = function (str) {\n    try {\n      return URL.createObjectURL(new Blob([str], {\n        type: 'application/javascript'\n      }));\n    } catch (e) {\n      const blob = new BlobBuilder();\n      blob.append(str);\n      return URL.createObjectURL(blob.getBlob());\n    }\n  };\n  const factory = function (code) {\n    return function () {\n      const objectUrl = createObjectURL(code);\n      const worker = browserWorkerPolyFill(new Worker(objectUrl));\n      worker.objURL = objectUrl;\n      const terminate = worker.terminate;\n      worker.on = worker.addEventListener;\n      worker.off = worker.removeEventListener;\n      worker.terminate = function () {\n        URL.revokeObjectURL(objectUrl);\n        return terminate.call(this);\n      };\n      return worker;\n    };\n  };\n  const transform = function (code) {\n    return `var browserWorkerPolyFill = ${browserWorkerPolyFill.toString()};\\n` + 'browserWorkerPolyFill(self);\\n' + code;\n  };\n  const getWorkerString = function (fn) {\n    return fn.toString().replace(/^function.+?{/, '').slice(0, -1);\n  };\n\n  /* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n  const workerCode$1 = transform(getWorkerString(function () {\n    var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * A lightweight readable stream implemention that handles event dispatching.\n     * Objects that inherit from streams should call init in their constructors.\n     */\n\n    var Stream$8 = function () {\n      this.init = function () {\n        var listeners = {};\n        /**\n         * Add a listener for a specified event type.\n         * @param type {string} the event name\n         * @param listener {function} the callback to be invoked when an event of\n         * the specified type occurs\n         */\n\n        this.on = function (type, listener) {\n          if (!listeners[type]) {\n            listeners[type] = [];\n          }\n          listeners[type] = listeners[type].concat(listener);\n        };\n        /**\n         * Remove a listener for a specified event type.\n         * @param type {string} the event name\n         * @param listener {function} a function previously registered for this\n         * type of event through `on`\n         */\n\n        this.off = function (type, listener) {\n          var index;\n          if (!listeners[type]) {\n            return false;\n          }\n          index = listeners[type].indexOf(listener);\n          listeners[type] = listeners[type].slice();\n          listeners[type].splice(index, 1);\n          return index > -1;\n        };\n        /**\n         * Trigger an event of the specified type on this stream. Any additional\n         * arguments to this function are passed as parameters to event listeners.\n         * @param type {string} the event name\n         */\n\n        this.trigger = function (type) {\n          var callbacks, i, length, args;\n          callbacks = listeners[type];\n          if (!callbacks) {\n            return;\n          } // Slicing the arguments on every invocation of this method\n          // can add a significant amount of overhead. Avoid the\n          // intermediate object creation for the common case of a\n          // single callback argument\n\n          if (arguments.length === 2) {\n            length = callbacks.length;\n            for (i = 0; i < length; ++i) {\n              callbacks[i].call(this, arguments[1]);\n            }\n          } else {\n            args = [];\n            i = arguments.length;\n            for (i = 1; i < arguments.length; ++i) {\n              args.push(arguments[i]);\n            }\n            length = callbacks.length;\n            for (i = 0; i < length; ++i) {\n              callbacks[i].apply(this, args);\n            }\n          }\n        };\n        /**\n         * Destroys the stream and cleans up.\n         */\n\n        this.dispose = function () {\n          listeners = {};\n        };\n      };\n    };\n    /**\n     * Forwards all `data` events on this stream to the destination stream. The\n     * destination stream should provide a method `push` to receive the data\n     * events as they arrive.\n     * @param destination {stream} the stream that will receive all `data` events\n     * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n     *                            when the current stream emits a 'done' event\n     * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n     */\n\n    Stream$8.prototype.pipe = function (destination) {\n      this.on('data', function (data) {\n        destination.push(data);\n      });\n      this.on('done', function (flushSource) {\n        destination.flush(flushSource);\n      });\n      this.on('partialdone', function (flushSource) {\n        destination.partialFlush(flushSource);\n      });\n      this.on('endedtimeline', function (flushSource) {\n        destination.endTimeline(flushSource);\n      });\n      this.on('reset', function (flushSource) {\n        destination.reset(flushSource);\n      });\n      return destination;\n    }; // Default stream functions that are expected to be overridden to perform\n    // actual work. These are provided by the prototype as a sort of no-op\n    // implementation so that we don't have to check for their existence in the\n    // `pipe` function above.\n\n    Stream$8.prototype.push = function (data) {\n      this.trigger('data', data);\n    };\n    Stream$8.prototype.flush = function (flushSource) {\n      this.trigger('done', flushSource);\n    };\n    Stream$8.prototype.partialFlush = function (flushSource) {\n      this.trigger('partialdone', flushSource);\n    };\n    Stream$8.prototype.endTimeline = function (flushSource) {\n      this.trigger('endedtimeline', flushSource);\n    };\n    Stream$8.prototype.reset = function (flushSource) {\n      this.trigger('reset', flushSource);\n    };\n    var stream = Stream$8;\n    var MAX_UINT32$1 = Math.pow(2, 32);\n    var getUint64$5 = function (uint8) {\n      var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n      var value;\n      if (dv.getBigUint64) {\n        value = dv.getBigUint64(0);\n        if (value < Number.MAX_SAFE_INTEGER) {\n          return Number(value);\n        }\n        return value;\n      }\n      return dv.getUint32(0) * MAX_UINT32$1 + dv.getUint32(4);\n    };\n    var numbers = {\n      getUint64: getUint64$5,\n      MAX_UINT32: MAX_UINT32$1\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Functions that generate fragmented MP4s suitable for use with Media\n     * Source Extensions.\n     */\n\n    var MAX_UINT32 = numbers.MAX_UINT32;\n    var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun$1, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\n\n    (function () {\n      var i;\n      types = {\n        avc1: [],\n        // codingname\n        avcC: [],\n        btrt: [],\n        dinf: [],\n        dref: [],\n        esds: [],\n        ftyp: [],\n        hdlr: [],\n        mdat: [],\n        mdhd: [],\n        mdia: [],\n        mfhd: [],\n        minf: [],\n        moof: [],\n        moov: [],\n        mp4a: [],\n        // codingname\n        mvex: [],\n        mvhd: [],\n        pasp: [],\n        sdtp: [],\n        smhd: [],\n        stbl: [],\n        stco: [],\n        stsc: [],\n        stsd: [],\n        stsz: [],\n        stts: [],\n        styp: [],\n        tfdt: [],\n        tfhd: [],\n        traf: [],\n        trak: [],\n        trun: [],\n        trex: [],\n        tkhd: [],\n        vmhd: []\n      }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\n      // don't throw an error\n\n      if (typeof Uint8Array === 'undefined') {\n        return;\n      }\n      for (i in types) {\n        if (types.hasOwnProperty(i)) {\n          types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n        }\n      }\n      MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\n      AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\n      MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\n      VIDEO_HDLR = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x00,\n      // pre_defined\n      0x76, 0x69, 0x64, 0x65,\n      // handler_type: 'vide'\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n      ]);\n      AUDIO_HDLR = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x00,\n      // pre_defined\n      0x73, 0x6f, 0x75, 0x6e,\n      // handler_type: 'soun'\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n      ]);\n      HDLR_TYPES = {\n        video: VIDEO_HDLR,\n        audio: AUDIO_HDLR\n      };\n      DREF = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x01,\n      // entry_count\n      0x00, 0x00, 0x00, 0x0c,\n      // entry_size\n      0x75, 0x72, 0x6c, 0x20,\n      // 'url' type\n      0x00,\n      // version 0\n      0x00, 0x00, 0x01 // entry_flags\n      ]);\n      SMHD = new Uint8Array([0x00,\n      // version\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00,\n      // balance, 0 means centered\n      0x00, 0x00 // reserved\n      ]);\n      STCO = new Uint8Array([0x00,\n      // version\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x00 // entry_count\n      ]);\n      STSC = STCO;\n      STSZ = new Uint8Array([0x00,\n      // version\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x00,\n      // sample_size\n      0x00, 0x00, 0x00, 0x00 // sample_count\n      ]);\n      STTS = STCO;\n      VMHD = new Uint8Array([0x00,\n      // version\n      0x00, 0x00, 0x01,\n      // flags\n      0x00, 0x00,\n      // graphicsmode\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n      ]);\n    })();\n    box = function (type) {\n      var payload = [],\n        size = 0,\n        i,\n        result,\n        view;\n      for (i = 1; i < arguments.length; i++) {\n        payload.push(arguments[i]);\n      }\n      i = payload.length; // calculate the total size we need to allocate\n\n      while (i--) {\n        size += payload[i].byteLength;\n      }\n      result = new Uint8Array(size + 8);\n      view = new DataView(result.buffer, result.byteOffset, result.byteLength);\n      view.setUint32(0, result.byteLength);\n      result.set(type, 4); // copy the payload into the result\n\n      for (i = 0, size = 8; i < payload.length; i++) {\n        result.set(payload[i], size);\n        size += payload[i].byteLength;\n      }\n      return result;\n    };\n    dinf = function () {\n      return box(types.dinf, box(types.dref, DREF));\n    };\n    esds = function (track) {\n      return box(types.esds, new Uint8Array([0x00,\n      // version\n      0x00, 0x00, 0x00,\n      // flags\n      // ES_Descriptor\n      0x03,\n      // tag, ES_DescrTag\n      0x19,\n      // length\n      0x00, 0x00,\n      // ES_ID\n      0x00,\n      // streamDependenceFlag, URL_flag, reserved, streamPriority\n      // DecoderConfigDescriptor\n      0x04,\n      // tag, DecoderConfigDescrTag\n      0x11,\n      // length\n      0x40,\n      // object type\n      0x15,\n      // streamType\n      0x00, 0x06, 0x00,\n      // bufferSizeDB\n      0x00, 0x00, 0xda, 0xc0,\n      // maxBitrate\n      0x00, 0x00, 0xda, 0xc0,\n      // avgBitrate\n      // DecoderSpecificInfo\n      0x05,\n      // tag, DecoderSpecificInfoTag\n      0x02,\n      // length\n      // ISO/IEC 14496-3, AudioSpecificConfig\n      // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\n      track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\n      ]));\n    };\n    ftyp = function () {\n      return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n    };\n    hdlr = function (type) {\n      return box(types.hdlr, HDLR_TYPES[type]);\n    };\n    mdat = function (data) {\n      return box(types.mdat, data);\n    };\n    mdhd = function (track) {\n      var result = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x02,\n      // creation_time\n      0x00, 0x00, 0x00, 0x03,\n      // modification_time\n      0x00, 0x01, 0x5f, 0x90,\n      // timescale, 90,000 \"ticks\" per second\n      track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF,\n      // duration\n      0x55, 0xc4,\n      // 'und' language (undetermined)\n      0x00, 0x00]); // Use the sample rate from the track metadata, when it is\n      // defined. The sample rate can be parsed out of an ADTS header, for\n      // instance.\n\n      if (track.samplerate) {\n        result[12] = track.samplerate >>> 24 & 0xFF;\n        result[13] = track.samplerate >>> 16 & 0xFF;\n        result[14] = track.samplerate >>> 8 & 0xFF;\n        result[15] = track.samplerate & 0xFF;\n      }\n      return box(types.mdhd, result);\n    };\n    mdia = function (track) {\n      return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n    };\n    mfhd = function (sequenceNumber) {\n      return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00,\n      // flags\n      (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\n      ]));\n    };\n    minf = function (track) {\n      return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n    };\n    moof = function (sequenceNumber, tracks) {\n      var trackFragments = [],\n        i = tracks.length; // build traf boxes for each track fragment\n\n      while (i--) {\n        trackFragments[i] = traf(tracks[i]);\n      }\n      return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\n    };\n    /**\n     * Returns a movie box.\n     * @param tracks {array} the tracks associated with this movie\n     * @see ISO/IEC 14496-12:2012(E), section 8.2.1\n     */\n\n    moov = function (tracks) {\n      var i = tracks.length,\n        boxes = [];\n      while (i--) {\n        boxes[i] = trak(tracks[i]);\n      }\n      return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\n    };\n    mvex = function (tracks) {\n      var i = tracks.length,\n        boxes = [];\n      while (i--) {\n        boxes[i] = trex(tracks[i]);\n      }\n      return box.apply(null, [types.mvex].concat(boxes));\n    };\n    mvhd = function (duration) {\n      var bytes = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x01,\n      // creation_time\n      0x00, 0x00, 0x00, 0x02,\n      // modification_time\n      0x00, 0x01, 0x5f, 0x90,\n      // timescale, 90,000 \"ticks\" per second\n      (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF,\n      // duration\n      0x00, 0x01, 0x00, 0x00,\n      // 1.0 rate\n      0x01, 0x00,\n      // 1.0 volume\n      0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,\n      // transformation: unity matrix\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      // pre_defined\n      0xff, 0xff, 0xff, 0xff // next_track_ID\n      ]);\n      return box(types.mvhd, bytes);\n    };\n    sdtp = function (track) {\n      var samples = track.samples || [],\n        bytes = new Uint8Array(4 + samples.length),\n        flags,\n        i; // leave the full box header (4 bytes) all zero\n      // write the sample table\n\n      for (i = 0; i < samples.length; i++) {\n        flags = samples[i].flags;\n        bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n      }\n      return box(types.sdtp, bytes);\n    };\n    stbl = function (track) {\n      return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\n    };\n    (function () {\n      var videoSample, audioSample;\n      stsd = function (track) {\n        return box(types.stsd, new Uint8Array([0x00,\n        // version 0\n        0x00, 0x00, 0x00,\n        // flags\n        0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\n      };\n      videoSample = function (track) {\n        var sps = track.sps || [],\n          pps = track.pps || [],\n          sequenceParameterSets = [],\n          pictureParameterSets = [],\n          i,\n          avc1Box; // assemble the SPSs\n\n        for (i = 0; i < sps.length; i++) {\n          sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\n          sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\n\n          sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\n        } // assemble the PPSs\n\n        for (i = 0; i < pps.length; i++) {\n          pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\n          pictureParameterSets.push(pps[i].byteLength & 0xFF);\n          pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\n        }\n        avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        // reserved\n        0x00, 0x01,\n        // data_reference_index\n        0x00, 0x00,\n        // pre_defined\n        0x00, 0x00,\n        // reserved\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        // pre_defined\n        (track.width & 0xff00) >> 8, track.width & 0xff,\n        // width\n        (track.height & 0xff00) >> 8, track.height & 0xff,\n        // height\n        0x00, 0x48, 0x00, 0x00,\n        // horizresolution\n        0x00, 0x48, 0x00, 0x00,\n        // vertresolution\n        0x00, 0x00, 0x00, 0x00,\n        // reserved\n        0x00, 0x01,\n        // frame_count\n        0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        // compressorname\n        0x00, 0x18,\n        // depth = 24\n        0x11, 0x11 // pre_defined = -1\n        ]), box(types.avcC, new Uint8Array([0x01,\n        // configurationVersion\n        track.profileIdc,\n        // AVCProfileIndication\n        track.profileCompatibility,\n        // profile_compatibility\n        track.levelIdc,\n        // AVCLevelIndication\n        0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n        ].concat([sps.length],\n        // numOfSequenceParameterSets\n        sequenceParameterSets,\n        // \"SPS\"\n        [pps.length],\n        // numOfPictureParameterSets\n        pictureParameterSets // \"PPS\"\n        ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80,\n        // bufferSizeDB\n        0x00, 0x2d, 0xc6, 0xc0,\n        // maxBitrate\n        0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\n        ]))];\n        if (track.sarRatio) {\n          var hSpacing = track.sarRatio[0],\n            vSpacing = track.sarRatio[1];\n          avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\n        }\n        return box.apply(null, avc1Box);\n      };\n      audioSample = function (track) {\n        return box(types.mp4a, new Uint8Array([\n        // SampleEntry, ISO/IEC 14496-12\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        // reserved\n        0x00, 0x01,\n        // data_reference_index\n        // AudioSampleEntry, ISO/IEC 14496-12\n        0x00, 0x00, 0x00, 0x00,\n        // reserved\n        0x00, 0x00, 0x00, 0x00,\n        // reserved\n        (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff,\n        // channelcount\n        (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff,\n        // samplesize\n        0x00, 0x00,\n        // pre_defined\n        0x00, 0x00,\n        // reserved\n        (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\n        // MP4AudioSampleEntry, ISO/IEC 14496-14\n        ]), esds(track));\n      };\n    })();\n    tkhd = function (track) {\n      var result = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x07,\n      // flags\n      0x00, 0x00, 0x00, 0x00,\n      // creation_time\n      0x00, 0x00, 0x00, 0x00,\n      // modification_time\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n      // track_ID\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF,\n      // duration\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00,\n      // layer\n      0x00, 0x00,\n      // alternate_group\n      0x01, 0x00,\n      // non-audio track volume\n      0x00, 0x00,\n      // reserved\n      0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,\n      // transformation: unity matrix\n      (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00,\n      // width\n      (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\n      ]);\n      return box(types.tkhd, result);\n    };\n    /**\n     * Generate a track fragment (traf) box. A traf box collects metadata\n     * about tracks in a movie fragment (moof) box.\n     */\n\n    traf = function (track) {\n      var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n      trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x3a,\n      // flags\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n      // track_ID\n      0x00, 0x00, 0x00, 0x01,\n      // sample_description_index\n      0x00, 0x00, 0x00, 0x00,\n      // default_sample_duration\n      0x00, 0x00, 0x00, 0x00,\n      // default_sample_size\n      0x00, 0x00, 0x00, 0x00 // default_sample_flags\n      ]));\n      upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / MAX_UINT32);\n      lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % MAX_UINT32);\n      trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01,\n      // version 1\n      0x00, 0x00, 0x00,\n      // flags\n      // baseMediaDecodeTime\n      upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\n      // the containing moof to the first payload byte of the associated\n      // mdat\n\n      dataOffset = 32 +\n      // tfhd\n      20 +\n      // tfdt\n      8 +\n      // traf header\n      16 +\n      // mfhd\n      8 +\n      // moof header\n      8; // mdat header\n      // audio tracks require less metadata\n\n      if (track.type === 'audio') {\n        trackFragmentRun = trun$1(track, dataOffset);\n        return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\n      } // video tracks should contain an independent and disposable samples\n      // box (sdtp)\n      // generate one and adjust offsets to match\n\n      sampleDependencyTable = sdtp(track);\n      trackFragmentRun = trun$1(track, sampleDependencyTable.length + dataOffset);\n      return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\n    };\n    /**\n     * Generate a track box.\n     * @param track {object} a track definition\n     * @return {Uint8Array} the track box\n     */\n\n    trak = function (track) {\n      track.duration = track.duration || 0xffffffff;\n      return box(types.trak, tkhd(track), mdia(track));\n    };\n    trex = function (track) {\n      var result = new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n      // track_ID\n      0x00, 0x00, 0x00, 0x01,\n      // default_sample_description_index\n      0x00, 0x00, 0x00, 0x00,\n      // default_sample_duration\n      0x00, 0x00, 0x00, 0x00,\n      // default_sample_size\n      0x00, 0x01, 0x00, 0x01 // default_sample_flags\n      ]); // the last two bytes of default_sample_flags is the sample\n      // degradation priority, a hint about the importance of this sample\n      // relative to others. Lower the degradation priority for all sample\n      // types other than video.\n\n      if (track.type !== 'video') {\n        result[result.length - 1] = 0x00;\n      }\n      return box(types.trex, result);\n    };\n    (function () {\n      var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\n      // duration is present for the first sample, it will be present for\n      // all subsequent samples.\n      // see ISO/IEC 14496-12:2012, Section 8.8.8.1\n\n      trunHeader = function (samples, offset) {\n        var durationPresent = 0,\n          sizePresent = 0,\n          flagsPresent = 0,\n          compositionTimeOffset = 0; // trun flag constants\n\n        if (samples.length) {\n          if (samples[0].duration !== undefined) {\n            durationPresent = 0x1;\n          }\n          if (samples[0].size !== undefined) {\n            sizePresent = 0x2;\n          }\n          if (samples[0].flags !== undefined) {\n            flagsPresent = 0x4;\n          }\n          if (samples[0].compositionTimeOffset !== undefined) {\n            compositionTimeOffset = 0x8;\n          }\n        }\n        return [0x00,\n        // version 0\n        0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01,\n        // flags\n        (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF,\n        // sample_count\n        (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\n        ];\n      };\n      videoTrun = function (track, offset) {\n        var bytesOffest, bytes, header, samples, sample, i;\n        samples = track.samples || [];\n        offset += 8 + 12 + 16 * samples.length;\n        header = trunHeader(samples, offset);\n        bytes = new Uint8Array(header.length + samples.length * 16);\n        bytes.set(header);\n        bytesOffest = header.length;\n        for (i = 0; i < samples.length; i++) {\n          sample = samples[i];\n          bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n          bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n          bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n          bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n          bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n          bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n          bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n          bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n\n          bytes[bytesOffest++] = sample.flags.isLeading << 2 | sample.flags.dependsOn;\n          bytes[bytesOffest++] = sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample;\n          bytes[bytesOffest++] = sample.flags.degradationPriority & 0xF0 << 8;\n          bytes[bytesOffest++] = sample.flags.degradationPriority & 0x0F; // sample_flags\n\n          bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF000000) >>> 24;\n          bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF0000) >>> 16;\n          bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF00) >>> 8;\n          bytes[bytesOffest++] = sample.compositionTimeOffset & 0xFF; // sample_composition_time_offset\n        }\n        return box(types.trun, bytes);\n      };\n      audioTrun = function (track, offset) {\n        var bytes, bytesOffest, header, samples, sample, i;\n        samples = track.samples || [];\n        offset += 8 + 12 + 8 * samples.length;\n        header = trunHeader(samples, offset);\n        bytes = new Uint8Array(header.length + samples.length * 8);\n        bytes.set(header);\n        bytesOffest = header.length;\n        for (i = 0; i < samples.length; i++) {\n          sample = samples[i];\n          bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n          bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n          bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n          bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n          bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n          bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n          bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n          bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n        }\n        return box(types.trun, bytes);\n      };\n      trun$1 = function (track, offset) {\n        if (track.type === 'audio') {\n          return audioTrun(track, offset);\n        }\n        return videoTrun(track, offset);\n      };\n    })();\n    var mp4Generator = {\n      ftyp: ftyp,\n      mdat: mdat,\n      moof: moof,\n      moov: moov,\n      initSegment: function (tracks) {\n        var fileType = ftyp(),\n          movie = moov(tracks),\n          result;\n        result = new Uint8Array(fileType.byteLength + movie.byteLength);\n        result.set(fileType);\n        result.set(movie, fileType.byteLength);\n        return result;\n      }\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n    // composed of the nal units that make up that frame\n    // Also keep track of cummulative data about the frame from the nal units such\n    // as the frame duration, starting pts, etc.\n\n    var groupNalsIntoFrames = function (nalUnits) {\n      var i,\n        currentNal,\n        currentFrame = [],\n        frames = []; // TODO added for LHLS, make sure this is OK\n\n      frames.byteLength = 0;\n      frames.nalCount = 0;\n      frames.duration = 0;\n      currentFrame.byteLength = 0;\n      for (i = 0; i < nalUnits.length; i++) {\n        currentNal = nalUnits[i]; // Split on 'aud'-type nal units\n\n        if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\n          // Since the very first nal unit is expected to be an AUD\n          // only push to the frames array when currentFrame is not empty\n          if (currentFrame.length) {\n            currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\n\n            frames.byteLength += currentFrame.byteLength;\n            frames.nalCount += currentFrame.length;\n            frames.duration += currentFrame.duration;\n            frames.push(currentFrame);\n          }\n          currentFrame = [currentNal];\n          currentFrame.byteLength = currentNal.data.byteLength;\n          currentFrame.pts = currentNal.pts;\n          currentFrame.dts = currentNal.dts;\n        } else {\n          // Specifically flag key frames for ease of use later\n          if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\n            currentFrame.keyFrame = true;\n          }\n          currentFrame.duration = currentNal.dts - currentFrame.dts;\n          currentFrame.byteLength += currentNal.data.byteLength;\n          currentFrame.push(currentNal);\n        }\n      } // For the last frame, use the duration of the previous frame if we\n      // have nothing better to go on\n\n      if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\n        currentFrame.duration = frames[frames.length - 1].duration;\n      } // Push the final frame\n      // TODO added for LHLS, make sure this is OK\n\n      frames.byteLength += currentFrame.byteLength;\n      frames.nalCount += currentFrame.length;\n      frames.duration += currentFrame.duration;\n      frames.push(currentFrame);\n      return frames;\n    }; // Convert an array of frames into an array of Gop with each Gop being composed\n    // of the frames that make up that Gop\n    // Also keep track of cummulative data about the Gop from the frames such as the\n    // Gop duration, starting pts, etc.\n\n    var groupFramesIntoGops = function (frames) {\n      var i,\n        currentFrame,\n        currentGop = [],\n        gops = []; // We must pre-set some of the values on the Gop since we\n      // keep running totals of these values\n\n      currentGop.byteLength = 0;\n      currentGop.nalCount = 0;\n      currentGop.duration = 0;\n      currentGop.pts = frames[0].pts;\n      currentGop.dts = frames[0].dts; // store some metadata about all the Gops\n\n      gops.byteLength = 0;\n      gops.nalCount = 0;\n      gops.duration = 0;\n      gops.pts = frames[0].pts;\n      gops.dts = frames[0].dts;\n      for (i = 0; i < frames.length; i++) {\n        currentFrame = frames[i];\n        if (currentFrame.keyFrame) {\n          // Since the very first frame is expected to be an keyframe\n          // only push to the gops array when currentGop is not empty\n          if (currentGop.length) {\n            gops.push(currentGop);\n            gops.byteLength += currentGop.byteLength;\n            gops.nalCount += currentGop.nalCount;\n            gops.duration += currentGop.duration;\n          }\n          currentGop = [currentFrame];\n          currentGop.nalCount = currentFrame.length;\n          currentGop.byteLength = currentFrame.byteLength;\n          currentGop.pts = currentFrame.pts;\n          currentGop.dts = currentFrame.dts;\n          currentGop.duration = currentFrame.duration;\n        } else {\n          currentGop.duration += currentFrame.duration;\n          currentGop.nalCount += currentFrame.length;\n          currentGop.byteLength += currentFrame.byteLength;\n          currentGop.push(currentFrame);\n        }\n      }\n      if (gops.length && currentGop.duration <= 0) {\n        currentGop.duration = gops[gops.length - 1].duration;\n      }\n      gops.byteLength += currentGop.byteLength;\n      gops.nalCount += currentGop.nalCount;\n      gops.duration += currentGop.duration; // push the final Gop\n\n      gops.push(currentGop);\n      return gops;\n    };\n    /*\n     * Search for the first keyframe in the GOPs and throw away all frames\n     * until that keyframe. Then extend the duration of the pulled keyframe\n     * and pull the PTS and DTS of the keyframe so that it covers the time\n     * range of the frames that were disposed.\n     *\n     * @param {Array} gops video GOPs\n     * @returns {Array} modified video GOPs\n     */\n\n    var extendFirstKeyFrame = function (gops) {\n      var currentGop;\n      if (!gops[0][0].keyFrame && gops.length > 1) {\n        // Remove the first GOP\n        currentGop = gops.shift();\n        gops.byteLength -= currentGop.byteLength;\n        gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\n        // first gop to cover the time period of the\n        // frames we just removed\n\n        gops[0][0].dts = currentGop.dts;\n        gops[0][0].pts = currentGop.pts;\n        gops[0][0].duration += currentGop.duration;\n      }\n      return gops;\n    };\n    /**\n     * Default sample object\n     * see ISO/IEC 14496-12:2012, section 8.6.4.3\n     */\n\n    var createDefaultSample = function () {\n      return {\n        size: 0,\n        flags: {\n          isLeading: 0,\n          dependsOn: 1,\n          isDependedOn: 0,\n          hasRedundancy: 0,\n          degradationPriority: 0,\n          isNonSyncSample: 1\n        }\n      };\n    };\n    /*\n     * Collates information from a video frame into an object for eventual\n     * entry into an MP4 sample table.\n     *\n     * @param {Object} frame the video frame\n     * @param {Number} dataOffset the byte offset to position the sample\n     * @return {Object} object containing sample table info for a frame\n     */\n\n    var sampleForFrame = function (frame, dataOffset) {\n      var sample = createDefaultSample();\n      sample.dataOffset = dataOffset;\n      sample.compositionTimeOffset = frame.pts - frame.dts;\n      sample.duration = frame.duration;\n      sample.size = 4 * frame.length; // Space for nal unit size\n\n      sample.size += frame.byteLength;\n      if (frame.keyFrame) {\n        sample.flags.dependsOn = 2;\n        sample.flags.isNonSyncSample = 0;\n      }\n      return sample;\n    }; // generate the track's sample table from an array of gops\n\n    var generateSampleTable$1 = function (gops, baseDataOffset) {\n      var h,\n        i,\n        sample,\n        currentGop,\n        currentFrame,\n        dataOffset = baseDataOffset || 0,\n        samples = [];\n      for (h = 0; h < gops.length; h++) {\n        currentGop = gops[h];\n        for (i = 0; i < currentGop.length; i++) {\n          currentFrame = currentGop[i];\n          sample = sampleForFrame(currentFrame, dataOffset);\n          dataOffset += sample.size;\n          samples.push(sample);\n        }\n      }\n      return samples;\n    }; // generate the track's raw mdat data from an array of gops\n\n    var concatenateNalData = function (gops) {\n      var h,\n        i,\n        j,\n        currentGop,\n        currentFrame,\n        currentNal,\n        dataOffset = 0,\n        nalsByteLength = gops.byteLength,\n        numberOfNals = gops.nalCount,\n        totalByteLength = nalsByteLength + 4 * numberOfNals,\n        data = new Uint8Array(totalByteLength),\n        view = new DataView(data.buffer); // For each Gop..\n\n      for (h = 0; h < gops.length; h++) {\n        currentGop = gops[h]; // For each Frame..\n\n        for (i = 0; i < currentGop.length; i++) {\n          currentFrame = currentGop[i]; // For each NAL..\n\n          for (j = 0; j < currentFrame.length; j++) {\n            currentNal = currentFrame[j];\n            view.setUint32(dataOffset, currentNal.data.byteLength);\n            dataOffset += 4;\n            data.set(currentNal.data, dataOffset);\n            dataOffset += currentNal.data.byteLength;\n          }\n        }\n      }\n      return data;\n    }; // generate the track's sample table from a frame\n\n    var generateSampleTableForFrame = function (frame, baseDataOffset) {\n      var sample,\n        dataOffset = baseDataOffset || 0,\n        samples = [];\n      sample = sampleForFrame(frame, dataOffset);\n      samples.push(sample);\n      return samples;\n    }; // generate the track's raw mdat data from a frame\n\n    var concatenateNalDataForFrame = function (frame) {\n      var i,\n        currentNal,\n        dataOffset = 0,\n        nalsByteLength = frame.byteLength,\n        numberOfNals = frame.length,\n        totalByteLength = nalsByteLength + 4 * numberOfNals,\n        data = new Uint8Array(totalByteLength),\n        view = new DataView(data.buffer); // For each NAL..\n\n      for (i = 0; i < frame.length; i++) {\n        currentNal = frame[i];\n        view.setUint32(dataOffset, currentNal.data.byteLength);\n        dataOffset += 4;\n        data.set(currentNal.data, dataOffset);\n        dataOffset += currentNal.data.byteLength;\n      }\n      return data;\n    };\n    var frameUtils$1 = {\n      groupNalsIntoFrames: groupNalsIntoFrames,\n      groupFramesIntoGops: groupFramesIntoGops,\n      extendFirstKeyFrame: extendFirstKeyFrame,\n      generateSampleTable: generateSampleTable$1,\n      concatenateNalData: concatenateNalData,\n      generateSampleTableForFrame: generateSampleTableForFrame,\n      concatenateNalDataForFrame: concatenateNalDataForFrame\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var highPrefix = [33, 16, 5, 32, 164, 27];\n    var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\n    var zeroFill = function (count) {\n      var a = [];\n      while (count--) {\n        a.push(0);\n      }\n      return a;\n    };\n    var makeTable = function (metaTable) {\n      return Object.keys(metaTable).reduce(function (obj, key) {\n        obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\n          return arr.concat(part);\n        }, []));\n        return obj;\n      }, {});\n    };\n    var silence;\n    var silence_1 = function () {\n      if (!silence) {\n        // Frames-of-silence to use for filling in missing AAC frames\n        var coneOfSilence = {\n          96000: [highPrefix, [227, 64], zeroFill(154), [56]],\n          88200: [highPrefix, [231], zeroFill(170), [56]],\n          64000: [highPrefix, [248, 192], zeroFill(240), [56]],\n          48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\n          44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\n          32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\n          24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\n          16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\n          12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\n          11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\n          8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\n        };\n        silence = makeTable(coneOfSilence);\n      }\n      return silence;\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var ONE_SECOND_IN_TS$4 = 90000,\n      // 90kHz clock\n      secondsToVideoTs,\n      secondsToAudioTs,\n      videoTsToSeconds,\n      audioTsToSeconds,\n      audioTsToVideoTs,\n      videoTsToAudioTs,\n      metadataTsToSeconds;\n    secondsToVideoTs = function (seconds) {\n      return seconds * ONE_SECOND_IN_TS$4;\n    };\n    secondsToAudioTs = function (seconds, sampleRate) {\n      return seconds * sampleRate;\n    };\n    videoTsToSeconds = function (timestamp) {\n      return timestamp / ONE_SECOND_IN_TS$4;\n    };\n    audioTsToSeconds = function (timestamp, sampleRate) {\n      return timestamp / sampleRate;\n    };\n    audioTsToVideoTs = function (timestamp, sampleRate) {\n      return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n    };\n    videoTsToAudioTs = function (timestamp, sampleRate) {\n      return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n    };\n    /**\n     * Adjust ID3 tag or caption timing information by the timeline pts values\n     * (if keepOriginalTimestamps is false) and convert to seconds\n     */\n\n    metadataTsToSeconds = function (timestamp, timelineStartPts, keepOriginalTimestamps) {\n      return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n    };\n    var clock$2 = {\n      ONE_SECOND_IN_TS: ONE_SECOND_IN_TS$4,\n      secondsToVideoTs: secondsToVideoTs,\n      secondsToAudioTs: secondsToAudioTs,\n      videoTsToSeconds: videoTsToSeconds,\n      audioTsToSeconds: audioTsToSeconds,\n      audioTsToVideoTs: audioTsToVideoTs,\n      videoTsToAudioTs: videoTsToAudioTs,\n      metadataTsToSeconds: metadataTsToSeconds\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var coneOfSilence = silence_1;\n    var clock$1 = clock$2;\n    /**\n     * Sum the `byteLength` properties of the data in each AAC frame\n     */\n\n    var sumFrameByteLengths = function (array) {\n      var i,\n        currentObj,\n        sum = 0; // sum the byteLength's all each nal unit in the frame\n\n      for (i = 0; i < array.length; i++) {\n        currentObj = array[i];\n        sum += currentObj.data.byteLength;\n      }\n      return sum;\n    }; // Possibly pad (prefix) the audio track with silence if appending this track\n    // would lead to the introduction of a gap in the audio buffer\n\n    var prefixWithSilence = function (track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\n      var baseMediaDecodeTimeTs,\n        frameDuration = 0,\n        audioGapDuration = 0,\n        audioFillFrameCount = 0,\n        audioFillDuration = 0,\n        silentFrame,\n        i,\n        firstFrame;\n      if (!frames.length) {\n        return;\n      }\n      baseMediaDecodeTimeTs = clock$1.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\n\n      frameDuration = Math.ceil(clock$1.ONE_SECOND_IN_TS / (track.samplerate / 1024));\n      if (audioAppendStartTs && videoBaseMediaDecodeTime) {\n        // insert the shortest possible amount (audio gap or audio to video gap)\n        audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\n\n        audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\n        audioFillDuration = audioFillFrameCount * frameDuration;\n      } // don't attempt to fill gaps smaller than a single frame or larger\n      // than a half second\n\n      if (audioFillFrameCount < 1 || audioFillDuration > clock$1.ONE_SECOND_IN_TS / 2) {\n        return;\n      }\n      silentFrame = coneOfSilence()[track.samplerate];\n      if (!silentFrame) {\n        // we don't have a silent frame pregenerated for the sample rate, so use a frame\n        // from the content instead\n        silentFrame = frames[0].data;\n      }\n      for (i = 0; i < audioFillFrameCount; i++) {\n        firstFrame = frames[0];\n        frames.splice(0, 0, {\n          data: silentFrame,\n          dts: firstFrame.dts - frameDuration,\n          pts: firstFrame.pts - frameDuration\n        });\n      }\n      track.baseMediaDecodeTime -= Math.floor(clock$1.videoTsToAudioTs(audioFillDuration, track.samplerate));\n      return audioFillDuration;\n    }; // If the audio segment extends before the earliest allowed dts\n    // value, remove AAC frames until starts at or after the earliest\n    // allowed DTS so that we don't end up with a negative baseMedia-\n    // DecodeTime for the audio track\n\n    var trimAdtsFramesByEarliestDts = function (adtsFrames, track, earliestAllowedDts) {\n      if (track.minSegmentDts >= earliestAllowedDts) {\n        return adtsFrames;\n      } // We will need to recalculate the earliest segment Dts\n\n      track.minSegmentDts = Infinity;\n      return adtsFrames.filter(function (currentFrame) {\n        // If this is an allowed frame, keep it and record it's Dts\n        if (currentFrame.dts >= earliestAllowedDts) {\n          track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\n          track.minSegmentPts = track.minSegmentDts;\n          return true;\n        } // Otherwise, discard it\n\n        return false;\n      });\n    }; // generate the track's raw mdat data from an array of frames\n\n    var generateSampleTable = function (frames) {\n      var i,\n        currentFrame,\n        samples = [];\n      for (i = 0; i < frames.length; i++) {\n        currentFrame = frames[i];\n        samples.push({\n          size: currentFrame.data.byteLength,\n          duration: 1024 // For AAC audio, all samples contain 1024 samples\n        });\n      }\n      return samples;\n    }; // generate the track's sample table from an array of frames\n\n    var concatenateFrameData = function (frames) {\n      var i,\n        currentFrame,\n        dataOffset = 0,\n        data = new Uint8Array(sumFrameByteLengths(frames));\n      for (i = 0; i < frames.length; i++) {\n        currentFrame = frames[i];\n        data.set(currentFrame.data, dataOffset);\n        dataOffset += currentFrame.data.byteLength;\n      }\n      return data;\n    };\n    var audioFrameUtils$1 = {\n      prefixWithSilence: prefixWithSilence,\n      trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\n      generateSampleTable: generateSampleTable,\n      concatenateFrameData: concatenateFrameData\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var ONE_SECOND_IN_TS$3 = clock$2.ONE_SECOND_IN_TS;\n    /**\n     * Store information about the start and end of the track and the\n     * duration for each frame/sample we process in order to calculate\n     * the baseMediaDecodeTime\n     */\n\n    var collectDtsInfo = function (track, data) {\n      if (typeof data.pts === 'number') {\n        if (track.timelineStartInfo.pts === undefined) {\n          track.timelineStartInfo.pts = data.pts;\n        }\n        if (track.minSegmentPts === undefined) {\n          track.minSegmentPts = data.pts;\n        } else {\n          track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n        }\n        if (track.maxSegmentPts === undefined) {\n          track.maxSegmentPts = data.pts;\n        } else {\n          track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\n        }\n      }\n      if (typeof data.dts === 'number') {\n        if (track.timelineStartInfo.dts === undefined) {\n          track.timelineStartInfo.dts = data.dts;\n        }\n        if (track.minSegmentDts === undefined) {\n          track.minSegmentDts = data.dts;\n        } else {\n          track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n        }\n        if (track.maxSegmentDts === undefined) {\n          track.maxSegmentDts = data.dts;\n        } else {\n          track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\n        }\n      }\n    };\n    /**\n     * Clear values used to calculate the baseMediaDecodeTime between\n     * tracks\n     */\n\n    var clearDtsInfo = function (track) {\n      delete track.minSegmentDts;\n      delete track.maxSegmentDts;\n      delete track.minSegmentPts;\n      delete track.maxSegmentPts;\n    };\n    /**\n     * Calculate the track's baseMediaDecodeTime based on the earliest\n     * DTS the transmuxer has ever seen and the minimum DTS for the\n     * current track\n     * @param track {object} track metadata configuration\n     * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\n     *        in the source; false to adjust the first segment to start at 0.\n     */\n\n    var calculateTrackBaseMediaDecodeTime = function (track, keepOriginalTimestamps) {\n      var baseMediaDecodeTime,\n        scale,\n        minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\n\n      if (!keepOriginalTimestamps) {\n        minSegmentDts -= track.timelineStartInfo.dts;\n      } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\n      // we want the start of the first segment to be placed\n\n      baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\n\n      baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\n\n      baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\n      if (track.type === 'audio') {\n        // Audio has a different clock equal to the sampling_rate so we need to\n        // scale the PTS values into the clock rate of the track\n        scale = track.samplerate / ONE_SECOND_IN_TS$3;\n        baseMediaDecodeTime *= scale;\n        baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\n      }\n      return baseMediaDecodeTime;\n    };\n    var trackDecodeInfo$1 = {\n      clearDtsInfo: clearDtsInfo,\n      calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\n      collectDtsInfo: collectDtsInfo\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Reads in-band caption information from a video elementary\n     * stream. Captions must follow the CEA-708 standard for injection\n     * into an MPEG-2 transport streams.\n     * @see https://en.wikipedia.org/wiki/CEA-708\n     * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n     */\n    // payload type field to indicate how they are to be\n    // interpreted. CEAS-708 caption content is always transmitted with\n    // payload type 0x04.\n\n    var USER_DATA_REGISTERED_ITU_T_T35 = 4,\n      RBSP_TRAILING_BITS = 128;\n    /**\n      * Parse a supplemental enhancement information (SEI) NAL unit.\n      * Stops parsing once a message of type ITU T T35 has been found.\n      *\n      * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n      * @return {object} the parsed SEI payload\n      * @see Rec. ITU-T H.264, 7.3.2.3.1\n      */\n\n    var parseSei = function (bytes) {\n      var i = 0,\n        result = {\n          payloadType: -1,\n          payloadSize: 0\n        },\n        payloadType = 0,\n        payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\n\n      while (i < bytes.byteLength) {\n        // stop once we have hit the end of the sei_rbsp\n        if (bytes[i] === RBSP_TRAILING_BITS) {\n          break;\n        } // Parse payload type\n\n        while (bytes[i] === 0xFF) {\n          payloadType += 255;\n          i++;\n        }\n        payloadType += bytes[i++]; // Parse payload size\n\n        while (bytes[i] === 0xFF) {\n          payloadSize += 255;\n          i++;\n        }\n        payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\n        // there can only ever be one caption message in a frame's sei\n\n        if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n          var userIdentifier = String.fromCharCode(bytes[i + 3], bytes[i + 4], bytes[i + 5], bytes[i + 6]);\n          if (userIdentifier === 'GA94') {\n            result.payloadType = payloadType;\n            result.payloadSize = payloadSize;\n            result.payload = bytes.subarray(i, i + payloadSize);\n            break;\n          } else {\n            result.payload = void 0;\n          }\n        } // skip the payload and parse the next message\n\n        i += payloadSize;\n        payloadType = 0;\n        payloadSize = 0;\n      }\n      return result;\n    }; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n    var parseUserData = function (sei) {\n      // itu_t_t35_contry_code must be 181 (United States) for\n      // captions\n      if (sei.payload[0] !== 181) {\n        return null;\n      } // itu_t_t35_provider_code should be 49 (ATSC) for captions\n\n      if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\n        return null;\n      } // the user_identifier should be \"GA94\" to indicate ATSC1 data\n\n      if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\n        return null;\n      } // finally, user_data_type_code should be 0x03 for caption data\n\n      if (sei.payload[7] !== 0x03) {\n        return null;\n      } // return the user_data_type_structure and strip the trailing\n      // marker bits\n\n      return sei.payload.subarray(8, sei.payload.length - 1);\n    }; // see CEA-708-D, section 4.4\n\n    var parseCaptionPackets = function (pts, userData) {\n      var results = [],\n        i,\n        count,\n        offset,\n        data; // if this is just filler, return immediately\n\n      if (!(userData[0] & 0x40)) {\n        return results;\n      } // parse out the cc_data_1 and cc_data_2 fields\n\n      count = userData[0] & 0x1f;\n      for (i = 0; i < count; i++) {\n        offset = i * 3;\n        data = {\n          type: userData[offset + 2] & 0x03,\n          pts: pts\n        }; // capture cc data when cc_valid is 1\n\n        if (userData[offset + 2] & 0x04) {\n          data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\n          results.push(data);\n        }\n      }\n      return results;\n    };\n    var discardEmulationPreventionBytes$1 = function (data) {\n      var length = data.byteLength,\n        emulationPreventionBytesPositions = [],\n        i = 1,\n        newLength,\n        newData; // Find all `Emulation Prevention Bytes`\n\n      while (i < length - 2) {\n        if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n          emulationPreventionBytesPositions.push(i + 2);\n          i += 2;\n        } else {\n          i++;\n        }\n      } // If no Emulation Prevention Bytes were found just return the original\n      // array\n\n      if (emulationPreventionBytesPositions.length === 0) {\n        return data;\n      } // Create a new array to hold the NAL unit data\n\n      newLength = length - emulationPreventionBytesPositions.length;\n      newData = new Uint8Array(newLength);\n      var sourceIndex = 0;\n      for (i = 0; i < newLength; sourceIndex++, i++) {\n        if (sourceIndex === emulationPreventionBytesPositions[0]) {\n          // Skip this byte\n          sourceIndex++; // Remove this position index\n\n          emulationPreventionBytesPositions.shift();\n        }\n        newData[i] = data[sourceIndex];\n      }\n      return newData;\n    }; // exports\n\n    var captionPacketParser = {\n      parseSei: parseSei,\n      parseUserData: parseUserData,\n      parseCaptionPackets: parseCaptionPackets,\n      discardEmulationPreventionBytes: discardEmulationPreventionBytes$1,\n      USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Reads in-band caption information from a video elementary\n     * stream. Captions must follow the CEA-708 standard for injection\n     * into an MPEG-2 transport streams.\n     * @see https://en.wikipedia.org/wiki/CEA-708\n     * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n     */\n    // Link To Transport\n    // -----------------\n\n    var Stream$7 = stream;\n    var cea708Parser = captionPacketParser;\n    var CaptionStream$2 = function (options) {\n      options = options || {};\n      CaptionStream$2.prototype.init.call(this); // parse708captions flag, default to true\n\n      this.parse708captions_ = typeof options.parse708captions === 'boolean' ? options.parse708captions : true;\n      this.captionPackets_ = [];\n      this.ccStreams_ = [new Cea608Stream(0, 0),\n      // eslint-disable-line no-use-before-define\n      new Cea608Stream(0, 1),\n      // eslint-disable-line no-use-before-define\n      new Cea608Stream(1, 0),\n      // eslint-disable-line no-use-before-define\n      new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n      ];\n      if (this.parse708captions_) {\n        this.cc708Stream_ = new Cea708Stream({\n          captionServices: options.captionServices\n        }); // eslint-disable-line no-use-before-define\n      }\n      this.reset(); // forward data and done events from CCs to this CaptionStream\n\n      this.ccStreams_.forEach(function (cc) {\n        cc.on('data', this.trigger.bind(this, 'data'));\n        cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\n        cc.on('done', this.trigger.bind(this, 'done'));\n      }, this);\n      if (this.parse708captions_) {\n        this.cc708Stream_.on('data', this.trigger.bind(this, 'data'));\n        this.cc708Stream_.on('partialdone', this.trigger.bind(this, 'partialdone'));\n        this.cc708Stream_.on('done', this.trigger.bind(this, 'done'));\n      }\n    };\n    CaptionStream$2.prototype = new Stream$7();\n    CaptionStream$2.prototype.push = function (event) {\n      var sei, userData, newCaptionPackets; // only examine SEI NALs\n\n      if (event.nalUnitType !== 'sei_rbsp') {\n        return;\n      } // parse the sei\n\n      sei = cea708Parser.parseSei(event.escapedRBSP); // no payload data, skip\n\n      if (!sei.payload) {\n        return;\n      } // ignore everything but user_data_registered_itu_t_t35\n\n      if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\n        return;\n      } // parse out the user data payload\n\n      userData = cea708Parser.parseUserData(sei); // ignore unrecognized userData\n\n      if (!userData) {\n        return;\n      } // Sometimes, the same segment # will be downloaded twice. To stop the\n      // caption data from being processed twice, we track the latest dts we've\n      // received and ignore everything with a dts before that. However, since\n      // data for a specific dts can be split across packets on either side of\n      // a segment boundary, we need to make sure we *don't* ignore the packets\n      // from the *next* segment that have dts === this.latestDts_. By constantly\n      // tracking the number of packets received with dts === this.latestDts_, we\n      // know how many should be ignored once we start receiving duplicates.\n\n      if (event.dts < this.latestDts_) {\n        // We've started getting older data, so set the flag.\n        this.ignoreNextEqualDts_ = true;\n        return;\n      } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\n        this.numSameDts_--;\n        if (!this.numSameDts_) {\n          // We've received the last duplicate packet, time to start processing again\n          this.ignoreNextEqualDts_ = false;\n        }\n        return;\n      } // parse out CC data packets and save them for later\n\n      newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\n      this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n      if (this.latestDts_ !== event.dts) {\n        this.numSameDts_ = 0;\n      }\n      this.numSameDts_++;\n      this.latestDts_ = event.dts;\n    };\n    CaptionStream$2.prototype.flushCCStreams = function (flushType) {\n      this.ccStreams_.forEach(function (cc) {\n        return flushType === 'flush' ? cc.flush() : cc.partialFlush();\n      }, this);\n    };\n    CaptionStream$2.prototype.flushStream = function (flushType) {\n      // make sure we actually parsed captions before proceeding\n      if (!this.captionPackets_.length) {\n        this.flushCCStreams(flushType);\n        return;\n      } // In Chrome, the Array#sort function is not stable so add a\n      // presortIndex that we can use to ensure we get a stable-sort\n\n      this.captionPackets_.forEach(function (elem, idx) {\n        elem.presortIndex = idx;\n      }); // sort caption byte-pairs based on their PTS values\n\n      this.captionPackets_.sort(function (a, b) {\n        if (a.pts === b.pts) {\n          return a.presortIndex - b.presortIndex;\n        }\n        return a.pts - b.pts;\n      });\n      this.captionPackets_.forEach(function (packet) {\n        if (packet.type < 2) {\n          // Dispatch packet to the right Cea608Stream\n          this.dispatchCea608Packet(packet);\n        } else {\n          // Dispatch packet to the Cea708Stream\n          this.dispatchCea708Packet(packet);\n        }\n      }, this);\n      this.captionPackets_.length = 0;\n      this.flushCCStreams(flushType);\n    };\n    CaptionStream$2.prototype.flush = function () {\n      return this.flushStream('flush');\n    }; // Only called if handling partial data\n\n    CaptionStream$2.prototype.partialFlush = function () {\n      return this.flushStream('partialFlush');\n    };\n    CaptionStream$2.prototype.reset = function () {\n      this.latestDts_ = null;\n      this.ignoreNextEqualDts_ = false;\n      this.numSameDts_ = 0;\n      this.activeCea608Channel_ = [null, null];\n      this.ccStreams_.forEach(function (ccStream) {\n        ccStream.reset();\n      });\n    }; // From the CEA-608 spec:\n\n    /*\n     * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\n     * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\n     * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\n     * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\n     * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\n     * to switch to captioning or Text.\n    */\n    // With that in mind, we ignore any data between an XDS control code and a\n    // subsequent closed-captioning control code.\n\n    CaptionStream$2.prototype.dispatchCea608Packet = function (packet) {\n      // NOTE: packet.type is the CEA608 field\n      if (this.setsTextOrXDSActive(packet)) {\n        this.activeCea608Channel_[packet.type] = null;\n      } else if (this.setsChannel1Active(packet)) {\n        this.activeCea608Channel_[packet.type] = 0;\n      } else if (this.setsChannel2Active(packet)) {\n        this.activeCea608Channel_[packet.type] = 1;\n      }\n      if (this.activeCea608Channel_[packet.type] === null) {\n        // If we haven't received anything to set the active channel, or the\n        // packets are Text/XDS data, discard the data; we don't want jumbled\n        // captions\n        return;\n      }\n      this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n    };\n    CaptionStream$2.prototype.setsChannel1Active = function (packet) {\n      return (packet.ccData & 0x7800) === 0x1000;\n    };\n    CaptionStream$2.prototype.setsChannel2Active = function (packet) {\n      return (packet.ccData & 0x7800) === 0x1800;\n    };\n    CaptionStream$2.prototype.setsTextOrXDSActive = function (packet) {\n      return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n    };\n    CaptionStream$2.prototype.dispatchCea708Packet = function (packet) {\n      if (this.parse708captions_) {\n        this.cc708Stream_.push(packet);\n      }\n    }; // ----------------------\n    // Session to Application\n    // ----------------------\n    // This hash maps special and extended character codes to their\n    // proper Unicode equivalent. The first one-byte key is just a\n    // non-standard character code. The two-byte keys that follow are\n    // the extended CEA708 character codes, along with the preceding\n    // 0x10 extended character byte to distinguish these codes from\n    // non-extended character codes. Every CEA708 character code that\n    // is not in this object maps directly to a standard unicode\n    // character code.\n    // The transparent space and non-breaking transparent space are\n    // technically not fully supported since there is no code to\n    // make them transparent, so they have normal non-transparent\n    // stand-ins.\n    // The special closed caption (CC) character isn't a standard\n    // unicode character, so a fairly similar unicode character was\n    // chosen in it's place.\n\n    var CHARACTER_TRANSLATION_708 = {\n      0x7f: 0x266a,\n      // ♪\n      0x1020: 0x20,\n      // Transparent Space\n      0x1021: 0xa0,\n      // Nob-breaking Transparent Space\n      0x1025: 0x2026,\n      // …\n      0x102a: 0x0160,\n      // Š\n      0x102c: 0x0152,\n      // Œ\n      0x1030: 0x2588,\n      // █\n      0x1031: 0x2018,\n      // ‘\n      0x1032: 0x2019,\n      // ’\n      0x1033: 0x201c,\n      // “\n      0x1034: 0x201d,\n      // ”\n      0x1035: 0x2022,\n      // •\n      0x1039: 0x2122,\n      // ™\n      0x103a: 0x0161,\n      // š\n      0x103c: 0x0153,\n      // œ\n      0x103d: 0x2120,\n      // ℠\n      0x103f: 0x0178,\n      // Ÿ\n      0x1076: 0x215b,\n      // ⅛\n      0x1077: 0x215c,\n      // ⅜\n      0x1078: 0x215d,\n      // ⅝\n      0x1079: 0x215e,\n      // ⅞\n      0x107a: 0x23d0,\n      // ⏐\n      0x107b: 0x23a4,\n      // ⎤\n      0x107c: 0x23a3,\n      // ⎣\n      0x107d: 0x23af,\n      // ⎯\n      0x107e: 0x23a6,\n      // ⎦\n      0x107f: 0x23a1,\n      // ⎡\n      0x10a0: 0x3138 // ㄸ (CC char)\n    };\n    var get708CharFromCode = function (code) {\n      var newCode = CHARACTER_TRANSLATION_708[code] || code;\n      if (code & 0x1000 && code === newCode) {\n        // Invalid extended code\n        return '';\n      }\n      return String.fromCharCode(newCode);\n    };\n    var within708TextBlock = function (b) {\n      return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n    };\n    var Cea708Window = function (windowNum) {\n      this.windowNum = windowNum;\n      this.reset();\n    };\n    Cea708Window.prototype.reset = function () {\n      this.clearText();\n      this.pendingNewLine = false;\n      this.winAttr = {};\n      this.penAttr = {};\n      this.penLoc = {};\n      this.penColor = {}; // These default values are arbitrary,\n      // defineWindow will usually override them\n\n      this.visible = 0;\n      this.rowLock = 0;\n      this.columnLock = 0;\n      this.priority = 0;\n      this.relativePositioning = 0;\n      this.anchorVertical = 0;\n      this.anchorHorizontal = 0;\n      this.anchorPoint = 0;\n      this.rowCount = 1;\n      this.virtualRowCount = this.rowCount + 1;\n      this.columnCount = 41;\n      this.windowStyle = 0;\n      this.penStyle = 0;\n    };\n    Cea708Window.prototype.getText = function () {\n      return this.rows.join('\\n');\n    };\n    Cea708Window.prototype.clearText = function () {\n      this.rows = [''];\n      this.rowIdx = 0;\n    };\n    Cea708Window.prototype.newLine = function (pts) {\n      if (this.rows.length >= this.virtualRowCount && typeof this.beforeRowOverflow === 'function') {\n        this.beforeRowOverflow(pts);\n      }\n      if (this.rows.length > 0) {\n        this.rows.push('');\n        this.rowIdx++;\n      } // Show all virtual rows since there's no visible scrolling\n\n      while (this.rows.length > this.virtualRowCount) {\n        this.rows.shift();\n        this.rowIdx--;\n      }\n    };\n    Cea708Window.prototype.isEmpty = function () {\n      if (this.rows.length === 0) {\n        return true;\n      } else if (this.rows.length === 1) {\n        return this.rows[0] === '';\n      }\n      return false;\n    };\n    Cea708Window.prototype.addText = function (text) {\n      this.rows[this.rowIdx] += text;\n    };\n    Cea708Window.prototype.backspace = function () {\n      if (!this.isEmpty()) {\n        var row = this.rows[this.rowIdx];\n        this.rows[this.rowIdx] = row.substr(0, row.length - 1);\n      }\n    };\n    var Cea708Service = function (serviceNum, encoding, stream) {\n      this.serviceNum = serviceNum;\n      this.text = '';\n      this.currentWindow = new Cea708Window(-1);\n      this.windows = [];\n      this.stream = stream; // Try to setup a TextDecoder if an `encoding` value was provided\n\n      if (typeof encoding === 'string') {\n        this.createTextDecoder(encoding);\n      }\n    };\n    /**\n     * Initialize service windows\n     * Must be run before service use\n     *\n     * @param  {Integer}  pts               PTS value\n     * @param  {Function} beforeRowOverflow Function to execute before row overflow of a window\n     */\n\n    Cea708Service.prototype.init = function (pts, beforeRowOverflow) {\n      this.startPts = pts;\n      for (var win = 0; win < 8; win++) {\n        this.windows[win] = new Cea708Window(win);\n        if (typeof beforeRowOverflow === 'function') {\n          this.windows[win].beforeRowOverflow = beforeRowOverflow;\n        }\n      }\n    };\n    /**\n     * Set current window of service to be affected by commands\n     *\n     * @param  {Integer} windowNum Window number\n     */\n\n    Cea708Service.prototype.setCurrentWindow = function (windowNum) {\n      this.currentWindow = this.windows[windowNum];\n    };\n    /**\n     * Try to create a TextDecoder if it is natively supported\n     */\n\n    Cea708Service.prototype.createTextDecoder = function (encoding) {\n      if (typeof TextDecoder === 'undefined') {\n        this.stream.trigger('log', {\n          level: 'warn',\n          message: 'The `encoding` option is unsupported without TextDecoder support'\n        });\n      } else {\n        try {\n          this.textDecoder_ = new TextDecoder(encoding);\n        } catch (error) {\n          this.stream.trigger('log', {\n            level: 'warn',\n            message: 'TextDecoder could not be created with ' + encoding + ' encoding. ' + error\n          });\n        }\n      }\n    };\n    var Cea708Stream = function (options) {\n      options = options || {};\n      Cea708Stream.prototype.init.call(this);\n      var self = this;\n      var captionServices = options.captionServices || {};\n      var captionServiceEncodings = {};\n      var serviceProps; // Get service encodings from captionServices option block\n\n      Object.keys(captionServices).forEach(serviceName => {\n        serviceProps = captionServices[serviceName];\n        if (/^SERVICE/.test(serviceName)) {\n          captionServiceEncodings[serviceName] = serviceProps.encoding;\n        }\n      });\n      this.serviceEncodings = captionServiceEncodings;\n      this.current708Packet = null;\n      this.services = {};\n      this.push = function (packet) {\n        if (packet.type === 3) {\n          // 708 packet start\n          self.new708Packet();\n          self.add708Bytes(packet);\n        } else {\n          if (self.current708Packet === null) {\n            // This should only happen at the start of a file if there's no packet start.\n            self.new708Packet();\n          }\n          self.add708Bytes(packet);\n        }\n      };\n    };\n    Cea708Stream.prototype = new Stream$7();\n    /**\n     * Push current 708 packet, create new 708 packet.\n     */\n\n    Cea708Stream.prototype.new708Packet = function () {\n      if (this.current708Packet !== null) {\n        this.push708Packet();\n      }\n      this.current708Packet = {\n        data: [],\n        ptsVals: []\n      };\n    };\n    /**\n     * Add pts and both bytes from packet into current 708 packet.\n     */\n\n    Cea708Stream.prototype.add708Bytes = function (packet) {\n      var data = packet.ccData;\n      var byte0 = data >>> 8;\n      var byte1 = data & 0xff; // I would just keep a list of packets instead of bytes, but it isn't clear in the spec\n      // that service blocks will always line up with byte pairs.\n\n      this.current708Packet.ptsVals.push(packet.pts);\n      this.current708Packet.data.push(byte0);\n      this.current708Packet.data.push(byte1);\n    };\n    /**\n     * Parse completed 708 packet into service blocks and push each service block.\n     */\n\n    Cea708Stream.prototype.push708Packet = function () {\n      var packet708 = this.current708Packet;\n      var packetData = packet708.data;\n      var serviceNum = null;\n      var blockSize = null;\n      var i = 0;\n      var b = packetData[i++];\n      packet708.seq = b >> 6;\n      packet708.sizeCode = b & 0x3f; // 0b00111111;\n\n      for (; i < packetData.length; i++) {\n        b = packetData[i++];\n        serviceNum = b >> 5;\n        blockSize = b & 0x1f; // 0b00011111\n\n        if (serviceNum === 7 && blockSize > 0) {\n          // Extended service num\n          b = packetData[i++];\n          serviceNum = b;\n        }\n        this.pushServiceBlock(serviceNum, i, blockSize);\n        if (blockSize > 0) {\n          i += blockSize - 1;\n        }\n      }\n    };\n    /**\n     * Parse service block, execute commands, read text.\n     *\n     * Note: While many of these commands serve important purposes,\n     * many others just parse out the parameters or attributes, but\n     * nothing is done with them because this is not a full and complete\n     * implementation of the entire 708 spec.\n     *\n     * @param  {Integer} serviceNum Service number\n     * @param  {Integer} start      Start index of the 708 packet data\n     * @param  {Integer} size       Block size\n     */\n\n    Cea708Stream.prototype.pushServiceBlock = function (serviceNum, start, size) {\n      var b;\n      var i = start;\n      var packetData = this.current708Packet.data;\n      var service = this.services[serviceNum];\n      if (!service) {\n        service = this.initService(serviceNum, i);\n      }\n      for (; i < start + size && i < packetData.length; i++) {\n        b = packetData[i];\n        if (within708TextBlock(b)) {\n          i = this.handleText(i, service);\n        } else if (b === 0x18) {\n          i = this.multiByteCharacter(i, service);\n        } else if (b === 0x10) {\n          i = this.extendedCommands(i, service);\n        } else if (0x80 <= b && b <= 0x87) {\n          i = this.setCurrentWindow(i, service);\n        } else if (0x98 <= b && b <= 0x9f) {\n          i = this.defineWindow(i, service);\n        } else if (b === 0x88) {\n          i = this.clearWindows(i, service);\n        } else if (b === 0x8c) {\n          i = this.deleteWindows(i, service);\n        } else if (b === 0x89) {\n          i = this.displayWindows(i, service);\n        } else if (b === 0x8a) {\n          i = this.hideWindows(i, service);\n        } else if (b === 0x8b) {\n          i = this.toggleWindows(i, service);\n        } else if (b === 0x97) {\n          i = this.setWindowAttributes(i, service);\n        } else if (b === 0x90) {\n          i = this.setPenAttributes(i, service);\n        } else if (b === 0x91) {\n          i = this.setPenColor(i, service);\n        } else if (b === 0x92) {\n          i = this.setPenLocation(i, service);\n        } else if (b === 0x8f) {\n          service = this.reset(i, service);\n        } else if (b === 0x08) {\n          // BS: Backspace\n          service.currentWindow.backspace();\n        } else if (b === 0x0c) {\n          // FF: Form feed\n          service.currentWindow.clearText();\n        } else if (b === 0x0d) {\n          // CR: Carriage return\n          service.currentWindow.pendingNewLine = true;\n        } else if (b === 0x0e) {\n          // HCR: Horizontal carriage return\n          service.currentWindow.clearText();\n        } else if (b === 0x8d) {\n          // DLY: Delay, nothing to do\n          i++;\n        } else ;\n      }\n    };\n    /**\n     * Execute an extended command\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.extendedCommands = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[++i];\n      if (within708TextBlock(b)) {\n        i = this.handleText(i, service, {\n          isExtended: true\n        });\n      }\n      return i;\n    };\n    /**\n     * Get PTS value of a given byte index\n     *\n     * @param  {Integer} byteIndex  Index of the byte\n     * @return {Integer}            PTS\n     */\n\n    Cea708Stream.prototype.getPts = function (byteIndex) {\n      // There's 1 pts value per 2 bytes\n      return this.current708Packet.ptsVals[Math.floor(byteIndex / 2)];\n    };\n    /**\n     * Initializes a service\n     *\n     * @param  {Integer} serviceNum Service number\n     * @return {Service}            Initialized service object\n     */\n\n    Cea708Stream.prototype.initService = function (serviceNum, i) {\n      var serviceName = 'SERVICE' + serviceNum;\n      var self = this;\n      var serviceName;\n      var encoding;\n      if (serviceName in this.serviceEncodings) {\n        encoding = this.serviceEncodings[serviceName];\n      }\n      this.services[serviceNum] = new Cea708Service(serviceNum, encoding, self);\n      this.services[serviceNum].init(this.getPts(i), function (pts) {\n        self.flushDisplayed(pts, self.services[serviceNum]);\n      });\n      return this.services[serviceNum];\n    };\n    /**\n     * Execute text writing to current window\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.handleText = function (i, service, options) {\n      var isExtended = options && options.isExtended;\n      var isMultiByte = options && options.isMultiByte;\n      var packetData = this.current708Packet.data;\n      var extended = isExtended ? 0x1000 : 0x0000;\n      var currentByte = packetData[i];\n      var nextByte = packetData[i + 1];\n      var win = service.currentWindow;\n      var char;\n      var charCodeArray; // Converts an array of bytes to a unicode hex string.\n\n      function toHexString(byteArray) {\n        return byteArray.map(byte => {\n          return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n        }).join('');\n      }\n      if (isMultiByte) {\n        charCodeArray = [currentByte, nextByte];\n        i++;\n      } else {\n        charCodeArray = [currentByte];\n      } // Use the TextDecoder if one was created for this service\n\n      if (service.textDecoder_ && !isExtended) {\n        char = service.textDecoder_.decode(new Uint8Array(charCodeArray));\n      } else {\n        // We assume any multi-byte char without a decoder is unicode.\n        if (isMultiByte) {\n          const unicode = toHexString(charCodeArray); // Takes a unicode hex string and creates a single character.\n\n          char = String.fromCharCode(parseInt(unicode, 16));\n        } else {\n          char = get708CharFromCode(extended | currentByte);\n        }\n      }\n      if (win.pendingNewLine && !win.isEmpty()) {\n        win.newLine(this.getPts(i));\n      }\n      win.pendingNewLine = false;\n      win.addText(char);\n      return i;\n    };\n    /**\n     * Handle decoding of multibyte character\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.multiByteCharacter = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var firstByte = packetData[i + 1];\n      var secondByte = packetData[i + 2];\n      if (within708TextBlock(firstByte) && within708TextBlock(secondByte)) {\n        i = this.handleText(++i, service, {\n          isMultiByte: true\n        });\n      }\n      return i;\n    };\n    /**\n     * Parse and execute the CW# command.\n     *\n     * Set the current window.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.setCurrentWindow = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[i];\n      var windowNum = b & 0x07;\n      service.setCurrentWindow(windowNum);\n      return i;\n    };\n    /**\n     * Parse and execute the DF# command.\n     *\n     * Define a window and set it as the current window.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.defineWindow = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[i];\n      var windowNum = b & 0x07;\n      service.setCurrentWindow(windowNum);\n      var win = service.currentWindow;\n      b = packetData[++i];\n      win.visible = (b & 0x20) >> 5; // v\n\n      win.rowLock = (b & 0x10) >> 4; // rl\n\n      win.columnLock = (b & 0x08) >> 3; // cl\n\n      win.priority = b & 0x07; // p\n\n      b = packetData[++i];\n      win.relativePositioning = (b & 0x80) >> 7; // rp\n\n      win.anchorVertical = b & 0x7f; // av\n\n      b = packetData[++i];\n      win.anchorHorizontal = b; // ah\n\n      b = packetData[++i];\n      win.anchorPoint = (b & 0xf0) >> 4; // ap\n\n      win.rowCount = b & 0x0f; // rc\n\n      b = packetData[++i];\n      win.columnCount = b & 0x3f; // cc\n\n      b = packetData[++i];\n      win.windowStyle = (b & 0x38) >> 3; // ws\n\n      win.penStyle = b & 0x07; // ps\n      // The spec says there are (rowCount+1) \"virtual rows\"\n\n      win.virtualRowCount = win.rowCount + 1;\n      return i;\n    };\n    /**\n     * Parse and execute the SWA command.\n     *\n     * Set attributes of the current window.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.setWindowAttributes = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[i];\n      var winAttr = service.currentWindow.winAttr;\n      b = packetData[++i];\n      winAttr.fillOpacity = (b & 0xc0) >> 6; // fo\n\n      winAttr.fillRed = (b & 0x30) >> 4; // fr\n\n      winAttr.fillGreen = (b & 0x0c) >> 2; // fg\n\n      winAttr.fillBlue = b & 0x03; // fb\n\n      b = packetData[++i];\n      winAttr.borderType = (b & 0xc0) >> 6; // bt\n\n      winAttr.borderRed = (b & 0x30) >> 4; // br\n\n      winAttr.borderGreen = (b & 0x0c) >> 2; // bg\n\n      winAttr.borderBlue = b & 0x03; // bb\n\n      b = packetData[++i];\n      winAttr.borderType += (b & 0x80) >> 5; // bt\n\n      winAttr.wordWrap = (b & 0x40) >> 6; // ww\n\n      winAttr.printDirection = (b & 0x30) >> 4; // pd\n\n      winAttr.scrollDirection = (b & 0x0c) >> 2; // sd\n\n      winAttr.justify = b & 0x03; // j\n\n      b = packetData[++i];\n      winAttr.effectSpeed = (b & 0xf0) >> 4; // es\n\n      winAttr.effectDirection = (b & 0x0c) >> 2; // ed\n\n      winAttr.displayEffect = b & 0x03; // de\n\n      return i;\n    };\n    /**\n     * Gather text from all displayed windows and push a caption to output.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     */\n\n    Cea708Stream.prototype.flushDisplayed = function (pts, service) {\n      var displayedText = []; // TODO: Positioning not supported, displaying multiple windows will not necessarily\n      // display text in the correct order, but sample files so far have not shown any issue.\n\n      for (var winId = 0; winId < 8; winId++) {\n        if (service.windows[winId].visible && !service.windows[winId].isEmpty()) {\n          displayedText.push(service.windows[winId].getText());\n        }\n      }\n      service.endPts = pts;\n      service.text = displayedText.join('\\n\\n');\n      this.pushCaption(service);\n      service.startPts = pts;\n    };\n    /**\n     * Push a caption to output if the caption contains text.\n     *\n     * @param  {Service} service  The service object to be affected\n     */\n\n    Cea708Stream.prototype.pushCaption = function (service) {\n      if (service.text !== '') {\n        this.trigger('data', {\n          startPts: service.startPts,\n          endPts: service.endPts,\n          text: service.text,\n          stream: 'cc708_' + service.serviceNum\n        });\n        service.text = '';\n        service.startPts = service.endPts;\n      }\n    };\n    /**\n     * Parse and execute the DSW command.\n     *\n     * Set visible property of windows based on the parsed bitmask.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.displayWindows = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[++i];\n      var pts = this.getPts(i);\n      this.flushDisplayed(pts, service);\n      for (var winId = 0; winId < 8; winId++) {\n        if (b & 0x01 << winId) {\n          service.windows[winId].visible = 1;\n        }\n      }\n      return i;\n    };\n    /**\n     * Parse and execute the HDW command.\n     *\n     * Set visible property of windows based on the parsed bitmask.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.hideWindows = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[++i];\n      var pts = this.getPts(i);\n      this.flushDisplayed(pts, service);\n      for (var winId = 0; winId < 8; winId++) {\n        if (b & 0x01 << winId) {\n          service.windows[winId].visible = 0;\n        }\n      }\n      return i;\n    };\n    /**\n     * Parse and execute the TGW command.\n     *\n     * Set visible property of windows based on the parsed bitmask.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.toggleWindows = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[++i];\n      var pts = this.getPts(i);\n      this.flushDisplayed(pts, service);\n      for (var winId = 0; winId < 8; winId++) {\n        if (b & 0x01 << winId) {\n          service.windows[winId].visible ^= 1;\n        }\n      }\n      return i;\n    };\n    /**\n     * Parse and execute the CLW command.\n     *\n     * Clear text of windows based on the parsed bitmask.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.clearWindows = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[++i];\n      var pts = this.getPts(i);\n      this.flushDisplayed(pts, service);\n      for (var winId = 0; winId < 8; winId++) {\n        if (b & 0x01 << winId) {\n          service.windows[winId].clearText();\n        }\n      }\n      return i;\n    };\n    /**\n     * Parse and execute the DLW command.\n     *\n     * Re-initialize windows based on the parsed bitmask.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.deleteWindows = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[++i];\n      var pts = this.getPts(i);\n      this.flushDisplayed(pts, service);\n      for (var winId = 0; winId < 8; winId++) {\n        if (b & 0x01 << winId) {\n          service.windows[winId].reset();\n        }\n      }\n      return i;\n    };\n    /**\n     * Parse and execute the SPA command.\n     *\n     * Set pen attributes of the current window.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.setPenAttributes = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[i];\n      var penAttr = service.currentWindow.penAttr;\n      b = packetData[++i];\n      penAttr.textTag = (b & 0xf0) >> 4; // tt\n\n      penAttr.offset = (b & 0x0c) >> 2; // o\n\n      penAttr.penSize = b & 0x03; // s\n\n      b = packetData[++i];\n      penAttr.italics = (b & 0x80) >> 7; // i\n\n      penAttr.underline = (b & 0x40) >> 6; // u\n\n      penAttr.edgeType = (b & 0x38) >> 3; // et\n\n      penAttr.fontStyle = b & 0x07; // fs\n\n      return i;\n    };\n    /**\n     * Parse and execute the SPC command.\n     *\n     * Set pen color of the current window.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.setPenColor = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[i];\n      var penColor = service.currentWindow.penColor;\n      b = packetData[++i];\n      penColor.fgOpacity = (b & 0xc0) >> 6; // fo\n\n      penColor.fgRed = (b & 0x30) >> 4; // fr\n\n      penColor.fgGreen = (b & 0x0c) >> 2; // fg\n\n      penColor.fgBlue = b & 0x03; // fb\n\n      b = packetData[++i];\n      penColor.bgOpacity = (b & 0xc0) >> 6; // bo\n\n      penColor.bgRed = (b & 0x30) >> 4; // br\n\n      penColor.bgGreen = (b & 0x0c) >> 2; // bg\n\n      penColor.bgBlue = b & 0x03; // bb\n\n      b = packetData[++i];\n      penColor.edgeRed = (b & 0x30) >> 4; // er\n\n      penColor.edgeGreen = (b & 0x0c) >> 2; // eg\n\n      penColor.edgeBlue = b & 0x03; // eb\n\n      return i;\n    };\n    /**\n     * Parse and execute the SPL command.\n     *\n     * Set pen location of the current window.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Integer}          New index after parsing\n     */\n\n    Cea708Stream.prototype.setPenLocation = function (i, service) {\n      var packetData = this.current708Packet.data;\n      var b = packetData[i];\n      var penLoc = service.currentWindow.penLoc; // Positioning isn't really supported at the moment, so this essentially just inserts a linebreak\n\n      service.currentWindow.pendingNewLine = true;\n      b = packetData[++i];\n      penLoc.row = b & 0x0f; // r\n\n      b = packetData[++i];\n      penLoc.column = b & 0x3f; // c\n\n      return i;\n    };\n    /**\n     * Execute the RST command.\n     *\n     * Reset service to a clean slate. Re-initialize.\n     *\n     * @param  {Integer} i        Current index in the 708 packet\n     * @param  {Service} service  The service object to be affected\n     * @return {Service}          Re-initialized service\n     */\n\n    Cea708Stream.prototype.reset = function (i, service) {\n      var pts = this.getPts(i);\n      this.flushDisplayed(pts, service);\n      return this.initService(service.serviceNum, i);\n    }; // This hash maps non-ASCII, special, and extended character codes to their\n    // proper Unicode equivalent. The first keys that are only a single byte\n    // are the non-standard ASCII characters, which simply map the CEA608 byte\n    // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\n    // character codes, but have their MSB bitmasked with 0x03 so that a lookup\n    // can be performed regardless of the field and data channel on which the\n    // character code was received.\n\n    var CHARACTER_TRANSLATION = {\n      0x2a: 0xe1,\n      // á\n      0x5c: 0xe9,\n      // é\n      0x5e: 0xed,\n      // í\n      0x5f: 0xf3,\n      // ó\n      0x60: 0xfa,\n      // ú\n      0x7b: 0xe7,\n      // ç\n      0x7c: 0xf7,\n      // ÷\n      0x7d: 0xd1,\n      // Ñ\n      0x7e: 0xf1,\n      // ñ\n      0x7f: 0x2588,\n      // █\n      0x0130: 0xae,\n      // ®\n      0x0131: 0xb0,\n      // °\n      0x0132: 0xbd,\n      // ½\n      0x0133: 0xbf,\n      // ¿\n      0x0134: 0x2122,\n      // ™\n      0x0135: 0xa2,\n      // ¢\n      0x0136: 0xa3,\n      // £\n      0x0137: 0x266a,\n      // ♪\n      0x0138: 0xe0,\n      // à\n      0x0139: 0xa0,\n      //\n      0x013a: 0xe8,\n      // è\n      0x013b: 0xe2,\n      // â\n      0x013c: 0xea,\n      // ê\n      0x013d: 0xee,\n      // î\n      0x013e: 0xf4,\n      // ô\n      0x013f: 0xfb,\n      // û\n      0x0220: 0xc1,\n      // Á\n      0x0221: 0xc9,\n      // É\n      0x0222: 0xd3,\n      // Ó\n      0x0223: 0xda,\n      // Ú\n      0x0224: 0xdc,\n      // Ü\n      0x0225: 0xfc,\n      // ü\n      0x0226: 0x2018,\n      // ‘\n      0x0227: 0xa1,\n      // ¡\n      0x0228: 0x2a,\n      // *\n      0x0229: 0x27,\n      // '\n      0x022a: 0x2014,\n      // —\n      0x022b: 0xa9,\n      // ©\n      0x022c: 0x2120,\n      // ℠\n      0x022d: 0x2022,\n      // •\n      0x022e: 0x201c,\n      // “\n      0x022f: 0x201d,\n      // ”\n      0x0230: 0xc0,\n      // À\n      0x0231: 0xc2,\n      // Â\n      0x0232: 0xc7,\n      // Ç\n      0x0233: 0xc8,\n      // È\n      0x0234: 0xca,\n      // Ê\n      0x0235: 0xcb,\n      // Ë\n      0x0236: 0xeb,\n      // ë\n      0x0237: 0xce,\n      // Î\n      0x0238: 0xcf,\n      // Ï\n      0x0239: 0xef,\n      // ï\n      0x023a: 0xd4,\n      // Ô\n      0x023b: 0xd9,\n      // Ù\n      0x023c: 0xf9,\n      // ù\n      0x023d: 0xdb,\n      // Û\n      0x023e: 0xab,\n      // «\n      0x023f: 0xbb,\n      // »\n      0x0320: 0xc3,\n      // Ã\n      0x0321: 0xe3,\n      // ã\n      0x0322: 0xcd,\n      // Í\n      0x0323: 0xcc,\n      // Ì\n      0x0324: 0xec,\n      // ì\n      0x0325: 0xd2,\n      // Ò\n      0x0326: 0xf2,\n      // ò\n      0x0327: 0xd5,\n      // Õ\n      0x0328: 0xf5,\n      // õ\n      0x0329: 0x7b,\n      // {\n      0x032a: 0x7d,\n      // }\n      0x032b: 0x5c,\n      // \\\n      0x032c: 0x5e,\n      // ^\n      0x032d: 0x5f,\n      // _\n      0x032e: 0x7c,\n      // |\n      0x032f: 0x7e,\n      // ~\n      0x0330: 0xc4,\n      // Ä\n      0x0331: 0xe4,\n      // ä\n      0x0332: 0xd6,\n      // Ö\n      0x0333: 0xf6,\n      // ö\n      0x0334: 0xdf,\n      // ß\n      0x0335: 0xa5,\n      // ¥\n      0x0336: 0xa4,\n      // ¤\n      0x0337: 0x2502,\n      // │\n      0x0338: 0xc5,\n      // Å\n      0x0339: 0xe5,\n      // å\n      0x033a: 0xd8,\n      // Ø\n      0x033b: 0xf8,\n      // ø\n      0x033c: 0x250c,\n      // ┌\n      0x033d: 0x2510,\n      // ┐\n      0x033e: 0x2514,\n      // └\n      0x033f: 0x2518 // ┘\n    };\n    var getCharFromCode = function (code) {\n      if (code === null) {\n        return '';\n      }\n      code = CHARACTER_TRANSLATION[code] || code;\n      return String.fromCharCode(code);\n    }; // the index of the last row in a CEA-608 display buffer\n\n    var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\n    // getting it through bit logic.\n\n    var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\n    // cells. The \"bottom\" row is the last element in the outer array.\n    // We keep track of positioning information as we go by storing the\n    // number of indentations and the tab offset in this buffer.\n\n    var createDisplayBuffer = function () {\n      var result = [],\n        i = BOTTOM_ROW + 1;\n      while (i--) {\n        result.push({\n          text: '',\n          indent: 0,\n          offset: 0\n        });\n      }\n      return result;\n    };\n    var Cea608Stream = function (field, dataChannel) {\n      Cea608Stream.prototype.init.call(this);\n      this.field_ = field || 0;\n      this.dataChannel_ = dataChannel || 0;\n      this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\n      this.setConstants();\n      this.reset();\n      this.push = function (packet) {\n        var data, swap, char0, char1, text; // remove the parity bits\n\n        data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\n\n        if (data === this.lastControlCode_) {\n          this.lastControlCode_ = null;\n          return;\n        } // Store control codes\n\n        if ((data & 0xf000) === 0x1000) {\n          this.lastControlCode_ = data;\n        } else if (data !== this.PADDING_) {\n          this.lastControlCode_ = null;\n        }\n        char0 = data >>> 8;\n        char1 = data & 0xff;\n        if (data === this.PADDING_) {\n          return;\n        } else if (data === this.RESUME_CAPTION_LOADING_) {\n          this.mode_ = 'popOn';\n        } else if (data === this.END_OF_CAPTION_) {\n          // If an EOC is received while in paint-on mode, the displayed caption\n          // text should be swapped to non-displayed memory as if it was a pop-on\n          // caption. Because of that, we should explicitly switch back to pop-on\n          // mode\n          this.mode_ = 'popOn';\n          this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\n\n          this.flushDisplayed(packet.pts); // flip memory\n\n          swap = this.displayed_;\n          this.displayed_ = this.nonDisplayed_;\n          this.nonDisplayed_ = swap; // start measuring the time to display the caption\n\n          this.startPts_ = packet.pts;\n        } else if (data === this.ROLL_UP_2_ROWS_) {\n          this.rollUpRows_ = 2;\n          this.setRollUp(packet.pts);\n        } else if (data === this.ROLL_UP_3_ROWS_) {\n          this.rollUpRows_ = 3;\n          this.setRollUp(packet.pts);\n        } else if (data === this.ROLL_UP_4_ROWS_) {\n          this.rollUpRows_ = 4;\n          this.setRollUp(packet.pts);\n        } else if (data === this.CARRIAGE_RETURN_) {\n          this.clearFormatting(packet.pts);\n          this.flushDisplayed(packet.pts);\n          this.shiftRowsUp_();\n          this.startPts_ = packet.pts;\n        } else if (data === this.BACKSPACE_) {\n          if (this.mode_ === 'popOn') {\n            this.nonDisplayed_[this.row_].text = this.nonDisplayed_[this.row_].text.slice(0, -1);\n          } else {\n            this.displayed_[this.row_].text = this.displayed_[this.row_].text.slice(0, -1);\n          }\n        } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\n          this.flushDisplayed(packet.pts);\n          this.displayed_ = createDisplayBuffer();\n        } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\n          this.nonDisplayed_ = createDisplayBuffer();\n        } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\n          if (this.mode_ !== 'paintOn') {\n            // NOTE: This should be removed when proper caption positioning is\n            // implemented\n            this.flushDisplayed(packet.pts);\n            this.displayed_ = createDisplayBuffer();\n          }\n          this.mode_ = 'paintOn';\n          this.startPts_ = packet.pts; // Append special characters to caption text\n        } else if (this.isSpecialCharacter(char0, char1)) {\n          // Bitmask char0 so that we can apply character transformations\n          // regardless of field and data channel.\n          // Then byte-shift to the left and OR with char1 so we can pass the\n          // entire character code to `getCharFromCode`.\n          char0 = (char0 & 0x03) << 8;\n          text = getCharFromCode(char0 | char1);\n          this[this.mode_](packet.pts, text);\n          this.column_++; // Append extended characters to caption text\n        } else if (this.isExtCharacter(char0, char1)) {\n          // Extended characters always follow their \"non-extended\" equivalents.\n          // IE if a \"è\" is desired, you'll always receive \"eè\"; non-compliant\n          // decoders are supposed to drop the \"è\", while compliant decoders\n          // backspace the \"e\" and insert \"è\".\n          // Delete the previous character\n          if (this.mode_ === 'popOn') {\n            this.nonDisplayed_[this.row_].text = this.nonDisplayed_[this.row_].text.slice(0, -1);\n          } else {\n            this.displayed_[this.row_].text = this.displayed_[this.row_].text.slice(0, -1);\n          } // Bitmask char0 so that we can apply character transformations\n          // regardless of field and data channel.\n          // Then byte-shift to the left and OR with char1 so we can pass the\n          // entire character code to `getCharFromCode`.\n\n          char0 = (char0 & 0x03) << 8;\n          text = getCharFromCode(char0 | char1);\n          this[this.mode_](packet.pts, text);\n          this.column_++; // Process mid-row codes\n        } else if (this.isMidRowCode(char0, char1)) {\n          // Attributes are not additive, so clear all formatting\n          this.clearFormatting(packet.pts); // According to the standard, mid-row codes\n          // should be replaced with spaces, so add one now\n\n          this[this.mode_](packet.pts, ' ');\n          this.column_++;\n          if ((char1 & 0xe) === 0xe) {\n            this.addFormatting(packet.pts, ['i']);\n          }\n          if ((char1 & 0x1) === 0x1) {\n            this.addFormatting(packet.pts, ['u']);\n          } // Detect offset control codes and adjust cursor\n        } else if (this.isOffsetControlCode(char0, char1)) {\n          // Cursor position is set by indent PAC (see below) in 4-column\n          // increments, with an additional offset code of 1-3 to reach any\n          // of the 32 columns specified by CEA-608. So all we need to do\n          // here is increment the column cursor by the given offset.\n          const offset = char1 & 0x03; // For an offest value 1-3, set the offset for that caption\n          // in the non-displayed array.\n\n          this.nonDisplayed_[this.row_].offset = offset;\n          this.column_ += offset; // Detect PACs (Preamble Address Codes)\n        } else if (this.isPAC(char0, char1)) {\n          // There's no logic for PAC -> row mapping, so we have to just\n          // find the row code in an array and use its index :(\n          var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\n\n          if (this.mode_ === 'rollUp') {\n            // This implies that the base row is incorrectly set.\n            // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\n            // of roll-up rows set.\n            if (row - this.rollUpRows_ + 1 < 0) {\n              row = this.rollUpRows_ - 1;\n            }\n            this.setRollUp(packet.pts, row);\n          } // Ensure the row is between 0 and 14, otherwise use the most\n          // recent or default row.\n\n          if (row !== this.row_ && row >= 0 && row <= 14) {\n            // formatting is only persistent for current row\n            this.clearFormatting(packet.pts);\n            this.row_ = row;\n          } // All PACs can apply underline, so detect and apply\n          // (All odd-numbered second bytes set underline)\n\n          if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n            this.addFormatting(packet.pts, ['u']);\n          }\n          if ((data & 0x10) === 0x10) {\n            // We've got an indent level code. Each successive even number\n            // increments the column cursor by 4, so we can get the desired\n            // column position by bit-shifting to the right (to get n/2)\n            // and multiplying by 4.\n            const indentations = (data & 0xe) >> 1;\n            this.column_ = indentations * 4; // add to the number of indentations for positioning\n\n            this.nonDisplayed_[this.row_].indent += indentations;\n          }\n          if (this.isColorPAC(char1)) {\n            // it's a color code, though we only support white, which\n            // can be either normal or italicized. white italics can be\n            // either 0x4e or 0x6e depending on the row, so we just\n            // bitwise-and with 0xe to see if italics should be turned on\n            if ((char1 & 0xe) === 0xe) {\n              this.addFormatting(packet.pts, ['i']);\n            }\n          } // We have a normal character in char0, and possibly one in char1\n        } else if (this.isNormalChar(char0)) {\n          if (char1 === 0x00) {\n            char1 = null;\n          }\n          text = getCharFromCode(char0);\n          text += getCharFromCode(char1);\n          this[this.mode_](packet.pts, text);\n          this.column_ += text.length;\n        } // finish data processing\n      };\n    };\n    Cea608Stream.prototype = new Stream$7(); // Trigger a cue point that captures the current state of the\n    // display buffer\n\n    Cea608Stream.prototype.flushDisplayed = function (pts) {\n      const logWarning = index => {\n        this.trigger('log', {\n          level: 'warn',\n          message: 'Skipping a malformed 608 caption at index ' + index + '.'\n        });\n      };\n      const content = [];\n      this.displayed_.forEach((row, i) => {\n        if (row && row.text && row.text.length) {\n          try {\n            // remove spaces from the start and end of the string\n            row.text = row.text.trim();\n          } catch (e) {\n            // Ordinarily, this shouldn't happen. However, caption\n            // parsing errors should not throw exceptions and\n            // break playback.\n            logWarning(i);\n          } // See the below link for more details on the following fields:\n          // https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608\n\n          if (row.text.length) {\n            content.push({\n              // The text to be displayed in the caption from this specific row, with whitespace removed.\n              text: row.text,\n              // Value between 1 and 15 representing the PAC row used to calculate line height.\n              line: i + 1,\n              // A number representing the indent position by percentage (CEA-608 PAC indent code).\n              // The value will be a number between 10 and 80. Offset is used to add an aditional\n              // value to the position if necessary.\n              position: 10 + Math.min(70, row.indent * 10) + row.offset * 2.5\n            });\n          }\n        } else if (row === undefined || row === null) {\n          logWarning(i);\n        }\n      });\n      if (content.length) {\n        this.trigger('data', {\n          startPts: this.startPts_,\n          endPts: pts,\n          content,\n          stream: this.name_\n        });\n      }\n    };\n    /**\n     * Zero out the data, used for startup and on seek\n     */\n\n    Cea608Stream.prototype.reset = function () {\n      this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\n      // actually display captions. If a caption is shifted to a row\n      // with a lower index than this, it is cleared from the display\n      // buffer\n\n      this.topRow_ = 0;\n      this.startPts_ = 0;\n      this.displayed_ = createDisplayBuffer();\n      this.nonDisplayed_ = createDisplayBuffer();\n      this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\n\n      this.column_ = 0;\n      this.row_ = BOTTOM_ROW;\n      this.rollUpRows_ = 2; // This variable holds currently-applied formatting\n\n      this.formatting_ = [];\n    };\n    /**\n     * Sets up control code and related constants for this instance\n     */\n\n    Cea608Stream.prototype.setConstants = function () {\n      // The following attributes have these uses:\n      // ext_ :    char0 for mid-row codes, and the base for extended\n      //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\n      //           extended codes)\n      // control_: char0 for control codes, except byte-shifted to the\n      //           left so that we can do this.control_ | CONTROL_CODE\n      // offset_:  char0 for tab offset codes\n      //\n      // It's also worth noting that control codes, and _only_ control codes,\n      // differ between field 1 and field2. Field 2 control codes are always\n      // their field 1 value plus 1. That's why there's the \"| field\" on the\n      // control value.\n      if (this.dataChannel_ === 0) {\n        this.BASE_ = 0x10;\n        this.EXT_ = 0x11;\n        this.CONTROL_ = (0x14 | this.field_) << 8;\n        this.OFFSET_ = 0x17;\n      } else if (this.dataChannel_ === 1) {\n        this.BASE_ = 0x18;\n        this.EXT_ = 0x19;\n        this.CONTROL_ = (0x1c | this.field_) << 8;\n        this.OFFSET_ = 0x1f;\n      } // Constants for the LSByte command codes recognized by Cea608Stream. This\n      // list is not exhaustive. For a more comprehensive listing and semantics see\n      // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\n      // Padding\n\n      this.PADDING_ = 0x0000; // Pop-on Mode\n\n      this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\n      this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\n\n      this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\n      this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\n      this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\n      this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\n\n      this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\n\n      this.BACKSPACE_ = this.CONTROL_ | 0x21;\n      this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\n      this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\n    };\n    /**\n     * Detects if the 2-byte packet data is a special character\n     *\n     * Special characters have a second byte in the range 0x30 to 0x3f,\n     * with the first byte being 0x11 (for data channel 1) or 0x19 (for\n     * data channel 2).\n     *\n     * @param  {Integer} char0 The first byte\n     * @param  {Integer} char1 The second byte\n     * @return {Boolean}       Whether the 2 bytes are an special character\n     */\n\n    Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\n      return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\n    };\n    /**\n     * Detects if the 2-byte packet data is an extended character\n     *\n     * Extended characters have a second byte in the range 0x20 to 0x3f,\n     * with the first byte being 0x12 or 0x13 (for data channel 1) or\n     * 0x1a or 0x1b (for data channel 2).\n     *\n     * @param  {Integer} char0 The first byte\n     * @param  {Integer} char1 The second byte\n     * @return {Boolean}       Whether the 2 bytes are an extended character\n     */\n\n    Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\n      return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\n    };\n    /**\n     * Detects if the 2-byte packet is a mid-row code\n     *\n     * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\n     * the first byte being 0x11 (for data channel 1) or 0x19 (for data\n     * channel 2).\n     *\n     * @param  {Integer} char0 The first byte\n     * @param  {Integer} char1 The second byte\n     * @return {Boolean}       Whether the 2 bytes are a mid-row code\n     */\n\n    Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\n      return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\n    };\n    /**\n     * Detects if the 2-byte packet is an offset control code\n     *\n     * Offset control codes have a second byte in the range 0x21 to 0x23,\n     * with the first byte being 0x17 (for data channel 1) or 0x1f (for\n     * data channel 2).\n     *\n     * @param  {Integer} char0 The first byte\n     * @param  {Integer} char1 The second byte\n     * @return {Boolean}       Whether the 2 bytes are an offset control code\n     */\n\n    Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\n      return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\n    };\n    /**\n     * Detects if the 2-byte packet is a Preamble Address Code\n     *\n     * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\n     * or 0x18 to 0x1f (for data channel 2), with the second byte in the\n     * range 0x40 to 0x7f.\n     *\n     * @param  {Integer} char0 The first byte\n     * @param  {Integer} char1 The second byte\n     * @return {Boolean}       Whether the 2 bytes are a PAC\n     */\n\n    Cea608Stream.prototype.isPAC = function (char0, char1) {\n      return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\n    };\n    /**\n     * Detects if a packet's second byte is in the range of a PAC color code\n     *\n     * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\n     * 0x60 to 0x6f.\n     *\n     * @param  {Integer} char1 The second byte\n     * @return {Boolean}       Whether the byte is a color PAC\n     */\n\n    Cea608Stream.prototype.isColorPAC = function (char1) {\n      return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\n    };\n    /**\n     * Detects if a single byte is in the range of a normal character\n     *\n     * Normal text bytes are in the range 0x20 to 0x7f.\n     *\n     * @param  {Integer} char  The byte\n     * @return {Boolean}       Whether the byte is a normal character\n     */\n\n    Cea608Stream.prototype.isNormalChar = function (char) {\n      return char >= 0x20 && char <= 0x7f;\n    };\n    /**\n     * Configures roll-up\n     *\n     * @param  {Integer} pts         Current PTS\n     * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\n     *                               a new position\n     */\n\n    Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\n      // Reset the base row to the bottom row when switching modes\n      if (this.mode_ !== 'rollUp') {\n        this.row_ = BOTTOM_ROW;\n        this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\n\n        this.flushDisplayed(pts);\n        this.nonDisplayed_ = createDisplayBuffer();\n        this.displayed_ = createDisplayBuffer();\n      }\n      if (newBaseRow !== undefined && newBaseRow !== this.row_) {\n        // move currently displayed captions (up or down) to the new base row\n        for (var i = 0; i < this.rollUpRows_; i++) {\n          this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\n          this.displayed_[this.row_ - i] = {\n            text: '',\n            indent: 0,\n            offset: 0\n          };\n        }\n      }\n      if (newBaseRow === undefined) {\n        newBaseRow = this.row_;\n      }\n      this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\n    }; // Adds the opening HTML tag for the passed character to the caption text,\n    // and keeps track of it for later closing\n\n    Cea608Stream.prototype.addFormatting = function (pts, format) {\n      this.formatting_ = this.formatting_.concat(format);\n      var text = format.reduce(function (text, format) {\n        return text + '<' + format + '>';\n      }, '');\n      this[this.mode_](pts, text);\n    }; // Adds HTML closing tags for current formatting to caption text and\n    // clears remembered formatting\n\n    Cea608Stream.prototype.clearFormatting = function (pts) {\n      if (!this.formatting_.length) {\n        return;\n      }\n      var text = this.formatting_.reverse().reduce(function (text, format) {\n        return text + '</' + format + '>';\n      }, '');\n      this.formatting_ = [];\n      this[this.mode_](pts, text);\n    }; // Mode Implementations\n\n    Cea608Stream.prototype.popOn = function (pts, text) {\n      var baseRow = this.nonDisplayed_[this.row_].text; // buffer characters\n\n      baseRow += text;\n      this.nonDisplayed_[this.row_].text = baseRow;\n    };\n    Cea608Stream.prototype.rollUp = function (pts, text) {\n      var baseRow = this.displayed_[this.row_].text;\n      baseRow += text;\n      this.displayed_[this.row_].text = baseRow;\n    };\n    Cea608Stream.prototype.shiftRowsUp_ = function () {\n      var i; // clear out inactive rows\n\n      for (i = 0; i < this.topRow_; i++) {\n        this.displayed_[i] = {\n          text: '',\n          indent: 0,\n          offset: 0\n        };\n      }\n      for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\n        this.displayed_[i] = {\n          text: '',\n          indent: 0,\n          offset: 0\n        };\n      } // shift displayed rows up\n\n      for (i = this.topRow_; i < this.row_; i++) {\n        this.displayed_[i] = this.displayed_[i + 1];\n      } // clear out the bottom row\n\n      this.displayed_[this.row_] = {\n        text: '',\n        indent: 0,\n        offset: 0\n      };\n    };\n    Cea608Stream.prototype.paintOn = function (pts, text) {\n      var baseRow = this.displayed_[this.row_].text;\n      baseRow += text;\n      this.displayed_[this.row_].text = baseRow;\n    }; // exports\n\n    var captionStream = {\n      CaptionStream: CaptionStream$2,\n      Cea608Stream: Cea608Stream,\n      Cea708Stream: Cea708Stream\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var streamTypes = {\n      H264_STREAM_TYPE: 0x1B,\n      ADTS_STREAM_TYPE: 0x0F,\n      METADATA_STREAM_TYPE: 0x15\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Accepts program elementary stream (PES) data events and corrects\n     * decode and presentation time stamps to account for a rollover\n     * of the 33 bit value.\n     */\n\n    var Stream$6 = stream;\n    var MAX_TS = 8589934592;\n    var RO_THRESH = 4294967296;\n    var TYPE_SHARED = 'shared';\n    var handleRollover$1 = function (value, reference) {\n      var direction = 1;\n      if (value > reference) {\n        // If the current timestamp value is greater than our reference timestamp and we detect a\n        // timestamp rollover, this means the roll over is happening in the opposite direction.\n        // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n        // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n        // rollover point. In loading this segment, the timestamp values will be very large,\n        // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n        // the time stamp to be `value - 2^33`.\n        direction = -1;\n      } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n      // cause an incorrect adjustment.\n\n      while (Math.abs(reference - value) > RO_THRESH) {\n        value += direction * MAX_TS;\n      }\n      return value;\n    };\n    var TimestampRolloverStream$1 = function (type) {\n      var lastDTS, referenceDTS;\n      TimestampRolloverStream$1.prototype.init.call(this); // The \"shared\" type is used in cases where a stream will contain muxed\n      // video and audio. We could use `undefined` here, but having a string\n      // makes debugging a little clearer.\n\n      this.type_ = type || TYPE_SHARED;\n      this.push = function (data) {\n        /**\n         * Rollover stream expects data from elementary stream.\n         * Elementary stream can push forward 2 types of data\n         * - Parsed Video/Audio/Timed-metadata PES (packetized elementary stream) packets\n         * - Tracks metadata from PMT (Program Map Table)\n         * Rollover stream expects pts/dts info to be available, since it stores lastDTS\n         * We should ignore non-PES packets since they may override lastDTS to undefined.\n         * lastDTS is important to signal the next segments\n         * about rollover from the previous segments.\n         */\n        if (data.type === 'metadata') {\n          this.trigger('data', data);\n          return;\n        } // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n        // streams will only accept data that matches their type.\n\n        if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n          return;\n        }\n        if (referenceDTS === undefined) {\n          referenceDTS = data.dts;\n        }\n        data.dts = handleRollover$1(data.dts, referenceDTS);\n        data.pts = handleRollover$1(data.pts, referenceDTS);\n        lastDTS = data.dts;\n        this.trigger('data', data);\n      };\n      this.flush = function () {\n        referenceDTS = lastDTS;\n        this.trigger('done');\n      };\n      this.endTimeline = function () {\n        this.flush();\n        this.trigger('endedtimeline');\n      };\n      this.discontinuity = function () {\n        referenceDTS = void 0;\n        lastDTS = void 0;\n      };\n      this.reset = function () {\n        this.discontinuity();\n        this.trigger('reset');\n      };\n    };\n    TimestampRolloverStream$1.prototype = new Stream$6();\n    var timestampRolloverStream = {\n      TimestampRolloverStream: TimestampRolloverStream$1,\n      handleRollover: handleRollover$1\n    }; // Once IE11 support is dropped, this function should be removed.\n\n    var typedArrayIndexOf$1 = (typedArray, element, fromIndex) => {\n      if (!typedArray) {\n        return -1;\n      }\n      var currentIndex = fromIndex;\n      for (; currentIndex < typedArray.length; currentIndex++) {\n        if (typedArray[currentIndex] === element) {\n          return currentIndex;\n        }\n      }\n      return -1;\n    };\n    var typedArray = {\n      typedArrayIndexOf: typedArrayIndexOf$1\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Tools for parsing ID3 frame data\n     * @see http://id3.org/id3v2.3.0\n     */\n\n    var typedArrayIndexOf = typedArray.typedArrayIndexOf,\n      // Frames that allow different types of text encoding contain a text\n      // encoding description byte [ID3v2.4.0 section 4.]\n      textEncodingDescriptionByte = {\n        Iso88591: 0x00,\n        // ISO-8859-1, terminated with \\0.\n        Utf16: 0x01,\n        // UTF-16 encoded Unicode BOM, terminated with \\0\\0\n        Utf16be: 0x02,\n        // UTF-16BE encoded Unicode, without BOM, terminated with \\0\\0\n        Utf8: 0x03 // UTF-8 encoded Unicode, terminated with \\0\n      },\n      // return a percent-encoded representation of the specified byte range\n      // @see http://en.wikipedia.org/wiki/Percent-encoding \n      percentEncode$1 = function (bytes, start, end) {\n        var i,\n          result = '';\n        for (i = start; i < end; i++) {\n          result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n        }\n        return result;\n      },\n      // return the string representation of the specified byte range,\n      // interpreted as UTf-8.\n      parseUtf8 = function (bytes, start, end) {\n        return decodeURIComponent(percentEncode$1(bytes, start, end));\n      },\n      // return the string representation of the specified byte range,\n      // interpreted as ISO-8859-1.\n      parseIso88591$1 = function (bytes, start, end) {\n        return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n      },\n      parseSyncSafeInteger$1 = function (data) {\n        return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n      },\n      frameParsers = {\n        'APIC': function (frame) {\n          var i = 1,\n            mimeTypeEndIndex,\n            descriptionEndIndex,\n            LINK_MIME_TYPE = '-->';\n          if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n            // ignore frames with unrecognized character encodings\n            return;\n          } // parsing fields [ID3v2.4.0 section 4.14.]\n\n          mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n          if (mimeTypeEndIndex < 0) {\n            // malformed frame\n            return;\n          } // parsing Mime type field (terminated with \\0)\n\n          frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n          i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n          frame.pictureType = frame.data[i];\n          i++;\n          descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n          if (descriptionEndIndex < 0) {\n            // malformed frame\n            return;\n          } // parsing Description field (terminated with \\0)\n\n          frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n          i = descriptionEndIndex + 1;\n          if (frame.mimeType === LINK_MIME_TYPE) {\n            // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n            frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n          } else {\n            // parsing Picture Data field as binary data\n            frame.pictureData = frame.data.subarray(i, frame.data.length);\n          }\n        },\n        'T*': function (frame) {\n          if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n            // ignore frames with unrecognized character encodings\n            return;\n          } // parse text field, do not include null terminator in the frame value\n          // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n          frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n          frame.values = frame.value.split('\\0');\n        },\n        'TXXX': function (frame) {\n          var descriptionEndIndex;\n          if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n            // ignore frames with unrecognized character encodings\n            return;\n          }\n          descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n          if (descriptionEndIndex === -1) {\n            return;\n          } // parse the text fields\n\n          frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n          // frames that allow different types of encoding contain terminated text\n          // [ID3v2.4.0 section 4.]\n\n          frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n          frame.data = frame.value;\n        },\n        'W*': function (frame) {\n          // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n          // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n          frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n        },\n        'WXXX': function (frame) {\n          var descriptionEndIndex;\n          if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n            // ignore frames with unrecognized character encodings\n            return;\n          }\n          descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n          if (descriptionEndIndex === -1) {\n            return;\n          } // parse the description and URL fields\n\n          frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n          // if the value is followed by a string termination all the following information\n          // should be ignored [ID3v2.4.0 section 4.3]\n\n          frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n        },\n        'PRIV': function (frame) {\n          var i;\n          for (i = 0; i < frame.data.length; i++) {\n            if (frame.data[i] === 0) {\n              // parse the description and URL fields\n              frame.owner = parseIso88591$1(frame.data, 0, i);\n              break;\n            }\n          }\n          frame.privateData = frame.data.subarray(i + 1);\n          frame.data = frame.privateData;\n        }\n      };\n    var parseId3Frames$1 = function (data) {\n      var frameSize,\n        frameHeader,\n        frameStart = 10,\n        tagSize = 0,\n        frames = []; // If we don't have enough data for a header, 10 bytes, \n      // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n      if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n        return;\n      } // the frame size is transmitted as a 28-bit integer in the\n      // last four bytes of the ID3 header.\n      // The most significant bit of each byte is dropped and the\n      // results concatenated to recover the actual value.\n\n      tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n      // convenient for our comparisons to include it\n\n      tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n      var hasExtendedHeader = data[5] & 0x40;\n      if (hasExtendedHeader) {\n        // advance the frame start past the extended header\n        frameStart += 4; // header size field\n\n        frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n        tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n      } // parse one or more ID3 frames\n      // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n      do {\n        // determine the number of bytes in this frame\n        frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n        if (frameSize < 1) {\n          break;\n        }\n        frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n        var frame = {\n          id: frameHeader,\n          data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n        };\n        frame.key = frame.id; // parse frame values\n\n        if (frameParsers[frame.id]) {\n          // use frame specific parser\n          frameParsers[frame.id](frame);\n        } else if (frame.id[0] === 'T') {\n          // use text frame generic parser\n          frameParsers['T*'](frame);\n        } else if (frame.id[0] === 'W') {\n          // use URL link frame generic parser\n          frameParsers['W*'](frame);\n        }\n        frames.push(frame);\n        frameStart += 10; // advance past the frame header\n\n        frameStart += frameSize; // advance past the frame body\n      } while (frameStart < tagSize);\n      return frames;\n    };\n    var parseId3 = {\n      parseId3Frames: parseId3Frames$1,\n      parseSyncSafeInteger: parseSyncSafeInteger$1,\n      frameParsers: frameParsers\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Accepts program elementary stream (PES) data events and parses out\n     * ID3 metadata from them, if present.\n     * @see http://id3.org/id3v2.3.0\n     */\n\n    var Stream$5 = stream,\n      StreamTypes$3 = streamTypes,\n      id3 = parseId3,\n      MetadataStream;\n    MetadataStream = function (options) {\n      var settings = {\n          // the bytes of the program-level descriptor field in MP2T\n          // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n          // program element descriptors\"\n          descriptor: options && options.descriptor\n        },\n        // the total size in bytes of the ID3 tag being parsed\n        tagSize = 0,\n        // tag data that is not complete enough to be parsed\n        buffer = [],\n        // the total number of bytes currently in the buffer\n        bufferSize = 0,\n        i;\n      MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n      // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n      this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n      if (settings.descriptor) {\n        for (i = 0; i < settings.descriptor.length; i++) {\n          this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n        }\n      }\n      this.push = function (chunk) {\n        var tag, frameStart, frameSize, frame, i, frameHeader;\n        if (chunk.type !== 'timed-metadata') {\n          return;\n        } // if data_alignment_indicator is set in the PES header,\n        // we must have the start of a new ID3 tag. Assume anything\n        // remaining in the buffer was malformed and throw it out\n\n        if (chunk.dataAlignmentIndicator) {\n          bufferSize = 0;\n          buffer.length = 0;\n        } // ignore events that don't look like ID3 data\n\n        if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n          this.trigger('log', {\n            level: 'warn',\n            message: 'Skipping unrecognized metadata packet'\n          });\n          return;\n        } // add this chunk to the data we've collected so far\n\n        buffer.push(chunk);\n        bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n        if (buffer.length === 1) {\n          // the frame size is transmitted as a 28-bit integer in the\n          // last four bytes of the ID3 header.\n          // The most significant bit of each byte is dropped and the\n          // results concatenated to recover the actual value.\n          tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n          // convenient for our comparisons to include it\n\n          tagSize += 10;\n        } // if the entire frame has not arrived, wait for more data\n\n        if (bufferSize < tagSize) {\n          return;\n        } // collect the entire frame so it can be parsed\n\n        tag = {\n          data: new Uint8Array(tagSize),\n          frames: [],\n          pts: buffer[0].pts,\n          dts: buffer[0].dts\n        };\n        for (i = 0; i < tagSize;) {\n          tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n          i += buffer[0].data.byteLength;\n          bufferSize -= buffer[0].data.byteLength;\n          buffer.shift();\n        } // find the start of the first frame and the end of the tag\n\n        frameStart = 10;\n        if (tag.data[5] & 0x40) {\n          // advance the frame start past the extended header\n          frameStart += 4; // header size field\n\n          frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n          tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n        } // parse one or more ID3 frames\n        // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n        do {\n          // determine the number of bytes in this frame\n          frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n          if (frameSize < 1) {\n            this.trigger('log', {\n              level: 'warn',\n              message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n            }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n            // to be sent along.\n\n            break;\n          }\n          frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n          frame = {\n            id: frameHeader,\n            data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n          };\n          frame.key = frame.id; // parse frame values\n\n          if (id3.frameParsers[frame.id]) {\n            // use frame specific parser\n            id3.frameParsers[frame.id](frame);\n          } else if (frame.id[0] === 'T') {\n            // use text frame generic parser\n            id3.frameParsers['T*'](frame);\n          } else if (frame.id[0] === 'W') {\n            // use URL link frame generic parser\n            id3.frameParsers['W*'](frame);\n          } // handle the special PRIV frame used to indicate the start\n          // time for raw AAC data\n\n          if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n            var d = frame.data,\n              size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n            size *= 4;\n            size += d[7] & 0x03;\n            frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n            // on the value of this frame\n            // we couldn't have known the appropriate pts and dts before\n            // parsing this ID3 tag so set those values now\n\n            if (tag.pts === undefined && tag.dts === undefined) {\n              tag.pts = frame.timeStamp;\n              tag.dts = frame.timeStamp;\n            }\n            this.trigger('timestamp', frame);\n          }\n          tag.frames.push(frame);\n          frameStart += 10; // advance past the frame header\n\n          frameStart += frameSize; // advance past the frame body\n        } while (frameStart < tagSize);\n        this.trigger('data', tag);\n      };\n    };\n    MetadataStream.prototype = new Stream$5();\n    var metadataStream = MetadataStream;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * A stream-based mp2t to mp4 converter. This utility can be used to\n     * deliver mp4s to a SourceBuffer on platforms that support native\n     * Media Source Extensions.\n     */\n\n    var Stream$4 = stream,\n      CaptionStream$1 = captionStream,\n      StreamTypes$2 = streamTypes,\n      TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n    var TransportPacketStream, TransportParseStream, ElementaryStream; // constants\n\n    var MP2T_PACKET_LENGTH$1 = 188,\n      // bytes\n      SYNC_BYTE$1 = 0x47;\n    /**\n     * Splits an incoming stream of binary data into MPEG-2 Transport\n     * Stream packets.\n     */\n\n    TransportPacketStream = function () {\n      var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n        bytesInBuffer = 0;\n      TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n      /**\n       * Split a stream of data into M2TS packets\n      **/\n\n      this.push = function (bytes) {\n        var startIndex = 0,\n          endIndex = MP2T_PACKET_LENGTH$1,\n          everything; // If there are bytes remaining from the last segment, prepend them to the\n        // bytes that were pushed in\n\n        if (bytesInBuffer) {\n          everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n          everything.set(buffer.subarray(0, bytesInBuffer));\n          everything.set(bytes, bytesInBuffer);\n          bytesInBuffer = 0;\n        } else {\n          everything = bytes;\n        } // While we have enough data for a packet\n\n        while (endIndex < everything.byteLength) {\n          // Look for a pair of start and end sync bytes in the data..\n          if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n            // We found a packet so emit it and jump one whole packet forward in\n            // the stream\n            this.trigger('data', everything.subarray(startIndex, endIndex));\n            startIndex += MP2T_PACKET_LENGTH$1;\n            endIndex += MP2T_PACKET_LENGTH$1;\n            continue;\n          } // If we get here, we have somehow become de-synchronized and we need to step\n          // forward one byte at a time until we find a pair of sync bytes that denote\n          // a packet\n\n          startIndex++;\n          endIndex++;\n        } // If there was some data left over at the end of the segment that couldn't\n        // possibly be a whole packet, keep it because it might be the start of a packet\n        // that continues in the next segment\n\n        if (startIndex < everything.byteLength) {\n          buffer.set(everything.subarray(startIndex), 0);\n          bytesInBuffer = everything.byteLength - startIndex;\n        }\n      };\n      /**\n       * Passes identified M2TS packets to the TransportParseStream to be parsed\n      **/\n\n      this.flush = function () {\n        // If the buffer contains a whole packet when we are being flushed, emit it\n        // and empty the buffer. Otherwise hold onto the data because it may be\n        // important for decoding the next segment\n        if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n          this.trigger('data', buffer);\n          bytesInBuffer = 0;\n        }\n        this.trigger('done');\n      };\n      this.endTimeline = function () {\n        this.flush();\n        this.trigger('endedtimeline');\n      };\n      this.reset = function () {\n        bytesInBuffer = 0;\n        this.trigger('reset');\n      };\n    };\n    TransportPacketStream.prototype = new Stream$4();\n    /**\n     * Accepts an MP2T TransportPacketStream and emits data events with parsed\n     * forms of the individual transport stream packets.\n     */\n\n    TransportParseStream = function () {\n      var parsePsi, parsePat, parsePmt, self;\n      TransportParseStream.prototype.init.call(this);\n      self = this;\n      this.packetsWaitingForPmt = [];\n      this.programMapTable = undefined;\n      parsePsi = function (payload, psi) {\n        var offset = 0; // PSI packets may be split into multiple sections and those\n        // sections may be split into multiple packets. If a PSI\n        // section starts in this packet, the payload_unit_start_indicator\n        // will be true and the first byte of the payload will indicate\n        // the offset from the current position to the start of the\n        // section.\n\n        if (psi.payloadUnitStartIndicator) {\n          offset += payload[offset] + 1;\n        }\n        if (psi.type === 'pat') {\n          parsePat(payload.subarray(offset), psi);\n        } else {\n          parsePmt(payload.subarray(offset), psi);\n        }\n      };\n      parsePat = function (payload, pat) {\n        pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n        pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n        // skip the PSI header and parse the first PMT entry\n\n        self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n        pat.pmtPid = self.pmtPid;\n      };\n      /**\n       * Parse out the relevant fields of a Program Map Table (PMT).\n       * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n       * packet. The first byte in this array should be the table_id\n       * field.\n       * @param pmt {object} the object that should be decorated with\n       * fields parsed from the PMT.\n       */\n\n      parsePmt = function (payload, pmt) {\n        var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n        // take effect. We don't believe this should ever be the case\n        // for HLS but we'll ignore \"forward\" PMT declarations if we see\n        // them. Future PMT declarations have the current_next_indicator\n        // set to zero.\n\n        if (!(payload[5] & 0x01)) {\n          return;\n        } // overwrite any existing program map table\n\n        self.programMapTable = {\n          video: null,\n          audio: null,\n          'timed-metadata': {}\n        }; // the mapping table ends at the end of the current section\n\n        sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n        tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n        // long the program info descriptors are\n\n        programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n        offset = 12 + programInfoLength;\n        while (offset < tableEnd) {\n          var streamType = payload[offset];\n          var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n          // TODO: should this be done for metadata too? for now maintain behavior of\n          //       multiple metadata streams\n\n          if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n            self.programMapTable.video = pid;\n          } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n            self.programMapTable.audio = pid;\n          } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n            // map pid to stream type for metadata streams\n            self.programMapTable['timed-metadata'][pid] = streamType;\n          } // move to the next table entry\n          // skip past the elementary stream descriptors, if present\n\n          offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n        } // record the map on the packet as well\n\n        pmt.programMapTable = self.programMapTable;\n      };\n      /**\n       * Deliver a new MP2T packet to the next stream in the pipeline.\n       */\n\n      this.push = function (packet) {\n        var result = {},\n          offset = 4;\n        result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n        result.pid = packet[1] & 0x1f;\n        result.pid <<= 8;\n        result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n        // fifth byte of the TS packet header. The adaptation field is\n        // used to add stuffing to PES packets that don't fill a complete\n        // TS packet, and to specify some forms of timing and control data\n        // that we do not currently use.\n\n        if ((packet[3] & 0x30) >>> 4 > 0x01) {\n          offset += packet[offset] + 1;\n        } // parse the rest of the packet based on the type\n\n        if (result.pid === 0) {\n          result.type = 'pat';\n          parsePsi(packet.subarray(offset), result);\n          this.trigger('data', result);\n        } else if (result.pid === this.pmtPid) {\n          result.type = 'pmt';\n          parsePsi(packet.subarray(offset), result);\n          this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n          while (this.packetsWaitingForPmt.length) {\n            this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n          }\n        } else if (this.programMapTable === undefined) {\n          // When we have not seen a PMT yet, defer further processing of\n          // PES packets until one has been parsed\n          this.packetsWaitingForPmt.push([packet, offset, result]);\n        } else {\n          this.processPes_(packet, offset, result);\n        }\n      };\n      this.processPes_ = function (packet, offset, result) {\n        // set the appropriate stream type\n        if (result.pid === this.programMapTable.video) {\n          result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n        } else if (result.pid === this.programMapTable.audio) {\n          result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n        } else {\n          // if not video or audio, it is timed-metadata or unknown\n          // if unknown, streamType will be undefined\n          result.streamType = this.programMapTable['timed-metadata'][result.pid];\n        }\n        result.type = 'pes';\n        result.data = packet.subarray(offset);\n        this.trigger('data', result);\n      };\n    };\n    TransportParseStream.prototype = new Stream$4();\n    TransportParseStream.STREAM_TYPES = {\n      h264: 0x1b,\n      adts: 0x0f\n    };\n    /**\n     * Reconsistutes program elementary stream (PES) packets from parsed\n     * transport stream packets. That is, if you pipe an\n     * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n     * events will be events which capture the bytes for individual PES\n     * packets plus relevant metadata that has been extracted from the\n     * container.\n     */\n\n    ElementaryStream = function () {\n      var self = this,\n        segmentHadPmt = false,\n        // PES packet fragments\n        video = {\n          data: [],\n          size: 0\n        },\n        audio = {\n          data: [],\n          size: 0\n        },\n        timedMetadata = {\n          data: [],\n          size: 0\n        },\n        programMapTable,\n        parsePes = function (payload, pes) {\n          var ptsDtsFlags;\n          const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n          pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n          // that are frame data that is continuing from the previous fragment. This\n          // is to check that the pes data is the start of a new pes payload\n\n          if (startPrefix !== 1) {\n            return;\n          } // get the packet length, this will be 0 for video\n\n          pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n          pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n          // and a DTS value. Determine what combination of values is\n          // available to work with.\n\n          ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\n          // performs all bitwise operations on 32-bit integers but javascript\n          // supports a much greater range (52-bits) of integer using standard\n          // mathematical operations.\n          // We construct a 31-bit value using bitwise operators over the 31\n          // most significant bits and then multiply by 4 (equal to a left-shift\n          // of 2) before we add the final 2 least significant bits of the\n          // timestamp (equal to an OR.)\n\n          if (ptsDtsFlags & 0xC0) {\n            // the PTS and DTS are not written out directly. For information\n            // on how they are encoded, see\n            // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n            pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n            pes.pts *= 4; // Left shift by 2\n\n            pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n            pes.dts = pes.pts;\n            if (ptsDtsFlags & 0x40) {\n              pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n              pes.dts *= 4; // Left shift by 2\n\n              pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n            }\n          } // the data section starts immediately after the PES header.\n          // pes_header_data_length specifies the number of header bytes\n          // that follow the last byte of the field.\n\n          pes.data = payload.subarray(9 + payload[8]);\n        },\n        /**\n          * Pass completely parsed PES packets to the next stream in the pipeline\n         **/\n        flushStream = function (stream, type, forceFlush) {\n          var packetData = new Uint8Array(stream.size),\n            event = {\n              type: type\n            },\n            i = 0,\n            offset = 0,\n            packetFlushable = false,\n            fragment; // do nothing if there is not enough buffered data for a complete\n          // PES header\n\n          if (!stream.data.length || stream.size < 9) {\n            return;\n          }\n          event.trackId = stream.data[0].pid; // reassemble the packet\n\n          for (i = 0; i < stream.data.length; i++) {\n            fragment = stream.data[i];\n            packetData.set(fragment.data, offset);\n            offset += fragment.data.byteLength;\n          } // parse assembled packet's PES header\n\n          parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n          // check that there is enough stream data to fill the packet\n\n          packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n          if (forceFlush || packetFlushable) {\n            stream.size = 0;\n            stream.data.length = 0;\n          } // only emit packets that are complete. this is to avoid assembling\n          // incomplete PES packets due to poor segmentation\n\n          if (packetFlushable) {\n            self.trigger('data', event);\n          }\n        };\n      ElementaryStream.prototype.init.call(this);\n      /**\n       * Identifies M2TS packet types and parses PES packets using metadata\n       * parsed from the PMT\n       **/\n\n      this.push = function (data) {\n        ({\n          pat: function () {// we have to wait for the PMT to arrive as well before we\n            // have any meaningful metadata\n          },\n          pes: function () {\n            var stream, streamType;\n            switch (data.streamType) {\n              case StreamTypes$2.H264_STREAM_TYPE:\n                stream = video;\n                streamType = 'video';\n                break;\n              case StreamTypes$2.ADTS_STREAM_TYPE:\n                stream = audio;\n                streamType = 'audio';\n                break;\n              case StreamTypes$2.METADATA_STREAM_TYPE:\n                stream = timedMetadata;\n                streamType = 'timed-metadata';\n                break;\n              default:\n                // ignore unknown stream types\n                return;\n            } // if a new packet is starting, we can flush the completed\n            // packet\n\n            if (data.payloadUnitStartIndicator) {\n              flushStream(stream, streamType, true);\n            } // buffer this fragment until we are sure we've received the\n            // complete payload\n\n            stream.data.push(data);\n            stream.size += data.data.byteLength;\n          },\n          pmt: function () {\n            var event = {\n              type: 'metadata',\n              tracks: []\n            };\n            programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n            if (programMapTable.video !== null) {\n              event.tracks.push({\n                timelineStartInfo: {\n                  baseMediaDecodeTime: 0\n                },\n                id: +programMapTable.video,\n                codec: 'avc',\n                type: 'video'\n              });\n            }\n            if (programMapTable.audio !== null) {\n              event.tracks.push({\n                timelineStartInfo: {\n                  baseMediaDecodeTime: 0\n                },\n                id: +programMapTable.audio,\n                codec: 'adts',\n                type: 'audio'\n              });\n            }\n            segmentHadPmt = true;\n            self.trigger('data', event);\n          }\n        })[data.type]();\n      };\n      this.reset = function () {\n        video.size = 0;\n        video.data.length = 0;\n        audio.size = 0;\n        audio.data.length = 0;\n        this.trigger('reset');\n      };\n      /**\n       * Flush any remaining input. Video PES packets may be of variable\n       * length. Normally, the start of a new video packet can trigger the\n       * finalization of the previous packet. That is not possible if no\n       * more video is forthcoming, however. In that case, some other\n       * mechanism (like the end of the file) has to be employed. When it is\n       * clear that no additional data is forthcoming, calling this method\n       * will flush the buffered packets.\n       */\n\n      this.flushStreams_ = function () {\n        // !!THIS ORDER IS IMPORTANT!!\n        // video first then audio\n        flushStream(video, 'video');\n        flushStream(audio, 'audio');\n        flushStream(timedMetadata, 'timed-metadata');\n      };\n      this.flush = function () {\n        // if on flush we haven't had a pmt emitted\n        // and we have a pmt to emit. emit the pmt\n        // so that we trigger a trackinfo downstream.\n        if (!segmentHadPmt && programMapTable) {\n          var pmt = {\n            type: 'metadata',\n            tracks: []\n          }; // translate audio and video streams to tracks\n\n          if (programMapTable.video !== null) {\n            pmt.tracks.push({\n              timelineStartInfo: {\n                baseMediaDecodeTime: 0\n              },\n              id: +programMapTable.video,\n              codec: 'avc',\n              type: 'video'\n            });\n          }\n          if (programMapTable.audio !== null) {\n            pmt.tracks.push({\n              timelineStartInfo: {\n                baseMediaDecodeTime: 0\n              },\n              id: +programMapTable.audio,\n              codec: 'adts',\n              type: 'audio'\n            });\n          }\n          self.trigger('data', pmt);\n        }\n        segmentHadPmt = false;\n        this.flushStreams_();\n        this.trigger('done');\n      };\n    };\n    ElementaryStream.prototype = new Stream$4();\n    var m2ts$1 = {\n      PAT_PID: 0x0000,\n      MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n      TransportPacketStream: TransportPacketStream,\n      TransportParseStream: TransportParseStream,\n      ElementaryStream: ElementaryStream,\n      TimestampRolloverStream: TimestampRolloverStream,\n      CaptionStream: CaptionStream$1.CaptionStream,\n      Cea608Stream: CaptionStream$1.Cea608Stream,\n      Cea708Stream: CaptionStream$1.Cea708Stream,\n      MetadataStream: metadataStream\n    };\n    for (var type in StreamTypes$2) {\n      if (StreamTypes$2.hasOwnProperty(type)) {\n        m2ts$1[type] = StreamTypes$2[type];\n      }\n    }\n    var m2ts_1 = m2ts$1;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var Stream$3 = stream;\n    var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n    var AdtsStream$1;\n    var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n    /*\n     * Accepts a ElementaryStream and emits data events with parsed\n     * AAC Audio Frames of the individual packets. Input audio in ADTS\n     * format is unpacked and re-emitted as AAC frames.\n     *\n     * @see http://wiki.multimedia.cx/index.php?title=ADTS\n     * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n     */\n\n    AdtsStream$1 = function (handlePartialSegments) {\n      var buffer,\n        frameNum = 0;\n      AdtsStream$1.prototype.init.call(this);\n      this.skipWarn_ = function (start, end) {\n        this.trigger('log', {\n          level: 'warn',\n          message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n        });\n      };\n      this.push = function (packet) {\n        var i = 0,\n          frameLength,\n          protectionSkipBytes,\n          oldBuffer,\n          sampleCount,\n          adtsFrameDuration;\n        if (!handlePartialSegments) {\n          frameNum = 0;\n        }\n        if (packet.type !== 'audio') {\n          // ignore non-audio data\n          return;\n        } // Prepend any data in the buffer to the input data so that we can parse\n        // aac frames the cross a PES packet boundary\n\n        if (buffer && buffer.length) {\n          oldBuffer = buffer;\n          buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n          buffer.set(oldBuffer);\n          buffer.set(packet.data, oldBuffer.byteLength);\n        } else {\n          buffer = packet.data;\n        } // unpack any ADTS frames which have been fully received\n        // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n        var skip; // We use i + 7 here because we want to be able to parse the entire header.\n        // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n        while (i + 7 < buffer.length) {\n          // Look for the start of an ADTS header..\n          if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n            if (typeof skip !== 'number') {\n              skip = i;\n            } // If a valid header was not found,  jump one forward and attempt to\n            // find a valid ADTS header starting at the next byte\n\n            i++;\n            continue;\n          }\n          if (typeof skip === 'number') {\n            this.skipWarn_(skip, i);\n            skip = null;\n          } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n          // end of the ADTS header\n\n          protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n          // end of the sync sequence\n          // NOTE: frame length includes the size of the header\n\n          frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n          sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n          adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n          // then we have to wait for more data\n\n          if (buffer.byteLength - i < frameLength) {\n            break;\n          } // Otherwise, deliver the complete AAC frame\n\n          this.trigger('data', {\n            pts: packet.pts + frameNum * adtsFrameDuration,\n            dts: packet.dts + frameNum * adtsFrameDuration,\n            sampleCount: sampleCount,\n            audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n            channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n            samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n            samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n            // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n            samplesize: 16,\n            // data is the frame without it's header\n            data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n          });\n          frameNum++;\n          i += frameLength;\n        }\n        if (typeof skip === 'number') {\n          this.skipWarn_(skip, i);\n          skip = null;\n        } // remove processed bytes from the buffer.\n\n        buffer = buffer.subarray(i);\n      };\n      this.flush = function () {\n        frameNum = 0;\n        this.trigger('done');\n      };\n      this.reset = function () {\n        buffer = void 0;\n        this.trigger('reset');\n      };\n      this.endTimeline = function () {\n        buffer = void 0;\n        this.trigger('endedtimeline');\n      };\n    };\n    AdtsStream$1.prototype = new Stream$3();\n    var adts = AdtsStream$1;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var ExpGolomb$1;\n    /**\n     * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n     * scheme used by h264.\n     */\n\n    ExpGolomb$1 = function (workingData) {\n      var\n        // the number of bytes left to examine in workingData\n        workingBytesAvailable = workingData.byteLength,\n        // the current word being examined\n        workingWord = 0,\n        // :uint\n        // the number of bits left to examine in the current word\n        workingBitsAvailable = 0; // :uint;\n      // ():uint\n\n      this.length = function () {\n        return 8 * workingBytesAvailable;\n      }; // ():uint\n\n      this.bitsAvailable = function () {\n        return 8 * workingBytesAvailable + workingBitsAvailable;\n      }; // ():void\n\n      this.loadWord = function () {\n        var position = workingData.byteLength - workingBytesAvailable,\n          workingBytes = new Uint8Array(4),\n          availableBytes = Math.min(4, workingBytesAvailable);\n        if (availableBytes === 0) {\n          throw new Error('no bytes available');\n        }\n        workingBytes.set(workingData.subarray(position, position + availableBytes));\n        workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n        workingBitsAvailable = availableBytes * 8;\n        workingBytesAvailable -= availableBytes;\n      }; // (count:int):void\n\n      this.skipBits = function (count) {\n        var skipBytes; // :int\n\n        if (workingBitsAvailable > count) {\n          workingWord <<= count;\n          workingBitsAvailable -= count;\n        } else {\n          count -= workingBitsAvailable;\n          skipBytes = Math.floor(count / 8);\n          count -= skipBytes * 8;\n          workingBytesAvailable -= skipBytes;\n          this.loadWord();\n          workingWord <<= count;\n          workingBitsAvailable -= count;\n        }\n      }; // (size:int):uint\n\n      this.readBits = function (size) {\n        var bits = Math.min(workingBitsAvailable, size),\n          // :uint\n          valu = workingWord >>> 32 - bits; // :uint\n        // if size > 31, handle error\n\n        workingBitsAvailable -= bits;\n        if (workingBitsAvailable > 0) {\n          workingWord <<= bits;\n        } else if (workingBytesAvailable > 0) {\n          this.loadWord();\n        }\n        bits = size - bits;\n        if (bits > 0) {\n          return valu << bits | this.readBits(bits);\n        }\n        return valu;\n      }; // ():uint\n\n      this.skipLeadingZeros = function () {\n        var leadingZeroCount; // :uint\n\n        for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n          if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n            // the first bit of working word is 1\n            workingWord <<= leadingZeroCount;\n            workingBitsAvailable -= leadingZeroCount;\n            return leadingZeroCount;\n          }\n        } // we exhausted workingWord and still have not found a 1\n\n        this.loadWord();\n        return leadingZeroCount + this.skipLeadingZeros();\n      }; // ():void\n\n      this.skipUnsignedExpGolomb = function () {\n        this.skipBits(1 + this.skipLeadingZeros());\n      }; // ():void\n\n      this.skipExpGolomb = function () {\n        this.skipBits(1 + this.skipLeadingZeros());\n      }; // ():uint\n\n      this.readUnsignedExpGolomb = function () {\n        var clz = this.skipLeadingZeros(); // :uint\n\n        return this.readBits(clz + 1) - 1;\n      }; // ():int\n\n      this.readExpGolomb = function () {\n        var valu = this.readUnsignedExpGolomb(); // :int\n\n        if (0x01 & valu) {\n          // the number is odd if the low order bit is set\n          return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n        }\n        return -1 * (valu >>> 1); // divide by two then make it negative\n      }; // Some convenience functions\n      // :Boolean\n\n      this.readBoolean = function () {\n        return this.readBits(1) === 1;\n      }; // ():int\n\n      this.readUnsignedByte = function () {\n        return this.readBits(8);\n      };\n      this.loadWord();\n    };\n    var expGolomb = ExpGolomb$1;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var Stream$2 = stream;\n    var ExpGolomb = expGolomb;\n    var H264Stream$1, NalByteStream;\n    var PROFILES_WITH_OPTIONAL_SPS_DATA;\n    /**\n     * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n     */\n\n    NalByteStream = function () {\n      var syncPoint = 0,\n        i,\n        buffer;\n      NalByteStream.prototype.init.call(this);\n      /*\n       * Scans a byte stream and triggers a data event with the NAL units found.\n       * @param {Object} data Event received from H264Stream\n       * @param {Uint8Array} data.data The h264 byte stream to be scanned\n       *\n       * @see H264Stream.push\n       */\n\n      this.push = function (data) {\n        var swapBuffer;\n        if (!buffer) {\n          buffer = data.data;\n        } else {\n          swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n          swapBuffer.set(buffer);\n          swapBuffer.set(data.data, buffer.byteLength);\n          buffer = swapBuffer;\n        }\n        var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n        // scan for NAL unit boundaries\n        // a match looks like this:\n        // 0 0 1 .. NAL .. 0 0 1\n        // ^ sync point        ^ i\n        // or this:\n        // 0 0 1 .. NAL .. 0 0 0\n        // ^ sync point        ^ i\n        // advance the sync point to a NAL start, if necessary\n\n        for (; syncPoint < len - 3; syncPoint++) {\n          if (buffer[syncPoint + 2] === 1) {\n            // the sync point is properly aligned\n            i = syncPoint + 5;\n            break;\n          }\n        }\n        while (i < len) {\n          // look at the current byte to determine if we've hit the end of\n          // a NAL unit boundary\n          switch (buffer[i]) {\n            case 0:\n              // skip past non-sync sequences\n              if (buffer[i - 1] !== 0) {\n                i += 2;\n                break;\n              } else if (buffer[i - 2] !== 0) {\n                i++;\n                break;\n              } // deliver the NAL unit if it isn't empty\n\n              if (syncPoint + 3 !== i - 2) {\n                this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n              } // drop trailing zeroes\n\n              do {\n                i++;\n              } while (buffer[i] !== 1 && i < len);\n              syncPoint = i - 2;\n              i += 3;\n              break;\n            case 1:\n              // skip past non-sync sequences\n              if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n                i += 3;\n                break;\n              } // deliver the NAL unit\n\n              this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n              syncPoint = i - 2;\n              i += 3;\n              break;\n            default:\n              // the current byte isn't a one or zero, so it cannot be part\n              // of a sync sequence\n              i += 3;\n              break;\n          }\n        } // filter out the NAL units that were delivered\n\n        buffer = buffer.subarray(syncPoint);\n        i -= syncPoint;\n        syncPoint = 0;\n      };\n      this.reset = function () {\n        buffer = null;\n        syncPoint = 0;\n        this.trigger('reset');\n      };\n      this.flush = function () {\n        // deliver the last buffered NAL unit\n        if (buffer && buffer.byteLength > 3) {\n          this.trigger('data', buffer.subarray(syncPoint + 3));\n        } // reset the stream state\n\n        buffer = null;\n        syncPoint = 0;\n        this.trigger('done');\n      };\n      this.endTimeline = function () {\n        this.flush();\n        this.trigger('endedtimeline');\n      };\n    };\n    NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n    // see Recommendation ITU-T H.264 (4/2013),\n    // 7.3.2.1.1 Sequence parameter set data syntax\n\n    PROFILES_WITH_OPTIONAL_SPS_DATA = {\n      100: true,\n      110: true,\n      122: true,\n      244: true,\n      44: true,\n      83: true,\n      86: true,\n      118: true,\n      128: true,\n      // TODO: the three profiles below don't\n      // appear to have sps data in the specificiation anymore?\n      138: true,\n      139: true,\n      134: true\n    };\n    /**\n     * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n     * events.\n     */\n\n    H264Stream$1 = function () {\n      var nalByteStream = new NalByteStream(),\n        self,\n        trackId,\n        currentPts,\n        currentDts,\n        discardEmulationPreventionBytes,\n        readSequenceParameterSet,\n        skipScalingList;\n      H264Stream$1.prototype.init.call(this);\n      self = this;\n      /*\n       * Pushes a packet from a stream onto the NalByteStream\n       *\n       * @param {Object} packet - A packet received from a stream\n       * @param {Uint8Array} packet.data - The raw bytes of the packet\n       * @param {Number} packet.dts - Decode timestamp of the packet\n       * @param {Number} packet.pts - Presentation timestamp of the packet\n       * @param {Number} packet.trackId - The id of the h264 track this packet came from\n       * @param {('video'|'audio')} packet.type - The type of packet\n       *\n       */\n\n      this.push = function (packet) {\n        if (packet.type !== 'video') {\n          return;\n        }\n        trackId = packet.trackId;\n        currentPts = packet.pts;\n        currentDts = packet.dts;\n        nalByteStream.push(packet);\n      };\n      /*\n       * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n       * for the NALUs to the next stream component.\n       * Also, preprocess caption and sequence parameter NALUs.\n       *\n       * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n       * @see NalByteStream.push\n       */\n\n      nalByteStream.on('data', function (data) {\n        var event = {\n          trackId: trackId,\n          pts: currentPts,\n          dts: currentDts,\n          data: data,\n          nalUnitTypeCode: data[0] & 0x1f\n        };\n        switch (event.nalUnitTypeCode) {\n          case 0x05:\n            event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n            break;\n          case 0x06:\n            event.nalUnitType = 'sei_rbsp';\n            event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n            break;\n          case 0x07:\n            event.nalUnitType = 'seq_parameter_set_rbsp';\n            event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n            event.config = readSequenceParameterSet(event.escapedRBSP);\n            break;\n          case 0x08:\n            event.nalUnitType = 'pic_parameter_set_rbsp';\n            break;\n          case 0x09:\n            event.nalUnitType = 'access_unit_delimiter_rbsp';\n            break;\n        } // This triggers data on the H264Stream\n\n        self.trigger('data', event);\n      });\n      nalByteStream.on('done', function () {\n        self.trigger('done');\n      });\n      nalByteStream.on('partialdone', function () {\n        self.trigger('partialdone');\n      });\n      nalByteStream.on('reset', function () {\n        self.trigger('reset');\n      });\n      nalByteStream.on('endedtimeline', function () {\n        self.trigger('endedtimeline');\n      });\n      this.flush = function () {\n        nalByteStream.flush();\n      };\n      this.partialFlush = function () {\n        nalByteStream.partialFlush();\n      };\n      this.reset = function () {\n        nalByteStream.reset();\n      };\n      this.endTimeline = function () {\n        nalByteStream.endTimeline();\n      };\n      /**\n       * Advance the ExpGolomb decoder past a scaling list. The scaling\n       * list is optionally transmitted as part of a sequence parameter\n       * set and is not relevant to transmuxing.\n       * @param count {number} the number of entries in this scaling list\n       * @param expGolombDecoder {object} an ExpGolomb pointed to the\n       * start of a scaling list\n       * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n       */\n\n      skipScalingList = function (count, expGolombDecoder) {\n        var lastScale = 8,\n          nextScale = 8,\n          j,\n          deltaScale;\n        for (j = 0; j < count; j++) {\n          if (nextScale !== 0) {\n            deltaScale = expGolombDecoder.readExpGolomb();\n            nextScale = (lastScale + deltaScale + 256) % 256;\n          }\n          lastScale = nextScale === 0 ? lastScale : nextScale;\n        }\n      };\n      /**\n       * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n       * Sequence Payload\"\n       * @param data {Uint8Array} the bytes of a RBSP from a NAL\n       * unit\n       * @return {Uint8Array} the RBSP without any Emulation\n       * Prevention Bytes\n       */\n\n      discardEmulationPreventionBytes = function (data) {\n        var length = data.byteLength,\n          emulationPreventionBytesPositions = [],\n          i = 1,\n          newLength,\n          newData; // Find all `Emulation Prevention Bytes`\n\n        while (i < length - 2) {\n          if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n            emulationPreventionBytesPositions.push(i + 2);\n            i += 2;\n          } else {\n            i++;\n          }\n        } // If no Emulation Prevention Bytes were found just return the original\n        // array\n\n        if (emulationPreventionBytesPositions.length === 0) {\n          return data;\n        } // Create a new array to hold the NAL unit data\n\n        newLength = length - emulationPreventionBytesPositions.length;\n        newData = new Uint8Array(newLength);\n        var sourceIndex = 0;\n        for (i = 0; i < newLength; sourceIndex++, i++) {\n          if (sourceIndex === emulationPreventionBytesPositions[0]) {\n            // Skip this byte\n            sourceIndex++; // Remove this position index\n\n            emulationPreventionBytesPositions.shift();\n          }\n          newData[i] = data[sourceIndex];\n        }\n        return newData;\n      };\n      /**\n       * Read a sequence parameter set and return some interesting video\n       * properties. A sequence parameter set is the H264 metadata that\n       * describes the properties of upcoming video frames.\n       * @param data {Uint8Array} the bytes of a sequence parameter set\n       * @return {object} an object with configuration parsed from the\n       * sequence parameter set, including the dimensions of the\n       * associated video frames.\n       */\n\n      readSequenceParameterSet = function (data) {\n        var frameCropLeftOffset = 0,\n          frameCropRightOffset = 0,\n          frameCropTopOffset = 0,\n          frameCropBottomOffset = 0,\n          expGolombDecoder,\n          profileIdc,\n          levelIdc,\n          profileCompatibility,\n          chromaFormatIdc,\n          picOrderCntType,\n          numRefFramesInPicOrderCntCycle,\n          picWidthInMbsMinus1,\n          picHeightInMapUnitsMinus1,\n          frameMbsOnlyFlag,\n          scalingListCount,\n          sarRatio = [1, 1],\n          aspectRatioIdc,\n          i;\n        expGolombDecoder = new ExpGolomb(data);\n        profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n        profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n        levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n        expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n        // some profiles have more optional data we don't need\n\n        if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n          chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n          if (chromaFormatIdc === 3) {\n            expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n          }\n          expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n          expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n          expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n          if (expGolombDecoder.readBoolean()) {\n            // seq_scaling_matrix_present_flag\n            scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n            for (i = 0; i < scalingListCount; i++) {\n              if (expGolombDecoder.readBoolean()) {\n                // seq_scaling_list_present_flag[ i ]\n                if (i < 6) {\n                  skipScalingList(16, expGolombDecoder);\n                } else {\n                  skipScalingList(64, expGolombDecoder);\n                }\n              }\n            }\n          }\n        }\n        expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n        picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n        if (picOrderCntType === 0) {\n          expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n        } else if (picOrderCntType === 1) {\n          expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n          expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n          expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n          numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n          for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n            expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n          }\n        }\n        expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n        expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n        picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n        picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n        frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n        if (frameMbsOnlyFlag === 0) {\n          expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n        }\n        expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n        if (expGolombDecoder.readBoolean()) {\n          // frame_cropping_flag\n          frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n          frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n          frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n          frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n        }\n        if (expGolombDecoder.readBoolean()) {\n          // vui_parameters_present_flag\n          if (expGolombDecoder.readBoolean()) {\n            // aspect_ratio_info_present_flag\n            aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n            switch (aspectRatioIdc) {\n              case 1:\n                sarRatio = [1, 1];\n                break;\n              case 2:\n                sarRatio = [12, 11];\n                break;\n              case 3:\n                sarRatio = [10, 11];\n                break;\n              case 4:\n                sarRatio = [16, 11];\n                break;\n              case 5:\n                sarRatio = [40, 33];\n                break;\n              case 6:\n                sarRatio = [24, 11];\n                break;\n              case 7:\n                sarRatio = [20, 11];\n                break;\n              case 8:\n                sarRatio = [32, 11];\n                break;\n              case 9:\n                sarRatio = [80, 33];\n                break;\n              case 10:\n                sarRatio = [18, 11];\n                break;\n              case 11:\n                sarRatio = [15, 11];\n                break;\n              case 12:\n                sarRatio = [64, 33];\n                break;\n              case 13:\n                sarRatio = [160, 99];\n                break;\n              case 14:\n                sarRatio = [4, 3];\n                break;\n              case 15:\n                sarRatio = [3, 2];\n                break;\n              case 16:\n                sarRatio = [2, 1];\n                break;\n              case 255:\n                {\n                  sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n                  break;\n                }\n            }\n            if (sarRatio) {\n              sarRatio[0] / sarRatio[1];\n            }\n          }\n        }\n        return {\n          profileIdc: profileIdc,\n          levelIdc: levelIdc,\n          profileCompatibility: profileCompatibility,\n          width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n          height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n          // sar is sample aspect ratio\n          sarRatio: sarRatio\n        };\n      };\n    };\n    H264Stream$1.prototype = new Stream$2();\n    var h264 = {\n      H264Stream: H264Stream$1,\n      NalByteStream: NalByteStream\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Utilities to detect basic properties and metadata about Aac data.\n     */\n\n    var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n    var parseId3TagSize = function (header, byteIndex) {\n      var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n        flags = header[byteIndex + 5],\n        footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n      returnSize = returnSize >= 0 ? returnSize : 0;\n      if (footerPresent) {\n        return returnSize + 20;\n      }\n      return returnSize + 10;\n    };\n    var getId3Offset = function (data, offset) {\n      if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n        return offset;\n      }\n      offset += parseId3TagSize(data, offset);\n      return getId3Offset(data, offset);\n    }; // TODO: use vhs-utils\n\n    var isLikelyAacData$1 = function (data) {\n      var offset = getId3Offset(data, 0);\n      return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n      // verify that the 2 layer bits are 0, aka this\n      // is not mp3 data but aac data.\n      (data[offset + 1] & 0x16) === 0x10;\n    };\n    var parseSyncSafeInteger = function (data) {\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n    }; // return a percent-encoded representation of the specified byte range\n    // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n    var percentEncode = function (bytes, start, end) {\n      var i,\n        result = '';\n      for (i = start; i < end; i++) {\n        result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n      }\n      return result;\n    }; // return the string representation of the specified byte range,\n    // interpreted as ISO-8859-1.\n\n    var parseIso88591 = function (bytes, start, end) {\n      return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n    };\n    var parseAdtsSize = function (header, byteIndex) {\n      var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n        middle = header[byteIndex + 4] << 3,\n        highTwo = header[byteIndex + 3] & 0x3 << 11;\n      return highTwo | middle | lowThree;\n    };\n    var parseType$5 = function (header, byteIndex) {\n      if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n        return 'timed-metadata';\n      } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n        return 'audio';\n      }\n      return null;\n    };\n    var parseSampleRate = function (packet) {\n      var i = 0;\n      while (i + 5 < packet.length) {\n        if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n          // If a valid header was not found,  jump one forward and attempt to\n          // find a valid ADTS header starting at the next byte\n          i++;\n          continue;\n        }\n        return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n      }\n      return null;\n    };\n    var parseAacTimestamp = function (packet) {\n      var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n      frameStart = 10;\n      if (packet[5] & 0x40) {\n        // advance the frame start past the extended header\n        frameStart += 4; // header size field\n\n        frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n      } // parse one or more ID3 frames\n      // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n      do {\n        // determine the number of bytes in this frame\n        frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n        if (frameSize < 1) {\n          return null;\n        }\n        frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n        if (frameHeader === 'PRIV') {\n          frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n          for (var i = 0; i < frame.byteLength; i++) {\n            if (frame[i] === 0) {\n              var owner = parseIso88591(frame, 0, i);\n              if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n                var d = frame.subarray(i + 1);\n                var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n                size *= 4;\n                size += d[7] & 0x03;\n                return size;\n              }\n              break;\n            }\n          }\n        }\n        frameStart += 10; // advance past the frame header\n\n        frameStart += frameSize; // advance past the frame body\n      } while (frameStart < packet.byteLength);\n      return null;\n    };\n    var utils = {\n      isLikelyAacData: isLikelyAacData$1,\n      parseId3TagSize: parseId3TagSize,\n      parseAdtsSize: parseAdtsSize,\n      parseType: parseType$5,\n      parseSampleRate: parseSampleRate,\n      parseAacTimestamp: parseAacTimestamp\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * A stream-based aac to mp4 converter. This utility can be used to\n     * deliver mp4s to a SourceBuffer on platforms that support native\n     * Media Source Extensions.\n     */\n\n    var Stream$1 = stream;\n    var aacUtils = utils; // Constants\n\n    var AacStream$1;\n    /**\n     * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n     */\n\n    AacStream$1 = function () {\n      var everything = new Uint8Array(),\n        timeStamp = 0;\n      AacStream$1.prototype.init.call(this);\n      this.setTimestamp = function (timestamp) {\n        timeStamp = timestamp;\n      };\n      this.push = function (bytes) {\n        var frameSize = 0,\n          byteIndex = 0,\n          bytesLeft,\n          chunk,\n          packet,\n          tempLength; // If there are bytes remaining from the last segment, prepend them to the\n        // bytes that were pushed in\n\n        if (everything.length) {\n          tempLength = everything.length;\n          everything = new Uint8Array(bytes.byteLength + tempLength);\n          everything.set(everything.subarray(0, tempLength));\n          everything.set(bytes, tempLength);\n        } else {\n          everything = bytes;\n        }\n        while (everything.length - byteIndex >= 3) {\n          if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n            // Exit early because we don't have enough to parse\n            // the ID3 tag header\n            if (everything.length - byteIndex < 10) {\n              break;\n            } // check framesize\n\n            frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n            // to emit a full packet\n            // Add to byteIndex to support multiple ID3 tags in sequence\n\n            if (byteIndex + frameSize > everything.length) {\n              break;\n            }\n            chunk = {\n              type: 'timed-metadata',\n              data: everything.subarray(byteIndex, byteIndex + frameSize)\n            };\n            this.trigger('data', chunk);\n            byteIndex += frameSize;\n            continue;\n          } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n            // Exit early because we don't have enough to parse\n            // the ADTS frame header\n            if (everything.length - byteIndex < 7) {\n              break;\n            }\n            frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n            // to emit a full packet\n\n            if (byteIndex + frameSize > everything.length) {\n              break;\n            }\n            packet = {\n              type: 'audio',\n              data: everything.subarray(byteIndex, byteIndex + frameSize),\n              pts: timeStamp,\n              dts: timeStamp\n            };\n            this.trigger('data', packet);\n            byteIndex += frameSize;\n            continue;\n          }\n          byteIndex++;\n        }\n        bytesLeft = everything.length - byteIndex;\n        if (bytesLeft > 0) {\n          everything = everything.subarray(byteIndex);\n        } else {\n          everything = new Uint8Array();\n        }\n      };\n      this.reset = function () {\n        everything = new Uint8Array();\n        this.trigger('reset');\n      };\n      this.endTimeline = function () {\n        everything = new Uint8Array();\n        this.trigger('endedtimeline');\n      };\n    };\n    AacStream$1.prototype = new Stream$1();\n    var aac = AacStream$1;\n    var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n    var audioProperties = AUDIO_PROPERTIES$1;\n    var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n    var videoProperties = VIDEO_PROPERTIES$1;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * A stream-based mp2t to mp4 converter. This utility can be used to\n     * deliver mp4s to a SourceBuffer on platforms that support native\n     * Media Source Extensions.\n     */\n\n    var Stream = stream;\n    var mp4 = mp4Generator;\n    var frameUtils = frameUtils$1;\n    var audioFrameUtils = audioFrameUtils$1;\n    var trackDecodeInfo = trackDecodeInfo$1;\n    var m2ts = m2ts_1;\n    var clock = clock$2;\n    var AdtsStream = adts;\n    var H264Stream = h264.H264Stream;\n    var AacStream = aac;\n    var isLikelyAacData = utils.isLikelyAacData;\n    var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n    var AUDIO_PROPERTIES = audioProperties;\n    var VIDEO_PROPERTIES = videoProperties; // object types\n\n    var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream;\n    var retriggerForStream = function (key, event) {\n      event.stream = key;\n      this.trigger('log', event);\n    };\n    var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n      var keys = Object.keys(pipeline);\n      for (var i = 0; i < keys.length; i++) {\n        var key = keys[i]; // skip non-stream keys and headOfPipeline\n        // which is just a duplicate\n\n        if (key === 'headOfPipeline' || !pipeline[key].on) {\n          continue;\n        }\n        pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n      }\n    };\n    /**\n     * Compare two arrays (even typed) for same-ness\n     */\n\n    var arrayEquals = function (a, b) {\n      var i;\n      if (a.length !== b.length) {\n        return false;\n      } // compare the value of each element in the array\n\n      for (i = 0; i < a.length; i++) {\n        if (a[i] !== b[i]) {\n          return false;\n        }\n      }\n      return true;\n    };\n    var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n      var ptsOffsetFromDts = startPts - startDts,\n        decodeDuration = endDts - startDts,\n        presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n      // however, the player time values will reflect a start from the baseMediaDecodeTime.\n      // In order to provide relevant values for the player times, base timing info on the\n      // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n      return {\n        start: {\n          dts: baseMediaDecodeTime,\n          pts: baseMediaDecodeTime + ptsOffsetFromDts\n        },\n        end: {\n          dts: baseMediaDecodeTime + decodeDuration,\n          pts: baseMediaDecodeTime + presentationDuration\n        },\n        prependedContentDuration: prependedContentDuration,\n        baseMediaDecodeTime: baseMediaDecodeTime\n      };\n    };\n    /**\n     * Constructs a single-track, ISO BMFF media segment from AAC data\n     * events. The output of this stream can be fed to a SourceBuffer\n     * configured with a suitable initialization segment.\n     * @param track {object} track metadata configuration\n     * @param options {object} transmuxer options object\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n     *        in the source; false to adjust the first segment to start at 0.\n     */\n\n    AudioSegmentStream = function (track, options) {\n      var adtsFrames = [],\n        sequenceNumber,\n        earliestAllowedDts = 0,\n        audioAppendStartTs = 0,\n        videoBaseMediaDecodeTime = Infinity;\n      options = options || {};\n      sequenceNumber = options.firstSequenceNumber || 0;\n      AudioSegmentStream.prototype.init.call(this);\n      this.push = function (data) {\n        trackDecodeInfo.collectDtsInfo(track, data);\n        if (track) {\n          AUDIO_PROPERTIES.forEach(function (prop) {\n            track[prop] = data[prop];\n          });\n        } // buffer audio data until end() is called\n\n        adtsFrames.push(data);\n      };\n      this.setEarliestDts = function (earliestDts) {\n        earliestAllowedDts = earliestDts;\n      };\n      this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n        videoBaseMediaDecodeTime = baseMediaDecodeTime;\n      };\n      this.setAudioAppendStart = function (timestamp) {\n        audioAppendStartTs = timestamp;\n      };\n      this.flush = function () {\n        var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n        if (adtsFrames.length === 0) {\n          this.trigger('done', 'AudioSegmentStream');\n          return;\n        }\n        frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n        track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n        videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n        // samples (that is, adts frames) in the audio data\n\n        track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n        mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n        adtsFrames = [];\n        moof = mp4.moof(sequenceNumber, [track]);\n        boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n        sequenceNumber++;\n        boxes.set(moof);\n        boxes.set(mdat, moof.byteLength);\n        trackDecodeInfo.clearDtsInfo(track);\n        frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n        // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n        // valid use-case where an init segment/data should be triggered without associated\n        // frames. Leaving for now, but should be looked into.\n\n        if (frames.length) {\n          segmentDuration = frames.length * frameDuration;\n          this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n          // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n          // frame info is in video clock cycles. Convert to match expectation of\n          // listeners (that all timestamps will be based on video clock cycles).\n          clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n          // frame times are already in video clock, as is segment duration\n          frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n          this.trigger('timingInfo', {\n            start: frames[0].pts,\n            end: frames[0].pts + segmentDuration\n          });\n        }\n        this.trigger('data', {\n          track: track,\n          boxes: boxes\n        });\n        this.trigger('done', 'AudioSegmentStream');\n      };\n      this.reset = function () {\n        trackDecodeInfo.clearDtsInfo(track);\n        adtsFrames = [];\n        this.trigger('reset');\n      };\n    };\n    AudioSegmentStream.prototype = new Stream();\n    /**\n     * Constructs a single-track, ISO BMFF media segment from H264 data\n     * events. The output of this stream can be fed to a SourceBuffer\n     * configured with a suitable initialization segment.\n     * @param track {object} track metadata configuration\n     * @param options {object} transmuxer options object\n     * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n     *        gopsToAlignWith list when attempting to align gop pts\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n     *        in the source; false to adjust the first segment to start at 0.\n     */\n\n    VideoSegmentStream = function (track, options) {\n      var sequenceNumber,\n        nalUnits = [],\n        gopsToAlignWith = [],\n        config,\n        pps;\n      options = options || {};\n      sequenceNumber = options.firstSequenceNumber || 0;\n      VideoSegmentStream.prototype.init.call(this);\n      delete track.minPTS;\n      this.gopCache_ = [];\n      /**\n        * Constructs a ISO BMFF segment given H264 nalUnits\n        * @param {Object} nalUnit A data event representing a nalUnit\n        * @param {String} nalUnit.nalUnitType\n        * @param {Object} nalUnit.config Properties for a mp4 track\n        * @param {Uint8Array} nalUnit.data The nalUnit bytes\n        * @see lib/codecs/h264.js\n       **/\n\n      this.push = function (nalUnit) {\n        trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n        if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n          config = nalUnit.config;\n          track.sps = [nalUnit.data];\n          VIDEO_PROPERTIES.forEach(function (prop) {\n            track[prop] = config[prop];\n          }, this);\n        }\n        if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n          pps = nalUnit.data;\n          track.pps = [nalUnit.data];\n        } // buffer video until flush() is called\n\n        nalUnits.push(nalUnit);\n      };\n      /**\n        * Pass constructed ISO BMFF track and boxes on to the\n        * next stream in the pipeline\n       **/\n\n      this.flush = function () {\n        var frames,\n          gopForFusion,\n          gops,\n          moof,\n          mdat,\n          boxes,\n          prependedContentDuration = 0,\n          firstGop,\n          lastGop; // Throw away nalUnits at the start of the byte stream until\n        // we find the first AUD\n\n        while (nalUnits.length) {\n          if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n            break;\n          }\n          nalUnits.shift();\n        } // Return early if no video data has been observed\n\n        if (nalUnits.length === 0) {\n          this.resetStream_();\n          this.trigger('done', 'VideoSegmentStream');\n          return;\n        } // Organize the raw nal-units into arrays that represent\n        // higher-level constructs such as frames and gops\n        // (group-of-pictures)\n\n        frames = frameUtils.groupNalsIntoFrames(nalUnits);\n        gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n        // a problem since MSE (on Chrome) requires a leading keyframe.\n        //\n        // We have two approaches to repairing this situation:\n        // 1) GOP-FUSION:\n        //    This is where we keep track of the GOPS (group-of-pictures)\n        //    from previous fragments and attempt to find one that we can\n        //    prepend to the current fragment in order to create a valid\n        //    fragment.\n        // 2) KEYFRAME-PULLING:\n        //    Here we search for the first keyframe in the fragment and\n        //    throw away all the frames between the start of the fragment\n        //    and that keyframe. We then extend the duration and pull the\n        //    PTS of the keyframe forward so that it covers the time range\n        //    of the frames that were disposed of.\n        //\n        // #1 is far prefereable over #2 which can cause \"stuttering\" but\n        // requires more things to be just right.\n\n        if (!gops[0][0].keyFrame) {\n          // Search for a gop for fusion from our gopCache\n          gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n          if (gopForFusion) {\n            // in order to provide more accurate timing information about the segment, save\n            // the number of seconds prepended to the original segment due to GOP fusion\n            prependedContentDuration = gopForFusion.duration;\n            gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n            // new gop at the beginning\n\n            gops.byteLength += gopForFusion.byteLength;\n            gops.nalCount += gopForFusion.nalCount;\n            gops.pts = gopForFusion.pts;\n            gops.dts = gopForFusion.dts;\n            gops.duration += gopForFusion.duration;\n          } else {\n            // If we didn't find a candidate gop fall back to keyframe-pulling\n            gops = frameUtils.extendFirstKeyFrame(gops);\n          }\n        } // Trim gops to align with gopsToAlignWith\n\n        if (gopsToAlignWith.length) {\n          var alignedGops;\n          if (options.alignGopsAtEnd) {\n            alignedGops = this.alignGopsAtEnd_(gops);\n          } else {\n            alignedGops = this.alignGopsAtStart_(gops);\n          }\n          if (!alignedGops) {\n            // save all the nals in the last GOP into the gop cache\n            this.gopCache_.unshift({\n              gop: gops.pop(),\n              pps: track.pps,\n              sps: track.sps\n            }); // Keep a maximum of 6 GOPs in the cache\n\n            this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n            nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n            this.resetStream_();\n            this.trigger('done', 'VideoSegmentStream');\n            return;\n          } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n          // when recalculated before sending off to CoalesceStream\n\n          trackDecodeInfo.clearDtsInfo(track);\n          gops = alignedGops;\n        }\n        trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n        // samples (that is, frames) in the video data\n\n        track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n        mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n        track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n        this.trigger('processedGopsInfo', gops.map(function (gop) {\n          return {\n            pts: gop.pts,\n            dts: gop.dts,\n            byteLength: gop.byteLength\n          };\n        }));\n        firstGop = gops[0];\n        lastGop = gops[gops.length - 1];\n        this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n        this.trigger('timingInfo', {\n          start: gops[0].pts,\n          end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n        }); // save all the nals in the last GOP into the gop cache\n\n        this.gopCache_.unshift({\n          gop: gops.pop(),\n          pps: track.pps,\n          sps: track.sps\n        }); // Keep a maximum of 6 GOPs in the cache\n\n        this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n        nalUnits = [];\n        this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n        this.trigger('timelineStartInfo', track.timelineStartInfo);\n        moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n        // throwing away hundreds of media segment fragments\n\n        boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n        sequenceNumber++;\n        boxes.set(moof);\n        boxes.set(mdat, moof.byteLength);\n        this.trigger('data', {\n          track: track,\n          boxes: boxes\n        });\n        this.resetStream_(); // Continue with the flush process now\n\n        this.trigger('done', 'VideoSegmentStream');\n      };\n      this.reset = function () {\n        this.resetStream_();\n        nalUnits = [];\n        this.gopCache_.length = 0;\n        gopsToAlignWith.length = 0;\n        this.trigger('reset');\n      };\n      this.resetStream_ = function () {\n        trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n        // for instance, when we are rendition switching\n\n        config = undefined;\n        pps = undefined;\n      }; // Search for a candidate Gop for gop-fusion from the gop cache and\n      // return it or return null if no good candidate was found\n\n      this.getGopForFusion_ = function (nalUnit) {\n        var halfSecond = 45000,\n          // Half-a-second in a 90khz clock\n          allowableOverlap = 10000,\n          // About 3 frames @ 30fps\n          nearestDistance = Infinity,\n          dtsDistance,\n          nearestGopObj,\n          currentGop,\n          currentGopObj,\n          i; // Search for the GOP nearest to the beginning of this nal unit\n\n        for (i = 0; i < this.gopCache_.length; i++) {\n          currentGopObj = this.gopCache_[i];\n          currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n          if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n            continue;\n          } // Reject Gops that would require a negative baseMediaDecodeTime\n\n          if (currentGop.dts < track.timelineStartInfo.dts) {\n            continue;\n          } // The distance between the end of the gop and the start of the nalUnit\n\n          dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n          // a half-second of the nal unit\n\n          if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n            // Always use the closest GOP we found if there is more than\n            // one candidate\n            if (!nearestGopObj || nearestDistance > dtsDistance) {\n              nearestGopObj = currentGopObj;\n              nearestDistance = dtsDistance;\n            }\n          }\n        }\n        if (nearestGopObj) {\n          return nearestGopObj.gop;\n        }\n        return null;\n      }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n      // of gopsToAlignWith starting from the START of the list\n\n      this.alignGopsAtStart_ = function (gops) {\n        var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n        byteLength = gops.byteLength;\n        nalCount = gops.nalCount;\n        duration = gops.duration;\n        alignIndex = gopIndex = 0;\n        while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n          align = gopsToAlignWith[alignIndex];\n          gop = gops[gopIndex];\n          if (align.pts === gop.pts) {\n            break;\n          }\n          if (gop.pts > align.pts) {\n            // this current gop starts after the current gop we want to align on, so increment\n            // align index\n            alignIndex++;\n            continue;\n          } // current gop starts before the current gop we want to align on. so increment gop\n          // index\n\n          gopIndex++;\n          byteLength -= gop.byteLength;\n          nalCount -= gop.nalCount;\n          duration -= gop.duration;\n        }\n        if (gopIndex === 0) {\n          // no gops to trim\n          return gops;\n        }\n        if (gopIndex === gops.length) {\n          // all gops trimmed, skip appending all gops\n          return null;\n        }\n        alignedGops = gops.slice(gopIndex);\n        alignedGops.byteLength = byteLength;\n        alignedGops.duration = duration;\n        alignedGops.nalCount = nalCount;\n        alignedGops.pts = alignedGops[0].pts;\n        alignedGops.dts = alignedGops[0].dts;\n        return alignedGops;\n      }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n      // of gopsToAlignWith starting from the END of the list\n\n      this.alignGopsAtEnd_ = function (gops) {\n        var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n        alignIndex = gopsToAlignWith.length - 1;\n        gopIndex = gops.length - 1;\n        alignEndIndex = null;\n        matchFound = false;\n        while (alignIndex >= 0 && gopIndex >= 0) {\n          align = gopsToAlignWith[alignIndex];\n          gop = gops[gopIndex];\n          if (align.pts === gop.pts) {\n            matchFound = true;\n            break;\n          }\n          if (align.pts > gop.pts) {\n            alignIndex--;\n            continue;\n          }\n          if (alignIndex === gopsToAlignWith.length - 1) {\n            // gop.pts is greater than the last alignment candidate. If no match is found\n            // by the end of this loop, we still want to append gops that come after this\n            // point\n            alignEndIndex = gopIndex;\n          }\n          gopIndex--;\n        }\n        if (!matchFound && alignEndIndex === null) {\n          return null;\n        }\n        var trimIndex;\n        if (matchFound) {\n          trimIndex = gopIndex;\n        } else {\n          trimIndex = alignEndIndex;\n        }\n        if (trimIndex === 0) {\n          return gops;\n        }\n        var alignedGops = gops.slice(trimIndex);\n        var metadata = alignedGops.reduce(function (total, gop) {\n          total.byteLength += gop.byteLength;\n          total.duration += gop.duration;\n          total.nalCount += gop.nalCount;\n          return total;\n        }, {\n          byteLength: 0,\n          duration: 0,\n          nalCount: 0\n        });\n        alignedGops.byteLength = metadata.byteLength;\n        alignedGops.duration = metadata.duration;\n        alignedGops.nalCount = metadata.nalCount;\n        alignedGops.pts = alignedGops[0].pts;\n        alignedGops.dts = alignedGops[0].dts;\n        return alignedGops;\n      };\n      this.alignGopsWith = function (newGopsToAlignWith) {\n        gopsToAlignWith = newGopsToAlignWith;\n      };\n    };\n    VideoSegmentStream.prototype = new Stream();\n    /**\n     * A Stream that can combine multiple streams (ie. audio & video)\n     * into a single output segment for MSE. Also supports audio-only\n     * and video-only streams.\n     * @param options {object} transmuxer options object\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n     *        in the source; false to adjust the first segment to start at media timeline start.\n     */\n\n    CoalesceStream = function (options, metadataStream) {\n      // Number of Tracks per output segment\n      // If greater than 1, we combine multiple\n      // tracks into a single segment\n      this.numberOfTracks = 0;\n      this.metadataStream = metadataStream;\n      options = options || {};\n      if (typeof options.remux !== 'undefined') {\n        this.remuxTracks = !!options.remux;\n      } else {\n        this.remuxTracks = true;\n      }\n      if (typeof options.keepOriginalTimestamps === 'boolean') {\n        this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n      } else {\n        this.keepOriginalTimestamps = false;\n      }\n      this.pendingTracks = [];\n      this.videoTrack = null;\n      this.pendingBoxes = [];\n      this.pendingCaptions = [];\n      this.pendingMetadata = [];\n      this.pendingBytes = 0;\n      this.emittedTracks = 0;\n      CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n      this.push = function (output) {\n        // buffer incoming captions until the associated video segment\n        // finishes\n        if (output.content || output.text) {\n          return this.pendingCaptions.push(output);\n        } // buffer incoming id3 tags until the final flush\n\n        if (output.frames) {\n          return this.pendingMetadata.push(output);\n        } // Add this track to the list of pending tracks and store\n        // important information required for the construction of\n        // the final segment\n\n        this.pendingTracks.push(output.track);\n        this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n        // We unshift audio and push video because\n        // as of Chrome 75 when switching from\n        // one init segment to another if the video\n        // mdat does not appear after the audio mdat\n        // only audio will play for the duration of our transmux.\n\n        if (output.track.type === 'video') {\n          this.videoTrack = output.track;\n          this.pendingBoxes.push(output.boxes);\n        }\n        if (output.track.type === 'audio') {\n          this.audioTrack = output.track;\n          this.pendingBoxes.unshift(output.boxes);\n        }\n      };\n    };\n    CoalesceStream.prototype = new Stream();\n    CoalesceStream.prototype.flush = function (flushSource) {\n      var offset = 0,\n        event = {\n          captions: [],\n          captionStreams: {},\n          metadata: [],\n          info: {}\n        },\n        caption,\n        id3,\n        initSegment,\n        timelineStartPts = 0,\n        i;\n      if (this.pendingTracks.length < this.numberOfTracks) {\n        if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n          // Return because we haven't received a flush from a data-generating\n          // portion of the segment (meaning that we have only recieved meta-data\n          // or captions.)\n          return;\n        } else if (this.remuxTracks) {\n          // Return until we have enough tracks from the pipeline to remux (if we\n          // are remuxing audio and video into a single MP4)\n          return;\n        } else if (this.pendingTracks.length === 0) {\n          // In the case where we receive a flush without any data having been\n          // received we consider it an emitted track for the purposes of coalescing\n          // `done` events.\n          // We do this for the case where there is an audio and video track in the\n          // segment but no audio data. (seen in several playlists with alternate\n          // audio tracks and no audio present in the main TS segments.)\n          this.emittedTracks++;\n          if (this.emittedTracks >= this.numberOfTracks) {\n            this.trigger('done');\n            this.emittedTracks = 0;\n          }\n          return;\n        }\n      }\n      if (this.videoTrack) {\n        timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n        VIDEO_PROPERTIES.forEach(function (prop) {\n          event.info[prop] = this.videoTrack[prop];\n        }, this);\n      } else if (this.audioTrack) {\n        timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n        AUDIO_PROPERTIES.forEach(function (prop) {\n          event.info[prop] = this.audioTrack[prop];\n        }, this);\n      }\n      if (this.videoTrack || this.audioTrack) {\n        if (this.pendingTracks.length === 1) {\n          event.type = this.pendingTracks[0].type;\n        } else {\n          event.type = 'combined';\n        }\n        this.emittedTracks += this.pendingTracks.length;\n        initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n        event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n        // and track definitions\n\n        event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n        event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n        for (i = 0; i < this.pendingBoxes.length; i++) {\n          event.data.set(this.pendingBoxes[i], offset);\n          offset += this.pendingBoxes[i].byteLength;\n        } // Translate caption PTS times into second offsets to match the\n        // video timeline for the segment, and add track info\n\n        for (i = 0; i < this.pendingCaptions.length; i++) {\n          caption = this.pendingCaptions[i];\n          caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n          caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n          event.captionStreams[caption.stream] = true;\n          event.captions.push(caption);\n        } // Translate ID3 frame PTS times into second offsets to match the\n        // video timeline for the segment\n\n        for (i = 0; i < this.pendingMetadata.length; i++) {\n          id3 = this.pendingMetadata[i];\n          id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n          event.metadata.push(id3);\n        } // We add this to every single emitted segment even though we only need\n        // it for the first\n\n        event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n        this.pendingTracks.length = 0;\n        this.videoTrack = null;\n        this.pendingBoxes.length = 0;\n        this.pendingCaptions.length = 0;\n        this.pendingBytes = 0;\n        this.pendingMetadata.length = 0; // Emit the built segment\n        // We include captions and ID3 tags for backwards compatibility,\n        // ideally we should send only video and audio in the data event\n\n        this.trigger('data', event); // Emit each caption to the outside world\n        // Ideally, this would happen immediately on parsing captions,\n        // but we need to ensure that video data is sent back first\n        // so that caption timing can be adjusted to match video timing\n\n        for (i = 0; i < event.captions.length; i++) {\n          caption = event.captions[i];\n          this.trigger('caption', caption);\n        } // Emit each id3 tag to the outside world\n        // Ideally, this would happen immediately on parsing the tag,\n        // but we need to ensure that video data is sent back first\n        // so that ID3 frame timing can be adjusted to match video timing\n\n        for (i = 0; i < event.metadata.length; i++) {\n          id3 = event.metadata[i];\n          this.trigger('id3Frame', id3);\n        }\n      } // Only emit `done` if all tracks have been flushed and emitted\n\n      if (this.emittedTracks >= this.numberOfTracks) {\n        this.trigger('done');\n        this.emittedTracks = 0;\n      }\n    };\n    CoalesceStream.prototype.setRemux = function (val) {\n      this.remuxTracks = val;\n    };\n    /**\n     * A Stream that expects MP2T binary data as input and produces\n     * corresponding media segments, suitable for use with Media Source\n     * Extension (MSE) implementations that support the ISO BMFF byte\n     * stream format, like Chrome.\n     */\n\n    Transmuxer = function (options) {\n      var self = this,\n        hasFlushed = true,\n        videoTrack,\n        audioTrack;\n      Transmuxer.prototype.init.call(this);\n      options = options || {};\n      this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n      this.transmuxPipeline_ = {};\n      this.setupAacPipeline = function () {\n        var pipeline = {};\n        this.transmuxPipeline_ = pipeline;\n        pipeline.type = 'aac';\n        pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n        pipeline.aacStream = new AacStream();\n        pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n        pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n        pipeline.adtsStream = new AdtsStream();\n        pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n        pipeline.headOfPipeline = pipeline.aacStream;\n        pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n        pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n        pipeline.metadataStream.on('timestamp', function (frame) {\n          pipeline.aacStream.setTimestamp(frame.timeStamp);\n        });\n        pipeline.aacStream.on('data', function (data) {\n          if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n            return;\n          }\n          audioTrack = audioTrack || {\n            timelineStartInfo: {\n              baseMediaDecodeTime: self.baseMediaDecodeTime\n            },\n            codec: 'adts',\n            type: 'audio'\n          }; // hook up the audio segment stream to the first track with aac data\n\n          pipeline.coalesceStream.numberOfTracks++;\n          pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n          pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n          pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n          pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n          self.trigger('trackinfo', {\n            hasAudio: !!audioTrack,\n            hasVideo: !!videoTrack\n          });\n        }); // Re-emit any data coming from the coalesce stream to the outside world\n\n        pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n        pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n        addPipelineLogRetriggers(this, pipeline);\n      };\n      this.setupTsPipeline = function () {\n        var pipeline = {};\n        this.transmuxPipeline_ = pipeline;\n        pipeline.type = 'ts';\n        pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n        pipeline.packetStream = new m2ts.TransportPacketStream();\n        pipeline.parseStream = new m2ts.TransportParseStream();\n        pipeline.elementaryStream = new m2ts.ElementaryStream();\n        pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n        pipeline.adtsStream = new AdtsStream();\n        pipeline.h264Stream = new H264Stream();\n        pipeline.captionStream = new m2ts.CaptionStream(options);\n        pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n        pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n        pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n        // demux the streams\n\n        pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n        pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n        pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n        pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n        pipeline.elementaryStream.on('data', function (data) {\n          var i;\n          if (data.type === 'metadata') {\n            i = data.tracks.length; // scan the tracks listed in the metadata\n\n            while (i--) {\n              if (!videoTrack && data.tracks[i].type === 'video') {\n                videoTrack = data.tracks[i];\n                videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n              } else if (!audioTrack && data.tracks[i].type === 'audio') {\n                audioTrack = data.tracks[i];\n                audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n              }\n            } // hook up the video segment stream to the first track with h264 data\n\n            if (videoTrack && !pipeline.videoSegmentStream) {\n              pipeline.coalesceStream.numberOfTracks++;\n              pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options);\n              pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n              pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n                // When video emits timelineStartInfo data after a flush, we forward that\n                // info to the AudioSegmentStream, if it exists, because video timeline\n                // data takes precedence.  Do not do this if keepOriginalTimestamps is set,\n                // because this is a particularly subtle form of timestamp alteration.\n                if (audioTrack && !options.keepOriginalTimestamps) {\n                  audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n                  // very earliest DTS we have seen in video because Chrome will\n                  // interpret any video track with a baseMediaDecodeTime that is\n                  // non-zero as a gap.\n\n                  pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n                }\n              });\n              pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n              pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n              pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n                if (audioTrack) {\n                  pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n                }\n              });\n              pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n              pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n            }\n            if (audioTrack && !pipeline.audioSegmentStream) {\n              // hook up the audio segment stream to the first track with aac data\n              pipeline.coalesceStream.numberOfTracks++;\n              pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n              pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n              pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n              pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n              pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n            } // emit pmt info\n\n            self.trigger('trackinfo', {\n              hasAudio: !!audioTrack,\n              hasVideo: !!videoTrack\n            });\n          }\n        }); // Re-emit any data coming from the coalesce stream to the outside world\n\n        pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n        pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n          id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n          self.trigger('id3Frame', id3Frame);\n        });\n        pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n        pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n        addPipelineLogRetriggers(this, pipeline);\n      }; // hook up the segment streams once track metadata is delivered\n\n      this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n        var pipeline = this.transmuxPipeline_;\n        if (!options.keepOriginalTimestamps) {\n          this.baseMediaDecodeTime = baseMediaDecodeTime;\n        }\n        if (audioTrack) {\n          audioTrack.timelineStartInfo.dts = undefined;\n          audioTrack.timelineStartInfo.pts = undefined;\n          trackDecodeInfo.clearDtsInfo(audioTrack);\n          if (pipeline.audioTimestampRolloverStream) {\n            pipeline.audioTimestampRolloverStream.discontinuity();\n          }\n        }\n        if (videoTrack) {\n          if (pipeline.videoSegmentStream) {\n            pipeline.videoSegmentStream.gopCache_ = [];\n          }\n          videoTrack.timelineStartInfo.dts = undefined;\n          videoTrack.timelineStartInfo.pts = undefined;\n          trackDecodeInfo.clearDtsInfo(videoTrack);\n          pipeline.captionStream.reset();\n        }\n        if (pipeline.timestampRolloverStream) {\n          pipeline.timestampRolloverStream.discontinuity();\n        }\n      };\n      this.setAudioAppendStart = function (timestamp) {\n        if (audioTrack) {\n          this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n        }\n      };\n      this.setRemux = function (val) {\n        var pipeline = this.transmuxPipeline_;\n        options.remux = val;\n        if (pipeline && pipeline.coalesceStream) {\n          pipeline.coalesceStream.setRemux(val);\n        }\n      };\n      this.alignGopsWith = function (gopsToAlignWith) {\n        if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n          this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n        }\n      };\n      this.getLogTrigger_ = function (key) {\n        var self = this;\n        return function (event) {\n          event.stream = key;\n          self.trigger('log', event);\n        };\n      }; // feed incoming data to the front of the parsing pipeline\n\n      this.push = function (data) {\n        if (hasFlushed) {\n          var isAac = isLikelyAacData(data);\n          if (isAac && this.transmuxPipeline_.type !== 'aac') {\n            this.setupAacPipeline();\n          } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n            this.setupTsPipeline();\n          }\n          hasFlushed = false;\n        }\n        this.transmuxPipeline_.headOfPipeline.push(data);\n      }; // flush any buffered data\n\n      this.flush = function () {\n        hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n        this.transmuxPipeline_.headOfPipeline.flush();\n      };\n      this.endTimeline = function () {\n        this.transmuxPipeline_.headOfPipeline.endTimeline();\n      };\n      this.reset = function () {\n        if (this.transmuxPipeline_.headOfPipeline) {\n          this.transmuxPipeline_.headOfPipeline.reset();\n        }\n      }; // Caption data has to be reset when seeking outside buffered range\n\n      this.resetCaptions = function () {\n        if (this.transmuxPipeline_.captionStream) {\n          this.transmuxPipeline_.captionStream.reset();\n        }\n      };\n    };\n    Transmuxer.prototype = new Stream();\n    var transmuxer = {\n      Transmuxer: Transmuxer,\n      VideoSegmentStream: VideoSegmentStream,\n      AudioSegmentStream: AudioSegmentStream,\n      AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n      VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n      // exported for testing\n      generateSegmentTimingInfo: generateSegmentTimingInfo\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     */\n\n    var toUnsigned$3 = function (value) {\n      return value >>> 0;\n    };\n    var toHexString$1 = function (value) {\n      return ('00' + value.toString(16)).slice(-2);\n    };\n    var bin = {\n      toUnsigned: toUnsigned$3,\n      toHexString: toHexString$1\n    };\n    var parseType$4 = function (buffer) {\n      var result = '';\n      result += String.fromCharCode(buffer[0]);\n      result += String.fromCharCode(buffer[1]);\n      result += String.fromCharCode(buffer[2]);\n      result += String.fromCharCode(buffer[3]);\n      return result;\n    };\n    var parseType_1 = parseType$4;\n    var toUnsigned$2 = bin.toUnsigned;\n    var parseType$3 = parseType_1;\n    var findBox$5 = function (data, path) {\n      var results = [],\n        i,\n        size,\n        type,\n        end,\n        subresults;\n      if (!path.length) {\n        // short-circuit the search for empty paths\n        return null;\n      }\n      for (i = 0; i < data.byteLength;) {\n        size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n        type = parseType$3(data.subarray(i + 4, i + 8));\n        end = size > 1 ? i + size : data.byteLength;\n        if (type === path[0]) {\n          if (path.length === 1) {\n            // this is the end of the path and we've found the box we were\n            // looking for\n            results.push(data.subarray(i + 8, end));\n          } else {\n            // recursively search for the next box along the path\n            subresults = findBox$5(data.subarray(i + 8, end), path.slice(1));\n            if (subresults.length) {\n              results = results.concat(subresults);\n            }\n          }\n        }\n        i = end;\n      } // we've finished searching all of data\n\n      return results;\n    };\n    var findBox_1 = findBox$5;\n    var toUnsigned$1 = bin.toUnsigned;\n    var getUint64$4 = numbers.getUint64;\n    var tfdt = function (data) {\n      var result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4))\n      };\n      if (result.version === 1) {\n        result.baseMediaDecodeTime = getUint64$4(data.subarray(4));\n      } else {\n        result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n      }\n      return result;\n    };\n    var parseTfdt$3 = tfdt;\n    var tfhd = function (data) {\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n        result = {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          trackId: view.getUint32(4)\n        },\n        baseDataOffsetPresent = result.flags[2] & 0x01,\n        sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n        defaultSampleDurationPresent = result.flags[2] & 0x08,\n        defaultSampleSizePresent = result.flags[2] & 0x10,\n        defaultSampleFlagsPresent = result.flags[2] & 0x20,\n        durationIsEmpty = result.flags[0] & 0x010000,\n        defaultBaseIsMoof = result.flags[0] & 0x020000,\n        i;\n      i = 8;\n      if (baseDataOffsetPresent) {\n        i += 4; // truncate top 4 bytes\n        // FIXME: should we read the full 64 bits?\n\n        result.baseDataOffset = view.getUint32(12);\n        i += 4;\n      }\n      if (sampleDescriptionIndexPresent) {\n        result.sampleDescriptionIndex = view.getUint32(i);\n        i += 4;\n      }\n      if (defaultSampleDurationPresent) {\n        result.defaultSampleDuration = view.getUint32(i);\n        i += 4;\n      }\n      if (defaultSampleSizePresent) {\n        result.defaultSampleSize = view.getUint32(i);\n        i += 4;\n      }\n      if (defaultSampleFlagsPresent) {\n        result.defaultSampleFlags = view.getUint32(i);\n      }\n      if (durationIsEmpty) {\n        result.durationIsEmpty = true;\n      }\n      if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n        result.baseDataOffsetIsMoof = true;\n      }\n      return result;\n    };\n    var parseTfhd$2 = tfhd;\n    var getUint64$3 = numbers.getUint64;\n    var parseSidx = function (data) {\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n        result = {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          references: [],\n          referenceId: view.getUint32(4),\n          timescale: view.getUint32(8)\n        },\n        i = 12;\n      if (result.version === 0) {\n        result.earliestPresentationTime = view.getUint32(i);\n        result.firstOffset = view.getUint32(i + 4);\n        i += 8;\n      } else {\n        // read 64 bits\n        result.earliestPresentationTime = getUint64$3(data.subarray(i));\n        result.firstOffset = getUint64$3(data.subarray(i + 8));\n        i += 16;\n      }\n      i += 2; // reserved\n\n      var referenceCount = view.getUint16(i);\n      i += 2; // start of references\n\n      for (; referenceCount > 0; i += 12, referenceCount--) {\n        result.references.push({\n          referenceType: (data[i] & 0x80) >>> 7,\n          referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n          subsegmentDuration: view.getUint32(i + 4),\n          startsWithSap: !!(data[i + 8] & 0x80),\n          sapType: (data[i + 8] & 0x70) >>> 4,\n          sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n        });\n      }\n      return result;\n    };\n    var parseSidx_1 = parseSidx;\n    var parseSampleFlags$1 = function (flags) {\n      return {\n        isLeading: (flags[0] & 0x0c) >>> 2,\n        dependsOn: flags[0] & 0x03,\n        isDependedOn: (flags[1] & 0xc0) >>> 6,\n        hasRedundancy: (flags[1] & 0x30) >>> 4,\n        paddingValue: (flags[1] & 0x0e) >>> 1,\n        isNonSyncSample: flags[1] & 0x01,\n        degradationPriority: flags[2] << 8 | flags[3]\n      };\n    };\n    var parseSampleFlags_1 = parseSampleFlags$1;\n    var parseSampleFlags = parseSampleFlags_1;\n    var trun = function (data) {\n      var result = {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          samples: []\n        },\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n        // Flag interpretation\n        dataOffsetPresent = result.flags[2] & 0x01,\n        // compare with 2nd byte of 0x1\n        firstSampleFlagsPresent = result.flags[2] & 0x04,\n        // compare with 2nd byte of 0x4\n        sampleDurationPresent = result.flags[1] & 0x01,\n        // compare with 2nd byte of 0x100\n        sampleSizePresent = result.flags[1] & 0x02,\n        // compare with 2nd byte of 0x200\n        sampleFlagsPresent = result.flags[1] & 0x04,\n        // compare with 2nd byte of 0x400\n        sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n        // compare with 2nd byte of 0x800\n        sampleCount = view.getUint32(4),\n        offset = 8,\n        sample;\n      if (dataOffsetPresent) {\n        // 32 bit signed integer\n        result.dataOffset = view.getInt32(offset);\n        offset += 4;\n      } // Overrides the flags for the first sample only. The order of\n      // optional values will be: duration, size, compositionTimeOffset\n\n      if (firstSampleFlagsPresent && sampleCount) {\n        sample = {\n          flags: parseSampleFlags(data.subarray(offset, offset + 4))\n        };\n        offset += 4;\n        if (sampleDurationPresent) {\n          sample.duration = view.getUint32(offset);\n          offset += 4;\n        }\n        if (sampleSizePresent) {\n          sample.size = view.getUint32(offset);\n          offset += 4;\n        }\n        if (sampleCompositionTimeOffsetPresent) {\n          if (result.version === 1) {\n            sample.compositionTimeOffset = view.getInt32(offset);\n          } else {\n            sample.compositionTimeOffset = view.getUint32(offset);\n          }\n          offset += 4;\n        }\n        result.samples.push(sample);\n        sampleCount--;\n      }\n      while (sampleCount--) {\n        sample = {};\n        if (sampleDurationPresent) {\n          sample.duration = view.getUint32(offset);\n          offset += 4;\n        }\n        if (sampleSizePresent) {\n          sample.size = view.getUint32(offset);\n          offset += 4;\n        }\n        if (sampleFlagsPresent) {\n          sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n          offset += 4;\n        }\n        if (sampleCompositionTimeOffsetPresent) {\n          if (result.version === 1) {\n            sample.compositionTimeOffset = view.getInt32(offset);\n          } else {\n            sample.compositionTimeOffset = view.getUint32(offset);\n          }\n          offset += 4;\n        }\n        result.samples.push(sample);\n      }\n      return result;\n    };\n    var parseTrun$2 = trun;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Parse the internal MP4 structure into an equivalent javascript\n     * object.\n     */\n\n    var numberHelpers = numbers;\n    var getUint64$2 = numberHelpers.getUint64;\n    var inspectMp4,\n      textifyMp4,\n      parseMp4Date = function (seconds) {\n        return new Date(seconds * 1000 - 2082844800000);\n      },\n      parseType$2 = parseType_1,\n      findBox$4 = findBox_1,\n      nalParse = function (avcStream) {\n        var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n          result = [],\n          i,\n          length;\n        for (i = 0; i + 4 < avcStream.length; i += length) {\n          length = avcView.getUint32(i);\n          i += 4; // bail if this doesn't appear to be an H264 stream\n\n          if (length <= 0) {\n            result.push('<span style=\\'color:red;\\'>MALFORMED DATA</span>');\n            continue;\n          }\n          switch (avcStream[i] & 0x1F) {\n            case 0x01:\n              result.push('slice_layer_without_partitioning_rbsp');\n              break;\n            case 0x05:\n              result.push('slice_layer_without_partitioning_rbsp_idr');\n              break;\n            case 0x06:\n              result.push('sei_rbsp');\n              break;\n            case 0x07:\n              result.push('seq_parameter_set_rbsp');\n              break;\n            case 0x08:\n              result.push('pic_parameter_set_rbsp');\n              break;\n            case 0x09:\n              result.push('access_unit_delimiter_rbsp');\n              break;\n            default:\n              result.push('UNKNOWN NAL - ' + avcStream[i] & 0x1F);\n              break;\n          }\n        }\n        return result;\n      },\n      // registry of handlers for individual mp4 box types\n      parse = {\n        // codingname, not a first-class box type. stsd entries share the\n        // same format as real boxes so the parsing infrastructure can be\n        // shared\n        avc1: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n          return {\n            dataReferenceIndex: view.getUint16(6),\n            width: view.getUint16(24),\n            height: view.getUint16(26),\n            horizresolution: view.getUint16(28) + view.getUint16(30) / 16,\n            vertresolution: view.getUint16(32) + view.getUint16(34) / 16,\n            frameCount: view.getUint16(40),\n            depth: view.getUint16(74),\n            config: inspectMp4(data.subarray(78, data.byteLength))\n          };\n        },\n        avcC: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              configurationVersion: data[0],\n              avcProfileIndication: data[1],\n              profileCompatibility: data[2],\n              avcLevelIndication: data[3],\n              lengthSizeMinusOne: data[4] & 0x03,\n              sps: [],\n              pps: []\n            },\n            numOfSequenceParameterSets = data[5] & 0x1f,\n            numOfPictureParameterSets,\n            nalSize,\n            offset,\n            i; // iterate past any SPSs\n\n          offset = 6;\n          for (i = 0; i < numOfSequenceParameterSets; i++) {\n            nalSize = view.getUint16(offset);\n            offset += 2;\n            result.sps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n            offset += nalSize;\n          } // iterate past any PPSs\n\n          numOfPictureParameterSets = data[offset];\n          offset++;\n          for (i = 0; i < numOfPictureParameterSets; i++) {\n            nalSize = view.getUint16(offset);\n            offset += 2;\n            result.pps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n            offset += nalSize;\n          }\n          return result;\n        },\n        btrt: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n          return {\n            bufferSizeDB: view.getUint32(0),\n            maxBitrate: view.getUint32(4),\n            avgBitrate: view.getUint32(8)\n          };\n        },\n        edts: function edts(data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        elst: function elst(data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4)),\n              edits: []\n            },\n            entryCount = view.getUint32(4),\n            i;\n          for (i = 8; entryCount; entryCount--) {\n            if (result.version === 0) {\n              result.edits.push({\n                segmentDuration: view.getUint32(i),\n                mediaTime: view.getInt32(i + 4),\n                mediaRate: view.getUint16(i + 8) + view.getUint16(i + 10) / (256 * 256)\n              });\n              i += 12;\n            } else {\n              result.edits.push({\n                segmentDuration: getUint64$2(data.subarray(i)),\n                mediaTime: getUint64$2(data.subarray(i + 8)),\n                mediaRate: view.getUint16(i + 16) + view.getUint16(i + 18) / (256 * 256)\n              });\n              i += 20;\n            }\n          }\n          return result;\n        },\n        esds: function (data) {\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            esId: data[6] << 8 | data[7],\n            streamPriority: data[8] & 0x1f,\n            decoderConfig: {\n              objectProfileIndication: data[11],\n              streamType: data[12] >>> 2 & 0x3f,\n              bufferSize: data[13] << 16 | data[14] << 8 | data[15],\n              maxBitrate: data[16] << 24 | data[17] << 16 | data[18] << 8 | data[19],\n              avgBitrate: data[20] << 24 | data[21] << 16 | data[22] << 8 | data[23],\n              decoderConfigDescriptor: {\n                tag: data[24],\n                length: data[25],\n                audioObjectType: data[26] >>> 3 & 0x1f,\n                samplingFrequencyIndex: (data[26] & 0x07) << 1 | data[27] >>> 7 & 0x01,\n                channelConfiguration: data[27] >>> 3 & 0x0f\n              }\n            }\n          };\n        },\n        ftyp: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              majorBrand: parseType$2(data.subarray(0, 4)),\n              minorVersion: view.getUint32(4),\n              compatibleBrands: []\n            },\n            i = 8;\n          while (i < data.byteLength) {\n            result.compatibleBrands.push(parseType$2(data.subarray(i, i + 4)));\n            i += 4;\n          }\n          return result;\n        },\n        dinf: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        dref: function (data) {\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            dataReferences: inspectMp4(data.subarray(8))\n          };\n        },\n        hdlr: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4)),\n              handlerType: parseType$2(data.subarray(8, 12)),\n              name: ''\n            },\n            i = 8; // parse out the name field\n\n          for (i = 24; i < data.byteLength; i++) {\n            if (data[i] === 0x00) {\n              // the name field is null-terminated\n              i++;\n              break;\n            }\n            result.name += String.fromCharCode(data[i]);\n          } // decode UTF-8 to javascript's internal representation\n          // see http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\n\n          result.name = decodeURIComponent(escape(result.name));\n          return result;\n        },\n        mdat: function (data) {\n          return {\n            byteLength: data.byteLength,\n            nals: nalParse(data)\n          };\n        },\n        mdhd: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            i = 4,\n            language,\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4)),\n              language: ''\n            };\n          if (result.version === 1) {\n            i += 4;\n            result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n            i += 8;\n            result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n            i += 4;\n            result.timescale = view.getUint32(i);\n            i += 8;\n            result.duration = view.getUint32(i); // truncating top 4 bytes\n          } else {\n            result.creationTime = parseMp4Date(view.getUint32(i));\n            i += 4;\n            result.modificationTime = parseMp4Date(view.getUint32(i));\n            i += 4;\n            result.timescale = view.getUint32(i);\n            i += 4;\n            result.duration = view.getUint32(i);\n          }\n          i += 4; // language is stored as an ISO-639-2/T code in an array of three 5-bit fields\n          // each field is the packed difference between its ASCII value and 0x60\n\n          language = view.getUint16(i);\n          result.language += String.fromCharCode((language >> 10) + 0x60);\n          result.language += String.fromCharCode(((language & 0x03e0) >> 5) + 0x60);\n          result.language += String.fromCharCode((language & 0x1f) + 0x60);\n          return result;\n        },\n        mdia: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        mfhd: function (data) {\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            sequenceNumber: data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]\n          };\n        },\n        minf: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        // codingname, not a first-class box type. stsd entries share the\n        // same format as real boxes so the parsing infrastructure can be\n        // shared\n        mp4a: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              // 6 bytes reserved\n              dataReferenceIndex: view.getUint16(6),\n              // 4 + 4 bytes reserved\n              channelcount: view.getUint16(16),\n              samplesize: view.getUint16(18),\n              // 2 bytes pre_defined\n              // 2 bytes reserved\n              samplerate: view.getUint16(24) + view.getUint16(26) / 65536\n            }; // if there are more bytes to process, assume this is an ISO/IEC\n          // 14496-14 MP4AudioSampleEntry and parse the ESDBox\n\n          if (data.byteLength > 28) {\n            result.streamDescriptor = inspectMp4(data.subarray(28))[0];\n          }\n          return result;\n        },\n        moof: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        moov: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        mvex: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        mvhd: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            i = 4,\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4))\n            };\n          if (result.version === 1) {\n            i += 4;\n            result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n            i += 8;\n            result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n            i += 4;\n            result.timescale = view.getUint32(i);\n            i += 8;\n            result.duration = view.getUint32(i); // truncating top 4 bytes\n          } else {\n            result.creationTime = parseMp4Date(view.getUint32(i));\n            i += 4;\n            result.modificationTime = parseMp4Date(view.getUint32(i));\n            i += 4;\n            result.timescale = view.getUint32(i);\n            i += 4;\n            result.duration = view.getUint32(i);\n          }\n          i += 4; // convert fixed-point, base 16 back to a number\n\n          result.rate = view.getUint16(i) + view.getUint16(i + 2) / 16;\n          i += 4;\n          result.volume = view.getUint8(i) + view.getUint8(i + 1) / 8;\n          i += 2;\n          i += 2;\n          i += 2 * 4;\n          result.matrix = new Uint32Array(data.subarray(i, i + 9 * 4));\n          i += 9 * 4;\n          i += 6 * 4;\n          result.nextTrackId = view.getUint32(i);\n          return result;\n        },\n        pdin: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n          return {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4)),\n            rate: view.getUint32(4),\n            initialDelay: view.getUint32(8)\n          };\n        },\n        sdtp: function (data) {\n          var result = {\n              version: data[0],\n              flags: new Uint8Array(data.subarray(1, 4)),\n              samples: []\n            },\n            i;\n          for (i = 4; i < data.byteLength; i++) {\n            result.samples.push({\n              dependsOn: (data[i] & 0x30) >> 4,\n              isDependedOn: (data[i] & 0x0c) >> 2,\n              hasRedundancy: data[i] & 0x03\n            });\n          }\n          return result;\n        },\n        sidx: parseSidx_1,\n        smhd: function (data) {\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            balance: data[4] + data[5] / 256\n          };\n        },\n        stbl: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        ctts: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4)),\n              compositionOffsets: []\n            },\n            entryCount = view.getUint32(4),\n            i;\n          for (i = 8; entryCount; i += 8, entryCount--) {\n            result.compositionOffsets.push({\n              sampleCount: view.getUint32(i),\n              sampleOffset: view[result.version === 0 ? 'getUint32' : 'getInt32'](i + 4)\n            });\n          }\n          return result;\n        },\n        stss: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4)),\n              syncSamples: []\n            },\n            entryCount = view.getUint32(4),\n            i;\n          for (i = 8; entryCount; i += 4, entryCount--) {\n            result.syncSamples.push(view.getUint32(i));\n          }\n          return result;\n        },\n        stco: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: data[0],\n              flags: new Uint8Array(data.subarray(1, 4)),\n              chunkOffsets: []\n            },\n            entryCount = view.getUint32(4),\n            i;\n          for (i = 8; entryCount; i += 4, entryCount--) {\n            result.chunkOffsets.push(view.getUint32(i));\n          }\n          return result;\n        },\n        stsc: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            entryCount = view.getUint32(4),\n            result = {\n              version: data[0],\n              flags: new Uint8Array(data.subarray(1, 4)),\n              sampleToChunks: []\n            },\n            i;\n          for (i = 8; entryCount; i += 12, entryCount--) {\n            result.sampleToChunks.push({\n              firstChunk: view.getUint32(i),\n              samplesPerChunk: view.getUint32(i + 4),\n              sampleDescriptionIndex: view.getUint32(i + 8)\n            });\n          }\n          return result;\n        },\n        stsd: function (data) {\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            sampleDescriptions: inspectMp4(data.subarray(8))\n          };\n        },\n        stsz: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: data[0],\n              flags: new Uint8Array(data.subarray(1, 4)),\n              sampleSize: view.getUint32(4),\n              entries: []\n            },\n            i;\n          for (i = 12; i < data.byteLength; i += 4) {\n            result.entries.push(view.getUint32(i));\n          }\n          return result;\n        },\n        stts: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            result = {\n              version: data[0],\n              flags: new Uint8Array(data.subarray(1, 4)),\n              timeToSamples: []\n            },\n            entryCount = view.getUint32(4),\n            i;\n          for (i = 8; entryCount; i += 8, entryCount--) {\n            result.timeToSamples.push({\n              sampleCount: view.getUint32(i),\n              sampleDelta: view.getUint32(i + 4)\n            });\n          }\n          return result;\n        },\n        styp: function (data) {\n          return parse.ftyp(data);\n        },\n        tfdt: parseTfdt$3,\n        tfhd: parseTfhd$2,\n        tkhd: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n            i = 4,\n            result = {\n              version: view.getUint8(0),\n              flags: new Uint8Array(data.subarray(1, 4))\n            };\n          if (result.version === 1) {\n            i += 4;\n            result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n            i += 8;\n            result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n            i += 4;\n            result.trackId = view.getUint32(i);\n            i += 4;\n            i += 8;\n            result.duration = view.getUint32(i); // truncating top 4 bytes\n          } else {\n            result.creationTime = parseMp4Date(view.getUint32(i));\n            i += 4;\n            result.modificationTime = parseMp4Date(view.getUint32(i));\n            i += 4;\n            result.trackId = view.getUint32(i);\n            i += 4;\n            i += 4;\n            result.duration = view.getUint32(i);\n          }\n          i += 4;\n          i += 2 * 4;\n          result.layer = view.getUint16(i);\n          i += 2;\n          result.alternateGroup = view.getUint16(i);\n          i += 2; // convert fixed-point, base 16 back to a number\n\n          result.volume = view.getUint8(i) + view.getUint8(i + 1) / 8;\n          i += 2;\n          i += 2;\n          result.matrix = new Uint32Array(data.subarray(i, i + 9 * 4));\n          i += 9 * 4;\n          result.width = view.getUint16(i) + view.getUint16(i + 2) / 65536;\n          i += 4;\n          result.height = view.getUint16(i) + view.getUint16(i + 2) / 65536;\n          return result;\n        },\n        traf: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        trak: function (data) {\n          return {\n            boxes: inspectMp4(data)\n          };\n        },\n        trex: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            trackId: view.getUint32(4),\n            defaultSampleDescriptionIndex: view.getUint32(8),\n            defaultSampleDuration: view.getUint32(12),\n            defaultSampleSize: view.getUint32(16),\n            sampleDependsOn: data[20] & 0x03,\n            sampleIsDependedOn: (data[21] & 0xc0) >> 6,\n            sampleHasRedundancy: (data[21] & 0x30) >> 4,\n            samplePaddingValue: (data[21] & 0x0e) >> 1,\n            sampleIsDifferenceSample: !!(data[21] & 0x01),\n            sampleDegradationPriority: view.getUint16(22)\n          };\n        },\n        trun: parseTrun$2,\n        'url ': function (data) {\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4))\n          };\n        },\n        vmhd: function (data) {\n          var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n          return {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            graphicsmode: view.getUint16(4),\n            opcolor: new Uint16Array([view.getUint16(6), view.getUint16(8), view.getUint16(10)])\n          };\n        }\n      };\n    /**\n     * Return a javascript array of box objects parsed from an ISO base\n     * media file.\n     * @param data {Uint8Array} the binary data of the media to be inspected\n     * @return {array} a javascript array of potentially nested box objects\n     */\n\n    inspectMp4 = function (data) {\n      var i = 0,\n        result = [],\n        view,\n        size,\n        type,\n        end,\n        box; // Convert data from Uint8Array to ArrayBuffer, to follow Dataview API\n\n      var ab = new ArrayBuffer(data.length);\n      var v = new Uint8Array(ab);\n      for (var z = 0; z < data.length; ++z) {\n        v[z] = data[z];\n      }\n      view = new DataView(ab);\n      while (i < data.byteLength) {\n        // parse box data\n        size = view.getUint32(i);\n        type = parseType$2(data.subarray(i + 4, i + 8));\n        end = size > 1 ? i + size : data.byteLength; // parse type-specific data\n\n        box = (parse[type] || function (data) {\n          return {\n            data: data\n          };\n        })(data.subarray(i + 8, end));\n        box.size = size;\n        box.type = type; // store this box and move to the next\n\n        result.push(box);\n        i = end;\n      }\n      return result;\n    };\n    /**\n     * Returns a textual representation of the javascript represtentation\n     * of an MP4 file. You can use it as an alternative to\n     * JSON.stringify() to compare inspected MP4s.\n     * @param inspectedMp4 {array} the parsed array of boxes in an MP4\n     * file\n     * @param depth {number} (optional) the number of ancestor boxes of\n     * the elements of inspectedMp4. Assumed to be zero if unspecified.\n     * @return {string} a text representation of the parsed MP4\n     */\n\n    textifyMp4 = function (inspectedMp4, depth) {\n      var indent;\n      depth = depth || 0;\n      indent = new Array(depth * 2 + 1).join(' '); // iterate over all the boxes\n\n      return inspectedMp4.map(function (box, index) {\n        // list the box type first at the current indentation level\n        return indent + box.type + '\\n' +\n        // the type is already included and handle child boxes separately\n        Object.keys(box).filter(function (key) {\n          return key !== 'type' && key !== 'boxes'; // output all the box properties\n        }).map(function (key) {\n          var prefix = indent + '  ' + key + ': ',\n            value = box[key]; // print out raw bytes as hexademical\n\n          if (value instanceof Uint8Array || value instanceof Uint32Array) {\n            var bytes = Array.prototype.slice.call(new Uint8Array(value.buffer, value.byteOffset, value.byteLength)).map(function (byte) {\n              return ' ' + ('00' + byte.toString(16)).slice(-2);\n            }).join('').match(/.{1,24}/g);\n            if (!bytes) {\n              return prefix + '<>';\n            }\n            if (bytes.length === 1) {\n              return prefix + '<' + bytes.join('').slice(1) + '>';\n            }\n            return prefix + '<\\n' + bytes.map(function (line) {\n              return indent + '  ' + line;\n            }).join('\\n') + '\\n' + indent + '  >';\n          } // stringify generic objects\n\n          return prefix + JSON.stringify(value, null, 2).split('\\n').map(function (line, index) {\n            if (index === 0) {\n              return line;\n            }\n            return indent + '  ' + line;\n          }).join('\\n');\n        }).join('\\n') + (\n        // recursively textify the child boxes\n        box.boxes ? '\\n' + textifyMp4(box.boxes, depth + 1) : '');\n      }).join('\\n');\n    };\n    var mp4Inspector = {\n      inspect: inspectMp4,\n      textify: textifyMp4,\n      parseType: parseType$2,\n      findBox: findBox$4,\n      parseTraf: parse.traf,\n      parseTfdt: parse.tfdt,\n      parseHdlr: parse.hdlr,\n      parseTfhd: parse.tfhd,\n      parseTrun: parse.trun,\n      parseSidx: parse.sidx\n    };\n    /**\n     * Returns the first string in the data array ending with a null char '\\0'\n     * @param {UInt8} data \n     * @returns the string with the null char\n     */\n\n    var uint8ToCString$1 = function (data) {\n      var index = 0;\n      var curChar = String.fromCharCode(data[index]);\n      var retString = '';\n      while (curChar !== '\\0') {\n        retString += curChar;\n        index++;\n        curChar = String.fromCharCode(data[index]);\n      } // Add nullChar\n\n      retString += curChar;\n      return retString;\n    };\n    var string = {\n      uint8ToCString: uint8ToCString$1\n    };\n    var uint8ToCString = string.uint8ToCString;\n    var getUint64$1 = numbers.getUint64;\n    /**\n     * Based on: ISO/IEC 23009 Section: 5.10.3.3\n     * References:\n     * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n     * https://aomediacodec.github.io/id3-emsg/\n     * \n     * Takes emsg box data as a uint8 array and returns a emsg box object\n     * @param {UInt8Array} boxData data from emsg box\n     * @returns A parsed emsg box object\n     */\n\n    var parseEmsgBox = function (boxData) {\n      // version + flags\n      var offset = 4;\n      var version = boxData[0];\n      var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n      if (version === 0) {\n        scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n        offset += scheme_id_uri.length;\n        value = uint8ToCString(boxData.subarray(offset));\n        offset += value.length;\n        var dv = new DataView(boxData.buffer);\n        timescale = dv.getUint32(offset);\n        offset += 4;\n        presentation_time_delta = dv.getUint32(offset);\n        offset += 4;\n        event_duration = dv.getUint32(offset);\n        offset += 4;\n        id = dv.getUint32(offset);\n        offset += 4;\n      } else if (version === 1) {\n        var dv = new DataView(boxData.buffer);\n        timescale = dv.getUint32(offset);\n        offset += 4;\n        presentation_time = getUint64$1(boxData.subarray(offset));\n        offset += 8;\n        event_duration = dv.getUint32(offset);\n        offset += 4;\n        id = dv.getUint32(offset);\n        offset += 4;\n        scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n        offset += scheme_id_uri.length;\n        value = uint8ToCString(boxData.subarray(offset));\n        offset += value.length;\n      }\n      message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n      var emsgBox = {\n        scheme_id_uri,\n        value,\n        // if timescale is undefined or 0 set to 1 \n        timescale: timescale ? timescale : 1,\n        presentation_time,\n        presentation_time_delta,\n        event_duration,\n        id,\n        message_data\n      };\n      return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n    };\n    /**\n     * Scales a presentation time or time delta with an offset with a provided timescale\n     * @param {number} presentationTime \n     * @param {number} timescale \n     * @param {number} timeDelta \n     * @param {number} offset \n     * @returns the scaled time as a number\n     */\n\n    var scaleTime = function (presentationTime, timescale, timeDelta, offset) {\n      return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n    };\n    /**\n     * Checks the emsg box data for validity based on the version\n     * @param {number} version of the emsg box to validate\n     * @param {Object} emsg the emsg data to validate\n     * @returns if the box is valid as a boolean\n     */\n\n    var isValidEmsgBox = function (version, emsg) {\n      var hasScheme = emsg.scheme_id_uri !== '\\0';\n      var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n      var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n      return !(version > 1) && isValidV0Box || isValidV1Box;\n    }; // Utility function to check if an object is defined\n\n    var isDefined = function (data) {\n      return data !== undefined || data !== null;\n    };\n    var emsg$1 = {\n      parseEmsgBox: parseEmsgBox,\n      scaleTime: scaleTime\n    };\n    var win;\n    if (typeof window !== \"undefined\") {\n      win = window;\n    } else if (typeof commonjsGlobal !== \"undefined\") {\n      win = commonjsGlobal;\n    } else if (typeof self !== \"undefined\") {\n      win = self;\n    } else {\n      win = {};\n    }\n    var window_1 = win;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Utilities to detect basic properties and metadata about MP4s.\n     */\n\n    var toUnsigned = bin.toUnsigned;\n    var toHexString = bin.toHexString;\n    var findBox$3 = findBox_1;\n    var parseType$1 = parseType_1;\n    var emsg = emsg$1;\n    var parseTfhd$1 = parseTfhd$2;\n    var parseTrun$1 = parseTrun$2;\n    var parseTfdt$2 = parseTfdt$3;\n    var getUint64 = numbers.getUint64;\n    var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader$1, getEmsgID3;\n    var window$2 = window_1;\n    var parseId3Frames = parseId3.parseId3Frames;\n    /**\n     * Parses an MP4 initialization segment and extracts the timescale\n     * values for any declared tracks. Timescale values indicate the\n     * number of clock ticks per second to assume for time-based values\n     * elsewhere in the MP4.\n     *\n     * To determine the start time of an MP4, you need two pieces of\n     * information: the timescale unit and the earliest base media decode\n     * time. Multiple timescales can be specified within an MP4 but the\n     * base media decode time is always expressed in the timescale from\n     * the media header box for the track:\n     * ```\n     * moov > trak > mdia > mdhd.timescale\n     * ```\n     * @param init {Uint8Array} the bytes of the init segment\n     * @return {object} a hash of track ids to timescale values or null if\n     * the init segment is malformed.\n     */\n\n    timescale = function (init) {\n      var result = {},\n        traks = findBox$3(init, ['moov', 'trak']); // mdhd timescale\n\n      return traks.reduce(function (result, trak) {\n        var tkhd, version, index, id, mdhd;\n        tkhd = findBox$3(trak, ['tkhd'])[0];\n        if (!tkhd) {\n          return null;\n        }\n        version = tkhd[0];\n        index = version === 0 ? 12 : 20;\n        id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n        mdhd = findBox$3(trak, ['mdia', 'mdhd'])[0];\n        if (!mdhd) {\n          return null;\n        }\n        version = mdhd[0];\n        index = version === 0 ? 12 : 20;\n        result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n        return result;\n      }, result);\n    };\n    /**\n     * Determine the base media decode start time, in seconds, for an MP4\n     * fragment. If multiple fragments are specified, the earliest time is\n     * returned.\n     *\n     * The base media decode time can be parsed from track fragment\n     * metadata:\n     * ```\n     * moof > traf > tfdt.baseMediaDecodeTime\n     * ```\n     * It requires the timescale value from the mdhd to interpret.\n     *\n     * @param timescale {object} a hash of track ids to timescale values.\n     * @return {number} the earliest base media decode start time for the\n     * fragment, in seconds\n     */\n\n    startTime = function (timescale, fragment) {\n      var trafs; // we need info from two childrend of each track fragment box\n\n      trafs = findBox$3(fragment, ['moof', 'traf']); // determine the start times for each track\n\n      var lowestTime = trafs.reduce(function (acc, traf) {\n        var tfhd = findBox$3(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n        var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n        var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n        var tfdt = findBox$3(traf, ['tfdt'])[0];\n        var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n        var baseTime; // version 1 is 64 bit\n\n        if (tfdt[0] === 1) {\n          baseTime = getUint64(tfdt.subarray(4, 12));\n        } else {\n          baseTime = dv.getUint32(4);\n        } // convert base time to seconds if it is a valid number.\n\n        let seconds;\n        if (typeof baseTime === 'bigint') {\n          seconds = baseTime / window$2.BigInt(scale);\n        } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n          seconds = baseTime / scale;\n        }\n        if (seconds < Number.MAX_SAFE_INTEGER) {\n          seconds = Number(seconds);\n        }\n        if (seconds < acc) {\n          acc = seconds;\n        }\n        return acc;\n      }, Infinity);\n      return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n    };\n    /**\n     * Determine the composition start, in seconds, for an MP4\n     * fragment.\n     *\n     * The composition start time of a fragment can be calculated using the base\n     * media decode time, composition time offset, and timescale, as follows:\n     *\n     * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n     *\n     * All of the aforementioned information is contained within a media fragment's\n     * `traf` box, except for timescale info, which comes from the initialization\n     * segment, so a track id (also contained within a `traf`) is also necessary to\n     * associate it with a timescale\n     *\n     *\n     * @param timescales {object} - a hash of track ids to timescale values.\n     * @param fragment {Unit8Array} - the bytes of a media segment\n     * @return {number} the composition start time for the fragment, in seconds\n     **/\n\n    compositionStartTime = function (timescales, fragment) {\n      var trafBoxes = findBox$3(fragment, ['moof', 'traf']);\n      var baseMediaDecodeTime = 0;\n      var compositionTimeOffset = 0;\n      var trackId;\n      if (trafBoxes && trafBoxes.length) {\n        // The spec states that track run samples contained within a `traf` box are contiguous, but\n        // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n        // We will assume that they are, so we only need the first to calculate start time.\n        var tfhd = findBox$3(trafBoxes[0], ['tfhd'])[0];\n        var trun = findBox$3(trafBoxes[0], ['trun'])[0];\n        var tfdt = findBox$3(trafBoxes[0], ['tfdt'])[0];\n        if (tfhd) {\n          var parsedTfhd = parseTfhd$1(tfhd);\n          trackId = parsedTfhd.trackId;\n        }\n        if (tfdt) {\n          var parsedTfdt = parseTfdt$2(tfdt);\n          baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n        }\n        if (trun) {\n          var parsedTrun = parseTrun$1(trun);\n          if (parsedTrun.samples && parsedTrun.samples.length) {\n            compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n          }\n        }\n      } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n      // specified.\n\n      var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n      if (typeof baseMediaDecodeTime === 'bigint') {\n        compositionTimeOffset = window$2.BigInt(compositionTimeOffset);\n        timescale = window$2.BigInt(timescale);\n      }\n      var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n      if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n        result = Number(result);\n      }\n      return result;\n    };\n    /**\n      * Find the trackIds of the video tracks in this source.\n      * Found by parsing the Handler Reference and Track Header Boxes:\n      *   moov > trak > mdia > hdlr\n      *   moov > trak > tkhd\n      *\n      * @param {Uint8Array} init - The bytes of the init segment for this source\n      * @return {Number[]} A list of trackIds\n      *\n      * @see ISO-BMFF-12/2015, Section 8.4.3\n     **/\n\n    getVideoTrackIds = function (init) {\n      var traks = findBox$3(init, ['moov', 'trak']);\n      var videoTrackIds = [];\n      traks.forEach(function (trak) {\n        var hdlrs = findBox$3(trak, ['mdia', 'hdlr']);\n        var tkhds = findBox$3(trak, ['tkhd']);\n        hdlrs.forEach(function (hdlr, index) {\n          var handlerType = parseType$1(hdlr.subarray(8, 12));\n          var tkhd = tkhds[index];\n          var view;\n          var version;\n          var trackId;\n          if (handlerType === 'vide') {\n            view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n            version = view.getUint8(0);\n            trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n            videoTrackIds.push(trackId);\n          }\n        });\n      });\n      return videoTrackIds;\n    };\n    getTimescaleFromMediaHeader$1 = function (mdhd) {\n      // mdhd is a FullBox, meaning it will have its own version as the first byte\n      var version = mdhd[0];\n      var index = version === 0 ? 12 : 20;\n      return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n    };\n    /**\n     * Get all the video, audio, and hint tracks from a non fragmented\n     * mp4 segment\n     */\n\n    getTracks = function (init) {\n      var traks = findBox$3(init, ['moov', 'trak']);\n      var tracks = [];\n      traks.forEach(function (trak) {\n        var track = {};\n        var tkhd = findBox$3(trak, ['tkhd'])[0];\n        var view, tkhdVersion; // id\n\n        if (tkhd) {\n          view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n          tkhdVersion = view.getUint8(0);\n          track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n        }\n        var hdlr = findBox$3(trak, ['mdia', 'hdlr'])[0]; // type\n\n        if (hdlr) {\n          var type = parseType$1(hdlr.subarray(8, 12));\n          if (type === 'vide') {\n            track.type = 'video';\n          } else if (type === 'soun') {\n            track.type = 'audio';\n          } else {\n            track.type = type;\n          }\n        } // codec\n\n        var stsd = findBox$3(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n        if (stsd) {\n          var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n          track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n          var codecBox = findBox$3(sampleDescriptions, [track.codec])[0];\n          var codecConfig, codecConfigType;\n          if (codecBox) {\n            // https://tools.ietf.org/html/rfc6381#section-3.3\n            if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n              // we don't need anything but the \"config\" parameter of the\n              // avc1 codecBox\n              codecConfig = codecBox.subarray(78);\n              codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n              if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n                track.codec += '.'; // left padded with zeroes for single digit hex\n                // profile idc\n\n                track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n                track.codec += toHexString(codecConfig[10]); // level idc\n\n                track.codec += toHexString(codecConfig[11]);\n              } else {\n                // TODO: show a warning that we couldn't parse the codec\n                // and are using the default\n                track.codec = 'avc1.4d400d';\n              }\n            } else if (/^mp4[a,v]$/i.test(track.codec)) {\n              // we do not need anything but the streamDescriptor of the mp4a codecBox\n              codecConfig = codecBox.subarray(28);\n              codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n              if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n                track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n                track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n              } else {\n                // TODO: show a warning that we couldn't parse the codec\n                // and are using the default\n                track.codec = 'mp4a.40.2';\n              }\n            } else {\n              // flac, opus, etc\n              track.codec = track.codec.toLowerCase();\n            }\n          }\n        }\n        var mdhd = findBox$3(trak, ['mdia', 'mdhd'])[0];\n        if (mdhd) {\n          track.timescale = getTimescaleFromMediaHeader$1(mdhd);\n        }\n        tracks.push(track);\n      });\n      return tracks;\n    };\n    /**\n     * Returns an array of emsg ID3 data from the provided segmentData.\n     * An offset can also be provided as the Latest Arrival Time to calculate \n     * the Event Start Time of v0 EMSG boxes. \n     * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n     * \n     * @param {Uint8Array} segmentData the segment byte array.\n     * @param {number} offset the segment start time or Latest Arrival Time, \n     * @return {Object[]} an array of ID3 parsed from EMSG boxes\n     */\n\n    getEmsgID3 = function (segmentData, offset = 0) {\n      var emsgBoxes = findBox$3(segmentData, ['emsg']);\n      return emsgBoxes.map(data => {\n        var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n        var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n        return {\n          cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n          duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n          frames: parsedId3Frames\n        };\n      });\n    };\n    var probe$2 = {\n      // export mp4 inspector's findBox and parseType for backwards compatibility\n      findBox: findBox$3,\n      parseType: parseType$1,\n      timescale: timescale,\n      startTime: startTime,\n      compositionStartTime: compositionStartTime,\n      videoTrackIds: getVideoTrackIds,\n      tracks: getTracks,\n      getTimescaleFromMediaHeader: getTimescaleFromMediaHeader$1,\n      getEmsgID3: getEmsgID3\n    };\n    const {\n      parseTrun\n    } = mp4Inspector;\n    const {\n      findBox: findBox$2\n    } = probe$2;\n    var window$1 = window_1;\n    /**\n     * Utility function for parsing data from mdat boxes.\n     * @param {Array<Uint8Array>} segment the segment data to create mdat/traf pairs from.\n     * @returns mdat and traf boxes paired up for easier parsing.\n     */\n\n    var getMdatTrafPairs$2 = function (segment) {\n      var trafs = findBox$2(segment, ['moof', 'traf']);\n      var mdats = findBox$2(segment, ['mdat']);\n      var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n      mdats.forEach(function (mdat, index) {\n        var matchingTraf = trafs[index];\n        mdatTrafPairs.push({\n          mdat: mdat,\n          traf: matchingTraf\n        });\n      });\n      return mdatTrafPairs;\n    };\n    /**\n      * Parses sample information out of Track Run Boxes and calculates\n      * the absolute presentation and decode timestamps of each sample.\n      *\n      * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\n      * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n          @see ISO-BMFF-12/2015, Section 8.8.12\n      * @param {Object} tfhd - The parsed Track Fragment Header\n      *   @see inspect.parseTfhd\n      * @return {Object[]} the parsed samples\n      *\n      * @see ISO-BMFF-12/2015, Section 8.8.8\n     **/\n\n    var parseSamples$2 = function (truns, baseMediaDecodeTime, tfhd) {\n      var currentDts = baseMediaDecodeTime;\n      var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n      var defaultSampleSize = tfhd.defaultSampleSize || 0;\n      var trackId = tfhd.trackId;\n      var allSamples = [];\n      truns.forEach(function (trun) {\n        // Note: We currently do not parse the sample table as well\n        // as the trun. It's possible some sources will require this.\n        // moov > trak > mdia > minf > stbl\n        var trackRun = parseTrun(trun);\n        var samples = trackRun.samples;\n        samples.forEach(function (sample) {\n          if (sample.duration === undefined) {\n            sample.duration = defaultSampleDuration;\n          }\n          if (sample.size === undefined) {\n            sample.size = defaultSampleSize;\n          }\n          sample.trackId = trackId;\n          sample.dts = currentDts;\n          if (sample.compositionTimeOffset === undefined) {\n            sample.compositionTimeOffset = 0;\n          }\n          if (typeof currentDts === 'bigint') {\n            sample.pts = currentDts + window$1.BigInt(sample.compositionTimeOffset);\n            currentDts += window$1.BigInt(sample.duration);\n          } else {\n            sample.pts = currentDts + sample.compositionTimeOffset;\n            currentDts += sample.duration;\n          }\n        });\n        allSamples = allSamples.concat(samples);\n      });\n      return allSamples;\n    };\n    var samples = {\n      getMdatTrafPairs: getMdatTrafPairs$2,\n      parseSamples: parseSamples$2\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Reads in-band CEA-708 captions out of FMP4 segments.\n     * @see https://en.wikipedia.org/wiki/CEA-708\n     */\n\n    var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n    var CaptionStream = captionStream.CaptionStream;\n    var findBox$1 = findBox_1;\n    var parseTfdt$1 = parseTfdt$3;\n    var parseTfhd = parseTfhd$2;\n    var {\n      getMdatTrafPairs: getMdatTrafPairs$1,\n      parseSamples: parseSamples$1\n    } = samples;\n    /**\n      * Maps an offset in the mdat to a sample based on the the size of the samples.\n      * Assumes that `parseSamples` has been called first.\n      *\n      * @param {Number} offset - The offset into the mdat\n      * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n      * @return {?Object} The matching sample, or null if no match was found.\n      *\n      * @see ISO-BMFF-12/2015, Section 8.8.8\n     **/\n\n    var mapToSample = function (offset, samples) {\n      var approximateOffset = offset;\n      for (var i = 0; i < samples.length; i++) {\n        var sample = samples[i];\n        if (approximateOffset < sample.size) {\n          return sample;\n        }\n        approximateOffset -= sample.size;\n      }\n      return null;\n    };\n    /**\n      * Finds SEI nal units contained in a Media Data Box.\n      * Assumes that `parseSamples` has been called first.\n      *\n      * @param {Uint8Array} avcStream - The bytes of the mdat\n      * @param {Object[]} samples - The samples parsed out by `parseSamples`\n      * @param {Number} trackId - The trackId of this video track\n      * @return {Object[]} seiNals - the parsed SEI NALUs found.\n      *   The contents of the seiNal should match what is expected by\n      *   CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n      *\n      * @see ISO-BMFF-12/2015, Section 8.1.1\n      * @see Rec. ITU-T H.264, 7.3.2.3.1\n     **/\n\n    var findSeiNals = function (avcStream, samples, trackId) {\n      var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n        result = {\n          logs: [],\n          seiNals: []\n        },\n        seiNal,\n        i,\n        length,\n        lastMatchedSample;\n      for (i = 0; i + 4 < avcStream.length; i += length) {\n        length = avcView.getUint32(i);\n        i += 4; // Bail if this doesn't appear to be an H264 stream\n\n        if (length <= 0) {\n          continue;\n        }\n        switch (avcStream[i] & 0x1F) {\n          case 0x06:\n            var data = avcStream.subarray(i + 1, i + 1 + length);\n            var matchingSample = mapToSample(i, samples);\n            seiNal = {\n              nalUnitType: 'sei_rbsp',\n              size: length,\n              data: data,\n              escapedRBSP: discardEmulationPreventionBytes(data),\n              trackId: trackId\n            };\n            if (matchingSample) {\n              seiNal.pts = matchingSample.pts;\n              seiNal.dts = matchingSample.dts;\n              lastMatchedSample = matchingSample;\n            } else if (lastMatchedSample) {\n              // If a matching sample cannot be found, use the last\n              // sample's values as they should be as close as possible\n              seiNal.pts = lastMatchedSample.pts;\n              seiNal.dts = lastMatchedSample.dts;\n            } else {\n              result.logs.push({\n                level: 'warn',\n                message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n              });\n              break;\n            }\n            result.seiNals.push(seiNal);\n            break;\n        }\n      }\n      return result;\n    };\n    /**\n      * Parses out caption nals from an FMP4 segment's video tracks.\n      *\n      * @param {Uint8Array} segment - The bytes of a single segment\n      * @param {Number} videoTrackId - The trackId of a video track in the segment\n      * @return {Object.<Number, Object[]>} A mapping of video trackId to\n      *   a list of seiNals found in that track\n     **/\n\n    var parseCaptionNals = function (segment, videoTrackId) {\n      var captionNals = {};\n      var mdatTrafPairs = getMdatTrafPairs$1(segment);\n      mdatTrafPairs.forEach(function (pair) {\n        var mdat = pair.mdat;\n        var traf = pair.traf;\n        var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n        var headerInfo = parseTfhd(tfhd[0]);\n        var trackId = headerInfo.trackId;\n        var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n        var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n        var truns = findBox$1(traf, ['trun']);\n        var samples;\n        var result; // Only parse video data for the chosen video track\n\n        if (videoTrackId === trackId && truns.length > 0) {\n          samples = parseSamples$1(truns, baseMediaDecodeTime, headerInfo);\n          result = findSeiNals(mdat, samples, trackId);\n          if (!captionNals[trackId]) {\n            captionNals[trackId] = {\n              seiNals: [],\n              logs: []\n            };\n          }\n          captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n          captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n        }\n      });\n      return captionNals;\n    };\n    /**\n      * Parses out inband captions from an MP4 container and returns\n      * caption objects that can be used by WebVTT and the TextTrack API.\n      * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n      * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n      * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n      *\n      * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n      * @param {Number} trackId - The id of the video track to parse\n      * @param {Number} timescale - The timescale for the video track from the init segment\n      *\n      * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n      * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n      * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n      * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n      * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n      * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n      * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n     **/\n\n    var parseEmbeddedCaptions = function (segment, trackId, timescale) {\n      var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n      if (trackId === null) {\n        return null;\n      }\n      captionNals = parseCaptionNals(segment, trackId);\n      var trackNals = captionNals[trackId] || {};\n      return {\n        seiNals: trackNals.seiNals,\n        logs: trackNals.logs,\n        timescale: timescale\n      };\n    };\n    /**\n      * Converts SEI NALUs into captions that can be used by video.js\n     **/\n\n    var CaptionParser = function () {\n      var isInitialized = false;\n      var captionStream; // Stores segments seen before trackId and timescale are set\n\n      var segmentCache; // Stores video track ID of the track being parsed\n\n      var trackId; // Stores the timescale of the track being parsed\n\n      var timescale; // Stores captions parsed so far\n\n      var parsedCaptions; // Stores whether we are receiving partial data or not\n\n      var parsingPartial;\n      /**\n        * A method to indicate whether a CaptionParser has been initalized\n        * @returns {Boolean}\n       **/\n\n      this.isInitialized = function () {\n        return isInitialized;\n      };\n      /**\n        * Initializes the underlying CaptionStream, SEI NAL parsing\n        * and management, and caption collection\n       **/\n\n      this.init = function (options) {\n        captionStream = new CaptionStream();\n        isInitialized = true;\n        parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n        captionStream.on('data', function (event) {\n          // Convert to seconds in the source's timescale\n          event.startTime = event.startPts / timescale;\n          event.endTime = event.endPts / timescale;\n          parsedCaptions.captions.push(event);\n          parsedCaptions.captionStreams[event.stream] = true;\n        });\n        captionStream.on('log', function (log) {\n          parsedCaptions.logs.push(log);\n        });\n      };\n      /**\n        * Determines if a new video track will be selected\n        * or if the timescale changed\n        * @return {Boolean}\n       **/\n\n      this.isNewInit = function (videoTrackIds, timescales) {\n        if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n          return false;\n        }\n        return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n      };\n      /**\n        * Parses out SEI captions and interacts with underlying\n        * CaptionStream to return dispatched captions\n        *\n        * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n        * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n        * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\n        * @see parseEmbeddedCaptions\n        * @see m2ts/caption-stream.js\n       **/\n\n      this.parse = function (segment, videoTrackIds, timescales) {\n        var parsedData;\n        if (!this.isInitialized()) {\n          return null; // This is not likely to be a video segment\n        } else if (!videoTrackIds || !timescales) {\n          return null;\n        } else if (this.isNewInit(videoTrackIds, timescales)) {\n          // Use the first video track only as there is no\n          // mechanism to switch to other video tracks\n          trackId = videoTrackIds[0];\n          timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n          // data until we have one.\n          // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n        } else if (trackId === null || !timescale) {\n          segmentCache.push(segment);\n          return null;\n        } // Now that a timescale and trackId is set, parse cached segments\n\n        while (segmentCache.length > 0) {\n          var cachedSegment = segmentCache.shift();\n          this.parse(cachedSegment, videoTrackIds, timescales);\n        }\n        parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n        if (parsedData && parsedData.logs) {\n          parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n        }\n        if (parsedData === null || !parsedData.seiNals) {\n          if (parsedCaptions.logs.length) {\n            return {\n              logs: parsedCaptions.logs,\n              captions: [],\n              captionStreams: []\n            };\n          }\n          return null;\n        }\n        this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n        this.flushStream();\n        return parsedCaptions;\n      };\n      /**\n        * Pushes SEI NALUs onto CaptionStream\n        * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n        * Assumes that `parseCaptionNals` has been called first\n        * @see m2ts/caption-stream.js\n        **/\n\n      this.pushNals = function (nals) {\n        if (!this.isInitialized() || !nals || nals.length === 0) {\n          return null;\n        }\n        nals.forEach(function (nal) {\n          captionStream.push(nal);\n        });\n      };\n      /**\n        * Flushes underlying CaptionStream to dispatch processed, displayable captions\n        * @see m2ts/caption-stream.js\n       **/\n\n      this.flushStream = function () {\n        if (!this.isInitialized()) {\n          return null;\n        }\n        if (!parsingPartial) {\n          captionStream.flush();\n        } else {\n          captionStream.partialFlush();\n        }\n      };\n      /**\n        * Reset caption buckets for new data\n       **/\n\n      this.clearParsedCaptions = function () {\n        parsedCaptions.captions = [];\n        parsedCaptions.captionStreams = {};\n        parsedCaptions.logs = [];\n      };\n      /**\n        * Resets underlying CaptionStream\n        * @see m2ts/caption-stream.js\n       **/\n\n      this.resetCaptionStream = function () {\n        if (!this.isInitialized()) {\n          return null;\n        }\n        captionStream.reset();\n      };\n      /**\n        * Convenience method to clear all captions flushed from the\n        * CaptionStream and still being parsed\n        * @see m2ts/caption-stream.js\n       **/\n\n      this.clearAllCaptions = function () {\n        this.clearParsedCaptions();\n        this.resetCaptionStream();\n      };\n      /**\n        * Reset caption parser\n       **/\n\n      this.reset = function () {\n        segmentCache = [];\n        trackId = null;\n        timescale = null;\n        if (!parsedCaptions) {\n          parsedCaptions = {\n            captions: [],\n            // CC1, CC2, CC3, CC4\n            captionStreams: {},\n            logs: []\n          };\n        } else {\n          this.clearParsedCaptions();\n        }\n        this.resetCaptionStream();\n      };\n      this.reset();\n    };\n    var captionParser = CaptionParser;\n    const {\n      parseTfdt\n    } = mp4Inspector;\n    const findBox = findBox_1;\n    const {\n      getTimescaleFromMediaHeader\n    } = probe$2;\n    const {\n      parseSamples,\n      getMdatTrafPairs\n    } = samples;\n    /**\n     * Module for parsing WebVTT text and styles from FMP4 segments.\n     * Based on the ISO/IEC 14496-30.\n     */\n\n    const WebVttParser = function () {\n      // default timescale to 90k\n      let timescale = 90e3;\n      /**\n       * Parses the timescale from the init segment.\n       * @param {Array<Uint8Array>} segment The initialization segment to parse the timescale from.\n       */\n\n      this.init = function (segment) {\n        // We just need the timescale from the init segment.\n        const mdhd = findBox(segment, ['moov', 'trak', 'mdia', 'mdhd'])[0];\n        if (mdhd) {\n          timescale = getTimescaleFromMediaHeader(mdhd);\n        }\n      };\n      /**\n       * Parses a WebVTT FMP4 segment.\n       * @param {Array<Uint8Array>} segment The content segment to parse the WebVTT cues from.\n       * @returns The WebVTT cue text, styling, and timing info as an array of cue objects.\n       */\n\n      this.parseSegment = function (segment) {\n        const vttCues = [];\n        const mdatTrafPairs = getMdatTrafPairs(segment);\n        let baseMediaDecodeTime = 0;\n        mdatTrafPairs.forEach(function (pair) {\n          const mdatBox = pair.mdat;\n          const trafBox = pair.traf; // zero or one.\n\n          const tfdtBox = findBox(trafBox, ['tfdt'])[0]; // zero or one.\n\n          const tfhdBox = findBox(trafBox, ['tfhd'])[0]; // zero or more.\n\n          const trunBoxes = findBox(trafBox, ['trun']);\n          if (tfdtBox) {\n            const tfdt = parseTfdt(tfdtBox);\n            baseMediaDecodeTime = tfdt.baseMediaDecodeTime;\n          }\n          if (trunBoxes.length && tfhdBox) {\n            const samples = parseSamples(trunBoxes, baseMediaDecodeTime, tfhdBox);\n            let mdatOffset = 0;\n            samples.forEach(function (sample) {\n              // decode utf8 payload\n              const UTF_8 = 'utf-8';\n              const textDecoder = new TextDecoder(UTF_8); // extract sample data from the mdat box.\n              // WebVTT Sample format:\n              // Exactly one VTTEmptyCueBox box\n              // OR one or more VTTCueBox boxes.\n\n              const sampleData = mdatBox.slice(mdatOffset, mdatOffset + sample.size); // single vtte box.\n\n              const vtteBox = findBox(sampleData, ['vtte'])[0]; // empty box\n\n              if (vtteBox) {\n                mdatOffset += sample.size;\n                return;\n              } // TODO: Support 'vtta' boxes.\n              // VTTAdditionalTextBoxes can be interleaved between VTTCueBoxes.\n\n              const vttcBoxes = findBox(sampleData, ['vttc']);\n              vttcBoxes.forEach(function (vttcBox) {\n                // mandatory payload box.\n                const paylBox = findBox(vttcBox, ['payl'])[0]; // optional settings box\n\n                const sttgBox = findBox(vttcBox, ['sttg'])[0];\n                const start = sample.pts / timescale;\n                const end = (sample.pts + sample.duration) / timescale;\n                let cueText, settings; // contains cue text.\n\n                if (paylBox) {\n                  try {\n                    cueText = textDecoder.decode(paylBox);\n                  } catch (e) {\n                    console.error(e);\n                  }\n                } // settings box contains styling.\n\n                if (sttgBox) {\n                  try {\n                    settings = textDecoder.decode(sttgBox);\n                  } catch (e) {\n                    console.error(e);\n                  }\n                }\n                if (sample.duration && cueText) {\n                  vttCues.push({\n                    cueText,\n                    start,\n                    end,\n                    settings\n                  });\n                }\n              });\n              mdatOffset += sample.size;\n            });\n          }\n        });\n        return vttCues;\n      };\n    };\n    var webvttParser = WebVttParser;\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Utilities to detect basic properties and metadata about TS Segments.\n     */\n\n    var StreamTypes$1 = streamTypes;\n    var parsePid = function (packet) {\n      var pid = packet[1] & 0x1f;\n      pid <<= 8;\n      pid |= packet[2];\n      return pid;\n    };\n    var parsePayloadUnitStartIndicator = function (packet) {\n      return !!(packet[1] & 0x40);\n    };\n    var parseAdaptionField = function (packet) {\n      var offset = 0; // if an adaption field is present, its length is specified by the\n      // fifth byte of the TS packet header. The adaptation field is\n      // used to add stuffing to PES packets that don't fill a complete\n      // TS packet, and to specify some forms of timing and control data\n      // that we do not currently use.\n\n      if ((packet[3] & 0x30) >>> 4 > 0x01) {\n        offset += packet[4] + 1;\n      }\n      return offset;\n    };\n    var parseType = function (packet, pmtPid) {\n      var pid = parsePid(packet);\n      if (pid === 0) {\n        return 'pat';\n      } else if (pid === pmtPid) {\n        return 'pmt';\n      } else if (pmtPid) {\n        return 'pes';\n      }\n      return null;\n    };\n    var parsePat = function (packet) {\n      var pusi = parsePayloadUnitStartIndicator(packet);\n      var offset = 4 + parseAdaptionField(packet);\n      if (pusi) {\n        offset += packet[offset] + 1;\n      }\n      return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n    };\n    var parsePmt = function (packet) {\n      var programMapTable = {};\n      var pusi = parsePayloadUnitStartIndicator(packet);\n      var payloadOffset = 4 + parseAdaptionField(packet);\n      if (pusi) {\n        payloadOffset += packet[payloadOffset] + 1;\n      } // PMTs can be sent ahead of the time when they should actually\n      // take effect. We don't believe this should ever be the case\n      // for HLS but we'll ignore \"forward\" PMT declarations if we see\n      // them. Future PMT declarations have the current_next_indicator\n      // set to zero.\n\n      if (!(packet[payloadOffset + 5] & 0x01)) {\n        return;\n      }\n      var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n      sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n      tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n      // long the program info descriptors are\n\n      programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n      var offset = 12 + programInfoLength;\n      while (offset < tableEnd) {\n        var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n        programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n        // skip past the elementary stream descriptors, if present\n\n        offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n      }\n      return programMapTable;\n    };\n    var parsePesType = function (packet, programMapTable) {\n      var pid = parsePid(packet);\n      var type = programMapTable[pid];\n      switch (type) {\n        case StreamTypes$1.H264_STREAM_TYPE:\n          return 'video';\n        case StreamTypes$1.ADTS_STREAM_TYPE:\n          return 'audio';\n        case StreamTypes$1.METADATA_STREAM_TYPE:\n          return 'timed-metadata';\n        default:\n          return null;\n      }\n    };\n    var parsePesTime = function (packet) {\n      var pusi = parsePayloadUnitStartIndicator(packet);\n      if (!pusi) {\n        return null;\n      }\n      var offset = 4 + parseAdaptionField(packet);\n      if (offset >= packet.byteLength) {\n        // From the H 222.0 MPEG-TS spec\n        // \"For transport stream packets carrying PES packets, stuffing is needed when there\n        //  is insufficient PES packet data to completely fill the transport stream packet\n        //  payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n        //  the sum of the lengths of the data elements in it, so that the payload bytes\n        //  remaining after the adaptation field exactly accommodates the available PES packet\n        //  data.\"\n        //\n        // If the offset is >= the length of the packet, then the packet contains no data\n        // and instead is just adaption field stuffing bytes\n        return null;\n      }\n      var pes = null;\n      var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n      // and a DTS value. Determine what combination of values is\n      // available to work with.\n\n      ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\n      // performs all bitwise operations on 32-bit integers but javascript\n      // supports a much greater range (52-bits) of integer using standard\n      // mathematical operations.\n      // We construct a 31-bit value using bitwise operators over the 31\n      // most significant bits and then multiply by 4 (equal to a left-shift\n      // of 2) before we add the final 2 least significant bits of the\n      // timestamp (equal to an OR.)\n\n      if (ptsDtsFlags & 0xC0) {\n        pes = {}; // the PTS and DTS are not written out directly. For information\n        // on how they are encoded, see\n        // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n        pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n        pes.pts *= 4; // Left shift by 2\n\n        pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n        pes.dts = pes.pts;\n        if (ptsDtsFlags & 0x40) {\n          pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n          pes.dts *= 4; // Left shift by 2\n\n          pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n        }\n      }\n      return pes;\n    };\n    var parseNalUnitType = function (type) {\n      switch (type) {\n        case 0x05:\n          return 'slice_layer_without_partitioning_rbsp_idr';\n        case 0x06:\n          return 'sei_rbsp';\n        case 0x07:\n          return 'seq_parameter_set_rbsp';\n        case 0x08:\n          return 'pic_parameter_set_rbsp';\n        case 0x09:\n          return 'access_unit_delimiter_rbsp';\n        default:\n          return null;\n      }\n    };\n    var videoPacketContainsKeyFrame = function (packet) {\n      var offset = 4 + parseAdaptionField(packet);\n      var frameBuffer = packet.subarray(offset);\n      var frameI = 0;\n      var frameSyncPoint = 0;\n      var foundKeyFrame = false;\n      var nalType; // advance the sync point to a NAL start, if necessary\n\n      for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n        if (frameBuffer[frameSyncPoint + 2] === 1) {\n          // the sync point is properly aligned\n          frameI = frameSyncPoint + 5;\n          break;\n        }\n      }\n      while (frameI < frameBuffer.byteLength) {\n        // look at the current byte to determine if we've hit the end of\n        // a NAL unit boundary\n        switch (frameBuffer[frameI]) {\n          case 0:\n            // skip past non-sync sequences\n            if (frameBuffer[frameI - 1] !== 0) {\n              frameI += 2;\n              break;\n            } else if (frameBuffer[frameI - 2] !== 0) {\n              frameI++;\n              break;\n            }\n            if (frameSyncPoint + 3 !== frameI - 2) {\n              nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n              if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n                foundKeyFrame = true;\n              }\n            } // drop trailing zeroes\n\n            do {\n              frameI++;\n            } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n            frameSyncPoint = frameI - 2;\n            frameI += 3;\n            break;\n          case 1:\n            // skip past non-sync sequences\n            if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n              frameI += 3;\n              break;\n            }\n            nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n            if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n              foundKeyFrame = true;\n            }\n            frameSyncPoint = frameI - 2;\n            frameI += 3;\n            break;\n          default:\n            // the current byte isn't a one or zero, so it cannot be part\n            // of a sync sequence\n            frameI += 3;\n            break;\n        }\n      }\n      frameBuffer = frameBuffer.subarray(frameSyncPoint);\n      frameI -= frameSyncPoint;\n      frameSyncPoint = 0; // parse the final nal\n\n      if (frameBuffer && frameBuffer.byteLength > 3) {\n        nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n        if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n          foundKeyFrame = true;\n        }\n      }\n      return foundKeyFrame;\n    };\n    var probe$1 = {\n      parseType: parseType,\n      parsePat: parsePat,\n      parsePmt: parsePmt,\n      parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n      parsePesType: parsePesType,\n      parsePesTime: parsePesTime,\n      videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n    };\n    /**\n     * mux.js\n     *\n     * Copyright (c) Brightcove\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n     *\n     * Parse mpeg2 transport stream packets to extract basic timing information\n     */\n\n    var StreamTypes = streamTypes;\n    var handleRollover = timestampRolloverStream.handleRollover;\n    var probe = {};\n    probe.ts = probe$1;\n    probe.aac = utils;\n    var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n    var MP2T_PACKET_LENGTH = 188,\n      // bytes\n      SYNC_BYTE = 0x47;\n    /**\n     * walks through segment data looking for pat and pmt packets to parse out\n     * program map table information\n     */\n\n    var parsePsi_ = function (bytes, pmt) {\n      var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type;\n      while (endIndex < bytes.byteLength) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n          // We found a packet\n          packet = bytes.subarray(startIndex, endIndex);\n          type = probe.ts.parseType(packet, pmt.pid);\n          switch (type) {\n            case 'pat':\n              pmt.pid = probe.ts.parsePat(packet);\n              break;\n            case 'pmt':\n              var table = probe.ts.parsePmt(packet);\n              pmt.table = pmt.table || {};\n              Object.keys(table).forEach(function (key) {\n                pmt.table[key] = table[key];\n              });\n              break;\n          }\n          startIndex += MP2T_PACKET_LENGTH;\n          endIndex += MP2T_PACKET_LENGTH;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n        startIndex++;\n        endIndex++;\n      }\n    };\n    /**\n     * walks through the segment data from the start and end to get timing information\n     * for the first and last audio pes packets\n     */\n\n    var parseAudioPes_ = function (bytes, pmt, result) {\n      var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type,\n        pesType,\n        pusi,\n        parsed;\n      var endLoop = false; // Start walking from start of segment to get first audio packet\n\n      while (endIndex <= bytes.byteLength) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n          // We found a packet\n          packet = bytes.subarray(startIndex, endIndex);\n          type = probe.ts.parseType(packet, pmt.pid);\n          switch (type) {\n            case 'pes':\n              pesType = probe.ts.parsePesType(packet, pmt.table);\n              pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n              if (pesType === 'audio' && pusi) {\n                parsed = probe.ts.parsePesTime(packet);\n                if (parsed) {\n                  parsed.type = 'audio';\n                  result.audio.push(parsed);\n                  endLoop = true;\n                }\n              }\n              break;\n          }\n          if (endLoop) {\n            break;\n          }\n          startIndex += MP2T_PACKET_LENGTH;\n          endIndex += MP2T_PACKET_LENGTH;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n        startIndex++;\n        endIndex++;\n      } // Start walking from end of segment to get last audio packet\n\n      endIndex = bytes.byteLength;\n      startIndex = endIndex - MP2T_PACKET_LENGTH;\n      endLoop = false;\n      while (startIndex >= 0) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n          // We found a packet\n          packet = bytes.subarray(startIndex, endIndex);\n          type = probe.ts.parseType(packet, pmt.pid);\n          switch (type) {\n            case 'pes':\n              pesType = probe.ts.parsePesType(packet, pmt.table);\n              pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n              if (pesType === 'audio' && pusi) {\n                parsed = probe.ts.parsePesTime(packet);\n                if (parsed) {\n                  parsed.type = 'audio';\n                  result.audio.push(parsed);\n                  endLoop = true;\n                }\n              }\n              break;\n          }\n          if (endLoop) {\n            break;\n          }\n          startIndex -= MP2T_PACKET_LENGTH;\n          endIndex -= MP2T_PACKET_LENGTH;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n        startIndex--;\n        endIndex--;\n      }\n    };\n    /**\n     * walks through the segment data from the start and end to get timing information\n     * for the first and last video pes packets as well as timing information for the first\n     * key frame.\n     */\n\n    var parseVideoPes_ = function (bytes, pmt, result) {\n      var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH,\n        packet,\n        type,\n        pesType,\n        pusi,\n        parsed,\n        frame,\n        i,\n        pes;\n      var endLoop = false;\n      var currentFrame = {\n        data: [],\n        size: 0\n      }; // Start walking from start of segment to get first video packet\n\n      while (endIndex < bytes.byteLength) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n          // We found a packet\n          packet = bytes.subarray(startIndex, endIndex);\n          type = probe.ts.parseType(packet, pmt.pid);\n          switch (type) {\n            case 'pes':\n              pesType = probe.ts.parsePesType(packet, pmt.table);\n              pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n              if (pesType === 'video') {\n                if (pusi && !endLoop) {\n                  parsed = probe.ts.parsePesTime(packet);\n                  if (parsed) {\n                    parsed.type = 'video';\n                    result.video.push(parsed);\n                    endLoop = true;\n                  }\n                }\n                if (!result.firstKeyFrame) {\n                  if (pusi) {\n                    if (currentFrame.size !== 0) {\n                      frame = new Uint8Array(currentFrame.size);\n                      i = 0;\n                      while (currentFrame.data.length) {\n                        pes = currentFrame.data.shift();\n                        frame.set(pes, i);\n                        i += pes.byteLength;\n                      }\n                      if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n                        var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n                        // the keyframe seems to work fine with HLS playback\n                        // and definitely preferable to a crash with TypeError...\n\n                        if (firstKeyFrame) {\n                          result.firstKeyFrame = firstKeyFrame;\n                          result.firstKeyFrame.type = 'video';\n                        } else {\n                          // eslint-disable-next-line\n                          console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n                        }\n                      }\n                      currentFrame.size = 0;\n                    }\n                  }\n                  currentFrame.data.push(packet);\n                  currentFrame.size += packet.byteLength;\n                }\n              }\n              break;\n          }\n          if (endLoop && result.firstKeyFrame) {\n            break;\n          }\n          startIndex += MP2T_PACKET_LENGTH;\n          endIndex += MP2T_PACKET_LENGTH;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n        startIndex++;\n        endIndex++;\n      } // Start walking from end of segment to get last video packet\n\n      endIndex = bytes.byteLength;\n      startIndex = endIndex - MP2T_PACKET_LENGTH;\n      endLoop = false;\n      while (startIndex >= 0) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n          // We found a packet\n          packet = bytes.subarray(startIndex, endIndex);\n          type = probe.ts.parseType(packet, pmt.pid);\n          switch (type) {\n            case 'pes':\n              pesType = probe.ts.parsePesType(packet, pmt.table);\n              pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n              if (pesType === 'video' && pusi) {\n                parsed = probe.ts.parsePesTime(packet);\n                if (parsed) {\n                  parsed.type = 'video';\n                  result.video.push(parsed);\n                  endLoop = true;\n                }\n              }\n              break;\n          }\n          if (endLoop) {\n            break;\n          }\n          startIndex -= MP2T_PACKET_LENGTH;\n          endIndex -= MP2T_PACKET_LENGTH;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n        startIndex--;\n        endIndex--;\n      }\n    };\n    /**\n     * Adjusts the timestamp information for the segment to account for\n     * rollover and convert to seconds based on pes packet timescale (90khz clock)\n     */\n\n    var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n      if (segmentInfo.audio && segmentInfo.audio.length) {\n        var audioBaseTimestamp = baseTimestamp;\n        if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n          audioBaseTimestamp = segmentInfo.audio[0].dts;\n        }\n        segmentInfo.audio.forEach(function (info) {\n          info.dts = handleRollover(info.dts, audioBaseTimestamp);\n          info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n          info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n          info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n        });\n      }\n      if (segmentInfo.video && segmentInfo.video.length) {\n        var videoBaseTimestamp = baseTimestamp;\n        if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n          videoBaseTimestamp = segmentInfo.video[0].dts;\n        }\n        segmentInfo.video.forEach(function (info) {\n          info.dts = handleRollover(info.dts, videoBaseTimestamp);\n          info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n          info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n          info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n        });\n        if (segmentInfo.firstKeyFrame) {\n          var frame = segmentInfo.firstKeyFrame;\n          frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n          frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n          frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n          frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n        }\n      }\n    };\n    /**\n     * inspects the aac data stream for start and end time information\n     */\n\n    var inspectAac_ = function (bytes) {\n      var endLoop = false,\n        audioCount = 0,\n        sampleRate = null,\n        timestamp = null,\n        frameSize = 0,\n        byteIndex = 0,\n        packet;\n      while (bytes.length - byteIndex >= 3) {\n        var type = probe.aac.parseType(bytes, byteIndex);\n        switch (type) {\n          case 'timed-metadata':\n            // Exit early because we don't have enough to parse\n            // the ID3 tag header\n            if (bytes.length - byteIndex < 10) {\n              endLoop = true;\n              break;\n            }\n            frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n            // to emit a full packet\n\n            if (frameSize > bytes.length) {\n              endLoop = true;\n              break;\n            }\n            if (timestamp === null) {\n              packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n              timestamp = probe.aac.parseAacTimestamp(packet);\n            }\n            byteIndex += frameSize;\n            break;\n          case 'audio':\n            // Exit early because we don't have enough to parse\n            // the ADTS frame header\n            if (bytes.length - byteIndex < 7) {\n              endLoop = true;\n              break;\n            }\n            frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n            // to emit a full packet\n\n            if (frameSize > bytes.length) {\n              endLoop = true;\n              break;\n            }\n            if (sampleRate === null) {\n              packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n              sampleRate = probe.aac.parseSampleRate(packet);\n            }\n            audioCount++;\n            byteIndex += frameSize;\n            break;\n          default:\n            byteIndex++;\n            break;\n        }\n        if (endLoop) {\n          return null;\n        }\n      }\n      if (sampleRate === null || timestamp === null) {\n        return null;\n      }\n      var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n      var result = {\n        audio: [{\n          type: 'audio',\n          dts: timestamp,\n          pts: timestamp\n        }, {\n          type: 'audio',\n          dts: timestamp + audioCount * 1024 * audioTimescale,\n          pts: timestamp + audioCount * 1024 * audioTimescale\n        }]\n      };\n      return result;\n    };\n    /**\n     * inspects the transport stream segment data for start and end time information\n     * of the audio and video tracks (when present) as well as the first key frame's\n     * start time.\n     */\n\n    var inspectTs_ = function (bytes) {\n      var pmt = {\n        pid: null,\n        table: null\n      };\n      var result = {};\n      parsePsi_(bytes, pmt);\n      for (var pid in pmt.table) {\n        if (pmt.table.hasOwnProperty(pid)) {\n          var type = pmt.table[pid];\n          switch (type) {\n            case StreamTypes.H264_STREAM_TYPE:\n              result.video = [];\n              parseVideoPes_(bytes, pmt, result);\n              if (result.video.length === 0) {\n                delete result.video;\n              }\n              break;\n            case StreamTypes.ADTS_STREAM_TYPE:\n              result.audio = [];\n              parseAudioPes_(bytes, pmt, result);\n              if (result.audio.length === 0) {\n                delete result.audio;\n              }\n              break;\n          }\n        }\n      }\n      return result;\n    };\n    /**\n     * Inspects segment byte data and returns an object with start and end timing information\n     *\n     * @param {Uint8Array} bytes The segment byte data\n     * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n     *  timestamps for rollover. This value must be in 90khz clock.\n     * @return {Object} Object containing start and end frame timing info of segment.\n     */\n\n    var inspect = function (bytes, baseTimestamp) {\n      var isAacData = probe.aac.isLikelyAacData(bytes);\n      var result;\n      if (isAacData) {\n        result = inspectAac_(bytes);\n      } else {\n        result = inspectTs_(bytes);\n      }\n      if (!result || !result.audio && !result.video) {\n        return null;\n      }\n      adjustTimestamp_(result, baseTimestamp);\n      return result;\n    };\n    var tsInspector = {\n      inspect: inspect,\n      parseAudioPes_: parseAudioPes_\n    };\n    /* global self */\n\n    /**\n     * Re-emits transmuxer events by converting them into messages to the\n     * world outside the worker.\n     *\n     * @param {Object} transmuxer the transmuxer to wire events on\n     * @private\n     */\n\n    const wireTransmuxerEvents = function (self, transmuxer) {\n      transmuxer.on('data', function (segment) {\n        // transfer ownership of the underlying ArrayBuffer\n        // instead of doing a copy to save memory\n        // ArrayBuffers are transferable but generic TypedArrays are not\n        // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n        const initArray = segment.initSegment;\n        segment.initSegment = {\n          data: initArray.buffer,\n          byteOffset: initArray.byteOffset,\n          byteLength: initArray.byteLength\n        };\n        const typedArray = segment.data;\n        segment.data = typedArray.buffer;\n        self.postMessage({\n          action: 'data',\n          segment,\n          byteOffset: typedArray.byteOffset,\n          byteLength: typedArray.byteLength\n        }, [segment.data]);\n      });\n      transmuxer.on('done', function (data) {\n        self.postMessage({\n          action: 'done'\n        });\n      });\n      transmuxer.on('gopInfo', function (gopInfo) {\n        self.postMessage({\n          action: 'gopInfo',\n          gopInfo\n        });\n      });\n      transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n        const videoSegmentTimingInfo = {\n          start: {\n            decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n            presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n          },\n          end: {\n            decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n            presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n          },\n          baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n        };\n        if (timingInfo.prependedContentDuration) {\n          videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n        }\n        self.postMessage({\n          action: 'videoSegmentTimingInfo',\n          videoSegmentTimingInfo\n        });\n      });\n      transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n        // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n        const audioSegmentTimingInfo = {\n          start: {\n            decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n            presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n          },\n          end: {\n            decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n            presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n          },\n          baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n        };\n        if (timingInfo.prependedContentDuration) {\n          audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n        }\n        self.postMessage({\n          action: 'audioSegmentTimingInfo',\n          audioSegmentTimingInfo\n        });\n      });\n      transmuxer.on('id3Frame', function (id3Frame) {\n        self.postMessage({\n          action: 'id3Frame',\n          id3Frame\n        });\n      });\n      transmuxer.on('caption', function (caption) {\n        self.postMessage({\n          action: 'caption',\n          caption\n        });\n      });\n      transmuxer.on('trackinfo', function (trackInfo) {\n        self.postMessage({\n          action: 'trackinfo',\n          trackInfo\n        });\n      });\n      transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n        // convert to video TS since we prioritize video time over audio\n        self.postMessage({\n          action: 'audioTimingInfo',\n          audioTimingInfo: {\n            start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n            end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n          }\n        });\n      });\n      transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n        self.postMessage({\n          action: 'videoTimingInfo',\n          videoTimingInfo: {\n            start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n            end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n          }\n        });\n      });\n      transmuxer.on('log', function (log) {\n        self.postMessage({\n          action: 'log',\n          log\n        });\n      });\n    };\n    /**\n     * All incoming messages route through this hash. If no function exists\n     * to handle an incoming message, then we ignore the message.\n     *\n     * @class MessageHandlers\n     * @param {Object} options the options to initialize with\n     */\n\n    class MessageHandlers {\n      constructor(self, options) {\n        this.options = options || {};\n        this.self = self;\n        this.init();\n      }\n      /**\n       * initialize our web worker and wire all the events.\n       */\n\n      init() {\n        if (this.transmuxer) {\n          this.transmuxer.dispose();\n        }\n        this.transmuxer = new transmuxer.Transmuxer(this.options);\n        wireTransmuxerEvents(this.self, this.transmuxer);\n      }\n      pushMp4Captions(data) {\n        if (!this.captionParser) {\n          this.captionParser = new captionParser();\n          this.captionParser.init();\n        }\n        const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n        const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n        this.self.postMessage({\n          action: 'mp4Captions',\n          captions: parsed && parsed.captions || [],\n          logs: parsed && parsed.logs || [],\n          data: segment.buffer\n        }, [segment.buffer]);\n      }\n      /**\n       * Initializes the WebVttParser and passes the init segment.\n       *\n       * @param {Uint8Array} data mp4 boxed WebVTT init segment data\n       */\n\n      initMp4WebVttParser(data) {\n        if (!this.webVttParser) {\n          this.webVttParser = new webvttParser();\n        }\n        const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength); // Set the timescale for the parser.\n        // This can be called repeatedly in order to set and re-set the timescale.\n\n        this.webVttParser.init(segment);\n      }\n      /**\n       * Parse an mp4 encapsulated WebVTT segment and return an array of cues.\n       *\n       * @param {Uint8Array} data a text/webvtt segment\n       * @return {Object[]} an array of parsed cue objects\n       */\n\n      getMp4WebVttText(data) {\n        if (!this.webVttParser) {\n          // timescale might not be set yet if the parser is created before an init segment is passed.\n          // default timescale is 90k.\n          this.webVttParser = new webvttParser();\n        }\n        const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n        const parsed = this.webVttParser.parseSegment(segment);\n        this.self.postMessage({\n          action: 'getMp4WebVttText',\n          mp4VttCues: parsed || [],\n          data: segment.buffer\n        }, [segment.buffer]);\n      }\n      probeMp4StartTime({\n        timescales,\n        data\n      }) {\n        const startTime = probe$2.startTime(timescales, data);\n        this.self.postMessage({\n          action: 'probeMp4StartTime',\n          startTime,\n          data\n        }, [data.buffer]);\n      }\n      probeMp4Tracks({\n        data\n      }) {\n        const tracks = probe$2.tracks(data);\n        this.self.postMessage({\n          action: 'probeMp4Tracks',\n          tracks,\n          data\n        }, [data.buffer]);\n      }\n      /**\n       * Probes an mp4 segment for EMSG boxes containing ID3 data.\n       * https://aomediacodec.github.io/id3-emsg/\n       *\n       * @param {Uint8Array} data segment data\n       * @param {number} offset segment start time\n       * @return {Object[]} an array of ID3 frames\n       */\n\n      probeEmsgID3({\n        data,\n        offset\n      }) {\n        const id3Frames = probe$2.getEmsgID3(data, offset);\n        this.self.postMessage({\n          action: 'probeEmsgID3',\n          id3Frames,\n          emsgData: data\n        }, [data.buffer]);\n      }\n      /**\n       * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n       * internal \"media time,\" as well as whether it contains video and/or audio.\n       *\n       * @private\n       * @param {Uint8Array} bytes - segment bytes\n       * @param {number} baseStartTime\n       *        Relative reference timestamp used when adjusting frame timestamps for rollover.\n       *        This value should be in seconds, as it's converted to a 90khz clock within the\n       *        function body.\n       * @return {Object} The start time of the current segment in \"media time\" as well as\n       *                  whether it contains video and/or audio\n       */\n\n      probeTs({\n        data,\n        baseStartTime\n      }) {\n        const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n        const timeInfo = tsInspector.inspect(data, tsStartTime);\n        let result = null;\n        if (timeInfo) {\n          result = {\n            // each type's time info comes back as an array of 2 times, start and end\n            hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n            hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n          };\n          if (result.hasVideo) {\n            result.videoStart = timeInfo.video[0].ptsTime;\n          }\n          if (result.hasAudio) {\n            result.audioStart = timeInfo.audio[0].ptsTime;\n          }\n        }\n        this.self.postMessage({\n          action: 'probeTs',\n          result,\n          data\n        }, [data.buffer]);\n      }\n      clearAllMp4Captions() {\n        if (this.captionParser) {\n          this.captionParser.clearAllCaptions();\n        }\n      }\n      clearParsedMp4Captions() {\n        if (this.captionParser) {\n          this.captionParser.clearParsedCaptions();\n        }\n      }\n      /**\n       * Adds data (a ts segment) to the start of the transmuxer pipeline for\n       * processing.\n       *\n       * @param {ArrayBuffer} data data to push into the muxer\n       */\n\n      push(data) {\n        // Cast array buffer to correct type for transmuxer\n        const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n        this.transmuxer.push(segment);\n      }\n      /**\n       * Recreate the transmuxer so that the next segment added via `push`\n       * start with a fresh transmuxer.\n       */\n\n      reset() {\n        this.transmuxer.reset();\n      }\n      /**\n       * Set the value that will be used as the `baseMediaDecodeTime` time for the\n       * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n       * set relative to the first based on the PTS values.\n       *\n       * @param {Object} data used to set the timestamp offset in the muxer\n       */\n\n      setTimestampOffset(data) {\n        const timestampOffset = data.timestampOffset || 0;\n        this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n      }\n      setAudioAppendStart(data) {\n        this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n      }\n      setRemux(data) {\n        this.transmuxer.setRemux(data.remux);\n      }\n      /**\n       * Forces the pipeline to finish processing the last segment and emit it's\n       * results.\n       *\n       * @param {Object} data event data, not really used\n       */\n\n      flush(data) {\n        this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n        self.postMessage({\n          action: 'done',\n          type: 'transmuxed'\n        });\n      }\n      endTimeline() {\n        this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n        // timelines\n\n        self.postMessage({\n          action: 'endedtimeline',\n          type: 'transmuxed'\n        });\n      }\n      alignGopsWith(data) {\n        this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n      }\n    }\n    /**\n     * Our web worker interface so that things can talk to mux.js\n     * that will be running in a web worker. the scope is passed to this by\n     * webworkify.\n     *\n     * @param {Object} self the scope for the web worker\n     */\n\n    self.onmessage = function (event) {\n      if (event.data.action === 'init' && event.data.options) {\n        this.messageHandlers = new MessageHandlers(self, event.data.options);\n        return;\n      }\n      if (!this.messageHandlers) {\n        this.messageHandlers = new MessageHandlers(self);\n      }\n      if (event.data && event.data.action && event.data.action !== 'init') {\n        if (this.messageHandlers[event.data.action]) {\n          this.messageHandlers[event.data.action](event.data);\n        }\n      }\n    };\n  }));\n  var TransmuxWorker = factory(workerCode$1);\n  /* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\n  const handleData_ = (event, transmuxedData, callback) => {\n    const {\n      type,\n      initSegment,\n      captions,\n      captionStreams,\n      metadata,\n      videoFrameDtsTime,\n      videoFramePtsTime\n    } = event.data.segment;\n    transmuxedData.buffer.push({\n      captions,\n      captionStreams,\n      metadata\n    });\n    const boxes = event.data.segment.boxes || {\n      data: event.data.segment.data\n    };\n    const result = {\n      type,\n      // cast ArrayBuffer to TypedArray\n      data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n      initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n    };\n    if (typeof videoFrameDtsTime !== 'undefined') {\n      result.videoFrameDtsTime = videoFrameDtsTime;\n    }\n    if (typeof videoFramePtsTime !== 'undefined') {\n      result.videoFramePtsTime = videoFramePtsTime;\n    }\n    callback(result);\n  };\n  const handleDone_ = ({\n    transmuxedData,\n    callback\n  }) => {\n    // Previously we only returned data on data events,\n    // not on done events. Clear out the buffer to keep that consistent.\n    transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n    // have received\n\n    callback(transmuxedData);\n  };\n  const handleGopInfo_ = (event, transmuxedData) => {\n    transmuxedData.gopInfo = event.data.gopInfo;\n  };\n  const processTransmux = options => {\n    const {\n      transmuxer,\n      bytes,\n      audioAppendStart,\n      gopsToAlignWith,\n      remux,\n      onData,\n      onTrackInfo,\n      onAudioTimingInfo,\n      onVideoTimingInfo,\n      onVideoSegmentTimingInfo,\n      onAudioSegmentTimingInfo,\n      onId3,\n      onCaptions,\n      onDone,\n      onEndedTimeline,\n      onTransmuxerLog,\n      isEndOfTimeline,\n      segment,\n      triggerSegmentEventFn\n    } = options;\n    const transmuxedData = {\n      buffer: []\n    };\n    let waitForEndedTimelineEvent = isEndOfTimeline;\n    const handleMessage = event => {\n      if (transmuxer.currentTransmux !== options) {\n        // disposed\n        return;\n      }\n      if (event.data.action === 'data') {\n        handleData_(event, transmuxedData, onData);\n      }\n      if (event.data.action === 'trackinfo') {\n        onTrackInfo(event.data.trackInfo);\n      }\n      if (event.data.action === 'gopInfo') {\n        handleGopInfo_(event, transmuxedData);\n      }\n      if (event.data.action === 'audioTimingInfo') {\n        onAudioTimingInfo(event.data.audioTimingInfo);\n      }\n      if (event.data.action === 'videoTimingInfo') {\n        onVideoTimingInfo(event.data.videoTimingInfo);\n      }\n      if (event.data.action === 'videoSegmentTimingInfo') {\n        onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n      }\n      if (event.data.action === 'audioSegmentTimingInfo') {\n        onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n      }\n      if (event.data.action === 'id3Frame') {\n        onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n      }\n      if (event.data.action === 'caption') {\n        onCaptions(event.data.caption);\n      }\n      if (event.data.action === 'endedtimeline') {\n        waitForEndedTimelineEvent = false;\n        onEndedTimeline();\n      }\n      if (event.data.action === 'log') {\n        onTransmuxerLog(event.data.log);\n      } // wait for the transmuxed event since we may have audio and video\n\n      if (event.data.type !== 'transmuxed') {\n        return;\n      } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n      // of a timeline, that means there may still be data events before the segment\n      // processing can be considerred complete. In that case, the final event should be\n      // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n      if (waitForEndedTimelineEvent) {\n        return;\n      }\n      transmuxer.onmessage = null;\n      handleDone_({\n        transmuxedData,\n        callback: onDone\n      });\n      /* eslint-disable no-use-before-define */\n\n      dequeue(transmuxer);\n      /* eslint-enable */\n    };\n    const handleError = () => {\n      const error = {\n        message: 'Received an error message from the transmuxer worker',\n        metadata: {\n          errorType: videojs.Error.StreamingFailedToTransmuxSegment,\n          segmentInfo: segmentInfoPayload({\n            segment\n          })\n        }\n      };\n      onDone(null, error);\n    };\n    transmuxer.onmessage = handleMessage;\n    transmuxer.onerror = handleError;\n    if (audioAppendStart) {\n      transmuxer.postMessage({\n        action: 'setAudioAppendStart',\n        appendStart: audioAppendStart\n      });\n    } // allow empty arrays to be passed to clear out GOPs\n\n    if (Array.isArray(gopsToAlignWith)) {\n      transmuxer.postMessage({\n        action: 'alignGopsWith',\n        gopsToAlignWith\n      });\n    }\n    if (typeof remux !== 'undefined') {\n      transmuxer.postMessage({\n        action: 'setRemux',\n        remux\n      });\n    }\n    if (bytes.byteLength) {\n      const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n      const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingstart',\n        segment\n      });\n      transmuxer.postMessage({\n        action: 'push',\n        // Send the typed-array of data as an ArrayBuffer so that\n        // it can be sent as a \"Transferable\" and avoid the costly\n        // memory copy\n        data: buffer,\n        // To recreate the original typed-array, we need information\n        // about what portion of the ArrayBuffer it was a view into\n        byteOffset,\n        byteLength: bytes.byteLength\n      }, [buffer]);\n    }\n    if (isEndOfTimeline) {\n      transmuxer.postMessage({\n        action: 'endTimeline'\n      });\n    } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n    // the end of the segment\n\n    transmuxer.postMessage({\n      action: 'flush'\n    });\n  };\n  const dequeue = transmuxer => {\n    transmuxer.currentTransmux = null;\n    if (transmuxer.transmuxQueue.length) {\n      transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n      if (typeof transmuxer.currentTransmux === 'function') {\n        transmuxer.currentTransmux();\n      } else {\n        processTransmux(transmuxer.currentTransmux);\n      }\n    }\n  };\n  const processAction = (transmuxer, action) => {\n    transmuxer.postMessage({\n      action\n    });\n    dequeue(transmuxer);\n  };\n  const enqueueAction = (action, transmuxer) => {\n    if (!transmuxer.currentTransmux) {\n      transmuxer.currentTransmux = action;\n      processAction(transmuxer, action);\n      return;\n    }\n    transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n  };\n  const reset = transmuxer => {\n    enqueueAction('reset', transmuxer);\n  };\n  const endTimeline = transmuxer => {\n    enqueueAction('endTimeline', transmuxer);\n  };\n  const transmux = options => {\n    if (!options.transmuxer.currentTransmux) {\n      options.transmuxer.currentTransmux = options;\n      processTransmux(options);\n      return;\n    }\n    options.transmuxer.transmuxQueue.push(options);\n  };\n  const createTransmuxer = options => {\n    const transmuxer = new TransmuxWorker();\n    transmuxer.currentTransmux = null;\n    transmuxer.transmuxQueue = [];\n    const term = transmuxer.terminate;\n    transmuxer.terminate = () => {\n      transmuxer.currentTransmux = null;\n      transmuxer.transmuxQueue.length = 0;\n      return term.call(transmuxer);\n    };\n    transmuxer.postMessage({\n      action: 'init',\n      options\n    });\n    return transmuxer;\n  };\n  var segmentTransmuxer = {\n    reset,\n    endTimeline,\n    transmux,\n    createTransmuxer\n  };\n  const workerCallback = function (options) {\n    const transmuxer = options.transmuxer;\n    const endAction = options.endAction || options.action;\n    const callback = options.callback;\n    const message = _extends$1({}, options, {\n      endAction: null,\n      transmuxer: null,\n      callback: null\n    });\n    const listenForEndEvent = event => {\n      if (event.data.action !== endAction) {\n        return;\n      }\n      transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n      if (event.data.data) {\n        event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n        if (options.data) {\n          options.data = event.data.data;\n        }\n      }\n      callback(event.data);\n    };\n    transmuxer.addEventListener('message', listenForEndEvent);\n    if (options.data) {\n      const isArrayBuffer = options.data instanceof ArrayBuffer;\n      message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n      message.byteLength = options.data.byteLength;\n      const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n      transmuxer.postMessage(message, transfers);\n    } else {\n      transmuxer.postMessage(message);\n    }\n  };\n  const REQUEST_ERRORS = {\n    FAILURE: 2,\n    TIMEOUT: -101,\n    ABORTED: -102\n  };\n  const WEB_VTT_CODEC = 'wvtt';\n  /**\n   * Abort all requests\n   *\n   * @param {Object} activeXhrs - an object that tracks all XHR requests\n   */\n\n  const abortAll = activeXhrs => {\n    activeXhrs.forEach(xhr => {\n      xhr.abort();\n    });\n  };\n  /**\n   * Gather important bandwidth stats once a request has completed\n   *\n   * @param {Object} request - the XHR request from which to gather stats\n   */\n\n  const getRequestStats = request => {\n    return {\n      bandwidth: request.bandwidth,\n      bytesReceived: request.bytesReceived || 0,\n      roundTripTime: request.roundTripTime || 0\n    };\n  };\n  /**\n   * If possible gather bandwidth stats as a request is in\n   * progress\n   *\n   * @param {Event} progressEvent - an event object from an XHR's progress event\n   */\n\n  const getProgressStats = progressEvent => {\n    const request = progressEvent.target;\n    const roundTripTime = Date.now() - request.requestTime;\n    const stats = {\n      bandwidth: Infinity,\n      bytesReceived: 0,\n      roundTripTime: roundTripTime || 0\n    };\n    stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n    // because we should only use bandwidth stats on progress to determine when\n    // abort a request early due to insufficient bandwidth\n\n    stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n    return stats;\n  };\n  /**\n   * Handle all error conditions in one place and return an object\n   * with all the information\n   *\n   * @param {Error|null} error - if non-null signals an error occured with the XHR\n   * @param {Object} request -  the XHR request that possibly generated the error\n   */\n\n  const handleErrors = (error, request) => {\n    const {\n      requestType\n    } = request;\n    const metadata = getStreamingNetworkErrorMetadata({\n      requestType,\n      request,\n      error\n    });\n    if (request.timedout) {\n      return {\n        status: request.status,\n        message: 'HLS request timed-out at URL: ' + request.uri,\n        code: REQUEST_ERRORS.TIMEOUT,\n        xhr: request,\n        metadata\n      };\n    }\n    if (request.aborted) {\n      return {\n        status: request.status,\n        message: 'HLS request aborted at URL: ' + request.uri,\n        code: REQUEST_ERRORS.ABORTED,\n        xhr: request,\n        metadata\n      };\n    }\n    if (error) {\n      return {\n        status: request.status,\n        message: 'HLS request errored at URL: ' + request.uri,\n        code: REQUEST_ERRORS.FAILURE,\n        xhr: request,\n        metadata\n      };\n    }\n    if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n      return {\n        status: request.status,\n        message: 'Empty HLS response at URL: ' + request.uri,\n        code: REQUEST_ERRORS.FAILURE,\n        xhr: request,\n        metadata\n      };\n    }\n    return null;\n  };\n  /**\n   * Handle responses for key data and convert the key data to the correct format\n   * for the decryption step later\n   *\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   * @param {Array} objects - objects to add the key bytes to.\n   * @param {Function} finishProcessingFn - a callback to execute to continue processing\n   *                                        this request\n   */\n\n  const handleKeyResponse = (segment, objects, finishProcessingFn, triggerSegmentEventFn) => (error, request) => {\n    const response = request.response;\n    const errorObj = handleErrors(error, request);\n    if (errorObj) {\n      return finishProcessingFn(errorObj, segment);\n    }\n    if (response.byteLength !== 16) {\n      return finishProcessingFn({\n        status: request.status,\n        message: 'Invalid HLS key at URL: ' + request.uri,\n        code: REQUEST_ERRORS.FAILURE,\n        xhr: request\n      }, segment);\n    }\n    const view = new DataView(response);\n    const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n    for (let i = 0; i < objects.length; i++) {\n      objects[i].bytes = bytes;\n    }\n    const keyInfo = {\n      uri: request.uri\n    };\n    triggerSegmentEventFn({\n      type: 'segmentkeyloadcomplete',\n      segment,\n      keyInfo\n    });\n    return finishProcessingFn(null, segment);\n  };\n  /**\n   * Processes an mp4 init segment depending on the codec through the transmuxer.\n   *\n   * @param {Object} segment init segment to process\n   * @param {string} codec the codec of the text segments\n   */\n\n  const initMp4Text = (segment, codec) => {\n    if (codec === WEB_VTT_CODEC) {\n      segment.transmuxer.postMessage({\n        action: 'initMp4WebVttParser',\n        data: segment.map.bytes\n      });\n    }\n  };\n  /**\n   * Parses an mp4 text segment with the transmuxer and calls the doneFn from\n   * the segment loader.\n   *\n   * @param {Object} segment the text segment to parse\n   * @param {string} codec the codec of the text segment\n   * @param {Function} doneFn the doneFn passed from the segment loader\n   */\n\n  const parseMp4TextSegment = (segment, codec, doneFn) => {\n    if (codec === WEB_VTT_CODEC) {\n      workerCallback({\n        action: 'getMp4WebVttText',\n        data: segment.bytes,\n        transmuxer: segment.transmuxer,\n        callback: ({\n          data,\n          mp4VttCues\n        }) => {\n          segment.bytes = data;\n          doneFn(null, segment, {\n            mp4VttCues\n          });\n        }\n      });\n    }\n  };\n  const parseInitSegment = (segment, callback) => {\n    const type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n    // only know how to parse mp4 init segments at the moment\n\n    if (type !== 'mp4') {\n      const uri = segment.map.resolvedUri || segment.map.uri;\n      const mediaType = type || 'unknown';\n      return callback({\n        internal: true,\n        message: `Found unsupported ${mediaType} container for initialization segment at URL: ${uri}`,\n        code: REQUEST_ERRORS.FAILURE,\n        metadata: {\n          mediaType\n        }\n      });\n    }\n    workerCallback({\n      action: 'probeMp4Tracks',\n      data: segment.map.bytes,\n      transmuxer: segment.transmuxer,\n      callback: ({\n        tracks,\n        data\n      }) => {\n        // transfer bytes back to us\n        segment.map.bytes = data;\n        tracks.forEach(function (track) {\n          segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n          if (segment.map.tracks[track.type]) {\n            return;\n          }\n          segment.map.tracks[track.type] = track;\n          if (typeof track.id === 'number' && track.timescale) {\n            segment.map.timescales = segment.map.timescales || {};\n            segment.map.timescales[track.id] = track.timescale;\n          }\n          if (track.type === 'text') {\n            initMp4Text(segment, track.codec);\n          }\n        });\n        return callback(null);\n      }\n    });\n  };\n  /**\n   * Handle init-segment responses\n   *\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   * @param {Function} finishProcessingFn - a callback to execute to continue processing\n   *                                        this request\n   */\n\n  const handleInitSegmentResponse = ({\n    segment,\n    finishProcessingFn,\n    triggerSegmentEventFn\n  }) => (error, request) => {\n    const errorObj = handleErrors(error, request);\n    if (errorObj) {\n      return finishProcessingFn(errorObj, segment);\n    }\n    const bytes = new Uint8Array(request.response);\n    triggerSegmentEventFn({\n      type: 'segmentloaded',\n      segment\n    }); // init segment is encypted, we will have to wait\n    // until the key request is done to decrypt.\n\n    if (segment.map.key) {\n      segment.map.encryptedBytes = bytes;\n      return finishProcessingFn(null, segment);\n    }\n    segment.map.bytes = bytes;\n    parseInitSegment(segment, function (parseError) {\n      if (parseError) {\n        parseError.xhr = request;\n        parseError.status = request.status;\n        return finishProcessingFn(parseError, segment);\n      }\n      finishProcessingFn(null, segment);\n    });\n  };\n  /**\n   * Response handler for segment-requests being sure to set the correct\n   * property depending on whether the segment is encryped or not\n   * Also records and keeps track of stats that are used for ABR purposes\n   *\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   * @param {Function} finishProcessingFn - a callback to execute to continue processing\n   *                                        this request\n   */\n\n  const handleSegmentResponse = ({\n    segment,\n    finishProcessingFn,\n    responseType,\n    triggerSegmentEventFn\n  }) => (error, request) => {\n    const errorObj = handleErrors(error, request);\n    if (errorObj) {\n      return finishProcessingFn(errorObj, segment);\n    }\n    triggerSegmentEventFn({\n      type: 'segmentloaded',\n      segment\n    });\n    const newBytes =\n    // although responseText \"should\" exist, this guard serves to prevent an error being\n    // thrown for two primary cases:\n    // 1. the mime type override stops working, or is not implemented for a specific\n    //    browser\n    // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n    responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n    segment.stats = getRequestStats(request);\n    if (segment.key) {\n      segment.encryptedBytes = new Uint8Array(newBytes);\n    } else {\n      segment.bytes = new Uint8Array(newBytes);\n    }\n    return finishProcessingFn(null, segment);\n  };\n  const transmuxAndNotify = ({\n    segment,\n    bytes,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }) => {\n    const fmp4Tracks = segment.map && segment.map.tracks || {};\n    const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n    // One reason for this is that in the case of full segments, we want to trust start\n    // times from the probe, rather than the transmuxer.\n\n    let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n    const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n    let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n    const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n    const finish = () => transmux({\n      bytes,\n      transmuxer: segment.transmuxer,\n      audioAppendStart: segment.audioAppendStart,\n      gopsToAlignWith: segment.gopsToAlignWith,\n      remux: isMuxed,\n      onData: result => {\n        result.type = result.type === 'combined' ? 'video' : result.type;\n        dataFn(segment, result);\n      },\n      onTrackInfo: trackInfo => {\n        if (trackInfoFn) {\n          if (isMuxed) {\n            trackInfo.isMuxed = true;\n          }\n          trackInfoFn(segment, trackInfo);\n        }\n      },\n      onAudioTimingInfo: audioTimingInfo => {\n        // we only want the first start value we encounter\n        if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n          audioStartFn(audioTimingInfo.start);\n          audioStartFn = null;\n        } // we want to continually update the end time\n\n        if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n          audioEndFn(audioTimingInfo.end);\n        }\n      },\n      onVideoTimingInfo: videoTimingInfo => {\n        // we only want the first start value we encounter\n        if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n          videoStartFn(videoTimingInfo.start);\n          videoStartFn = null;\n        } // we want to continually update the end time\n\n        if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n          videoEndFn(videoTimingInfo.end);\n        }\n      },\n      onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n        const timingInfo = {\n          pts: {\n            start: videoSegmentTimingInfo.start.presentation,\n            end: videoSegmentTimingInfo.end.presentation\n          },\n          dts: {\n            start: videoSegmentTimingInfo.start.decode,\n            end: videoSegmentTimingInfo.end.decode\n          }\n        };\n        triggerSegmentEventFn({\n          type: 'segmenttransmuxingtiminginfoavailable',\n          segment,\n          timingInfo\n        });\n        videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n      },\n      onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n        const timingInfo = {\n          pts: {\n            start: audioSegmentTimingInfo.start.pts,\n            end: audioSegmentTimingInfo.end.pts\n          },\n          dts: {\n            start: audioSegmentTimingInfo.start.dts,\n            end: audioSegmentTimingInfo.end.dts\n          }\n        };\n        triggerSegmentEventFn({\n          type: 'segmenttransmuxingtiminginfoavailable',\n          segment,\n          timingInfo\n        });\n        audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n      },\n      onId3: (id3Frames, dispatchType) => {\n        id3Fn(segment, id3Frames, dispatchType);\n      },\n      onCaptions: captions => {\n        captionsFn(segment, [captions]);\n      },\n      isEndOfTimeline,\n      onEndedTimeline: () => {\n        endedTimelineFn();\n      },\n      onTransmuxerLog,\n      onDone: (result, error) => {\n        if (!doneFn) {\n          return;\n        }\n        result.type = result.type === 'combined' ? 'video' : result.type;\n        triggerSegmentEventFn({\n          type: 'segmenttransmuxingcomplete',\n          segment\n        });\n        doneFn(error, segment, result);\n      },\n      segment,\n      triggerSegmentEventFn\n    }); // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n    // Meaning cached frame data may corrupt our notion of where this segment\n    // really starts. To get around this, probe for the info needed.\n\n    workerCallback({\n      action: 'probeTs',\n      transmuxer: segment.transmuxer,\n      data: bytes,\n      baseStartTime: segment.baseStartTime,\n      callback: data => {\n        segment.bytes = bytes = data.data;\n        const probeResult = data.result;\n        if (probeResult) {\n          trackInfoFn(segment, {\n            hasAudio: probeResult.hasAudio,\n            hasVideo: probeResult.hasVideo,\n            isMuxed\n          });\n          trackInfoFn = null;\n        }\n        finish();\n      }\n    });\n  };\n  const handleSegmentBytes = ({\n    segment,\n    bytes,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }) => {\n    let bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n    // We should have a handler that fetches the number of bytes required\n    // to check if something is fmp4. This will allow us to save bandwidth\n    // because we can only exclude a playlist and abort requests\n    // by codec after trackinfo triggers.\n\n    if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n      segment.isFmp4 = true;\n      const {\n        tracks\n      } = segment.map;\n      const isMp4TextSegment = tracks.text && (!tracks.audio || !tracks.video);\n      if (isMp4TextSegment) {\n        dataFn(segment, {\n          data: bytesAsUint8Array,\n          type: 'text'\n        });\n        parseMp4TextSegment(segment, tracks.text.codec, doneFn);\n        return;\n      }\n      const trackInfo = {\n        isFmp4: true,\n        hasVideo: !!tracks.video,\n        hasAudio: !!tracks.audio\n      }; // if we have a audio track, with a codec that is not set to\n      // encrypted audio\n\n      if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n        trackInfo.audioCodec = tracks.audio.codec;\n      } // if we have a video track, with a codec that is not set to\n      // encrypted video\n\n      if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n        trackInfo.videoCodec = tracks.video.codec;\n      }\n      if (tracks.video && tracks.audio) {\n        trackInfo.isMuxed = true;\n      } // since we don't support appending fmp4 data on progress, we know we have the full\n      // segment here\n\n      trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n      // time. The end time can be roughly calculated by the receiver using the duration.\n      //\n      // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n      // that is the true start of the segment (where the playback engine should begin\n      // decoding).\n\n      const finishLoading = (captions, id3Frames) => {\n        // if the track still has audio at this point it is only possible\n        // for it to be audio only. See `tracks.video && tracks.audio` if statement\n        // above.\n        // we make sure to use segment.bytes here as that\n        dataFn(segment, {\n          data: bytesAsUint8Array,\n          type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n        });\n        if (id3Frames && id3Frames.length) {\n          id3Fn(segment, id3Frames);\n        }\n        if (captions && captions.length) {\n          captionsFn(segment, captions);\n        }\n        doneFn(null, segment, {});\n      };\n      workerCallback({\n        action: 'probeMp4StartTime',\n        timescales: segment.map.timescales,\n        data: bytesAsUint8Array,\n        transmuxer: segment.transmuxer,\n        callback: ({\n          data,\n          startTime\n        }) => {\n          // transfer bytes back to us\n          bytes = data.buffer;\n          segment.bytes = bytesAsUint8Array = data;\n          if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n            timingInfoFn(segment, 'audio', 'start', startTime);\n          }\n          if (trackInfo.hasVideo) {\n            timingInfoFn(segment, 'video', 'start', startTime);\n          }\n          workerCallback({\n            action: 'probeEmsgID3',\n            data: bytesAsUint8Array,\n            transmuxer: segment.transmuxer,\n            offset: startTime,\n            callback: ({\n              emsgData,\n              id3Frames\n            }) => {\n              // transfer bytes back to us\n              bytes = emsgData.buffer;\n              segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n              // Initialize CaptionParser if it hasn't been yet\n\n              if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n                finishLoading(undefined, id3Frames);\n                return;\n              }\n              workerCallback({\n                action: 'pushMp4Captions',\n                endAction: 'mp4Captions',\n                transmuxer: segment.transmuxer,\n                data: bytesAsUint8Array,\n                timescales: segment.map.timescales,\n                trackIds: [tracks.video.id],\n                callback: message => {\n                  // transfer bytes back to us\n                  bytes = message.data.buffer;\n                  segment.bytes = bytesAsUint8Array = message.data;\n                  message.logs.forEach(function (log) {\n                    onTransmuxerLog(merge(log, {\n                      stream: 'mp4CaptionParser'\n                    }));\n                  });\n                  finishLoading(message.captions, id3Frames);\n                }\n              });\n            }\n          });\n        }\n      });\n      return;\n    } // VTT or other segments that don't need processing\n\n    if (!segment.transmuxer) {\n      doneFn(null, segment, {});\n      return;\n    }\n    if (typeof segment.container === 'undefined') {\n      segment.container = detectContainerForBytes(bytesAsUint8Array);\n    }\n    if (segment.container !== 'ts' && segment.container !== 'aac') {\n      trackInfoFn(segment, {\n        hasAudio: false,\n        hasVideo: false\n      });\n      doneFn(null, segment, {});\n      return;\n    } // ts or aac\n\n    transmuxAndNotify({\n      segment,\n      bytes,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn,\n      doneFn,\n      onTransmuxerLog,\n      triggerSegmentEventFn\n    });\n  };\n  const decrypt = function ({\n    id,\n    key,\n    encryptedBytes,\n    decryptionWorker,\n    segment,\n    doneFn\n  }, callback) {\n    const decryptionHandler = event => {\n      if (event.data.source === id) {\n        decryptionWorker.removeEventListener('message', decryptionHandler);\n        const decrypted = event.data.decrypted;\n        callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n      }\n    };\n    decryptionWorker.onerror = () => {\n      const message = 'An error occurred in the decryption worker';\n      const segmentInfo = segmentInfoPayload({\n        segment\n      });\n      const decryptError = {\n        message,\n        metadata: {\n          error: new Error(message),\n          errorType: videojs.Error.StreamingFailedToDecryptSegment,\n          segmentInfo,\n          keyInfo: {\n            uri: segment.key.resolvedUri || segment.map.key.resolvedUri\n          }\n        }\n      };\n      doneFn(decryptError, segment);\n    };\n    decryptionWorker.addEventListener('message', decryptionHandler);\n    let keyBytes;\n    if (key.bytes.slice) {\n      keyBytes = key.bytes.slice();\n    } else {\n      keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n    } // incrementally decrypt the bytes\n\n    decryptionWorker.postMessage(createTransferableMessage({\n      source: id,\n      encrypted: encryptedBytes,\n      key: keyBytes,\n      iv: key.iv\n    }), [encryptedBytes.buffer, keyBytes.buffer]);\n  };\n  /**\n   * Decrypt the segment via the decryption web worker\n   *\n   * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n   *                                       routines\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   * @param {Function} trackInfoFn - a callback that receives track info\n   * @param {Function} timingInfoFn - a callback that receives timing info\n   * @param {Function} videoSegmentTimingInfoFn\n   *                   a callback that receives video timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {Function} audioSegmentTimingInfoFn\n   *                   a callback that receives audio timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {boolean}  isEndOfTimeline\n   *                   true if this segment represents the last segment in a timeline\n   * @param {Function} endedTimelineFn\n   *                   a callback made when a timeline is ended, will only be called if\n   *                   isEndOfTimeline is true\n   * @param {Function} dataFn - a callback that is executed when segment bytes are available\n   *                            and ready to use\n   * @param {Function} doneFn - a callback that is executed after decryption has completed\n   */\n\n  const decryptSegment = ({\n    decryptionWorker,\n    segment,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }) => {\n    triggerSegmentEventFn({\n      type: 'segmentdecryptionstart'\n    });\n    decrypt({\n      id: segment.requestId,\n      key: segment.key,\n      encryptedBytes: segment.encryptedBytes,\n      decryptionWorker,\n      segment,\n      doneFn\n    }, decryptedBytes => {\n      segment.bytes = decryptedBytes;\n      triggerSegmentEventFn({\n        type: 'segmentdecryptioncomplete',\n        segment\n      });\n      handleSegmentBytes({\n        segment,\n        bytes: segment.bytes,\n        trackInfoFn,\n        timingInfoFn,\n        videoSegmentTimingInfoFn,\n        audioSegmentTimingInfoFn,\n        id3Fn,\n        captionsFn,\n        isEndOfTimeline,\n        endedTimelineFn,\n        dataFn,\n        doneFn,\n        onTransmuxerLog,\n        triggerSegmentEventFn\n      });\n    });\n  };\n  /**\n   * This function waits for all XHRs to finish (with either success or failure)\n   * before continueing processing via it's callback. The function gathers errors\n   * from each request into a single errors array so that the error status for\n   * each request can be examined later.\n   *\n   * @param {Object} activeXhrs - an object that tracks all XHR requests\n   * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n   *                                       routines\n   * @param {Function} trackInfoFn - a callback that receives track info\n   * @param {Function} timingInfoFn - a callback that receives timing info\n   * @param {Function} videoSegmentTimingInfoFn\n   *                   a callback that receives video timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {Function} audioSegmentTimingInfoFn\n   *                   a callback that receives audio timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {Function} id3Fn - a callback that receives ID3 metadata\n   * @param {Function} captionsFn - a callback that receives captions\n   * @param {boolean}  isEndOfTimeline\n   *                   true if this segment represents the last segment in a timeline\n   * @param {Function} endedTimelineFn\n   *                   a callback made when a timeline is ended, will only be called if\n   *                   isEndOfTimeline is true\n   * @param {Function} dataFn - a callback that is executed when segment bytes are available\n   *                            and ready to use\n   * @param {Function} doneFn - a callback that is executed after all resources have been\n   *                            downloaded and any decryption completed\n   */\n\n  const waitForCompletion = ({\n    activeXhrs,\n    decryptionWorker,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }) => {\n    let count = 0;\n    let didError = false;\n    return (error, segment) => {\n      if (didError) {\n        return;\n      }\n      if (error) {\n        didError = true; // If there are errors, we have to abort any outstanding requests\n\n        abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n        // handle the aborted events from those requests, there are some cases where we may\n        // never get an aborted event. For instance, if the network connection is lost and\n        // there were two requests, the first may have triggered an error immediately, while\n        // the second request remains unsent. In that case, the aborted algorithm will not\n        // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n        //\n        // We also can't rely on the ready state of the XHR, since the request that\n        // triggered the connection error may also show as a ready state of 0 (unsent).\n        // Therefore, we have to finish this group of requests immediately after the first\n        // seen error.\n\n        return doneFn(error, segment);\n      }\n      count += 1;\n      if (count === activeXhrs.length) {\n        const segmentFinish = function () {\n          if (segment.encryptedBytes) {\n            return decryptSegment({\n              decryptionWorker,\n              segment,\n              trackInfoFn,\n              timingInfoFn,\n              videoSegmentTimingInfoFn,\n              audioSegmentTimingInfoFn,\n              id3Fn,\n              captionsFn,\n              isEndOfTimeline,\n              endedTimelineFn,\n              dataFn,\n              doneFn,\n              onTransmuxerLog,\n              triggerSegmentEventFn\n            });\n          } // Otherwise, everything is ready just continue\n\n          handleSegmentBytes({\n            segment,\n            bytes: segment.bytes,\n            trackInfoFn,\n            timingInfoFn,\n            videoSegmentTimingInfoFn,\n            audioSegmentTimingInfoFn,\n            id3Fn,\n            captionsFn,\n            isEndOfTimeline,\n            endedTimelineFn,\n            dataFn,\n            doneFn,\n            onTransmuxerLog,\n            triggerSegmentEventFn\n          });\n        }; // Keep track of when *all* of the requests have completed\n\n        segment.endOfAllRequests = Date.now();\n        if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n          triggerSegmentEventFn({\n            type: 'segmentdecryptionstart',\n            segment\n          });\n          return decrypt({\n            decryptionWorker,\n            // add -init to the \"id\" to differentiate between segment\n            // and init segment decryption, just in case they happen\n            // at the same time at some point in the future.\n            id: segment.requestId + '-init',\n            encryptedBytes: segment.map.encryptedBytes,\n            key: segment.map.key,\n            segment,\n            doneFn\n          }, decryptedBytes => {\n            segment.map.bytes = decryptedBytes;\n            triggerSegmentEventFn({\n              type: 'segmentdecryptioncomplete',\n              segment\n            });\n            parseInitSegment(segment, parseError => {\n              if (parseError) {\n                abortAll(activeXhrs);\n                return doneFn(parseError, segment);\n              }\n              segmentFinish();\n            });\n          });\n        }\n        segmentFinish();\n      }\n    };\n  };\n  /**\n   * Calls the abort callback if any request within the batch was aborted. Will only call\n   * the callback once per batch of requests, even if multiple were aborted.\n   *\n   * @param {Object} loadendState - state to check to see if the abort function was called\n   * @param {Function} abortFn - callback to call for abort\n   */\n\n  const handleLoadEnd = ({\n    loadendState,\n    abortFn\n  }) => event => {\n    const request = event.target;\n    if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n      abortFn();\n      loadendState.calledAbortFn = true;\n    }\n  };\n  /**\n   * Simple progress event callback handler that gathers some stats before\n   * executing a provided callback with the `segment` object\n   *\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   * @param {Function} progressFn - a callback that is executed each time a progress event\n   *                                is received\n   * @param {Function} trackInfoFn - a callback that receives track info\n   * @param {Function} timingInfoFn - a callback that receives timing info\n   * @param {Function} videoSegmentTimingInfoFn\n   *                   a callback that receives video timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {Function} audioSegmentTimingInfoFn\n   *                   a callback that receives audio timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {boolean}  isEndOfTimeline\n   *                   true if this segment represents the last segment in a timeline\n   * @param {Function} endedTimelineFn\n   *                   a callback made when a timeline is ended, will only be called if\n   *                   isEndOfTimeline is true\n   * @param {Function} dataFn - a callback that is executed when segment bytes are available\n   *                            and ready to use\n   * @param {Event} event - the progress event object from XMLHttpRequest\n   */\n\n  const handleProgress = ({\n    segment,\n    progressFn,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn\n  }) => event => {\n    const request = event.target;\n    if (request.aborted) {\n      return;\n    }\n    segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n    if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n      segment.stats.firstBytesReceivedAt = Date.now();\n    }\n    return progressFn(event, segment);\n  };\n  /**\n   * Load all resources and does any processing necessary for a media-segment\n   *\n   * Features:\n   *   decrypts the media-segment if it has a key uri and an iv\n   *   aborts *all* requests if *any* one request fails\n   *\n   * The segment object, at minimum, has the following format:\n   * {\n   *   resolvedUri: String,\n   *   [transmuxer]: Object,\n   *   [byterange]: {\n   *     offset: Number,\n   *     length: Number\n   *   },\n   *   [key]: {\n   *     resolvedUri: String\n   *     [byterange]: {\n   *       offset: Number,\n   *       length: Number\n   *     },\n   *     iv: {\n   *       bytes: Uint32Array\n   *     }\n   *   },\n   *   [map]: {\n   *     resolvedUri: String,\n   *     [byterange]: {\n   *       offset: Number,\n   *       length: Number\n   *     },\n   *     [bytes]: Uint8Array\n   *   }\n   * }\n   * ...where [name] denotes optional properties\n   *\n   * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n   * @param {Object} xhrOptions - the base options to provide to all xhr requests\n   * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n   *                                       decryption routines\n   * @param {Object} segment - a simplified copy of the segmentInfo object\n   *                           from SegmentLoader\n   * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n   *                             aborted\n   * @param {Function} progressFn - a callback that receives progress events from the main\n   *                                segment's xhr request\n   * @param {Function} trackInfoFn - a callback that receives track info\n   * @param {Function} timingInfoFn - a callback that receives timing info\n   * @param {Function} videoSegmentTimingInfoFn\n   *                   a callback that receives video timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {Function} audioSegmentTimingInfoFn\n   *                   a callback that receives audio timing info based on media times and\n   *                   any adjustments made by the transmuxer\n   * @param {Function} id3Fn - a callback that receives ID3 metadata\n   * @param {Function} captionsFn - a callback that receives captions\n   * @param {boolean}  isEndOfTimeline\n   *                   true if this segment represents the last segment in a timeline\n   * @param {Function} endedTimelineFn\n   *                   a callback made when a timeline is ended, will only be called if\n   *                   isEndOfTimeline is true\n   * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n   *                            request, transmuxed if needed\n   * @param {Function} doneFn - a callback that is executed only once all requests have\n   *                            succeeded or failed\n   * @return {Function} a function that, when invoked, immediately aborts all\n   *                     outstanding requests\n   */\n\n  const mediaSegmentRequest = ({\n    xhr,\n    xhrOptions,\n    decryptionWorker,\n    segment,\n    abortFn,\n    progressFn,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }) => {\n    const activeXhrs = [];\n    const finishProcessingFn = waitForCompletion({\n      activeXhrs,\n      decryptionWorker,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn,\n      doneFn,\n      onTransmuxerLog,\n      triggerSegmentEventFn\n    }); // optionally, request the decryption key\n\n    if (segment.key && !segment.key.bytes) {\n      const objects = [segment.key];\n      if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n        objects.push(segment.map.key);\n      }\n      const keyRequestOptions = merge(xhrOptions, {\n        uri: segment.key.resolvedUri,\n        responseType: 'arraybuffer',\n        requestType: 'segment-key'\n      });\n      const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn, triggerSegmentEventFn);\n      const keyInfo = {\n        uri: segment.key.resolvedUri\n      };\n      triggerSegmentEventFn({\n        type: 'segmentkeyloadstart',\n        segment,\n        keyInfo\n      });\n      const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n      activeXhrs.push(keyXhr);\n    } // optionally, request the associated media init segment\n\n    if (segment.map && !segment.map.bytes) {\n      const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n      if (differentMapKey) {\n        const mapKeyRequestOptions = merge(xhrOptions, {\n          uri: segment.map.key.resolvedUri,\n          responseType: 'arraybuffer',\n          requestType: 'segment-key'\n        });\n        const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn, triggerSegmentEventFn);\n        const keyInfo = {\n          uri: segment.map.key.resolvedUri\n        };\n        triggerSegmentEventFn({\n          type: 'segmentkeyloadstart',\n          segment,\n          keyInfo\n        });\n        const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n        activeXhrs.push(mapKeyXhr);\n      }\n      const initSegmentOptions = merge(xhrOptions, {\n        uri: segment.map.resolvedUri,\n        responseType: 'arraybuffer',\n        headers: segmentXhrHeaders(segment.map),\n        requestType: 'segment-media-initialization'\n      });\n      const initSegmentRequestCallback = handleInitSegmentResponse({\n        segment,\n        finishProcessingFn,\n        triggerSegmentEventFn\n      });\n      triggerSegmentEventFn({\n        type: 'segmentloadstart',\n        segment\n      });\n      const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n      activeXhrs.push(initSegmentXhr);\n    }\n    const segmentRequestOptions = merge(xhrOptions, {\n      uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n      responseType: 'arraybuffer',\n      headers: segmentXhrHeaders(segment),\n      requestType: 'segment'\n    });\n    const segmentRequestCallback = handleSegmentResponse({\n      segment,\n      finishProcessingFn,\n      responseType: segmentRequestOptions.responseType,\n      triggerSegmentEventFn\n    });\n    triggerSegmentEventFn({\n      type: 'segmentloadstart',\n      segment\n    });\n    const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n    segmentXhr.addEventListener('progress', handleProgress({\n      segment,\n      progressFn,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn\n    }));\n    activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n    // multiple times, provide a shared state object\n\n    const loadendState = {};\n    activeXhrs.forEach(activeXhr => {\n      activeXhr.addEventListener('loadend', handleLoadEnd({\n        loadendState,\n        abortFn\n      }));\n    });\n    return () => abortAll(activeXhrs);\n  };\n  const logFn = logger('PlaylistSelector');\n  const representationToString = function (representation) {\n    if (!representation || !representation.playlist) {\n      return;\n    }\n    const playlist = representation.playlist;\n    return JSON.stringify({\n      id: playlist.id,\n      bandwidth: representation.bandwidth,\n      width: representation.width,\n      height: representation.height,\n      codecs: playlist.attributes && playlist.attributes.CODECS || ''\n    });\n  }; // Utilities\n\n  /**\n   * Returns the CSS value for the specified property on an element\n   * using `getComputedStyle`. Firefox has a long-standing issue where\n   * getComputedStyle() may return null when running in an iframe with\n   * `display: none`.\n   *\n   * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n   * @param {HTMLElement} el the htmlelement to work on\n   * @param {string} the proprety to get the style for\n   */\n\n  const safeGetComputedStyle = function (el, property) {\n    if (!el) {\n      return '';\n    }\n    const result = window.getComputedStyle(el);\n    if (!result) {\n      return '';\n    }\n    return result[property];\n  };\n  /**\n   * Resuable stable sort function\n   *\n   * @param {Playlists} array\n   * @param {Function} sortFn Different comparators\n   * @function stableSort\n   */\n\n  const stableSort = function (array, sortFn) {\n    const newArray = array.slice();\n    array.sort(function (left, right) {\n      const cmp = sortFn(left, right);\n      if (cmp === 0) {\n        return newArray.indexOf(left) - newArray.indexOf(right);\n      }\n      return cmp;\n    });\n  };\n  /**\n   * A comparator function to sort two playlist object by bandwidth.\n   *\n   * @param {Object} left a media playlist object\n   * @param {Object} right a media playlist object\n   * @return {number} Greater than zero if the bandwidth attribute of\n   * left is greater than the corresponding attribute of right. Less\n   * than zero if the bandwidth of right is greater than left and\n   * exactly zero if the two are equal.\n   */\n\n  const comparePlaylistBandwidth = function (left, right) {\n    let leftBandwidth;\n    let rightBandwidth;\n    if (left.attributes.BANDWIDTH) {\n      leftBandwidth = left.attributes.BANDWIDTH;\n    }\n    leftBandwidth = leftBandwidth || window.Number.MAX_VALUE;\n    if (right.attributes.BANDWIDTH) {\n      rightBandwidth = right.attributes.BANDWIDTH;\n    }\n    rightBandwidth = rightBandwidth || window.Number.MAX_VALUE;\n    return leftBandwidth - rightBandwidth;\n  };\n  /**\n   * A comparator function to sort two playlist object by resolution (width).\n   *\n   * @param {Object} left a media playlist object\n   * @param {Object} right a media playlist object\n   * @return {number} Greater than zero if the resolution.width attribute of\n   * left is greater than the corresponding attribute of right. Less\n   * than zero if the resolution.width of right is greater than left and\n   * exactly zero if the two are equal.\n   */\n\n  const comparePlaylistResolution = function (left, right) {\n    let leftWidth;\n    let rightWidth;\n    if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n      leftWidth = left.attributes.RESOLUTION.width;\n    }\n    leftWidth = leftWidth || window.Number.MAX_VALUE;\n    if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n      rightWidth = right.attributes.RESOLUTION.width;\n    }\n    rightWidth = rightWidth || window.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n    // have the same media dimensions/ resolution\n\n    if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n      return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n    }\n    return leftWidth - rightWidth;\n  };\n  /**\n   * Chooses the appropriate media playlist based on bandwidth and player size\n   *\n   * @param {Object} settings\n   *        Object of information required to use this selector\n   * @param {Object} settings.main\n   *        Object representation of the main manifest\n   * @param {number} settings.bandwidth\n   *        Current calculated bandwidth of the player\n   * @param {number} settings.playerWidth\n   *        Current width of the player element (should account for the device pixel ratio)\n   * @param {number} settings.playerHeight\n   *        Current height of the player element (should account for the device pixel ratio)\n   * @param {number} settings.playerObjectFit\n   *        Current value of the video element's object-fit CSS property. Allows taking into\n   *        account that the video might be scaled up to cover the media element when selecting\n   *        media playlists based on player size.\n   * @param {boolean} settings.limitRenditionByPlayerDimensions\n   *        True if the player width and height should be used during the selection, false otherwise\n   * @param {Object} settings.playlistController\n   *        the current playlistController object\n   * @return {Playlist} the highest bitrate playlist less than the\n   * currently detected bandwidth, accounting for some amount of\n   * bandwidth variance\n   */\n\n  let simpleSelector = function (settings) {\n    const {\n      main,\n      bandwidth: playerBandwidth,\n      playerWidth,\n      playerHeight,\n      playerObjectFit,\n      limitRenditionByPlayerDimensions,\n      playlistController\n    } = settings; // If we end up getting called before `main` is available, exit early\n\n    if (!main) {\n      return;\n    }\n    const options = {\n      bandwidth: playerBandwidth,\n      width: playerWidth,\n      height: playerHeight,\n      limitRenditionByPlayerDimensions\n    };\n    let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n    if (Playlist.isAudioOnly(main)) {\n      playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n      // at the buttom of this function for debugging.\n\n      options.audioOnly = true;\n    } // convert the playlists to an intermediary representation to make comparisons easier\n\n    let sortedPlaylistReps = playlists.map(playlist => {\n      let bandwidth;\n      const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n      const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n      bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n      bandwidth = bandwidth || window.Number.MAX_VALUE;\n      return {\n        bandwidth,\n        width,\n        height,\n        playlist\n      };\n    });\n    stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n    // incompatible configurations\n\n    sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n    // api or excluded temporarily due to playback errors.\n\n    let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\n    if (!enabledPlaylistReps.length) {\n      // if there are no enabled playlists, then they have all been excluded or disabled\n      // by the user through the representations api. In this case, ignore exclusion and\n      // fallback to what the user wants by using playlists the user has not disabled.\n      enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist));\n    } // filter out any variant that has greater effective bitrate\n    // than the current estimated bandwidth\n\n    const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n    let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n    // and then taking the very first element\n\n    const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n    if (limitRenditionByPlayerDimensions === false) {\n      const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n      if (chosenRep && chosenRep.playlist) {\n        let type = 'sortedPlaylistReps';\n        if (bandwidthBestRep) {\n          type = 'bandwidthBestRep';\n        }\n        if (enabledPlaylistReps[0]) {\n          type = 'enabledPlaylistReps';\n        }\n        logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n        return chosenRep.playlist;\n      }\n      logFn('could not choose a playlist with options', options);\n      return null;\n    } // filter out playlists without resolution information\n\n    const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n    stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n    const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n    highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n    const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n    let resolutionPlusOneList;\n    let resolutionPlusOneSmallest;\n    let resolutionPlusOneRep; // find the smallest variant that is larger than the player\n    // if there is no match of exact resolution\n\n    if (!resolutionBestRep) {\n      resolutionPlusOneList = haveResolution.filter(rep => {\n        if (playerObjectFit === 'cover') {\n          // video will be scaled up to cover the player. We need to\n          // make sure rendition is at least as wide and as high as the\n          // player.\n          return rep.width > playerWidth && rep.height > playerHeight;\n        } // video will be scaled down to fit inside the player soon as\n        // its resolution exceeds player size in at least one dimension.\n\n        return rep.width > playerWidth || rep.height > playerHeight;\n      }); // find all the variants have the same smallest resolution\n\n      resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that\n      // is just-larger-than the video player\n\n      highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n      resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n    }\n    let leastPixelDiffRep; // If this selector proves to be better than others,\n    // resolutionPlusOneRep and resolutionBestRep and all\n    // the code involving them should be removed.\n\n    if (playlistController.leastPixelDiffSelector) {\n      // find the variant that is closest to the player's pixel size\n      const leastPixelDiffList = haveResolution.map(rep => {\n        rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n        return rep;\n      }); // get the highest bandwidth, closest resolution playlist\n\n      stableSort(leastPixelDiffList, (left, right) => {\n        // sort by highest bandwidth if pixelDiff is the same\n        if (left.pixelDiff === right.pixelDiff) {\n          return right.bandwidth - left.bandwidth;\n        }\n        return left.pixelDiff - right.pixelDiff;\n      });\n      leastPixelDiffRep = leastPixelDiffList[0];\n    } // fallback chain of variants\n\n    const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n    if (chosenRep && chosenRep.playlist) {\n      let type = 'sortedPlaylistReps';\n      if (leastPixelDiffRep) {\n        type = 'leastPixelDiffRep';\n      } else if (resolutionPlusOneRep) {\n        type = 'resolutionPlusOneRep';\n      } else if (resolutionBestRep) {\n        type = 'resolutionBestRep';\n      } else if (bandwidthBestRep) {\n        type = 'bandwidthBestRep';\n      } else if (enabledPlaylistReps[0]) {\n        type = 'enabledPlaylistReps';\n      }\n      logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n      return chosenRep.playlist;\n    }\n    logFn('could not choose a playlist with options', options);\n    return null;\n  };\n\n  /**\n   * Chooses the appropriate media playlist based on the most recent\n   * bandwidth estimate and the player size.\n   *\n   * Expects to be called within the context of an instance of VhsHandler\n   *\n   * @return {Playlist} the highest bitrate playlist less than the\n   * currently detected bandwidth, accounting for some amount of\n   * bandwidth variance\n   */\n\n  const lastBandwidthSelector = function () {\n    let pixelRatio = this.useDevicePixelRatio ? window.devicePixelRatio || 1 : 1;\n    if (!isNaN(this.customPixelRatio)) {\n      pixelRatio = this.customPixelRatio;\n    }\n    return simpleSelector({\n      main: this.playlists.main,\n      bandwidth: this.systemBandwidth,\n      playerWidth: parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio,\n      playerHeight: parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio,\n      playerObjectFit: this.usePlayerObjectFit ? safeGetComputedStyle(this.tech_.el(), 'objectFit') : '',\n      limitRenditionByPlayerDimensions: this.limitRenditionByPlayerDimensions,\n      playlistController: this.playlistController_\n    });\n  };\n  /**\n   * Chooses the appropriate media playlist based on an\n   * exponential-weighted moving average of the bandwidth after\n   * filtering for player size.\n   *\n   * Expects to be called within the context of an instance of VhsHandler\n   *\n   * @param {number} decay - a number between 0 and 1. Higher values of\n   * this parameter will cause previous bandwidth estimates to lose\n   * significance more quickly.\n   * @return {Function} a function which can be invoked to create a new\n   * playlist selector function.\n   * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n   */\n\n  const movingAverageBandwidthSelector = function (decay) {\n    let average = -1;\n    let lastSystemBandwidth = -1;\n    if (decay < 0 || decay > 1) {\n      throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n    }\n    return function () {\n      let pixelRatio = this.useDevicePixelRatio ? window.devicePixelRatio || 1 : 1;\n      if (!isNaN(this.customPixelRatio)) {\n        pixelRatio = this.customPixelRatio;\n      }\n      if (average < 0) {\n        average = this.systemBandwidth;\n        lastSystemBandwidth = this.systemBandwidth;\n      } // stop the average value from decaying for every 250ms\n      // when the systemBandwidth is constant\n      // and\n      // stop average from setting to a very low value when the\n      // systemBandwidth becomes 0 in case of chunk cancellation\n\n      if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n        average = decay * this.systemBandwidth + (1 - decay) * average;\n        lastSystemBandwidth = this.systemBandwidth;\n      }\n      return simpleSelector({\n        main: this.playlists.main,\n        bandwidth: average,\n        playerWidth: parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio,\n        playerHeight: parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio,\n        playerObjectFit: this.usePlayerObjectFit ? safeGetComputedStyle(this.tech_.el(), 'objectFit') : '',\n        limitRenditionByPlayerDimensions: this.limitRenditionByPlayerDimensions,\n        playlistController: this.playlistController_\n      });\n    };\n  };\n  /**\n   * Chooses the appropriate media playlist based on the potential to rebuffer\n   *\n   * @param {Object} settings\n   *        Object of information required to use this selector\n   * @param {Object} settings.main\n   *        Object representation of the main manifest\n   * @param {number} settings.currentTime\n   *        The current time of the player\n   * @param {number} settings.bandwidth\n   *        Current measured bandwidth\n   * @param {number} settings.duration\n   *        Duration of the media\n   * @param {number} settings.segmentDuration\n   *        Segment duration to be used in round trip time calculations\n   * @param {number} settings.timeUntilRebuffer\n   *        Time left in seconds until the player has to rebuffer\n   * @param {number} settings.currentTimeline\n   *        The current timeline segments are being loaded from\n   * @param {SyncController} settings.syncController\n   *        SyncController for determining if we have a sync point for a given playlist\n   * @return {Object|null}\n   *         {Object} return.playlist\n   *         The highest bandwidth playlist with the least amount of rebuffering\n   *         {Number} return.rebufferingImpact\n   *         The amount of time in seconds switching to this playlist will rebuffer. A\n   *         negative value means that switching will cause zero rebuffering.\n   */\n\n  const minRebufferMaxBandwidthSelector = function (settings) {\n    const {\n      main,\n      currentTime,\n      bandwidth,\n      duration,\n      segmentDuration,\n      timeUntilRebuffer,\n      currentTimeline,\n      syncController\n    } = settings; // filter out any playlists that have been excluded due to\n    // incompatible configurations\n\n    const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n    // api or excluded temporarily due to playback errors.\n\n    let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n    if (!enabledPlaylists.length) {\n      // if there are no enabled playlists, then they have all been excluded or disabled\n      // by the user through the representations api. In this case, ignore exclusion and\n      // fallback to what the user wants by using playlists the user has not disabled.\n      enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist));\n    }\n    const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n    const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n      const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n      // sync request first. This will double the request time\n\n      const numRequests = syncPoint ? 1 : 2;\n      const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n      const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n      return {\n        playlist,\n        rebufferingImpact\n      };\n    });\n    const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n    stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n    if (noRebufferingPlaylists.length) {\n      return noRebufferingPlaylists[0];\n    }\n    stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\n    return rebufferingEstimates[0] || null;\n  };\n  /**\n   * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n   * one with video.  If no renditions with video exist, return the lowest audio rendition.\n   *\n   * Expects to be called within the context of an instance of VhsHandler\n   *\n   * @return {Object|null}\n   *         {Object} return.playlist\n   *         The lowest bitrate playlist that contains a video codec.  If no such rendition\n   *         exists pick the lowest audio rendition.\n   */\n\n  const lowestBitrateCompatibleVariantSelector = function () {\n    // filter out any playlists that have been excluded due to\n    // incompatible configurations or playback errors\n    const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n    stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video\n    // (this is not necessarily true, although it is generally true).\n    //\n    // If an entire manifest has no valid videos everything will get filtered\n    // out.\n\n    const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\n    return playlistsWithVideo[0] || null;\n  };\n\n  /**\n   * Combine all segments into a single Uint8Array\n   *\n   * @param {Object} segmentObj\n   * @return {Uint8Array} concatenated bytes\n   * @private\n   */\n  const concatSegments = segmentObj => {\n    let offset = 0;\n    let tempBuffer;\n    if (segmentObj.bytes) {\n      tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n      segmentObj.segments.forEach(segment => {\n        tempBuffer.set(segment, offset);\n        offset += segment.byteLength;\n      });\n    }\n    return tempBuffer;\n  };\n  /**\n   * Example:\n   * https://host.com/path1/path2/path3/segment.ts?arg1=val1\n   * -->\n   * path3/segment.ts\n   *\n   * @param resolvedUri\n   * @return {string}\n   */\n\n  function compactSegmentUrlDescription(resolvedUri) {\n    try {\n      return new URL(resolvedUri).pathname.split('/').slice(-2).join('/');\n    } catch (e) {\n      return '';\n    }\n  }\n\n  /**\n   * @file text-tracks.js\n   */\n  /**\n   * Create captions text tracks on video.js if they do not exist\n   *\n   * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n   * @param {Object} tech the video.js tech\n   * @param {Object} captionStream the caption stream to create\n   * @private\n   */\n\n  const createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n    if (!inbandTextTracks[captionStream]) {\n      tech.trigger({\n        type: 'usage',\n        name: 'vhs-608'\n      });\n      let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n      if (/^cc708_/.test(captionStream)) {\n        instreamId = 'SERVICE' + captionStream.split('_')[1];\n      }\n      const track = tech.textTracks().getTrackById(instreamId);\n      if (track) {\n        // Resuse an existing track with a CC# id because this was\n        // very likely created by videojs-contrib-hls from information\n        // in the m3u8 for us to use\n        inbandTextTracks[captionStream] = track;\n      } else {\n        // This section gets called when we have caption services that aren't specified in the manifest.\n        // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n        const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n        let label = captionStream;\n        let language = captionStream;\n        let def = false;\n        const captionService = captionServices[instreamId];\n        if (captionService) {\n          label = captionService.label;\n          language = captionService.language;\n          def = captionService.default;\n        } // Otherwise, create a track with the default `CC#` label and\n        // without a language\n\n        inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n          kind: 'captions',\n          id: instreamId,\n          // TODO: investigate why this doesn't seem to turn the caption on by default\n          default: def,\n          label,\n          language\n        }, false).track;\n      }\n    }\n  };\n  /**\n   * Add caption text track data to a source handler given an array of captions\n   *\n   * @param {Object}\n   *   @param {Object} inbandTextTracks the inband text tracks\n   *   @param {number} timestampOffset the timestamp offset of the source buffer\n   *   @param {Array} captionArray an array of caption data\n   * @private\n   */\n\n  const addCaptionData = function ({\n    inbandTextTracks,\n    captionArray,\n    timestampOffset\n  }) {\n    if (!captionArray) {\n      return;\n    }\n    const Cue = window.WebKitDataCue || window.VTTCue;\n    captionArray.forEach(caption => {\n      const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n      // with positioning data\n\n      if (caption.content) {\n        caption.content.forEach(value => {\n          const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n          cue.line = value.line;\n          cue.align = 'left';\n          cue.position = value.position;\n          cue.positionAlign = 'line-left';\n          inbandTextTracks[track].addCue(cue);\n        });\n      } else {\n        // otherwise, a text value with combined captions is sent\n        inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n      }\n    });\n  };\n  /**\n   * Define properties on a cue for backwards compatability,\n   * but warn the user that the way that they are using it\n   * is depricated and will be removed at a later date.\n   *\n   * @param {Cue} cue the cue to add the properties on\n   * @private\n   */\n\n  const deprecateOldCue = function (cue) {\n    Object.defineProperties(cue.frame, {\n      id: {\n        get() {\n          videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n          return cue.value.key;\n        }\n      },\n      value: {\n        get() {\n          videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n          return cue.value.data;\n        }\n      },\n      privateData: {\n        get() {\n          videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n          return cue.value.data;\n        }\n      }\n    });\n  };\n  /**\n   * Add metadata text track data to a source handler given an array of metadata\n   *\n   * @param {Object}\n   *   @param {Object} inbandTextTracks the inband text tracks\n   *   @param {Array} metadataArray an array of meta data\n   *   @param {number} timestampOffset the timestamp offset of the source buffer\n   *   @param {number} videoDuration the duration of the video\n   * @private\n   */\n\n  const addMetadata = ({\n    inbandTextTracks,\n    metadataArray,\n    timestampOffset,\n    videoDuration\n  }) => {\n    if (!metadataArray) {\n      return;\n    }\n    const Cue = window.WebKitDataCue || window.VTTCue;\n    const metadataTrack = inbandTextTracks.metadataTrack_;\n    if (!metadataTrack) {\n      return;\n    }\n    metadataArray.forEach(metadata => {\n      const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n      // ignore this bit of metadata.\n      // This likely occurs when you have an non-timed ID3 tag like TIT2,\n      // which is the \"Title/Songname/Content description\" frame\n\n      if (typeof time !== 'number' || window.isNaN(time) || time < 0 || !(time < Infinity)) {\n        return;\n      } // If we have no frames, we can't create a cue.\n\n      if (!metadata.frames || !metadata.frames.length) {\n        return;\n      }\n      metadata.frames.forEach(frame => {\n        const cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n        cue.frame = frame;\n        cue.value = frame;\n        deprecateOldCue(cue);\n        metadataTrack.addCue(cue);\n      });\n    });\n    if (!metadataTrack.cues || !metadataTrack.cues.length) {\n      return;\n    } // Updating the metadeta cues so that\n    // the endTime of each cue is the startTime of the next cue\n    // the endTime of last cue is the duration of the video\n\n    const cues = metadataTrack.cues;\n    const cuesArray = []; // Create a copy of the TextTrackCueList...\n    // ...disregarding cues with a falsey value\n\n    for (let i = 0; i < cues.length; i++) {\n      if (cues[i]) {\n        cuesArray.push(cues[i]);\n      }\n    } // Group cues by their startTime value\n\n    const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n      const timeSlot = obj[cue.startTime] || [];\n      timeSlot.push(cue);\n      obj[cue.startTime] = timeSlot;\n      return obj;\n    }, {}); // Sort startTimes by ascending order\n\n    const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n    sortedStartTimes.forEach((startTime, idx) => {\n      const cueGroup = cuesGroupedByStartTime[startTime];\n      const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime;\n      const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n      cueGroup.forEach(cue => {\n        cue.endTime = nextTime;\n      });\n    });\n  }; // object for mapping daterange attributes\n\n  const dateRangeAttr = {\n    id: 'ID',\n    class: 'CLASS',\n    startDate: 'START-DATE',\n    duration: 'DURATION',\n    endDate: 'END-DATE',\n    endOnNext: 'END-ON-NEXT',\n    plannedDuration: 'PLANNED-DURATION',\n    scte35Out: 'SCTE35-OUT',\n    scte35In: 'SCTE35-IN'\n  };\n  const dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n  /**\n   * Add DateRange metadata text track to a source handler given an array of metadata\n   *\n   * @param {Object}\n   *   @param {Object} inbandTextTracks the inband text tracks\n   *   @param {Array} dateRanges parsed media playlist\n   * @private\n   */\n\n  const addDateRangeMetadata = ({\n    inbandTextTracks,\n    dateRanges\n  }) => {\n    const metadataTrack = inbandTextTracks.metadataTrack_;\n    if (!metadataTrack) {\n      return;\n    }\n    const Cue = window.WebKitDataCue || window.VTTCue;\n    dateRanges.forEach(dateRange => {\n      // we generate multiple cues for each date range with different attributes\n      for (const key of Object.keys(dateRange)) {\n        if (dateRangeKeysToOmit.has(key)) {\n          continue;\n        }\n        const cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n        cue.id = dateRange.id;\n        cue.type = 'com.apple.quicktime.HLS';\n        cue.value = {\n          key: dateRangeAttr[key],\n          data: dateRange[key]\n        };\n        if (key === 'scte35Out' || key === 'scte35In') {\n          cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n        }\n        metadataTrack.addCue(cue);\n      }\n      dateRange.processDateRange();\n    });\n  };\n  /**\n   * Create metadata text track on video.js if it does not exist\n   *\n   * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n   * @param {string} dispatchType the inband metadata track dispatch type\n   * @param {Object} tech the video.js tech\n   * @private\n   */\n\n  const createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n    if (inbandTextTracks.metadataTrack_) {\n      return;\n    }\n    inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n      kind: 'metadata',\n      label: 'Timed Metadata'\n    }, false).track;\n    if (!videojs.browser.IS_ANY_SAFARI) {\n      inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n    }\n  };\n  /**\n   * Remove cues from a track on video.js.\n   *\n   * @param {Double} start start of where we should remove the cue\n   * @param {Double} end end of where the we should remove the cue\n   * @param {Object} track the text track to remove the cues from\n   * @private\n   */\n\n  const removeCuesFromTrack = function (start, end, track) {\n    let i;\n    let cue;\n    if (!track) {\n      return;\n    }\n    if (!track.cues) {\n      return;\n    }\n    i = track.cues.length;\n    while (i--) {\n      cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n      if (cue.startTime >= start && cue.endTime <= end) {\n        track.removeCue(cue);\n      }\n    }\n  };\n  /**\n   * Remove duplicate cues from a track on video.js (a cue is considered a\n   * duplicate if it has the same time interval and text as another)\n   *\n   * @param {Object} track the text track to remove the duplicate cues from\n   * @private\n   */\n\n  const removeDuplicateCuesFromTrack = function (track) {\n    const cues = track.cues;\n    if (!cues) {\n      return;\n    }\n    const uniqueCues = {};\n    for (let i = cues.length - 1; i >= 0; i--) {\n      const cue = cues[i];\n      const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n      if (uniqueCues[cueKey]) {\n        track.removeCue(cue);\n      } else {\n        uniqueCues[cueKey] = cue;\n      }\n    }\n  };\n\n  /**\n   * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n   * front of current time.\n   *\n   * @param {Array} buffer\n   *        The current buffer of gop information\n   * @param {number} currentTime\n   *        The current time\n   * @param {Double} mapping\n   *        Offset to map display time to stream presentation time\n   * @return {Array}\n   *         List of gops considered safe to append over\n   */\n\n  const gopsSafeToAlignWith = (buffer, currentTime, mapping) => {\n    if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n      return [];\n    } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n    const currentTimePts = Math.ceil((currentTime - mapping + 3) * clock_1);\n    let i;\n    for (i = 0; i < buffer.length; i++) {\n      if (buffer[i].pts > currentTimePts) {\n        break;\n      }\n    }\n    return buffer.slice(i);\n  };\n  /**\n   * Appends gop information (timing and byteLength) received by the transmuxer for the\n   * gops appended in the last call to appendBuffer\n   *\n   * @param {Array} buffer\n   *        The current buffer of gop information\n   * @param {Array} gops\n   *        List of new gop information\n   * @param {boolean} replace\n   *        If true, replace the buffer with the new gop information. If false, append the\n   *        new gop information to the buffer in the right location of time.\n   * @return {Array}\n   *         Updated list of gop information\n   */\n\n  const updateGopBuffer = (buffer, gops, replace) => {\n    if (!gops.length) {\n      return buffer;\n    }\n    if (replace) {\n      // If we are in safe append mode, then completely overwrite the gop buffer\n      // with the most recent appeneded data. This will make sure that when appending\n      // future segments, we only try to align with gops that are both ahead of current\n      // time and in the last segment appended.\n      return gops.slice();\n    }\n    const start = gops[0].pts;\n    let i = 0;\n    for (i; i < buffer.length; i++) {\n      if (buffer[i].pts >= start) {\n        break;\n      }\n    }\n    return buffer.slice(0, i).concat(gops);\n  };\n  /**\n   * Removes gop information in buffer that overlaps with provided start and end\n   *\n   * @param {Array} buffer\n   *        The current buffer of gop information\n   * @param {Double} start\n   *        position to start the remove at\n   * @param {Double} end\n   *        position to end the remove at\n   * @param {Double} mapping\n   *        Offset to map display time to stream presentation time\n   */\n\n  const removeGopBuffer = (buffer, start, end, mapping) => {\n    const startPts = Math.ceil((start - mapping) * clock_1);\n    const endPts = Math.ceil((end - mapping) * clock_1);\n    const updatedBuffer = buffer.slice();\n    let i = buffer.length;\n    while (i--) {\n      if (buffer[i].pts <= endPts) {\n        break;\n      }\n    }\n    if (i === -1) {\n      // no removal because end of remove range is before start of buffer\n      return updatedBuffer;\n    }\n    let j = i + 1;\n    while (j--) {\n      if (buffer[j].pts <= startPts) {\n        break;\n      }\n    } // clamp remove range start to 0 index\n\n    j = Math.max(j, 0);\n    updatedBuffer.splice(j, i - j + 1);\n    return updatedBuffer;\n  };\n  const shallowEqual = function (a, b) {\n    // if both are undefined\n    // or one or the other is undefined\n    // they are not equal\n    if (!a && !b || !a && b || a && !b) {\n      return false;\n    } // they are the same object and thus, equal\n\n    if (a === b) {\n      return true;\n    } // sort keys so we can make sure they have\n    // all the same keys later.\n\n    const akeys = Object.keys(a).sort();\n    const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n    if (akeys.length !== bkeys.length) {\n      return false;\n    }\n    for (let i = 0; i < akeys.length; i++) {\n      const key = akeys[i]; // different sorted keys, not equal\n\n      if (key !== bkeys[i]) {\n        return false;\n      } // different values, not equal\n\n      if (a[key] !== b[key]) {\n        return false;\n      }\n    }\n    return true;\n  };\n\n  /**\n   * The segment loader has no recourse except to fetch a segment in the\n   * current playlist and use the internal timestamps in that segment to\n   * generate a syncPoint. This function returns a good candidate index\n   * for that process.\n   *\n   * @param {Array} segments - the segments array from a playlist.\n   * @return {number} An index of a segment from the playlist to load\n   */\n\n  const getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n    segments = segments || [];\n    const timelineSegments = [];\n    let time = 0;\n    for (let i = 0; i < segments.length; i++) {\n      const segment = segments[i];\n      if (currentTimeline === segment.timeline) {\n        timelineSegments.push(i);\n        time += segment.duration;\n        if (time > targetTime) {\n          return i;\n        }\n      }\n    }\n    if (timelineSegments.length === 0) {\n      return 0;\n    } // default to the last timeline segment\n\n    return timelineSegments[timelineSegments.length - 1];\n  }; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n  // number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n  // as a start to prevent any potential issues with removing content too close to the\n  // playhead.\n\n  const MIN_BACK_BUFFER = 1; // in ms\n\n  const CHECK_BUFFER_DELAY = 500;\n  const finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half\n  // frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n  // not accurately reflect the rest of the content.\n\n  const MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\n  const illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => {\n    // Although these checks should most likely cover non 'main' types, for now it narrows\n    // the scope of our checks.\n    if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n      return null;\n    }\n    if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n      return 'Neither audio nor video found in segment.';\n    }\n    if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n      return '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.';\n    }\n    if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n      return '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.';\n    }\n    return null;\n  };\n  /**\n   * Calculates a time value that is safe to remove from the back buffer without interrupting\n   * playback.\n   *\n   * @param {TimeRange} seekable\n   *        The current seekable range\n   * @param {number} currentTime\n   *        The current time of the player\n   * @param {number} targetDuration\n   *        The target duration of the current playlist\n   * @return {number}\n   *         Time that is safe to remove from the back buffer without interrupting playback\n   */\n\n  const safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => {\n    // 30 seconds before the playhead provides a safe default for trimming.\n    //\n    // Choosing a reasonable default is particularly important for high bitrate content and\n    // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n    // throw an APPEND_BUFFER_ERR.\n    let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n    if (seekable.length) {\n      // Some live playlists may have a shorter window of content than the full allowed back\n      // buffer. For these playlists, don't save content that's no longer within the window.\n      trimTime = Math.max(trimTime, seekable.start(0));\n    } // Don't remove within target duration of the current time to avoid the possibility of\n    // removing the GOP currently being played, as removing it can cause playback stalls.\n\n    const maxTrimTime = currentTime - targetDuration;\n    return Math.min(maxTrimTime, trimTime);\n  };\n  const segmentInfoString = segmentInfo => {\n    const {\n      startOfSegment,\n      duration,\n      segment,\n      part,\n      playlist: {\n        mediaSequence: seq,\n        id,\n        segments = []\n      },\n      mediaIndex: index,\n      partIndex,\n      timeline\n    } = segmentInfo;\n    const segmentLen = segments.length - 1;\n    let selection = 'mediaIndex/partIndex increment';\n    if (segmentInfo.getMediaInfoForTime) {\n      selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n    } else if (segmentInfo.isSyncRequest) {\n      selection = 'getSyncSegmentCandidate (isSyncRequest)';\n    }\n    if (segmentInfo.independent) {\n      selection += ` with independent ${segmentInfo.independent}`;\n    }\n    const hasPartIndex = typeof partIndex === 'number';\n    const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n    const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n      preloadSegment: segment\n    }) - 1 : 0;\n    return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n  };\n  const timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\n  /**\n   * Returns the timestamp offset to use for the segment.\n   *\n   * @param {number} segmentTimeline\n   *        The timeline of the segment\n   * @param {number} currentTimeline\n   *        The timeline currently being followed by the loader\n   * @param {number} startOfSegment\n   *        The estimated segment start\n   * @param {TimeRange[]} buffered\n   *        The loader's buffer\n   * @param {boolean} overrideCheck\n   *        If true, no checks are made to see if the timestamp offset value should be set,\n   *        but sets it directly to a value.\n   *\n   * @return {number|null}\n   *         Either a number representing a new timestamp offset, or null if the segment is\n   *         part of the same timeline\n   */\n\n  const timestampOffsetForSegment = ({\n    segmentTimeline,\n    currentTimeline,\n    startOfSegment,\n    buffered,\n    overrideCheck\n  }) => {\n    // Check to see if we are crossing a discontinuity to see if we need to set the\n    // timestamp offset on the transmuxer and source buffer.\n    //\n    // Previously, we changed the timestampOffset if the start of this segment was less than\n    // the currently set timestampOffset, but this isn't desirable as it can produce bad\n    // behavior, especially around long running live streams.\n    if (!overrideCheck && segmentTimeline === currentTimeline) {\n      return null;\n    } // When changing renditions, it's possible to request a segment on an older timeline. For\n    // instance, given two renditions with the following:\n    //\n    // #EXTINF:10\n    // segment1\n    // #EXT-X-DISCONTINUITY\n    // #EXTINF:10\n    // segment2\n    // #EXTINF:10\n    // segment3\n    //\n    // And the current player state:\n    //\n    // current time: 8\n    // buffer: 0 => 20\n    //\n    // The next segment on the current rendition would be segment3, filling the buffer from\n    // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n    // then the next segment to be requested will be segment1 from the new rendition in\n    // order to fill time 8 and onwards. Using the buffered end would result in repeated\n    // content (since it would position segment1 of the new rendition starting at 20s). This\n    // case can be identified when the new segment's timeline is a prior value. Instead of\n    // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n    // more accurate to the actual start time of the segment.\n\n    if (segmentTimeline < currentTimeline) {\n      return startOfSegment;\n    } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n    // value uses the end of the last segment if it is available. While this value\n    // should often be correct, it's better to rely on the buffered end, as the new\n    // content post discontinuity should line up with the buffered end as if it were\n    // time 0 for the new content.\n\n    return buffered.length ? buffered.end(buffered.length - 1) : startOfSegment;\n  };\n  /**\n   * Returns whether or not the loader should wait for a timeline change from the timeline\n   * change controller before processing the segment.\n   *\n   * Primary timing in VHS goes by video. This is different from most media players, as\n   * audio is more often used as the primary timing source. For the foreseeable future, VHS\n   * will continue to use video as the primary timing source, due to the current logic and\n   * expectations built around it.\n\n   * Since the timing follows video, in order to maintain sync, the video loader is\n   * responsible for setting both audio and video source buffer timestamp offsets.\n   *\n   * Setting different values for audio and video source buffers could lead to\n   * desyncing. The following examples demonstrate some of the situations where this\n   * distinction is important. Note that all of these cases involve demuxed content. When\n   * content is muxed, the audio and video are packaged together, therefore syncing\n   * separate media playlists is not an issue.\n   *\n   * CASE 1: Audio prepares to load a new timeline before video:\n   *\n   * Timeline:       0                 1\n   * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n   * Audio Loader:                     ^\n   * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n   * Video Loader              ^\n   *\n   * In the above example, the audio loader is preparing to load the 6th segment, the first\n   * after a discontinuity, while the video loader is still loading the 5th segment, before\n   * the discontinuity.\n   *\n   * If the audio loader goes ahead and loads and appends the 6th segment before the video\n   * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n   * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n   * the audio loader must provide the audioAppendStart value to trim the content in the\n   * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n   * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n   * segment until that value is provided.\n   *\n   * CASE 2: Video prepares to load a new timeline before audio:\n   *\n   * Timeline:       0                 1\n   * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n   * Audio Loader:             ^\n   * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n   * Video Loader                      ^\n   *\n   * In the above example, the video loader is preparing to load the 6th segment, the first\n   * after a discontinuity, while the audio loader is still loading the 5th segment, before\n   * the discontinuity.\n   *\n   * If the video loader goes ahead and loads and appends the 6th segment, then once the\n   * segment is loaded and processed, both the video and audio timestamp offsets will be\n   * set, since video is used as the primary timing source. This is to ensure content lines\n   * up appropriately, as any modifications to the video timing are reflected by audio when\n   * the video loader sets the audio and video timestamp offsets to the same value. However,\n   * setting the timestamp offset for audio before audio has had a chance to change\n   * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n   * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n   *\n   * CASE 3: When seeking, audio prepares to load a new timeline before video\n   *\n   * Timeline:       0                 1\n   * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n   * Audio Loader:           ^\n   * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n   * Video Loader            ^\n   *\n   * In the above example, both audio and video loaders are loading segments from timeline\n   * 0, but imagine that the seek originated from timeline 1.\n   *\n   * When seeking to a new timeline, the timestamp offset will be set based on the expected\n   * segment start of the loaded video segment. In order to maintain sync, the audio loader\n   * must wait for the video loader to load its segment and update both the audio and video\n   * timestamp offsets before it may load and append its own segment. This is the case\n   * whether the seek results in a mismatched segment request (e.g., the audio loader\n   * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n   * loaders choose to load the same segment index from each playlist, as the segments may\n   * not be aligned perfectly, even for matching segment indexes.\n   *\n   * @param {Object} timelinechangeController\n   * @param {number} currentTimeline\n   *        The timeline currently being followed by the loader\n   * @param {number} segmentTimeline\n   *        The timeline of the segment being loaded\n   * @param {('main'|'audio')} loaderType\n   *        The loader type\n   * @param {boolean} audioDisabled\n   *        Whether the audio is disabled for the loader. This should only be true when the\n   *        loader may have muxed audio in its segment, but should not append it, e.g., for\n   *        the main loader when an alternate audio playlist is active.\n   *\n   * @return {boolean}\n   *         Whether the loader should wait for a timeline change from the timeline change\n   *         controller before processing the segment\n   */\n\n  const shouldWaitForTimelineChange = ({\n    timelineChangeController,\n    currentTimeline,\n    segmentTimeline,\n    loaderType,\n    audioDisabled\n  }) => {\n    if (currentTimeline === segmentTimeline) {\n      return false;\n    }\n    if (loaderType === 'audio') {\n      const lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n        type: 'main'\n      }); // Audio loader should wait if:\n      //\n      // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n      // * main hasn't yet changed to the timeline audio is looking to load\n\n      return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n    } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n    // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n    // loader's segments (or the content is audio/video only and handled by the main\n    // loader).\n\n    if (loaderType === 'main' && audioDisabled) {\n      const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n        type: 'audio'\n      }); // Main loader should wait for the audio loader if audio is not pending a timeline\n      // change to the current timeline.\n      //\n      // Since the main loader is responsible for setting the timestamp offset for both\n      // audio and video, the main loader must wait for audio to be about to change to its\n      // timeline before setting the offset, otherwise, if audio is behind in loading,\n      // segments from the previous timeline would be adjusted by the new timestamp offset.\n      //\n      // This requirement means that video will not cross a timeline until the audio is\n      // about to cross to it, so that way audio and video will always cross the timeline\n      // together.\n      //\n      // In addition to normal timeline changes, these rules also apply to the start of a\n      // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n      // that these rules apply to the first timeline change because if they did not, it's\n      // possible that the main loader will cross two timelines before the audio loader has\n      // crossed one. Logic may be implemented to handle the startup as a special case, but\n      // it's easier to simply treat all timeline changes the same.\n\n      if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n  const shouldFixBadTimelineChanges = timelineChangeController => {\n    if (!timelineChangeController) {\n      return false;\n    }\n    const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n      type: 'audio'\n    });\n    const pendingMainTimelineChange = timelineChangeController.pendingTimelineChange({\n      type: 'main'\n    });\n    const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;\n    const differentPendingChanges = hasPendingTimelineChanges && pendingAudioTimelineChange.to !== pendingMainTimelineChange.to;\n    const isNotInitialPendingTimelineChange = hasPendingTimelineChanges && pendingAudioTimelineChange.from !== -1 && pendingMainTimelineChange.from !== -1;\n    if (isNotInitialPendingTimelineChange && differentPendingChanges) {\n      return true;\n    }\n    return false;\n  };\n  /**\n   * Check if the pending audio timeline change is behind the\n   * pending main timeline change.\n   *\n   * @param {SegmentLoader} segmentLoader\n   * @return {boolean}\n   */\n\n  const isAudioTimelineBehind = segmentLoader => {\n    const pendingAudioTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({\n      type: 'audio'\n    });\n    const pendingMainTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({\n      type: 'main'\n    });\n    const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;\n    return hasPendingTimelineChanges && pendingAudioTimelineChange.to < pendingMainTimelineChange.to;\n  };\n  /**\n   * A method to check if the player is waiting for a timeline change, and fixes\n   * certain scenarios where the timelines need to be updated.\n   *\n   * @param {SegmentLoader} segmentLoader\n   */\n\n  const checkAndFixTimelines = segmentLoader => {\n    const segmentInfo = segmentLoader.pendingSegment_;\n    if (!segmentInfo) {\n      return;\n    }\n    const waitingForTimelineChange = shouldWaitForTimelineChange({\n      timelineChangeController: segmentLoader.timelineChangeController_,\n      currentTimeline: segmentLoader.currentTimeline_,\n      segmentTimeline: segmentInfo.timeline,\n      loaderType: segmentLoader.loaderType_,\n      audioDisabled: segmentLoader.audioDisabled_\n    });\n    if (waitingForTimelineChange && shouldFixBadTimelineChanges(segmentLoader.timelineChangeController_)) {\n      if (isAudioTimelineBehind(segmentLoader)) {\n        segmentLoader.timelineChangeController_.trigger('audioTimelineBehind');\n        return;\n      }\n      segmentLoader.timelineChangeController_.trigger('fixBadTimelineChange');\n    }\n  };\n  const mediaDuration = timingInfos => {\n    let maxDuration = 0;\n    ['video', 'audio'].forEach(function (type) {\n      const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n      if (!typeTimingInfo) {\n        return;\n      }\n      const {\n        start,\n        end\n      } = typeTimingInfo;\n      let duration;\n      if (typeof start === 'bigint' || typeof end === 'bigint') {\n        duration = window.BigInt(end) - window.BigInt(start);\n      } else if (typeof start === 'number' && typeof end === 'number') {\n        duration = end - start;\n      }\n      if (typeof duration !== 'undefined' && duration > maxDuration) {\n        maxDuration = duration;\n      }\n    }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n    // as we only need BigInt when we are above that.\n\n    if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n      maxDuration = Number(maxDuration);\n    }\n    return maxDuration;\n  };\n  const segmentTooLong = ({\n    segmentDuration,\n    maxDuration\n  }) => {\n    // 0 duration segments are most likely due to metadata only segments or a lack of\n    // information.\n    if (!segmentDuration) {\n      return false;\n    } // For HLS:\n    //\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n    // The EXTINF duration of each Media Segment in the Playlist\n    // file, when rounded to the nearest integer, MUST be less than or equal\n    // to the target duration; longer segments can trigger playback stalls\n    // or other errors.\n    //\n    // For DASH, the mpd-parser uses the largest reported segment duration as the target\n    // duration. Although that reported duration is occasionally approximate (i.e., not\n    // exact), a strict check may report that a segment is too long more often in DASH.\n\n    return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n  };\n  const getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => {\n    // Right now we aren't following DASH's timing model exactly, so only perform\n    // this check for HLS content.\n    if (sourceType !== 'hls') {\n      return null;\n    }\n    const segmentDuration = mediaDuration({\n      audioTimingInfo: segmentInfo.audioTimingInfo,\n      videoTimingInfo: segmentInfo.videoTimingInfo\n    }); // Don't report if we lack information.\n    //\n    // If the segment has a duration of 0 it is either a lack of information or a\n    // metadata only segment and shouldn't be reported here.\n\n    if (!segmentDuration) {\n      return null;\n    }\n    const targetDuration = segmentInfo.playlist.targetDuration;\n    const isSegmentWayTooLong = segmentTooLong({\n      segmentDuration,\n      maxDuration: targetDuration * 2\n    });\n    const isSegmentSlightlyTooLong = segmentTooLong({\n      segmentDuration,\n      maxDuration: targetDuration\n    });\n    const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n    if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n      return {\n        severity: isSegmentWayTooLong ? 'warn' : 'info',\n        message: segmentTooLongMessage\n      };\n    }\n    return null;\n  };\n  /**\n   *\n   * @param {Object} options type of segment loader and segment either segmentInfo or simple segment\n   * @return a segmentInfo payload for events or errors.\n   */\n\n  const segmentInfoPayload = ({\n    type,\n    segment\n  }) => {\n    if (!segment) {\n      return;\n    }\n    const isEncrypted = Boolean(segment.key || segment.map && segment.map.ke);\n    const isMediaInitialization = Boolean(segment.map && !segment.map.bytes);\n    const start = segment.startOfSegment === undefined ? segment.start : segment.startOfSegment;\n    return {\n      type: type || segment.type,\n      uri: segment.resolvedUri || segment.uri,\n      start,\n      duration: segment.duration,\n      isEncrypted,\n      isMediaInitialization\n    };\n  };\n  /**\n   * An object that manages segment loading and appending.\n   *\n   * @class SegmentLoader\n   * @param {Object} options required and optional options\n   * @extends videojs.EventTarget\n   */\n\n  class SegmentLoader extends videojs.EventTarget {\n    constructor(settings, options = {}) {\n      super(); // check pre-conditions\n\n      if (!settings) {\n        throw new TypeError('Initialization settings are required');\n      }\n      if (typeof settings.currentTime !== 'function') {\n        throw new TypeError('No currentTime getter specified');\n      }\n      if (!settings.mediaSource) {\n        throw new TypeError('No MediaSource specified');\n      } // public properties\n\n      this.bandwidth = settings.bandwidth;\n      this.throughput = {\n        rate: 0,\n        count: 0\n      };\n      this.roundTrip = NaN;\n      this.resetStats_();\n      this.mediaIndex = null;\n      this.partIndex = null; // private settings\n\n      this.hasPlayed_ = settings.hasPlayed;\n      this.currentTime_ = settings.currentTime;\n      this.seekable_ = settings.seekable;\n      this.seeking_ = settings.seeking;\n      this.duration_ = settings.duration;\n      this.mediaSource_ = settings.mediaSource;\n      this.vhs_ = settings.vhs;\n      this.loaderType_ = settings.loaderType;\n      this.currentMediaInfo_ = void 0;\n      this.startingMediaInfo_ = void 0;\n      this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n      this.goalBufferLength_ = settings.goalBufferLength;\n      this.sourceType_ = settings.sourceType;\n      this.sourceUpdater_ = settings.sourceUpdater;\n      this.inbandTextTracks_ = settings.inbandTextTracks;\n      this.state_ = 'INIT';\n      this.timelineChangeController_ = settings.timelineChangeController;\n      this.shouldSaveSegmentTimingInfo_ = true;\n      this.parse708captions_ = settings.parse708captions;\n      this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n      this.captionServices_ = settings.captionServices;\n      this.exactManifestTimings = settings.exactManifestTimings;\n      this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n      this.checkBufferTimeout_ = null;\n      this.error_ = void 0;\n      this.currentTimeline_ = -1;\n      this.shouldForceTimestampOffsetAfterResync_ = false;\n      this.pendingSegment_ = null;\n      this.xhrOptions_ = null;\n      this.pendingSegments_ = [];\n      this.audioDisabled_ = false;\n      this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n      this.gopBuffer_ = [];\n      this.timeMapping_ = 0;\n      this.safeAppend_ = false;\n      this.appendInitSegment_ = {\n        audio: true,\n        video: true\n      };\n      this.playlistOfLastInitSegment_ = {\n        audio: null,\n        video: null\n      };\n      this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n      // information yet to start the loading process (e.g., if the audio loader wants to\n      // load a segment from the next timeline but the main loader hasn't yet crossed that\n      // timeline), then the load call will be added to the queue until it is ready to be\n      // processed.\n\n      this.loadQueue_ = [];\n      this.metadataQueue_ = {\n        id3: [],\n        caption: []\n      };\n      this.waitingOnRemove_ = false;\n      this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n      this.activeInitSegmentId_ = null;\n      this.initSegments_ = {}; // HLSe playback\n\n      this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n      this.keyCache_ = {};\n      this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n      // between a time in the display time and a segment index within\n      // a playlist\n\n      this.syncController_ = settings.syncController;\n      this.syncPoint_ = {\n        segmentIndex: 0,\n        time: 0\n      };\n      this.transmuxer_ = this.createTransmuxer_();\n      this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n      this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n      this.mediaSource_.addEventListener('sourceopen', () => {\n        if (!this.isEndOfStream_()) {\n          this.ended_ = false;\n        }\n      }); // ...for determining the fetch location\n\n      this.fetchAtBuffer_ = false;\n      this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n      Object.defineProperty(this, 'state', {\n        get() {\n          return this.state_;\n        },\n        set(newState) {\n          if (newState !== this.state_) {\n            this.logger_(`${this.state_} -> ${newState}`);\n            this.state_ = newState;\n            this.trigger('statechange');\n          }\n        }\n      });\n      this.sourceUpdater_.on('ready', () => {\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        } else {\n          checkAndFixTimelines(this);\n        }\n      });\n      this.sourceUpdater_.on('codecschange', metadata => {\n        this.trigger(_extends$1({\n          type: 'codecschange'\n        }, metadata));\n      }); // Only the main loader needs to listen for pending timeline changes, as the main\n      // loader should wait for audio to be ready to change its timeline so that both main\n      // and audio timelines change together. For more details, see the\n      // shouldWaitForTimelineChange function.\n\n      if (this.loaderType_ === 'main') {\n        this.timelineChangeController_.on('pendingtimelinechange', () => {\n          if (this.hasEnoughInfoToAppend_()) {\n            this.processCallQueue_();\n          } else {\n            checkAndFixTimelines(this);\n          }\n        });\n      } // The main loader only listens on pending timeline changes, but the audio loader,\n      // since its loads follow main, needs to listen on timeline changes. For more details,\n      // see the shouldWaitForTimelineChange function.\n\n      if (this.loaderType_ === 'audio') {\n        this.timelineChangeController_.on('timelinechange', metadata => {\n          this.trigger(_extends$1({\n            type: 'timelinechange'\n          }, metadata));\n          if (this.hasEnoughInfoToLoad_()) {\n            this.processLoadQueue_();\n          } else {\n            checkAndFixTimelines(this);\n          }\n          if (this.hasEnoughInfoToAppend_()) {\n            this.processCallQueue_();\n          } else {\n            checkAndFixTimelines(this);\n          }\n        });\n      }\n    }\n    /**\n     * TODO: Current sync controller consists of many hls-specific strategies\n     * media sequence sync is also hls-specific, and we would like to be protocol-agnostic on this level\n     * this should be a part of the sync-controller and sync controller should expect different strategy list based on the protocol.\n     *\n     * @return {MediaSequenceSync|null}\n     * @private\n     */\n\n    get mediaSequenceSync_() {\n      return this.syncController_.getMediaSequenceSync(this.loaderType_);\n    }\n    createTransmuxer_() {\n      return segmentTransmuxer.createTransmuxer({\n        remux: false,\n        alignGopsAtEnd: this.safeAppend_,\n        keepOriginalTimestamps: true,\n        parse708captions: this.parse708captions_,\n        captionServices: this.captionServices_\n      });\n    }\n    /**\n     * reset all of our media stats\n     *\n     * @private\n     */\n\n    resetStats_() {\n      this.mediaBytesTransferred = 0;\n      this.mediaRequests = 0;\n      this.mediaRequestsAborted = 0;\n      this.mediaRequestsTimedout = 0;\n      this.mediaRequestsErrored = 0;\n      this.mediaTransferDuration = 0;\n      this.mediaSecondsLoaded = 0;\n      this.mediaAppends = 0;\n    }\n    /**\n     * dispose of the SegmentLoader and reset to the default state\n     */\n\n    dispose() {\n      this.trigger('dispose');\n      this.state = 'DISPOSED';\n      this.pause();\n      this.abort_();\n      if (this.transmuxer_) {\n        this.transmuxer_.terminate();\n      }\n      this.resetStats_();\n      if (this.checkBufferTimeout_) {\n        window.clearTimeout(this.checkBufferTimeout_);\n      }\n      if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n        this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n      }\n      this.off();\n    }\n    setAudio(enable) {\n      this.audioDisabled_ = !enable;\n      if (enable) {\n        this.appendInitSegment_.audio = true;\n      } else {\n        // remove current track audio if it gets disabled\n        this.sourceUpdater_.removeAudio(0, this.duration_());\n      }\n    }\n    /**\n     * abort anything that is currently doing on with the SegmentLoader\n     * and reset to a default state\n     */\n\n    abort() {\n      if (this.state !== 'WAITING') {\n        if (this.pendingSegment_) {\n          this.pendingSegment_ = null;\n        }\n        this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n        return;\n      }\n      this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n      // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n      // when the request is aborted. This will prevent the loader from being stuck in the\n      // WAITING state indefinitely.\n\n      this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n      // next segment\n\n      if (!this.paused()) {\n        this.monitorBuffer_();\n      }\n    }\n    /**\n     * abort all pending xhr requests and null any pending segements\n     *\n     * @private\n     */\n\n    abort_() {\n      if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n        this.pendingSegment_.abortRequests();\n      } // clear out the segment being processed\n\n      this.pendingSegment_ = null;\n      this.callQueue_ = [];\n      this.loadQueue_ = [];\n      this.metadataQueue_.id3 = [];\n      this.metadataQueue_.caption = [];\n      this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n      this.waitingOnRemove_ = false;\n      window.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n      this.quotaExceededErrorRetryTimeout_ = null;\n    }\n    checkForAbort_(requestId) {\n      // If the state is APPENDING, then aborts will not modify the state, meaning the first\n      // callback that happens should reset the state to READY so that loading can continue.\n      if (this.state === 'APPENDING' && !this.pendingSegment_) {\n        this.state = 'READY';\n        return true;\n      }\n      if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n        return true;\n      }\n      return false;\n    }\n    /**\n     * set an error on the segment loader and null out any pending segements\n     *\n     * @param {Error} error the error to set on the SegmentLoader\n     * @return {Error} the error that was set or that is currently set\n     */\n\n    error(error) {\n      if (typeof error !== 'undefined') {\n        this.logger_('error occurred:', error);\n        this.error_ = error;\n      }\n      this.pendingSegment_ = null;\n      return this.error_;\n    }\n    endOfStream() {\n      this.ended_ = true;\n      if (this.transmuxer_) {\n        // need to clear out any cached data to prepare for the new segment\n        segmentTransmuxer.reset(this.transmuxer_);\n      }\n      this.gopBuffer_.length = 0;\n      this.pause();\n      this.trigger('ended');\n    }\n    /**\n     * Indicates which time ranges are buffered\n     *\n     * @return {TimeRange}\n     *         TimeRange object representing the current buffered ranges\n     */\n\n    buffered_() {\n      const trackInfo = this.getMediaInfo_();\n      if (!this.sourceUpdater_ || !trackInfo) {\n        return createTimeRanges();\n      }\n      if (this.loaderType_ === 'main') {\n        const {\n          hasAudio,\n          hasVideo,\n          isMuxed\n        } = trackInfo;\n        if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n          return this.sourceUpdater_.buffered();\n        }\n        if (hasVideo) {\n          return this.sourceUpdater_.videoBuffered();\n        }\n      } // One case that can be ignored for now is audio only with alt audio,\n      // as we don't yet have proper support for that.\n\n      return this.sourceUpdater_.audioBuffered();\n    }\n    /**\n     * Gets and sets init segment for the provided map\n     *\n     * @param {Object} map\n     *        The map object representing the init segment to get or set\n     * @param {boolean=} set\n     *        If true, the init segment for the provided map should be saved\n     * @return {Object}\n     *         map object for desired init segment\n     */\n\n    initSegmentForMap(map, set = false) {\n      if (!map) {\n        return null;\n      }\n      const id = initSegmentId(map);\n      let storedMap = this.initSegments_[id];\n      if (set && !storedMap && map.bytes) {\n        this.initSegments_[id] = storedMap = {\n          resolvedUri: map.resolvedUri,\n          byterange: map.byterange,\n          bytes: map.bytes,\n          tracks: map.tracks,\n          timescales: map.timescales\n        };\n      }\n      return storedMap || map;\n    }\n    /**\n     * Gets and sets key for the provided key\n     *\n     * @param {Object} key\n     *        The key object representing the key to get or set\n     * @param {boolean=} set\n     *        If true, the key for the provided key should be saved\n     * @return {Object}\n     *         Key object for desired key\n     */\n\n    segmentKey(key, set = false) {\n      if (!key) {\n        return null;\n      }\n      const id = segmentKeyId(key);\n      let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n      // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n      if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n        this.keyCache_[id] = storedKey = {\n          resolvedUri: key.resolvedUri,\n          bytes: key.bytes\n        };\n      }\n      const result = {\n        resolvedUri: (storedKey || key).resolvedUri\n      };\n      if (storedKey) {\n        result.bytes = storedKey.bytes;\n      }\n      return result;\n    }\n    /**\n     * Returns true if all configuration required for loading is present, otherwise false.\n     *\n     * @return {boolean} True if the all configuration is ready for loading\n     * @private\n     */\n\n    couldBeginLoading_() {\n      return this.playlist_ && !this.paused();\n    }\n    /**\n     * load a playlist and start to fill the buffer\n     */\n\n    load() {\n      // un-pause\n      this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n      // specified\n\n      if (!this.playlist_) {\n        return;\n      } // if all the configuration is ready, initialize and begin loading\n\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\n        return this.init_();\n      } // if we're in the middle of processing a segment already, don't\n      // kick off an additional segment request\n\n      if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n        return;\n      }\n      this.state = 'READY';\n    }\n    /**\n     * Once all the starting parameters have been specified, begin\n     * operation. This method should only be invoked from the INIT\n     * state.\n     *\n     * @private\n     */\n\n    init_() {\n      this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n      // audio data from the muxed content should be removed\n\n      this.resetEverything();\n      return this.monitorBuffer_();\n    }\n    /**\n     * set a playlist on the segment loader\n     *\n     * @param {PlaylistLoader} media the playlist to set on the segment loader\n     */\n\n    playlist(newPlaylist, options = {}) {\n      if (!newPlaylist) {\n        return;\n      }\n      if (this.playlist_ && this.playlist_.endList && newPlaylist.endList && this.playlist_.uri === newPlaylist.uri) {\n        // skip update if both prev and new are vod and have the same URI\n        return;\n      }\n      const oldPlaylist = this.playlist_;\n      const segmentInfo = this.pendingSegment_;\n      this.playlist_ = newPlaylist;\n      this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n      // is always our zero-time so force a sync update each time the playlist\n      // is refreshed from the server\n      //\n      // Use the INIT state to determine if playback has started, as the playlist sync info\n      // should be fixed once requests begin (as sync points are generated based on sync\n      // info), but not before then.\n\n      if (this.state === 'INIT') {\n        newPlaylist.syncInfo = {\n          mediaSequence: newPlaylist.mediaSequence,\n          time: 0\n        }; // Setting the date time mapping means mapping the program date time (if available)\n        // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n        // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n        // be updated as the playlist is refreshed before the loader starts loading, the\n        // program date time mapping needs to be updated as well.\n        //\n        // This mapping is only done for the main loader because a program date time should\n        // map equivalently between playlists.\n\n        if (this.loaderType_ === 'main') {\n          this.syncController_.setDateTimeMappingForStart(newPlaylist);\n        }\n      }\n      let oldId = null;\n      if (oldPlaylist) {\n        if (oldPlaylist.id) {\n          oldId = oldPlaylist.id;\n        } else if (oldPlaylist.uri) {\n          oldId = oldPlaylist.uri;\n        }\n      }\n      this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`);\n      if (this.mediaSequenceSync_) {\n        this.mediaSequenceSync_.update(newPlaylist, this.currentTime_());\n        this.logger_(`Playlist update:\ncurrentTime: ${this.currentTime_()}\nbufferedEnd: ${lastBufferedEnd(this.buffered_())}\n`, this.mediaSequenceSync_.diagnostics);\n      } // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n      // in LIVE, we always want to update with new playlists (including refreshes)\n\n      this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n      // buffering now\n\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\n        return this.init_();\n      }\n      if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n        if (this.mediaIndex !== null) {\n          // we must reset/resync the segment loader when we switch renditions and\n          // the segment loader is already synced to the previous rendition\n          // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n          // to false, resulting in fetching segments at currentTime and causing repeated\n          // same-segment requests on playlist change. This erroneously drives up the playback watcher\n          // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n          // will not change the buffer.\n          // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n          const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n          if (isLLHLS) {\n            this.resetLoader();\n          } else {\n            this.resyncLoader();\n          }\n        }\n        this.currentMediaInfo_ = void 0;\n        this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n        return;\n      } // we reloaded the same playlist so we are in a live scenario\n      // and we will likely need to adjust the mediaIndex\n\n      const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n      this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader\n      // this is important because we can abort a request and this value must be\n      // equal to the last appended mediaIndex\n\n      if (this.mediaIndex !== null) {\n        this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n        // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n        // new playlist was incremented by 1.\n\n        if (this.mediaIndex < 0) {\n          this.mediaIndex = null;\n          this.partIndex = null;\n        } else {\n          const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n          // unless parts fell off of the playlist for this segment.\n          // In that case we need to reset partIndex and resync\n\n          if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n            const mediaIndex = this.mediaIndex;\n            this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);\n            this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n            // as the part was dropped from our current playlists segment.\n            // The mediaIndex will still be valid so keep that around.\n\n            this.mediaIndex = mediaIndex;\n          }\n        }\n      } // update the mediaIndex on the SegmentInfo object\n      // this is important because we will update this.mediaIndex with this value\n      // in `handleAppendsDone_` after the segment has been successfully appended\n\n      if (segmentInfo) {\n        segmentInfo.mediaIndex -= mediaSequenceDiff;\n        if (segmentInfo.mediaIndex < 0) {\n          segmentInfo.mediaIndex = null;\n          segmentInfo.partIndex = null;\n        } else {\n          // we need to update the referenced segment so that timing information is\n          // saved for the new playlist's segment, however, if the segment fell off the\n          // playlist, we can leave the old reference and just lose the timing info\n          if (segmentInfo.mediaIndex >= 0) {\n            segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n          }\n          if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n            segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n          }\n        }\n      }\n      this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n    }\n    /**\n     * Prevent the loader from fetching additional segments. If there\n     * is a segment request outstanding, it will finish processing\n     * before the loader halts. A segment loader can be unpaused by\n     * calling load().\n     */\n\n    pause() {\n      if (this.checkBufferTimeout_) {\n        window.clearTimeout(this.checkBufferTimeout_);\n        this.checkBufferTimeout_ = null;\n      }\n    }\n    /**\n     * Returns whether the segment loader is fetching additional\n     * segments when given the opportunity. This property can be\n     * modified through calls to pause() and load().\n     */\n\n    paused() {\n      return this.checkBufferTimeout_ === null;\n    }\n    /**\n     * Delete all the buffered data and reset the SegmentLoader\n     *\n     * @param {Function} [done] an optional callback to be executed when the remove\n     * operation is complete\n     */\n\n    resetEverything(done) {\n      this.ended_ = false;\n      this.activeInitSegmentId_ = null;\n      this.appendInitSegment_ = {\n        audio: true,\n        video: true\n      };\n      this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n      // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n      // we then clamp the value to duration if necessary.\n\n      this.remove(0, Infinity, done); // clears fmp4 captions\n\n      if (this.transmuxer_) {\n        this.transmuxer_.postMessage({\n          action: 'clearAllMp4Captions'\n        }); // reset the cache in the transmuxer\n\n        this.transmuxer_.postMessage({\n          action: 'reset'\n        });\n      }\n    }\n    /**\n     * Force the SegmentLoader to resync and start loading around the currentTime instead\n     * of starting at the end of the buffer\n     *\n     * Useful for fast quality changes\n     */\n\n    resetLoader() {\n      this.fetchAtBuffer_ = false;\n      if (this.mediaSequenceSync_) {\n        this.mediaSequenceSync_.resetAppendedStatus();\n      }\n      this.resyncLoader();\n    }\n    /**\n     * Force the SegmentLoader to restart synchronization and make a conservative guess\n     * before returning to the simple walk-forward method\n     */\n\n    resyncLoader() {\n      if (this.transmuxer_) {\n        // need to clear out any cached data to prepare for the new segment\n        segmentTransmuxer.reset(this.transmuxer_);\n      }\n      this.mediaIndex = null;\n      this.partIndex = null;\n      this.syncPoint_ = null;\n      this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,\n      // so we don't want it for DASH or fragmented mp4 segments.\n\n      const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;\n      const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;\n      if (isHlsTs) {\n        this.shouldForceTimestampOffsetAfterResync_ = true;\n      }\n      this.callQueue_ = [];\n      this.loadQueue_ = [];\n      this.metadataQueue_.id3 = [];\n      this.metadataQueue_.caption = [];\n      this.abort();\n      if (this.transmuxer_) {\n        this.transmuxer_.postMessage({\n          action: 'clearParsedMp4Captions'\n        });\n      }\n    }\n    /**\n     * Remove any data in the source buffer between start and end times\n     *\n     * @param {number} start - the start time of the region to remove from the buffer\n     * @param {number} end - the end time of the region to remove from the buffer\n     * @param {Function} [done] - an optional callback to be executed when the remove\n     * @param {boolean} force - force all remove operations to happen\n     * operation is complete\n     */\n\n    remove(start, end, done = () => {}, force = false) {\n      // clamp end to duration if we need to remove everything.\n      // This is due to a browser bug that causes issues if we remove to Infinity.\n      // videojs/videojs-contrib-hls#1225\n      if (end === Infinity) {\n        end = this.duration_();\n      } // skip removes that would throw an error\n      // commonly happens during a rendition switch at the start of a video\n      // from start 0 to end 0\n\n      if (end <= start) {\n        this.logger_('skipping remove because end ${end} is <= start ${start}');\n        return;\n      }\n      if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n        this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n        return;\n      } // set it to one to complete this function's removes\n\n      let removesRemaining = 1;\n      const removeFinished = () => {\n        removesRemaining--;\n        if (removesRemaining === 0) {\n          done();\n        }\n      };\n      if (force || !this.audioDisabled_) {\n        removesRemaining++;\n        this.sourceUpdater_.removeAudio(start, end, removeFinished);\n      } // While it would be better to only remove video if the main loader has video, this\n      // should be safe with audio only as removeVideo will call back even if there's no\n      // video buffer.\n      //\n      // In theory we can check to see if there's video before calling the remove, but in\n      // the event that we're switching between renditions and from video to audio only\n      // (when we add support for that), we may need to clear the video contents despite\n      // what the new media will contain.\n\n      if (force || this.loaderType_ === 'main') {\n        this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n        removesRemaining++;\n        this.sourceUpdater_.removeVideo(start, end, removeFinished);\n      } // remove any captions and ID3 tags\n\n      for (const track in this.inbandTextTracks_) {\n        removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n      }\n      removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n      removeFinished();\n    }\n    /**\n     * (re-)schedule monitorBufferTick_ to run as soon as possible\n     *\n     * @private\n     */\n\n    monitorBuffer_() {\n      if (this.checkBufferTimeout_) {\n        window.clearTimeout(this.checkBufferTimeout_);\n      }\n      this.checkBufferTimeout_ = window.setTimeout(this.monitorBufferTick_.bind(this), 1);\n    }\n    /**\n     * As long as the SegmentLoader is in the READY state, periodically\n     * invoke fillBuffer_().\n     *\n     * @private\n     */\n\n    monitorBufferTick_() {\n      if (this.state === 'READY') {\n        this.fillBuffer_();\n      }\n      if (this.checkBufferTimeout_) {\n        window.clearTimeout(this.checkBufferTimeout_);\n      }\n      this.checkBufferTimeout_ = window.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n    }\n    /**\n     * fill the buffer with segements unless the sourceBuffers are\n     * currently updating\n     *\n     * Note: this function should only ever be called by monitorBuffer_\n     * and never directly\n     *\n     * @private\n     */\n\n    fillBuffer_() {\n      // TODO since the source buffer maintains a queue, and we shouldn't call this function\n      // except when we're ready for the next segment, this check can most likely be removed\n      if (this.sourceUpdater_.updating()) {\n        return;\n      } // see if we need to begin loading immediately\n\n      const segmentInfo = this.chooseNextRequest_();\n      if (!segmentInfo) {\n        return;\n      }\n      const metadata = {\n        segmentInfo: segmentInfoPayload({\n          type: this.loaderType_,\n          segment: segmentInfo\n        })\n      };\n      this.trigger({\n        type: 'segmentselected',\n        metadata\n      });\n      if (typeof segmentInfo.timestampOffset === 'number') {\n        this.isPendingTimestampOffset_ = false;\n        this.timelineChangeController_.pendingTimelineChange({\n          type: this.loaderType_,\n          from: this.currentTimeline_,\n          to: segmentInfo.timeline\n        });\n      }\n      this.loadSegment_(segmentInfo);\n    }\n    /**\n     * Determines if we should call endOfStream on the media source based\n     * on the state of the buffer or if appened segment was the final\n     * segment in the playlist.\n     *\n     * @param {number} [mediaIndex] the media index of segment we last appended\n     * @param {Object} [playlist] a media playlist object\n     * @return {boolean} do we need to call endOfStream on the MediaSource\n     */\n\n    isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n      if (!playlist || !this.mediaSource_) {\n        return false;\n      }\n      const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n      const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n      const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n      // so that MediaSources can trigger the `ended` event when it runs out of\n      // buffered data instead of waiting for me\n\n      return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n    }\n    /**\n     * Determines what request should be made given current segment loader state.\n     *\n     * @return {Object} a request object that describes the segment/part to load\n     */\n\n    chooseNextRequest_() {\n      const buffered = this.buffered_();\n      const bufferedEnd = lastBufferedEnd(buffered) || 0;\n      const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n      const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n      const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n      const segments = this.playlist_.segments; // return no segment if:\n      // 1. we don't have segments\n      // 2. The video has not yet played and we already downloaded a segment\n      // 3. we already have enough buffered time\n\n      if (!segments.length || preloaded || haveEnoughBuffer) {\n        return null;\n      }\n      this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_(), this.loaderType_);\n      const next = {\n        partIndex: null,\n        mediaIndex: null,\n        startOfSegment: null,\n        playlist: this.playlist_,\n        isSyncRequest: Boolean(!this.syncPoint_)\n      };\n      if (next.isSyncRequest) {\n        next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n        this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${next.mediaIndex}`);\n      } else if (this.mediaIndex !== null) {\n        const segment = segments[this.mediaIndex];\n        const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n        next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n        if (segment.parts && segment.parts[partIndex + 1]) {\n          next.mediaIndex = this.mediaIndex;\n          next.partIndex = partIndex + 1;\n        } else {\n          next.mediaIndex = this.mediaIndex + 1;\n        }\n      } else {\n        let segmentIndex;\n        let partIndex;\n        let startTime;\n        const targetTime = this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_();\n        if (this.mediaSequenceSync_) {\n          this.logger_(`chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ${targetTime}.\nCurrentTime: ${this.currentTime_()}\nBufferedEnd: ${bufferedEnd}\nFetch At Buffer: ${this.fetchAtBuffer_}\n`, this.mediaSequenceSync_.diagnostics);\n        }\n        if (this.mediaSequenceSync_ && this.mediaSequenceSync_.isReliable) {\n          const syncInfo = this.getSyncInfoFromMediaSequenceSync_(targetTime);\n          if (!syncInfo) {\n            const message = 'No sync info found while using media sequence sync';\n            this.error({\n              message,\n              metadata: {\n                errorType: videojs.Error.StreamingFailedToSelectNextSegment,\n                error: new Error(message)\n              }\n            });\n            this.logger_('chooseNextRequest_ - no sync info found using media sequence sync'); // no match\n\n            return null;\n          }\n          this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${syncInfo.start} --> ${syncInfo.end})`);\n          segmentIndex = syncInfo.segmentIndex;\n          partIndex = syncInfo.partIndex;\n          startTime = syncInfo.start;\n        } else {\n          this.logger_('chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.'); // fallback\n\n          const mediaInfoForTime = Playlist.getMediaInfoForTime({\n            exactManifestTimings: this.exactManifestTimings,\n            playlist: this.playlist_,\n            currentTime: targetTime,\n            startingPartIndex: this.syncPoint_.partIndex,\n            startingSegmentIndex: this.syncPoint_.segmentIndex,\n            startTime: this.syncPoint_.time\n          });\n          segmentIndex = mediaInfoForTime.segmentIndex;\n          partIndex = mediaInfoForTime.partIndex;\n          startTime = mediaInfoForTime.startTime;\n        }\n        next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${targetTime}` : `currentTime ${targetTime}`;\n        next.mediaIndex = segmentIndex;\n        next.startOfSegment = startTime;\n        next.partIndex = partIndex;\n        this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${next.mediaIndex} `);\n      }\n      const nextSegment = segments[next.mediaIndex];\n      let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n      // the next partIndex is invalid do not choose a next segment.\n\n      if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n        return null;\n      } // if the next segment has parts, and we don't have a partIndex.\n      // Set partIndex to 0\n\n      if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n        next.partIndex = 0;\n        nextPart = nextSegment.parts[0];\n      } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n      // it applies to each segment in each media playlist.\n      // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n      const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n      // that the next part we append is \"independent\" if possible.\n      // So we check if the previous part is independent, and request\n      // it if it is.\n\n      if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n        if (next.partIndex === 0) {\n          const lastSegment = segments[next.mediaIndex - 1];\n          const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n          if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n            next.mediaIndex -= 1;\n            next.partIndex = lastSegment.parts.length - 1;\n            next.independent = 'previous segment';\n          }\n        } else if (nextSegment.parts[next.partIndex - 1].independent) {\n          next.partIndex -= 1;\n          next.independent = 'previous part';\n        }\n      }\n      const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n      // 1. this is the last segment in the playlist\n      // 2. end of stream has been called on the media source already\n      // 3. the player is not seeking\n\n      if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n        return null;\n      }\n      if (this.shouldForceTimestampOffsetAfterResync_) {\n        this.shouldForceTimestampOffsetAfterResync_ = false;\n        next.forceTimestampOffset = true;\n        this.logger_('choose next request. Force timestamp offset after loader resync');\n      }\n      return this.generateSegmentInfo_(next);\n    }\n    getSyncInfoFromMediaSequenceSync_(targetTime) {\n      if (!this.mediaSequenceSync_) {\n        return null;\n      } // we should pull the target time to the least available time if we drop out of sync for any reason\n\n      const finalTargetTime = Math.max(targetTime, this.mediaSequenceSync_.start);\n      if (targetTime !== finalTargetTime) {\n        this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${targetTime} to ${finalTargetTime}`);\n      }\n      const mediaSequenceSyncInfo = this.mediaSequenceSync_.getSyncInfoForTime(finalTargetTime);\n      if (!mediaSequenceSyncInfo) {\n        // no match at all\n        return null;\n      }\n      if (!mediaSequenceSyncInfo.isAppended) {\n        // has a perfect match\n        return mediaSequenceSyncInfo;\n      } // has match, but segment was already appended.\n      // attempt to auto-advance to the nearest next segment:\n\n      const nextMediaSequenceSyncInfo = this.mediaSequenceSync_.getSyncInfoForTime(mediaSequenceSyncInfo.end);\n      if (!nextMediaSequenceSyncInfo) {\n        // no match at all\n        return null;\n      }\n      if (nextMediaSequenceSyncInfo.isAppended) {\n        this.logger_('getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!');\n      } // got match with the nearest next segment\n\n      return nextMediaSequenceSyncInfo;\n    }\n    generateSegmentInfo_(options) {\n      const {\n        independent,\n        playlist,\n        mediaIndex,\n        startOfSegment,\n        isSyncRequest,\n        partIndex,\n        forceTimestampOffset,\n        getMediaInfoForTime\n      } = options;\n      const segment = playlist.segments[mediaIndex];\n      const part = typeof partIndex === 'number' && segment.parts[partIndex];\n      const segmentInfo = {\n        requestId: 'segment-loader-' + Math.random(),\n        // resolve the segment URL relative to the playlist\n        uri: part && part.resolvedUri || segment.resolvedUri,\n        // the segment's mediaIndex at the time it was requested\n        mediaIndex,\n        partIndex: part ? partIndex : null,\n        // whether or not to update the SegmentLoader's state with this\n        // segment's mediaIndex\n        isSyncRequest,\n        startOfSegment,\n        // the segment's playlist\n        playlist,\n        // unencrypted bytes of the segment\n        bytes: null,\n        // when a key is defined for this segment, the encrypted bytes\n        encryptedBytes: null,\n        // The target timestampOffset for this segment when we append it\n        // to the source buffer\n        timestampOffset: null,\n        // The timeline that the segment is in\n        timeline: segment.timeline,\n        // The expected duration of the segment in seconds\n        duration: part && part.duration || segment.duration,\n        // retain the segment in case the playlist updates while doing an async process\n        segment,\n        part,\n        byteLength: 0,\n        transmuxer: this.transmuxer_,\n        // type of getMediaInfoForTime that was used to get this segment\n        getMediaInfoForTime,\n        independent\n      };\n      const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n      segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n        segmentTimeline: segment.timeline,\n        currentTimeline: this.currentTimeline_,\n        startOfSegment,\n        buffered: this.buffered_(),\n        overrideCheck\n      });\n      const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n      if (typeof audioBufferedEnd === 'number') {\n        // since the transmuxer is using the actual timing values, but the buffer is\n        // adjusted by the timestamp offset, we must adjust the value here\n        segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n      }\n      if (this.sourceUpdater_.videoBuffered().length) {\n        segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n        // since the transmuxer is using the actual timing values, but the time is\n        // adjusted by the timestmap offset, we must adjust the value here\n        this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n      }\n      return segmentInfo;\n    } // get the timestampoffset for a segment,\n    // added so that vtt segment loader can override and prevent\n    // adding timestamp offsets.\n\n    timestampOffsetForSegment_(options) {\n      return timestampOffsetForSegment(options);\n    }\n    /**\n     * Determines if the network has enough bandwidth to complete the current segment\n     * request in a timely manner. If not, the request will be aborted early and bandwidth\n     * updated to trigger a playlist switch.\n     *\n     * @param {Object} stats\n     *        Object containing stats about the request timing and size\n     * @private\n     */\n\n    earlyAbortWhenNeeded_(stats) {\n      if (this.vhs_.tech_.paused() ||\n      // Don't abort if the current playlist is on the lowestEnabledRendition\n      // TODO: Replace using timeout with a boolean indicating whether this playlist is\n      //       the lowestEnabledRendition.\n      !this.xhrOptions_.timeout ||\n      // Don't abort if we have no bandwidth information to estimate segment sizes\n      !this.playlist_.attributes.BANDWIDTH) {\n        return;\n      } // Wait at least 1 second since the first byte of data has been received before\n      // using the calculated bandwidth from the progress event to allow the bitrate\n      // to stabilize\n\n      if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n        return;\n      }\n      const currentTime = this.currentTime_();\n      const measuredBandwidth = stats.bandwidth;\n      const segmentDuration = this.pendingSegment_.duration;\n      const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n      // if we are only left with less than 1 second when the request completes.\n      // A negative timeUntilRebuffering indicates we are already rebuffering\n\n      const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n      // is larger than the estimated time until the player runs out of forward buffer\n\n      if (requestTimeRemaining <= timeUntilRebuffer$1) {\n        return;\n      }\n      const switchCandidate = minRebufferMaxBandwidthSelector({\n        main: this.vhs_.playlists.main,\n        currentTime,\n        bandwidth: measuredBandwidth,\n        duration: this.duration_(),\n        segmentDuration,\n        timeUntilRebuffer: timeUntilRebuffer$1,\n        currentTimeline: this.currentTimeline_,\n        syncController: this.syncController_\n      });\n      if (!switchCandidate) {\n        return;\n      }\n      const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n      const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n      let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n      // potential round trip time of the new request so that we are not too aggressive\n      // with switching to a playlist that might save us a fraction of a second.\n\n      if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n        minimumTimeSaving = 1;\n      }\n      if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n        return;\n      } // set the bandwidth to that of the desired playlist being sure to scale by\n      // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n      // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n      this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n      this.trigger('earlyabort');\n    }\n    handleAbort_(segmentInfo) {\n      this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`);\n      this.mediaRequestsAborted += 1;\n    }\n    /**\n     * XHR `progress` event handler\n     *\n     * @param {Event}\n     *        The XHR `progress` event\n     * @param {Object} simpleSegment\n     *        A simplified segment object copy\n     * @private\n     */\n\n    handleProgress_(event, simpleSegment) {\n      this.earlyAbortWhenNeeded_(simpleSegment.stats);\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      }\n      this.trigger('progress');\n    }\n    handleTrackInfo_(simpleSegment, trackInfo) {\n      const {\n        hasAudio,\n        hasVideo\n      } = trackInfo;\n      const metadata = {\n        segmentInfo: segmentInfoPayload({\n          type: this.loaderType_,\n          segment: simpleSegment\n        }),\n        trackInfo: {\n          hasAudio,\n          hasVideo\n        }\n      };\n      this.trigger({\n        type: 'segmenttransmuxingtrackinfoavailable',\n        metadata\n      });\n      this.earlyAbortWhenNeeded_(simpleSegment.stats);\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      }\n      if (this.checkForIllegalMediaSwitch(trackInfo)) {\n        return;\n      }\n      trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n      // Guard against cases where we're not getting track info at all until we are\n      // certain that all streams will provide it.\n\n      if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n        this.appendInitSegment_ = {\n          audio: true,\n          video: true\n        };\n        this.startingMediaInfo_ = trackInfo;\n        this.currentMediaInfo_ = trackInfo;\n        this.logger_('trackinfo update', trackInfo);\n        this.trigger('trackinfo');\n      } // trackinfo may cause an abort if the trackinfo\n      // causes a codec change to an unsupported codec.\n\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      } // set trackinfo on the pending segment so that\n      // it can append.\n\n      this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n      if (this.hasEnoughInfoToAppend_()) {\n        this.processCallQueue_();\n      } else {\n        checkAndFixTimelines(this);\n      }\n    }\n    handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n      this.earlyAbortWhenNeeded_(simpleSegment.stats);\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      }\n      const segmentInfo = this.pendingSegment_;\n      const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n      segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n      segmentInfo[timingInfoProperty][timeType] = time;\n      this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n      if (this.hasEnoughInfoToAppend_()) {\n        this.processCallQueue_();\n      } else {\n        checkAndFixTimelines(this);\n      }\n    }\n    handleCaptions_(simpleSegment, captionData) {\n      this.earlyAbortWhenNeeded_(simpleSegment.stats);\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      } // This could only happen with fmp4 segments, but\n      // should still not happen in general\n\n      if (captionData.length === 0) {\n        this.logger_('SegmentLoader received no captions from a caption event');\n        return;\n      }\n      const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n      // can be adjusted by the timestamp offset\n\n      if (!segmentInfo.hasAppendedData_) {\n        this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n        return;\n      }\n      const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n      const captionTracks = {}; // get total start/end and captions for each track/stream\n\n      captionData.forEach(caption => {\n        // caption.stream is actually a track name...\n        // set to the existing values in tracks or default values\n        captionTracks[caption.stream] = captionTracks[caption.stream] || {\n          // Infinity, as any other value will be less than this\n          startTime: Infinity,\n          captions: [],\n          // 0 as an other value will be more than this\n          endTime: 0\n        };\n        const captionTrack = captionTracks[caption.stream];\n        captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n        captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n        captionTrack.captions.push(caption);\n      });\n      Object.keys(captionTracks).forEach(trackName => {\n        const {\n          startTime,\n          endTime,\n          captions\n        } = captionTracks[trackName];\n        const inbandTextTracks = this.inbandTextTracks_;\n        this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n        createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n        // We do this because a rendition change that also changes the timescale for captions\n        // will result in captions being re-parsed for certain segments. If we add them again\n        // without clearing we will have two of the same captions visible.\n\n        removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n        addCaptionData({\n          captionArray: captions,\n          inbandTextTracks,\n          timestampOffset\n        });\n      }); // Reset stored captions since we added parsed\n      // captions to a text track at this point\n\n      if (this.transmuxer_) {\n        this.transmuxer_.postMessage({\n          action: 'clearParsedMp4Captions'\n        });\n      }\n    }\n    handleId3_(simpleSegment, id3Frames, dispatchType) {\n      this.earlyAbortWhenNeeded_(simpleSegment.stats);\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      }\n      const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n      if (!segmentInfo.hasAppendedData_) {\n        this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n        return;\n      }\n      this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n    }\n    processMetadataQueue_() {\n      this.metadataQueue_.id3.forEach(fn => fn());\n      this.metadataQueue_.caption.forEach(fn => fn());\n      this.metadataQueue_.id3 = [];\n      this.metadataQueue_.caption = [];\n    }\n    processCallQueue_() {\n      const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n      // functions may check the length of the load queue and default to pushing themselves\n      // back onto the queue.\n\n      this.callQueue_ = [];\n      callQueue.forEach(fun => fun());\n    }\n    processLoadQueue_() {\n      const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n      // functions may check the length of the load queue and default to pushing themselves\n      // back onto the queue.\n\n      this.loadQueue_ = [];\n      loadQueue.forEach(fun => fun());\n    }\n    /**\n     * Determines whether the loader has enough info to load the next segment.\n     *\n     * @return {boolean}\n     *         Whether or not the loader has enough info to load the next segment\n     */\n\n    hasEnoughInfoToLoad_() {\n      // Since primary timing goes by video, only the audio loader potentially needs to wait\n      // to load.\n      if (this.loaderType_ !== 'audio') {\n        return true;\n      }\n      const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n      // enough info to load.\n\n      if (!segmentInfo) {\n        return false;\n      } // The first segment can and should be loaded immediately so that source buffers are\n      // created together (before appending). Source buffer creation uses the presence of\n      // audio and video data to determine whether to create audio/video source buffers, and\n      // uses processed (transmuxed or parsed) media to determine the types required.\n\n      if (!this.getCurrentMediaInfo_()) {\n        return true;\n      }\n      if (\n      // Technically, instead of waiting to load a segment on timeline changes, a segment\n      // can be requested and downloaded and only wait before it is transmuxed or parsed.\n      // But in practice, there are a few reasons why it is better to wait until a loader\n      // is ready to append that segment before requesting and downloading:\n      //\n      // 1. Because audio and main loaders cross discontinuities together, if this loader\n      //    is waiting for the other to catch up, then instead of requesting another\n      //    segment and using up more bandwidth, by not yet loading, more bandwidth is\n      //    allotted to the loader currently behind.\n      // 2. media-segment-request doesn't have to have logic to consider whether a segment\n      // is ready to be processed or not, isolating the queueing behavior to the loader.\n      // 3. The audio loader bases some of its segment properties on timing information\n      //    provided by the main loader, meaning that, if the logic for waiting on\n      //    processing was in media-segment-request, then it would also need to know how\n      //    to re-generate the segment information after the main loader caught up.\n      shouldWaitForTimelineChange({\n        timelineChangeController: this.timelineChangeController_,\n        currentTimeline: this.currentTimeline_,\n        segmentTimeline: segmentInfo.timeline,\n        loaderType: this.loaderType_,\n        audioDisabled: this.audioDisabled_\n      })) {\n        return false;\n      }\n      return true;\n    }\n    getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n      return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n    }\n    getMediaInfo_(segmentInfo = this.pendingSegment_) {\n      return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n    }\n    getPendingSegmentPlaylist() {\n      return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n    }\n    hasEnoughInfoToAppend_() {\n      if (!this.sourceUpdater_.ready()) {\n        return false;\n      } // If content needs to be removed or the loader is waiting on an append reattempt,\n      // then no additional content should be appended until the prior append is resolved.\n\n      if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n        return false;\n      }\n      const segmentInfo = this.pendingSegment_;\n      const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n      // we do not have information on this specific\n      // segment yet\n\n      if (!segmentInfo || !trackInfo) {\n        return false;\n      }\n      const {\n        hasAudio,\n        hasVideo,\n        isMuxed\n      } = trackInfo;\n      if (hasVideo && !segmentInfo.videoTimingInfo) {\n        return false;\n      } // muxed content only relies on video timing information for now.\n\n      if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n        return false;\n      } // we need to allow an append here even if we're moving to different timelines.\n\n      if (shouldWaitForTimelineChange({\n        timelineChangeController: this.timelineChangeController_,\n        currentTimeline: this.currentTimeline_,\n        segmentTimeline: segmentInfo.timeline,\n        loaderType: this.loaderType_,\n        audioDisabled: this.audioDisabled_\n      })) {\n        return false;\n      }\n      return true;\n    }\n    handleData_(simpleSegment, result) {\n      this.earlyAbortWhenNeeded_(simpleSegment.stats);\n      if (this.checkForAbort_(simpleSegment.requestId)) {\n        return;\n      } // If there's anything in the call queue, then this data came later and should be\n      // executed after the calls currently queued.\n\n      if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n        checkAndFixTimelines(this);\n        this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n        return;\n      }\n      const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n      this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n      this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n      // logic may change behavior depending on the state, and changing state too early may\n      // inflate our estimates of bandwidth. In the future this should be re-examined to\n      // note more granular states.\n      // don't process and append data if the mediaSource is closed\n\n      if (this.mediaSource_.readyState === 'closed') {\n        return;\n      } // if this request included an initialization segment, save that data\n      // to the initSegment cache\n\n      if (simpleSegment.map) {\n        simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n        segmentInfo.segment.map = simpleSegment.map;\n      } // if this request included a segment key, save that data in the cache\n\n      if (simpleSegment.key) {\n        this.segmentKey(simpleSegment.key, true);\n      }\n      segmentInfo.isFmp4 = simpleSegment.isFmp4;\n      segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n      if (segmentInfo.isFmp4) {\n        this.trigger('fmp4');\n        segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n      } else {\n        const trackInfo = this.getCurrentMediaInfo_();\n        const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n        let firstVideoFrameTimeForData;\n        if (useVideoTimingInfo) {\n          firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n        } // Segment loader knows more about segment timing than the transmuxer (in certain\n        // aspects), so make any changes required for a more accurate start time.\n        // Don't set the end time yet, as the segment may not be finished processing.\n\n        segmentInfo.timingInfo.start = this.trueSegmentStart_({\n          currentStart: segmentInfo.timingInfo.start,\n          playlist: segmentInfo.playlist,\n          mediaIndex: segmentInfo.mediaIndex,\n          currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n          useVideoTimingInfo,\n          firstVideoFrameTimeForData,\n          videoTimingInfo: segmentInfo.videoTimingInfo,\n          audioTimingInfo: segmentInfo.audioTimingInfo\n        });\n      } // Init segments for audio and video only need to be appended in certain cases. Now\n      // that data is about to be appended, we can check the final cases to determine\n      // whether we should append an init segment.\n\n      this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n      // as we use the start of the segment to offset the best guess (playlist provided)\n      // timestamp offset.\n\n      this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n      // be appended or not.\n\n      if (segmentInfo.isSyncRequest) {\n        // first save/update our timing info for this segment.\n        // this is what allows us to choose an accurate segment\n        // and the main reason we make a sync request.\n        this.updateTimingInfoEnd_(segmentInfo);\n        this.syncController_.saveSegmentTimingInfo({\n          segmentInfo,\n          shouldSaveTimelineMapping: this.loaderType_ === 'main'\n        });\n        const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n        // after taking into account its timing info, do not append it.\n\n        if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n          this.logger_('sync segment was incorrect, not appending');\n          return;\n        } // otherwise append it like any other segment as our guess was correct.\n\n        this.logger_('sync segment was correct, appending');\n      } // Save some state so that in the future anything waiting on first append (and/or\n      // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n      // we need some notion of whether the timestamp offset or other relevant information\n      // has had a chance to be set.\n\n      segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n      this.processMetadataQueue_();\n      this.appendData_(segmentInfo, result);\n    }\n    updateAppendInitSegmentStatus(segmentInfo, type) {\n      // alt audio doesn't manage timestamp offset\n      if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n      // in the case that we're handling partial data, we don't want to append an init\n      // segment for each chunk\n      !segmentInfo.changedTimestampOffset) {\n        // if the timestamp offset changed, the timeline may have changed, so we have to re-\n        // append init segments\n        this.appendInitSegment_ = {\n          audio: true,\n          video: true\n        };\n      }\n      if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n        // make sure we append init segment on playlist changes, in case the media config\n        // changed\n        this.appendInitSegment_[type] = true;\n      }\n    }\n    getInitSegmentAndUpdateState_({\n      type,\n      initSegment,\n      map,\n      playlist\n    }) {\n      // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n      // (Section 3) required to parse the applicable Media Segments.  It applies to every\n      // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n      // or until the end of the playlist.\"\n      // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n      if (map) {\n        const id = initSegmentId(map);\n        if (this.activeInitSegmentId_ === id) {\n          // don't need to re-append the init segment if the ID matches\n          return null;\n        } // a map-specified init segment takes priority over any transmuxed (or otherwise\n        // obtained) init segment\n        //\n        // this also caches the init segment for later use\n\n        initSegment = this.initSegmentForMap(map, true).bytes;\n        this.activeInitSegmentId_ = id;\n      } // We used to always prepend init segments for video, however, that shouldn't be\n      // necessary. Instead, we should only append on changes, similar to what we've always\n      // done for audio. This is more important (though may not be that important) for\n      // frame-by-frame appending for LHLS, simply because of the increased quantity of\n      // appends.\n\n      if (initSegment && this.appendInitSegment_[type]) {\n        // Make sure we track the playlist that we last used for the init segment, so that\n        // we can re-append the init segment in the event that we get data from a new\n        // playlist. Discontinuities and track changes are handled in other sections.\n        this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n        this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n        // we are appending the muxer init segment\n\n        this.activeInitSegmentId_ = null;\n        return initSegment;\n      }\n      return null;\n    }\n    handleQuotaExceededError_({\n      segmentInfo,\n      type,\n      bytes\n    }, error) {\n      const audioBuffered = this.sourceUpdater_.audioBuffered();\n      const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n      // should be cleared out during the buffer removals. However, log in case it helps\n      // debug.\n\n      if (audioBuffered.length > 1) {\n        this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n      }\n      if (videoBuffered.length > 1) {\n        this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n      }\n      const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n      const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n      const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n      const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n      if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n        // Can't remove enough buffer to make room for new segment (or the browser doesn't\n        // allow for appends of segments this size). In the future, it may be possible to\n        // split up the segment and append in pieces, but for now, error out this playlist\n        // in an attempt to switch to a more manageable rendition.\n        this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `);\n        this.error({\n          message: 'Quota exceeded error with append of a single segment of content',\n          excludeUntil: Infinity\n        });\n        this.trigger('error');\n        return;\n      } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n      // that the segment-loader should block on future events until this one is handled, so\n      // that it doesn't keep moving onto further segments. Adding the call to the call\n      // queue will prevent further appends until waitingOnRemove_ and\n      // quotaExceededErrorRetryTimeout_ are cleared.\n      //\n      // Note that this will only block the current loader. In the case of demuxed content,\n      // the other load may keep filling as fast as possible. In practice, this should be\n      // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n      // source buffer, or video fills without enough room for audio to append (and without\n      // the availability of clearing out seconds of back buffer to make room for audio).\n      // But it might still be good to handle this case in the future as a TODO.\n\n      this.waitingOnRemove_ = true;\n      this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n        segmentInfo,\n        type,\n        bytes\n      }));\n      const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n      // before retrying.\n\n      const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n      this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n      this.remove(0, timeToRemoveUntil, () => {\n        this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n        this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n        // attempts (since we can't clear less than the minimum)\n\n        this.quotaExceededErrorRetryTimeout_ = window.setTimeout(() => {\n          this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n          this.quotaExceededErrorRetryTimeout_ = null;\n          this.processCallQueue_();\n        }, MIN_BACK_BUFFER * 1000);\n      }, true);\n    }\n    handleAppendError_({\n      segmentInfo,\n      type,\n      bytes\n    }, error) {\n      // if there's no error, nothing to do\n      if (!error) {\n        return;\n      }\n      if (error.code === QUOTA_EXCEEDED_ERR) {\n        this.handleQuotaExceededError_({\n          segmentInfo,\n          type,\n          bytes\n        }); // A quota exceeded error should be recoverable with a future re-append, so no need\n        // to trigger an append error.\n\n        return;\n      }\n      this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error); // If an append errors, we often can't recover.\n      // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n      //\n      // Trigger a special error so that it can be handled separately from normal,\n      // recoverable errors.\n\n      this.error({\n        message: `${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`,\n        metadata: {\n          errorType: videojs.Error.StreamingFailedToAppendSegment\n        }\n      });\n      this.trigger('appenderror');\n    }\n    appendToSourceBuffer_({\n      segmentInfo,\n      type,\n      initSegment,\n      data,\n      bytes\n    }) {\n      // If this is a re-append, bytes were already created and don't need to be recreated\n      if (!bytes) {\n        const segments = [data];\n        let byteLength = data.byteLength;\n        if (initSegment) {\n          // if the media initialization segment is changing, append it before the content\n          // segment\n          segments.unshift(initSegment);\n          byteLength += initSegment.byteLength;\n        } // Technically we should be OK appending the init segment separately, however, we\n        // haven't yet tested that, and prepending is how we have always done things.\n\n        bytes = concatSegments({\n          bytes: byteLength,\n          segments\n        });\n      }\n      const metadata = {\n        segmentInfo: segmentInfoPayload({\n          type: this.loaderType_,\n          segment: segmentInfo\n        })\n      };\n      this.trigger({\n        type: 'segmentappendstart',\n        metadata\n      });\n      this.sourceUpdater_.appendBuffer({\n        segmentInfo,\n        type,\n        bytes\n      }, this.handleAppendError_.bind(this, {\n        segmentInfo,\n        type,\n        bytes\n      }));\n    }\n    handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n      if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n        return;\n      }\n      const segment = this.pendingSegment_.segment;\n      const timingInfoProperty = `${type}TimingInfo`;\n      if (!segment[timingInfoProperty]) {\n        segment[timingInfoProperty] = {};\n      }\n      segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n      segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n      segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n      segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n      segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n      segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n    }\n    appendData_(segmentInfo, result) {\n      const {\n        type,\n        data\n      } = result;\n      if (!data || !data.byteLength) {\n        return;\n      }\n      if (type === 'audio' && this.audioDisabled_) {\n        return;\n      }\n      const initSegment = this.getInitSegmentAndUpdateState_({\n        type,\n        initSegment: result.initSegment,\n        playlist: segmentInfo.playlist,\n        map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n      });\n      this.appendToSourceBuffer_({\n        segmentInfo,\n        type,\n        initSegment,\n        data\n      });\n    }\n    /**\n     * load a specific segment from a request into the buffer\n     *\n     * @private\n     */\n\n    loadSegment_(segmentInfo) {\n      this.state = 'WAITING';\n      this.pendingSegment_ = segmentInfo;\n      this.trimBackBuffer_(segmentInfo);\n      if (typeof segmentInfo.timestampOffset === 'number') {\n        if (this.transmuxer_) {\n          this.transmuxer_.postMessage({\n            action: 'clearAllMp4Captions'\n          });\n        }\n      }\n      if (!this.hasEnoughInfoToLoad_()) {\n        checkAndFixTimelines(this);\n        this.loadQueue_.push(() => {\n          // regenerate the audioAppendStart, timestampOffset, etc as they\n          // may have changed since this function was added to the queue.\n          const options = _extends$1({}, segmentInfo, {\n            forceTimestampOffset: true\n          });\n          _extends$1(segmentInfo, this.generateSegmentInfo_(options));\n          this.isPendingTimestampOffset_ = false;\n          this.updateTransmuxerAndRequestSegment_(segmentInfo);\n        });\n        return;\n      }\n      this.updateTransmuxerAndRequestSegment_(segmentInfo);\n    }\n    updateTransmuxerAndRequestSegment_(segmentInfo) {\n      // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n      // the transmuxer still needs to be updated before then.\n      //\n      // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n      // offset must be passed to the transmuxer for stream correcting adjustments.\n      if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n        this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n        segmentInfo.gopsToAlignWith = [];\n        this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n        this.transmuxer_.postMessage({\n          action: 'reset'\n        });\n        this.transmuxer_.postMessage({\n          action: 'setTimestampOffset',\n          timestampOffset: segmentInfo.timestampOffset\n        });\n      }\n      const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n      const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n      const isWalkingForward = this.mediaIndex !== null;\n      const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n      // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n      // the first timeline\n      segmentInfo.timeline > 0;\n      const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n      this.logger_(`Requesting\n${compactSegmentUrlDescription(segmentInfo.uri)}\n${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n      // then this init segment has never been seen before and should be appended.\n      //\n      // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n      // both to true and leave the decision of whether to append the init segment to append time.\n\n      if (simpleSegment.map && !simpleSegment.map.bytes) {\n        this.logger_('going to request init segment.');\n        this.appendInitSegment_ = {\n          video: true,\n          audio: true\n        };\n      }\n      segmentInfo.abortRequests = mediaSegmentRequest({\n        xhr: this.vhs_.xhr,\n        xhrOptions: this.xhrOptions_,\n        decryptionWorker: this.decrypter_,\n        segment: simpleSegment,\n        abortFn: this.handleAbort_.bind(this, segmentInfo),\n        progressFn: this.handleProgress_.bind(this),\n        trackInfoFn: this.handleTrackInfo_.bind(this),\n        timingInfoFn: this.handleTimingInfo_.bind(this),\n        videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n        audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n        captionsFn: this.handleCaptions_.bind(this),\n        isEndOfTimeline,\n        endedTimelineFn: () => {\n          this.logger_('received endedtimeline callback');\n        },\n        id3Fn: this.handleId3_.bind(this),\n        dataFn: this.handleData_.bind(this),\n        doneFn: this.segmentRequestFinished_.bind(this),\n        onTransmuxerLog: ({\n          message,\n          level,\n          stream\n        }) => {\n          this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n        },\n        triggerSegmentEventFn: ({\n          type,\n          segment,\n          keyInfo,\n          trackInfo,\n          timingInfo\n        }) => {\n          const segInfo = segmentInfoPayload({\n            segment\n          });\n          const metadata = {\n            segmentInfo: segInfo\n          }; // add other properties if necessary.\n\n          if (keyInfo) {\n            metadata.keyInfo = keyInfo;\n          }\n          if (trackInfo) {\n            metadata.trackInfo = trackInfo;\n          }\n          if (timingInfo) {\n            metadata.timingInfo = timingInfo;\n          }\n          this.trigger({\n            type,\n            metadata\n          });\n        }\n      });\n    }\n    /**\n     * trim the back buffer so that we don't have too much data\n     * in the source buffer\n     *\n     * @private\n     *\n     * @param {Object} segmentInfo - the current segment\n     */\n\n    trimBackBuffer_(segmentInfo) {\n      const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n      // buffer and a very conservative \"garbage collector\"\n      // We manually clear out the old buffer to ensure\n      // we don't trigger the QuotaExceeded error\n      // on the source buffer during subsequent appends\n\n      if (removeToTime > 0) {\n        this.remove(0, removeToTime);\n      }\n    }\n    /**\n     * created a simplified copy of the segment object with just the\n     * information necessary to perform the XHR and decryption\n     *\n     * @private\n     *\n     * @param {Object} segmentInfo - the current segment\n     * @return {Object} a simplified segment object copy\n     */\n\n    createSimplifiedSegmentObj_(segmentInfo) {\n      const segment = segmentInfo.segment;\n      const part = segmentInfo.part;\n      const isEncrypted = segmentInfo.segment.key || segmentInfo.segment.map && segmentInfo.segment.map.key;\n      const isMediaInitialization = segmentInfo.segment.map && !segmentInfo.segment.map.bytes;\n      const simpleSegment = {\n        resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n        byterange: part ? part.byterange : segment.byterange,\n        requestId: segmentInfo.requestId,\n        transmuxer: segmentInfo.transmuxer,\n        audioAppendStart: segmentInfo.audioAppendStart,\n        gopsToAlignWith: segmentInfo.gopsToAlignWith,\n        part: segmentInfo.part,\n        type: this.loaderType_,\n        start: segmentInfo.startOfSegment,\n        duration: segmentInfo.duration,\n        isEncrypted,\n        isMediaInitialization\n      };\n      const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n      if (previousSegment && previousSegment.timeline === segment.timeline) {\n        // The baseStartTime of a segment is used to handle rollover when probing the TS\n        // segment to retrieve timing information. Since the probe only looks at the media's\n        // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n        // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n        // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n        // seconds of media time, so should be used here. The previous segment is used since\n        // the end of the previous segment should represent the beginning of the current\n        // segment, so long as they are on the same timeline.\n        if (previousSegment.videoTimingInfo) {\n          simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n        } else if (previousSegment.audioTimingInfo) {\n          simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n        }\n      }\n      if (segment.key) {\n        // if the media sequence is greater than 2^32, the IV will be incorrect\n        // assuming 10s segments, that would be about 1300 years\n        const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n        simpleSegment.key = this.segmentKey(segment.key);\n        simpleSegment.key.iv = iv;\n      }\n      if (segment.map) {\n        simpleSegment.map = this.initSegmentForMap(segment.map);\n      }\n      return simpleSegment;\n    }\n    saveTransferStats_(stats) {\n      // every request counts as a media request even if it has been aborted\n      // or canceled due to a timeout\n      this.mediaRequests += 1;\n      if (stats) {\n        this.mediaBytesTransferred += stats.bytesReceived;\n        this.mediaTransferDuration += stats.roundTripTime;\n      }\n    }\n    saveBandwidthRelatedStats_(duration, stats) {\n      // byteLength will be used for throughput, and should be based on bytes receieved,\n      // which we only know at the end of the request and should reflect total bytes\n      // downloaded rather than just bytes processed from components of the segment\n      this.pendingSegment_.byteLength = stats.bytesReceived;\n      if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n        this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n        return;\n      }\n      const metadata = {\n        bandwidthInfo: {\n          from: this.bandwidth,\n          to: stats.bandwidth\n        }\n      }; // player event with payload\n\n      this.trigger({\n        type: 'bandwidthupdated',\n        metadata\n      });\n      this.bandwidth = stats.bandwidth;\n      this.roundTrip = stats.roundTripTime;\n    }\n    handleTimeout_() {\n      // although the VTT segment loader bandwidth isn't really used, it's good to\n      // maintain functinality between segment loaders\n      this.mediaRequestsTimedout += 1;\n      this.bandwidth = 1;\n      this.roundTrip = NaN;\n      this.trigger('bandwidthupdate');\n      this.trigger('timeout');\n    }\n    /**\n     * Handle the callback from the segmentRequest function and set the\n     * associated SegmentLoader state and errors if necessary\n     *\n     * @private\n     */\n\n    segmentRequestFinished_(error, simpleSegment, result) {\n      // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n      // check the call queue directly since this function doesn't need to deal with any\n      // data, and can continue even if the source buffers are not set up and we didn't get\n      // any data from the segment\n      if (this.callQueue_.length) {\n        this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n        return;\n      }\n      this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n      if (!this.pendingSegment_) {\n        return;\n      } // the request was aborted and the SegmentLoader has already started\n      // another request. this can happen when the timeout for an aborted\n      // request triggers due to a limitation in the XHR library\n      // do not count this as any sort of request or we risk double-counting\n\n      if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n        return;\n      } // an error occurred from the active pendingSegment_ so reset everything\n\n      if (error) {\n        this.pendingSegment_ = null;\n        this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n        if (error.code === REQUEST_ERRORS.ABORTED) {\n          return;\n        }\n        this.pause(); // the error is really just that at least one of the requests timed-out\n        // set the bandwidth to a very low value and trigger an ABR switch to\n        // take emergency action\n\n        if (error.code === REQUEST_ERRORS.TIMEOUT) {\n          this.handleTimeout_();\n          return;\n        } // if control-flow has arrived here, then the error is real\n        // emit an error event to exclude the current playlist\n\n        this.mediaRequestsErrored += 1;\n        this.error(error);\n        this.trigger('error');\n        return;\n      }\n      const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n      // generated for ABR purposes\n\n      this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n      segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n      if (result.gopInfo) {\n        this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n      } // Although we may have already started appending on progress, we shouldn't switch the\n      // state away from loading until we are officially done loading the segment data.\n\n      this.state = 'APPENDING'; // used for testing\n\n      this.trigger('appending');\n      this.waitForAppendsToComplete_(segmentInfo);\n    }\n    setTimeMapping_(timeline) {\n      const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n      if (timelineMapping !== null) {\n        this.timeMapping_ = timelineMapping;\n      }\n    }\n    updateMediaSecondsLoaded_(segment) {\n      if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n        this.mediaSecondsLoaded += segment.end - segment.start;\n      } else {\n        this.mediaSecondsLoaded += segment.duration;\n      }\n    }\n    shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n      if (timestampOffset === null) {\n        return false;\n      } // note that we're potentially using the same timestamp offset for both video and\n      // audio\n\n      if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n        return true;\n      }\n      if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n        return true;\n      }\n      return false;\n    }\n    trueSegmentStart_({\n      currentStart,\n      playlist,\n      mediaIndex,\n      firstVideoFrameTimeForData,\n      currentVideoTimestampOffset,\n      useVideoTimingInfo,\n      videoTimingInfo,\n      audioTimingInfo\n    }) {\n      if (typeof currentStart !== 'undefined') {\n        // if start was set once, keep using it\n        return currentStart;\n      }\n      if (!useVideoTimingInfo) {\n        return audioTimingInfo.start;\n      }\n      const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n      // within that segment. Since the transmuxer maintains a cache of incomplete data\n      // from and/or the last frame seen, the start time may reflect a frame that starts\n      // in the previous segment. Check for that case and ensure the start time is\n      // accurate for the segment.\n\n      if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n        return firstVideoFrameTimeForData;\n      }\n      return videoTimingInfo.start;\n    }\n    waitForAppendsToComplete_(segmentInfo) {\n      const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n      if (!trackInfo) {\n        this.error({\n          message: 'No starting media returned, likely due to an unsupported media format.',\n          playlistExclusionDuration: Infinity\n        });\n        this.trigger('error');\n        return;\n      } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n      // on each queue this loader is responsible for to ensure that the appends are\n      // complete.\n\n      const {\n        hasAudio,\n        hasVideo,\n        isMuxed\n      } = trackInfo;\n      const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n      const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n      segmentInfo.waitingOnAppends = 0; // segments with no data\n\n      if (!segmentInfo.hasAppendedData_) {\n        if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n          // When there's no audio or video data in the segment, there's no audio or video\n          // timing information.\n          //\n          // If there's no audio or video timing information, then the timestamp offset\n          // can't be adjusted to the appropriate value for the transmuxer and source\n          // buffers.\n          //\n          // Therefore, the next segment should be used to set the timestamp offset.\n          this.isPendingTimestampOffset_ = true;\n        } // override settings for metadata only segments\n\n        segmentInfo.timingInfo = {\n          start: 0\n        };\n        segmentInfo.waitingOnAppends++;\n        if (!this.isPendingTimestampOffset_) {\n          // update the timestampoffset\n          this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n          // no video/audio data.\n\n          this.processMetadataQueue_();\n        } // append is \"done\" instantly with no data.\n\n        this.checkAppendsDone_(segmentInfo);\n        return;\n      } // Since source updater could call back synchronously, do the increments first.\n\n      if (waitForVideo) {\n        segmentInfo.waitingOnAppends++;\n      }\n      if (waitForAudio) {\n        segmentInfo.waitingOnAppends++;\n      }\n      if (waitForVideo) {\n        this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n      }\n      if (waitForAudio) {\n        this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n      }\n    }\n    checkAppendsDone_(segmentInfo) {\n      if (this.checkForAbort_(segmentInfo.requestId)) {\n        return;\n      }\n      segmentInfo.waitingOnAppends--;\n      if (segmentInfo.waitingOnAppends === 0) {\n        this.handleAppendsDone_();\n      }\n    }\n    checkForIllegalMediaSwitch(trackInfo) {\n      const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n      if (illegalMediaSwitchError) {\n        this.error({\n          message: illegalMediaSwitchError,\n          playlistExclusionDuration: Infinity\n        });\n        this.trigger('error');\n        return true;\n      }\n      return false;\n    }\n    updateSourceBufferTimestampOffset_(segmentInfo) {\n      if (segmentInfo.timestampOffset === null ||\n      // we don't yet have the start for whatever media type (video or audio) has\n      // priority, timing-wise, so we must wait\n      typeof segmentInfo.timingInfo.start !== 'number' ||\n      // already updated the timestamp offset for this segment\n      segmentInfo.changedTimestampOffset ||\n      // the alt audio loader should not be responsible for setting the timestamp offset\n      this.loaderType_ !== 'main') {\n        return;\n      }\n      let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n      // the timing info here comes from video. In the event that the audio is longer than\n      // the video, this will trim the start of the audio.\n      // This also trims any offset from 0 at the beginning of the media\n\n      segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n        videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n        audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n        timingInfo: segmentInfo.timingInfo\n      }); // In the event that there are part segment downloads, each will try to update the\n      // timestamp offset. Retaining this bit of state prevents us from updating in the\n      // future (within the same segment), however, there may be a better way to handle it.\n\n      segmentInfo.changedTimestampOffset = true;\n      if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n        this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n        didChange = true;\n      }\n      if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n        this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n        didChange = true;\n      }\n      if (didChange) {\n        this.trigger('timestampoffset');\n      }\n    }\n    getSegmentStartTimeForTimestampOffsetCalculation_({\n      videoTimingInfo,\n      audioTimingInfo,\n      timingInfo\n    }) {\n      if (!this.useDtsForTimestampOffset_) {\n        return timingInfo.start;\n      }\n      if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n        return videoTimingInfo.transmuxedDecodeStart;\n      } // handle audio only\n\n      if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n        return audioTimingInfo.transmuxedDecodeStart;\n      } // handle content not transmuxed (e.g., MP4)\n\n      return timingInfo.start;\n    }\n    updateTimingInfoEnd_(segmentInfo) {\n      segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n      const trackInfo = this.getMediaInfo_();\n      const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n      const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n      if (!prioritizedTimingInfo) {\n        return;\n      }\n      segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n      // End time may not exist in a case where we aren't parsing the full segment (one\n      // current example is the case of fmp4), so use the rough duration to calculate an\n      // end time.\n      prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n    }\n    /**\n     * callback to run when appendBuffer is finished. detects if we are\n     * in a good state to do things with the data we got, or if we need\n     * to wait for more\n     *\n     * @private\n     */\n\n    handleAppendsDone_() {\n      // appendsdone can cause an abort\n      if (this.pendingSegment_) {\n        const metadata = {\n          segmentInfo: segmentInfoPayload({\n            type: this.loaderType_,\n            segment: this.pendingSegment_\n          })\n        };\n        this.trigger({\n          type: 'appendsdone',\n          metadata\n        });\n      }\n      if (!this.pendingSegment_) {\n        this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n        // all appending cases?\n\n        if (!this.paused()) {\n          this.monitorBuffer_();\n        }\n        return;\n      }\n      const segmentInfo = this.pendingSegment_;\n      if (segmentInfo.part && segmentInfo.part.syncInfo) {\n        // low-latency flow\n        segmentInfo.part.syncInfo.markAppended();\n      } else if (segmentInfo.segment.syncInfo) {\n        // normal flow\n        segmentInfo.segment.syncInfo.markAppended();\n      } // Now that the end of the segment has been reached, we can set the end time. It's\n      // best to wait until all appends are done so we're sure that the primary media is\n      // finished (and we have its end time).\n\n      this.updateTimingInfoEnd_(segmentInfo);\n      if (this.shouldSaveSegmentTimingInfo_) {\n        // Timeline mappings should only be saved for the main loader. This is for multiple\n        // reasons:\n        //\n        // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n        //    and the main loader try to save the timeline mapping, whichever comes later\n        //    will overwrite the first. In theory this is OK, as the mappings should be the\n        //    same, however, it breaks for (2)\n        // 2) In the event of a live stream, the initial live point will make for a somewhat\n        //    arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n        //    the mapping will be off for one of the streams, dependent on which one was\n        //    first saved (see (1)).\n        // 3) Primary timing goes by video in VHS, so the mapping should be video.\n        //\n        // Since the audio loader will wait for the main loader to load the first segment,\n        // the main loader will save the first timeline mapping, and ensure that there won't\n        // be a case where audio loads two segments without saving a mapping (thus leading\n        // to missing segment timing info).\n        this.syncController_.saveSegmentTimingInfo({\n          segmentInfo,\n          shouldSaveTimelineMapping: this.loaderType_ === 'main'\n        });\n      }\n      const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n      if (segmentDurationMessage) {\n        if (segmentDurationMessage.severity === 'warn') {\n          videojs.log.warn(segmentDurationMessage.message);\n        } else {\n          this.logger_(segmentDurationMessage.message);\n        }\n      }\n      this.recordThroughput_(segmentInfo);\n      this.pendingSegment_ = null;\n      this.state = 'READY';\n      if (segmentInfo.isSyncRequest) {\n        this.trigger('syncinfoupdate'); // if the sync request was not appended\n        // then it was not the correct segment.\n        // throw it away and use the data it gave us\n        // to get the correct one.\n\n        if (!segmentInfo.hasAppendedData_) {\n          this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`);\n          return;\n        }\n      }\n      this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n      this.addSegmentMetadataCue_(segmentInfo);\n      this.fetchAtBuffer_ = true;\n      if (this.currentTimeline_ !== segmentInfo.timeline) {\n        this.timelineChangeController_.lastTimelineChange({\n          type: this.loaderType_,\n          from: this.currentTimeline_,\n          to: segmentInfo.timeline\n        }); // If audio is not disabled, the main segment loader is responsible for updating\n        // the audio timeline as well. If the content is video only, this won't have any\n        // impact.\n\n        if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n          this.timelineChangeController_.lastTimelineChange({\n            type: 'audio',\n            from: this.currentTimeline_,\n            to: segmentInfo.timeline\n          });\n        }\n      }\n      this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n      // the following conditional otherwise it may consider this a bad \"guess\"\n      // and attempt to resync when the post-update seekable window and live\n      // point would mean that this was the perfect segment to fetch\n\n      this.trigger('syncinfoupdate');\n      const segment = segmentInfo.segment;\n      const part = segmentInfo.part;\n      const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n      const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n      // the currentTime_ that means that our conservative guess was too conservative.\n      // In that case, reset the loader state so that we try to use any information gained\n      // from the previous request to create a new, more accurate, sync-point.\n\n      if (badSegmentGuess || badPartGuess) {\n        this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n        this.resetEverything();\n        return;\n      }\n      const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n      // and conservatively guess\n\n      if (isWalkingForward) {\n        this.trigger('bandwidthupdate');\n      }\n      this.trigger('progress');\n      this.mediaIndex = segmentInfo.mediaIndex;\n      this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n      // buffer, end the stream. this ensures the \"ended\" event will\n      // fire if playback reaches that point.\n\n      if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n        this.endOfStream();\n      } // used for testing\n\n      this.trigger('appended');\n      if (segmentInfo.hasAppendedData_) {\n        this.mediaAppends++;\n      }\n      if (!this.paused()) {\n        this.monitorBuffer_();\n      }\n    }\n    /**\n     * Records the current throughput of the decrypt, transmux, and append\n     * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n     * moving average of the throughput. `throughput.count` is the number of\n     * data points in the average.\n     *\n     * @private\n     * @param {Object} segmentInfo the object returned by loadSegment\n     */\n\n    recordThroughput_(segmentInfo) {\n      if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n        this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n        return;\n      }\n      const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n      // by zero in the case where the throughput is ridiculously high\n\n      const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n      const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n      //   newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n      this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n    }\n    /**\n     * Adds a cue to the segment-metadata track with some metadata information about the\n     * segment\n     *\n     * @private\n     * @param {Object} segmentInfo\n     *        the object returned by loadSegment\n     * @method addSegmentMetadataCue_\n     */\n\n    addSegmentMetadataCue_(segmentInfo) {\n      if (!this.segmentMetadataTrack_) {\n        return;\n      }\n      const segment = segmentInfo.segment;\n      const start = segment.start;\n      const end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n      if (!finite(start) || !finite(end)) {\n        return;\n      }\n      removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n      const Cue = window.WebKitDataCue || window.VTTCue;\n      const value = {\n        custom: segment.custom,\n        dateTimeObject: segment.dateTimeObject,\n        dateTimeString: segment.dateTimeString,\n        programDateTime: segment.programDateTime,\n        bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n        resolution: segmentInfo.playlist.attributes.RESOLUTION,\n        codecs: segmentInfo.playlist.attributes.CODECS,\n        byteLength: segmentInfo.byteLength,\n        uri: segmentInfo.uri,\n        timeline: segmentInfo.timeline,\n        playlist: segmentInfo.playlist.id,\n        start,\n        end\n      };\n      const data = JSON.stringify(value);\n      const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n      // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n      cue.value = value;\n      this.segmentMetadataTrack_.addCue(cue);\n    }\n  }\n  function noop() {}\n  const toTitleCase = function (string) {\n    if (typeof string !== 'string') {\n      return string;\n    }\n    return string.replace(/./, w => w.toUpperCase());\n  };\n\n  /**\n   * @file source-updater.js\n   */\n  const bufferTypes = ['video', 'audio'];\n  const updating = (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`];\n    return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n  };\n  const nextQueueIndexOfType = (type, queue) => {\n    for (let i = 0; i < queue.length; i++) {\n      const queueEntry = queue[i];\n      if (queueEntry.type === 'mediaSource') {\n        // If the next entry is a media source entry (uses multiple source buffers), block\n        // processing to allow it to go through first.\n        return null;\n      }\n      if (queueEntry.type === type) {\n        return i;\n      }\n    }\n    return null;\n  };\n  const shiftQueue = (type, sourceUpdater) => {\n    if (sourceUpdater.queue.length === 0) {\n      return;\n    }\n    let queueIndex = 0;\n    let queueEntry = sourceUpdater.queue[queueIndex];\n    if (queueEntry.type === 'mediaSource') {\n      if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n        sourceUpdater.queue.shift();\n        queueEntry.action(sourceUpdater);\n        if (queueEntry.doneFn) {\n          queueEntry.doneFn();\n        } // Only specific source buffer actions must wait for async updateend events. Media\n        // Source actions process synchronously. Therefore, both audio and video source\n        // buffers are now clear to process the next queue entries.\n\n        shiftQueue('audio', sourceUpdater);\n        shiftQueue('video', sourceUpdater);\n      } // Media Source actions require both source buffers, so if the media source action\n      // couldn't process yet (because one or both source buffers are busy), block other\n      // queue actions until both are available and the media source action can process.\n\n      return;\n    }\n    if (type === 'mediaSource') {\n      // If the queue was shifted by a media source action (this happens when pushing a\n      // media source action onto the queue), then it wasn't from an updateend event from an\n      // audio or video source buffer, so there's no change from previous state, and no\n      // processing should be done.\n      return;\n    } // Media source queue entries don't need to consider whether the source updater is\n    // started (i.e., source buffers are created) as they don't need the source buffers, but\n    // source buffer queue entries do.\n\n    if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n      return;\n    }\n    if (queueEntry.type !== type) {\n      queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n      if (queueIndex === null) {\n        // Either there's no queue entry that uses this source buffer type in the queue, or\n        // there's a media source queue entry before the next entry of this type, in which\n        // case wait for that action to process first.\n        return;\n      }\n      queueEntry = sourceUpdater.queue[queueIndex];\n    }\n    sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n    //\n    // The queue pending operation must be set before the action is performed in the event\n    // that the action results in a synchronous event that is acted upon. For instance, if\n    // an exception is thrown that can be handled, it's possible that new actions will be\n    // appended to an empty queue and immediately executed, but would not have the correct\n    // pending information if this property was set after the action was performed.\n\n    sourceUpdater.queuePending[type] = queueEntry;\n    queueEntry.action(type, sourceUpdater);\n    if (!queueEntry.doneFn) {\n      // synchronous operation, process next entry\n      sourceUpdater.queuePending[type] = null;\n      shiftQueue(type, sourceUpdater);\n      return;\n    }\n  };\n  const cleanupBuffer = (type, sourceUpdater) => {\n    const buffer = sourceUpdater[`${type}Buffer`];\n    const titleType = toTitleCase(type);\n    if (!buffer) {\n      return;\n    }\n    buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n    buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n    sourceUpdater.codecs[type] = null;\n    sourceUpdater[`${type}Buffer`] = null;\n  };\n  const inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\n  const actions = {\n    appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n      const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n      sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n      try {\n        sourceBuffer.appendBuffer(bytes);\n      } catch (e) {\n        sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n        sourceUpdater.queuePending[type] = null;\n        onError(e);\n      }\n    },\n    remove: (start, end) => (type, sourceUpdater) => {\n      const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n      sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n      try {\n        sourceBuffer.remove(start, end);\n      } catch (e) {\n        sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n      }\n    },\n    timestampOffset: offset => (type, sourceUpdater) => {\n      const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n      sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n      sourceBuffer.timestampOffset = offset;\n    },\n    callback: callback => (type, sourceUpdater) => {\n      callback();\n    },\n    endOfStream: error => sourceUpdater => {\n      if (sourceUpdater.mediaSource.readyState !== 'open') {\n        return;\n      }\n      sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n      try {\n        sourceUpdater.mediaSource.endOfStream(error);\n      } catch (e) {\n        videojs.log.warn('Failed to call media source endOfStream', e);\n      }\n    },\n    duration: duration => sourceUpdater => {\n      sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n      try {\n        sourceUpdater.mediaSource.duration = duration;\n      } catch (e) {\n        videojs.log.warn('Failed to set media source duration', e);\n      }\n    },\n    abort: () => (type, sourceUpdater) => {\n      if (sourceUpdater.mediaSource.readyState !== 'open') {\n        return;\n      }\n      const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n      sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n      try {\n        sourceBuffer.abort();\n      } catch (e) {\n        videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n      }\n    },\n    addSourceBuffer: (type, codec) => sourceUpdater => {\n      const titleType = toTitleCase(type);\n      const mime = getMimeForCodec(codec);\n      sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n      const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n      sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n      sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n      sourceUpdater.codecs[type] = codec;\n      sourceUpdater[`${type}Buffer`] = sourceBuffer;\n    },\n    removeSourceBuffer: type => sourceUpdater => {\n      const sourceBuffer = sourceUpdater[`${type}Buffer`];\n      cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      }\n      sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n      try {\n        sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n      } catch (e) {\n        videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n      }\n    },\n    changeType: codec => (type, sourceUpdater) => {\n      const sourceBuffer = sourceUpdater[`${type}Buffer`];\n      const mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n      // or the media source does not contain this source buffer.\n\n      if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n        return;\n      } // do not update codec if we don't need to.\n      // Only update if we change the codec base.\n      // For example, going from avc1.640028 to avc1.64001f does not require a changeType call.\n\n      const newCodecBase = codec.substring(0, codec.indexOf('.'));\n      const oldCodec = sourceUpdater.codecs[type];\n      const oldCodecBase = oldCodec.substring(0, oldCodec.indexOf('.'));\n      if (oldCodecBase === newCodecBase) {\n        return;\n      }\n      const metadata = {\n        codecsChangeInfo: {\n          from: oldCodec,\n          to: codec\n        }\n      };\n      sourceUpdater.trigger({\n        type: 'codecschange',\n        metadata\n      });\n      sourceUpdater.logger_(`changing ${type}Buffer codec from ${oldCodec} to ${codec}`); // check if change to the provided type is supported\n\n      try {\n        sourceBuffer.changeType(mime);\n        sourceUpdater.codecs[type] = codec;\n      } catch (e) {\n        metadata.errorType = videojs.Error.StreamingCodecsChangeError;\n        metadata.error = e;\n        e.metadata = metadata;\n        sourceUpdater.error_ = e;\n        sourceUpdater.trigger('error');\n        videojs.log.warn(`Failed to changeType on ${type}Buffer`, e);\n      }\n    }\n  };\n  const pushQueue = ({\n    type,\n    sourceUpdater,\n    action,\n    doneFn,\n    name\n  }) => {\n    sourceUpdater.queue.push({\n      type,\n      action,\n      doneFn,\n      name\n    });\n    shiftQueue(type, sourceUpdater);\n  };\n  const onUpdateend = (type, sourceUpdater) => e => {\n    // Although there should, in theory, be a pending action for any updateend receieved,\n    // there are some actions that may trigger updateend events without set definitions in\n    // the w3c spec. For instance, setting the duration on the media source may trigger\n    // updateend events on source buffers. This does not appear to be in the spec. As such,\n    // if we encounter an updateend without a corresponding pending action from our queue\n    // for that source buffer type, process the next action.\n    const bufferedRangesForType = sourceUpdater[`${type}Buffered`]();\n    const descriptiveString = bufferedRangesToString(bufferedRangesForType);\n    sourceUpdater.logger_(`received \"updateend\" event for ${type} Source Buffer: `, descriptiveString);\n    if (sourceUpdater.queuePending[type]) {\n      const doneFn = sourceUpdater.queuePending[type].doneFn;\n      sourceUpdater.queuePending[type] = null;\n      if (doneFn) {\n        // if there's an error, report it\n        doneFn(sourceUpdater[`${type}Error_`]);\n      }\n    }\n    shiftQueue(type, sourceUpdater);\n  };\n  /**\n   * A queue of callbacks to be serialized and applied when a\n   * MediaSource and its associated SourceBuffers are not in the\n   * updating state. It is used by the segment loader to update the\n   * underlying SourceBuffers when new data is loaded, for instance.\n   *\n   * @class SourceUpdater\n   * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n   * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n   */\n\n  class SourceUpdater extends videojs.EventTarget {\n    constructor(mediaSource) {\n      super();\n      this.mediaSource = mediaSource;\n      this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n      this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n      this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n      this.audioTimestampOffset_ = 0;\n      this.videoTimestampOffset_ = 0;\n      this.queue = [];\n      this.queuePending = {\n        audio: null,\n        video: null\n      };\n      this.delayedAudioAppendQueue_ = [];\n      this.videoAppendQueued_ = false;\n      this.codecs = {};\n      this.onVideoUpdateEnd_ = onUpdateend('video', this);\n      this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n      this.onVideoError_ = e => {\n        // used for debugging\n        this.videoError_ = e;\n      };\n      this.onAudioError_ = e => {\n        // used for debugging\n        this.audioError_ = e;\n      };\n      this.createdSourceBuffers_ = false;\n      this.initializedEme_ = false;\n      this.triggeredReady_ = false;\n    }\n    initializedEme() {\n      this.initializedEme_ = true;\n      this.triggerReady();\n    }\n    hasCreatedSourceBuffers() {\n      // if false, likely waiting on one of the segment loaders to get enough data to create\n      // source buffers\n      return this.createdSourceBuffers_;\n    }\n    hasInitializedAnyEme() {\n      return this.initializedEme_;\n    }\n    ready() {\n      return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n    }\n    createSourceBuffers(codecs) {\n      if (this.hasCreatedSourceBuffers()) {\n        // already created them before\n        return;\n      } // the intial addOrChangeSourceBuffers will always be\n      // two add buffers.\n\n      this.addOrChangeSourceBuffers(codecs);\n      this.createdSourceBuffers_ = true;\n      this.trigger('createdsourcebuffers');\n      this.triggerReady();\n    }\n    triggerReady() {\n      // only allow ready to be triggered once, this prevents the case\n      // where:\n      // 1. we trigger createdsourcebuffers\n      // 2. ie 11 synchronously initializates eme\n      // 3. the synchronous initialization causes us to trigger ready\n      // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n      if (this.ready() && !this.triggeredReady_) {\n        this.triggeredReady_ = true;\n        this.trigger('ready');\n      }\n    }\n    /**\n     * Add a type of source buffer to the media source.\n     *\n     * @param {string} type\n     *        The type of source buffer to add.\n     *\n     * @param {string} codec\n     *        The codec to add the source buffer with.\n     */\n\n    addSourceBuffer(type, codec) {\n      pushQueue({\n        type: 'mediaSource',\n        sourceUpdater: this,\n        action: actions.addSourceBuffer(type, codec),\n        name: 'addSourceBuffer'\n      });\n    }\n    /**\n     * call abort on a source buffer.\n     *\n     * @param {string} type\n     *        The type of source buffer to call abort on.\n     */\n\n    abort(type) {\n      pushQueue({\n        type,\n        sourceUpdater: this,\n        action: actions.abort(type),\n        name: 'abort'\n      });\n    }\n    /**\n     * Call removeSourceBuffer and remove a specific type\n     * of source buffer on the mediaSource.\n     *\n     * @param {string} type\n     *        The type of source buffer to remove.\n     */\n\n    removeSourceBuffer(type) {\n      if (!this.canRemoveSourceBuffer()) {\n        videojs.log.error('removeSourceBuffer is not supported!');\n        return;\n      }\n      pushQueue({\n        type: 'mediaSource',\n        sourceUpdater: this,\n        action: actions.removeSourceBuffer(type),\n        name: 'removeSourceBuffer'\n      });\n    }\n    /**\n     * Whether or not the removeSourceBuffer function is supported\n     * on the mediaSource.\n     *\n     * @return {boolean}\n     *          if removeSourceBuffer can be called.\n     */\n\n    canRemoveSourceBuffer() {\n      // As of Firefox 83 removeSourceBuffer\n      // throws errors, so we report that it does not support this.\n      return !videojs.browser.IS_FIREFOX && window.MediaSource && window.MediaSource.prototype && typeof window.MediaSource.prototype.removeSourceBuffer === 'function';\n    }\n    /**\n     * Whether or not the changeType function is supported\n     * on our SourceBuffers.\n     *\n     * @return {boolean}\n     *         if changeType can be called.\n     */\n\n    static canChangeType() {\n      return window.SourceBuffer && window.SourceBuffer.prototype && typeof window.SourceBuffer.prototype.changeType === 'function';\n    }\n    /**\n     * Whether or not the changeType function is supported\n     * on our SourceBuffers.\n     *\n     * @return {boolean}\n     *         if changeType can be called.\n     */\n\n    canChangeType() {\n      return this.constructor.canChangeType();\n    }\n    /**\n     * Call the changeType function on a source buffer, given the code and type.\n     *\n     * @param {string} type\n     *        The type of source buffer to call changeType on.\n     *\n     * @param {string} codec\n     *        The codec string to change type with on the source buffer.\n     */\n\n    changeType(type, codec) {\n      if (!this.canChangeType()) {\n        videojs.log.error('changeType is not supported!');\n        return;\n      }\n      pushQueue({\n        type,\n        sourceUpdater: this,\n        action: actions.changeType(codec),\n        name: 'changeType'\n      });\n    }\n    /**\n     * Add source buffers with a codec or, if they are already created,\n     * call changeType on source buffers using changeType.\n     *\n     * @param {Object} codecs\n     *        Codecs to switch to\n     */\n\n    addOrChangeSourceBuffers(codecs) {\n      if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n        throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n      }\n      Object.keys(codecs).forEach(type => {\n        const codec = codecs[type];\n        if (!this.hasCreatedSourceBuffers()) {\n          return this.addSourceBuffer(type, codec);\n        }\n        if (this.canChangeType()) {\n          this.changeType(type, codec);\n        }\n      });\n    }\n    /**\n     * Queue an update to append an ArrayBuffer.\n     *\n     * @param {MediaObject} object containing audioBytes and/or videoBytes\n     * @param {Function} done the function to call when done\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n     */\n\n    appendBuffer(options, doneFn) {\n      const {\n        segmentInfo,\n        type,\n        bytes\n      } = options;\n      this.processedAppend_ = true;\n      if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n        this.delayedAudioAppendQueue_.push([options, doneFn]);\n        this.logger_(`delayed audio append of ${bytes.length} until video append`);\n        return;\n      } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n      // not be fired. This means that the queue will be blocked until the next action\n      // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n      // these errors by calling the doneFn with the specific error.\n\n      const onError = doneFn;\n      pushQueue({\n        type,\n        sourceUpdater: this,\n        action: actions.appendBuffer(bytes, segmentInfo || {\n          mediaIndex: -1\n        }, onError),\n        doneFn,\n        name: 'appendBuffer'\n      });\n      if (type === 'video') {\n        this.videoAppendQueued_ = true;\n        if (!this.delayedAudioAppendQueue_.length) {\n          return;\n        }\n        const queue = this.delayedAudioAppendQueue_.slice();\n        this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n        this.delayedAudioAppendQueue_.length = 0;\n        queue.forEach(que => {\n          this.appendBuffer.apply(this, que);\n        });\n      }\n    }\n    /**\n     * Get the audio buffer's buffered timerange.\n     *\n     * @return {TimeRange}\n     *         The audio buffer's buffered time range\n     */\n\n    audioBuffered() {\n      // no media source/source buffer or it isn't in the media sources\n      // source buffer list\n      if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n        return createTimeRanges();\n      }\n      return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n    }\n    /**\n     * Get the video buffer's buffered timerange.\n     *\n     * @return {TimeRange}\n     *         The video buffer's buffered time range\n     */\n\n    videoBuffered() {\n      // no media source/source buffer or it isn't in the media sources\n      // source buffer list\n      if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n        return createTimeRanges();\n      }\n      return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n    }\n    /**\n     * Get a combined video/audio buffer's buffered timerange.\n     *\n     * @return {TimeRange}\n     *         the combined time range\n     */\n\n    buffered() {\n      const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n      const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n      if (audio && !video) {\n        return this.audioBuffered();\n      }\n      if (video && !audio) {\n        return this.videoBuffered();\n      }\n      return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n    }\n    /**\n     * Add a callback to the queue that will set duration on the mediaSource.\n     *\n     * @param {number} duration\n     *        The duration to set\n     *\n     * @param {Function} [doneFn]\n     *        function to run after duration has been set.\n     */\n\n    setDuration(duration, doneFn = noop) {\n      // In order to set the duration on the media source, it's necessary to wait for all\n      // source buffers to no longer be updating. \"If the updating attribute equals true on\n      // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n      // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n      pushQueue({\n        type: 'mediaSource',\n        sourceUpdater: this,\n        action: actions.duration(duration),\n        name: 'duration',\n        doneFn\n      });\n    }\n    /**\n     * Add a mediaSource endOfStream call to the queue\n     *\n     * @param {Error} [error]\n     *        Call endOfStream with an error\n     *\n     * @param {Function} [doneFn]\n     *        A function that should be called when the\n     *        endOfStream call has finished.\n     */\n\n    endOfStream(error = null, doneFn = noop) {\n      if (typeof error !== 'string') {\n        error = undefined;\n      } // In order to set the duration on the media source, it's necessary to wait for all\n      // source buffers to no longer be updating. \"If the updating attribute equals true on\n      // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n      // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n      pushQueue({\n        type: 'mediaSource',\n        sourceUpdater: this,\n        action: actions.endOfStream(error),\n        name: 'endOfStream',\n        doneFn\n      });\n    }\n    /**\n     * Queue an update to remove a time range from the buffer.\n     *\n     * @param {number} start where to start the removal\n     * @param {number} end where to end the removal\n     * @param {Function} [done=noop] optional callback to be executed when the remove\n     * operation is complete\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n     */\n\n    removeAudio(start, end, done = noop) {\n      if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n        done();\n        return;\n      }\n      pushQueue({\n        type: 'audio',\n        sourceUpdater: this,\n        action: actions.remove(start, end),\n        doneFn: done,\n        name: 'remove'\n      });\n    }\n    /**\n     * Queue an update to remove a time range from the buffer.\n     *\n     * @param {number} start where to start the removal\n     * @param {number} end where to end the removal\n     * @param {Function} [done=noop] optional callback to be executed when the remove\n     * operation is complete\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n     */\n\n    removeVideo(start, end, done = noop) {\n      if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n        done();\n        return;\n      }\n      pushQueue({\n        type: 'video',\n        sourceUpdater: this,\n        action: actions.remove(start, end),\n        doneFn: done,\n        name: 'remove'\n      });\n    }\n    /**\n     * Whether the underlying sourceBuffer is updating or not\n     *\n     * @return {boolean} the updating status of the SourceBuffer\n     */\n\n    updating() {\n      // the audio/video source buffer is updating\n      if (updating('audio', this) || updating('video', this)) {\n        return true;\n      }\n      return false;\n    }\n    /**\n     * Set/get the timestampoffset on the audio SourceBuffer\n     *\n     * @return {number} the timestamp offset\n     */\n\n    audioTimestampOffset(offset) {\n      if (typeof offset !== 'undefined' && this.audioBuffer &&\n      // no point in updating if it's the same\n      this.audioTimestampOffset_ !== offset) {\n        pushQueue({\n          type: 'audio',\n          sourceUpdater: this,\n          action: actions.timestampOffset(offset),\n          name: 'timestampOffset'\n        });\n        this.audioTimestampOffset_ = offset;\n      }\n      return this.audioTimestampOffset_;\n    }\n    /**\n     * Set/get the timestampoffset on the video SourceBuffer\n     *\n     * @return {number} the timestamp offset\n     */\n\n    videoTimestampOffset(offset) {\n      if (typeof offset !== 'undefined' && this.videoBuffer &&\n      // no point in updating if it's the same\n      this.videoTimestampOffset_ !== offset) {\n        pushQueue({\n          type: 'video',\n          sourceUpdater: this,\n          action: actions.timestampOffset(offset),\n          name: 'timestampOffset'\n        });\n        this.videoTimestampOffset_ = offset;\n      }\n      return this.videoTimestampOffset_;\n    }\n    /**\n     * Add a function to the queue that will be called\n     * when it is its turn to run in the audio queue.\n     *\n     * @param {Function} callback\n     *        The callback to queue.\n     */\n\n    audioQueueCallback(callback) {\n      if (!this.audioBuffer) {\n        return;\n      }\n      pushQueue({\n        type: 'audio',\n        sourceUpdater: this,\n        action: actions.callback(callback),\n        name: 'callback'\n      });\n    }\n    /**\n     * Add a function to the queue that will be called\n     * when it is its turn to run in the video queue.\n     *\n     * @param {Function} callback\n     *        The callback to queue.\n     */\n\n    videoQueueCallback(callback) {\n      if (!this.videoBuffer) {\n        return;\n      }\n      pushQueue({\n        type: 'video',\n        sourceUpdater: this,\n        action: actions.callback(callback),\n        name: 'callback'\n      });\n    }\n    /**\n     * dispose of the source updater and the underlying sourceBuffer\n     */\n\n    dispose() {\n      this.trigger('dispose');\n      bufferTypes.forEach(type => {\n        this.abort(type);\n        if (this.canRemoveSourceBuffer()) {\n          this.removeSourceBuffer(type);\n        } else {\n          this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n        }\n      });\n      this.videoAppendQueued_ = false;\n      this.delayedAudioAppendQueue_.length = 0;\n      if (this.sourceopenListener_) {\n        this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n      }\n      this.off();\n    }\n  }\n  const uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\n  const bufferToHexString = buffer => {\n    const uInt8Buffer = new Uint8Array(buffer);\n    return Array.from(uInt8Buffer).map(byte => byte.toString(16).padStart(2, '0')).join('');\n  };\n\n  /**\n   * @file vtt-segment-loader.js\n   */\n  const VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\n  class NoVttJsError extends Error {\n    constructor() {\n      super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n    }\n  }\n  /**\n   * An object that manages segment loading and appending.\n   *\n   * @class VTTSegmentLoader\n   * @param {Object} options required and optional options\n   * @extends videojs.EventTarget\n   */\n\n  class VTTSegmentLoader extends SegmentLoader {\n    constructor(settings, options = {}) {\n      super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n      // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n      this.mediaSource_ = null;\n      this.subtitlesTrack_ = null;\n      this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n      this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n      // the sync controller leads to improper behavior.\n\n      this.shouldSaveSegmentTimingInfo_ = false;\n    }\n    /**\n     * Indicates which time ranges are buffered\n     *\n     * @return {TimeRange}\n     *         TimeRange object representing the current buffered ranges\n     */\n\n    buffered_() {\n      if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n        return createTimeRanges();\n      }\n      const cues = this.subtitlesTrack_.cues;\n      const start = cues[0].startTime;\n      const end = cues[cues.length - 1].startTime;\n      return createTimeRanges([[start, end]]);\n    }\n    /**\n     * Gets and sets init segment for the provided map\n     *\n     * @param {Object} map\n     *        The map object representing the init segment to get or set\n     * @param {boolean=} set\n     *        If true, the init segment for the provided map should be saved\n     * @return {Object}\n     *         map object for desired init segment\n     */\n\n    initSegmentForMap(map, set = false) {\n      if (!map) {\n        return null;\n      }\n      const id = initSegmentId(map);\n      let storedMap = this.initSegments_[id];\n      if (set && !storedMap && map.bytes) {\n        // append WebVTT line terminators to the media initialization segment if it exists\n        // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n        // requires two or more WebVTT line terminators between the WebVTT header and the\n        // rest of the file\n        const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n        const combinedSegment = new Uint8Array(combinedByteLength);\n        combinedSegment.set(map.bytes);\n        combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n        this.initSegments_[id] = storedMap = {\n          resolvedUri: map.resolvedUri,\n          byterange: map.byterange,\n          bytes: combinedSegment\n        };\n      }\n      return storedMap || map;\n    }\n    /**\n     * Returns true if all configuration required for loading is present, otherwise false.\n     *\n     * @return {boolean} True if the all configuration is ready for loading\n     * @private\n     */\n\n    couldBeginLoading_() {\n      return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n    }\n    /**\n     * Once all the starting parameters have been specified, begin\n     * operation. This method should only be invoked from the INIT\n     * state.\n     *\n     * @private\n     */\n\n    init_() {\n      this.state = 'READY';\n      this.resetEverything();\n      return this.monitorBuffer_();\n    }\n    /**\n     * Set a subtitle track on the segment loader to add subtitles to\n     *\n     * @param {TextTrack=} track\n     *        The text track to add loaded subtitles to\n     * @return {TextTrack}\n     *        Returns the subtitles track\n     */\n\n    track(track) {\n      if (typeof track === 'undefined') {\n        return this.subtitlesTrack_;\n      }\n      this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start\n      // buffering now\n\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\n        this.init_();\n      }\n      return this.subtitlesTrack_;\n    }\n    /**\n     * Remove any data in the source buffer between start and end times\n     *\n     * @param {number} start - the start time of the region to remove from the buffer\n     * @param {number} end - the end time of the region to remove from the buffer\n     */\n\n    remove(start, end) {\n      removeCuesFromTrack(start, end, this.subtitlesTrack_);\n    }\n    /**\n     * fill the buffer with segements unless the sourceBuffers are\n     * currently updating\n     *\n     * Note: this function should only ever be called by monitorBuffer_\n     * and never directly\n     *\n     * @private\n     */\n\n    fillBuffer_() {\n      // see if we need to begin loading immediately\n      const segmentInfo = this.chooseNextRequest_();\n      if (!segmentInfo) {\n        return;\n      }\n      if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n        // We don't have the timestamp offset that we need to sync subtitles.\n        // Rerun on a timestamp offset or user interaction.\n        const checkTimestampOffset = () => {\n          this.state = 'READY';\n          if (!this.paused()) {\n            // if not paused, queue a buffer check as soon as possible\n            this.monitorBuffer_();\n          }\n        };\n        this.syncController_.one('timestampoffset', checkTimestampOffset);\n        this.state = 'WAITING_ON_TIMELINE';\n        return;\n      }\n      this.loadSegment_(segmentInfo);\n    } // never set a timestamp offset for vtt segments.\n\n    timestampOffsetForSegment_() {\n      return null;\n    }\n    chooseNextRequest_() {\n      return this.skipEmptySegments_(super.chooseNextRequest_());\n    }\n    /**\n     * Prevents the segment loader from requesting segments we know contain no subtitles\n     * by walking forward until we find the next segment that we don't know whether it is\n     * empty or not.\n     *\n     * @param {Object} segmentInfo\n     *        a segment info object that describes the current segment\n     * @return {Object}\n     *         a segment info object that describes the current segment\n     */\n\n    skipEmptySegments_(segmentInfo) {\n      while (segmentInfo && segmentInfo.segment.empty) {\n        // stop at the last possible segmentInfo\n        if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n          segmentInfo = null;\n          break;\n        }\n        segmentInfo = this.generateSegmentInfo_({\n          playlist: segmentInfo.playlist,\n          mediaIndex: segmentInfo.mediaIndex + 1,\n          startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n          isSyncRequest: segmentInfo.isSyncRequest\n        });\n      }\n      return segmentInfo;\n    }\n    stopForError(error) {\n      this.error(error);\n      this.state = 'READY';\n      this.pause();\n      this.trigger('error');\n    }\n    /**\n     * append a decrypted segement to the SourceBuffer through a SourceUpdater\n     *\n     * @private\n     */\n\n    segmentRequestFinished_(error, simpleSegment, result) {\n      if (!this.subtitlesTrack_) {\n        this.state = 'READY';\n        return;\n      }\n      this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n      if (!this.pendingSegment_) {\n        this.state = 'READY';\n        this.mediaRequestsAborted += 1;\n        return;\n      }\n      if (error) {\n        if (error.code === REQUEST_ERRORS.TIMEOUT) {\n          this.handleTimeout_();\n        }\n        if (error.code === REQUEST_ERRORS.ABORTED) {\n          this.mediaRequestsAborted += 1;\n        } else {\n          this.mediaRequestsErrored += 1;\n        }\n        this.stopForError(error);\n        return;\n      }\n      const segmentInfo = this.pendingSegment_;\n      const isMp4WebVttSegmentWithCues = result.mp4VttCues && result.mp4VttCues.length;\n      if (isMp4WebVttSegmentWithCues) {\n        segmentInfo.mp4VttCues = result.mp4VttCues;\n      } // although the VTT segment loader bandwidth isn't really used, it's good to\n      // maintain functionality between segment loaders\n\n      this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n      if (simpleSegment.key) {\n        this.segmentKey(simpleSegment.key, true);\n      }\n      this.state = 'APPENDING'; // used for tests\n\n      this.trigger('appending');\n      const segment = segmentInfo.segment;\n      if (segment.map) {\n        segment.map.bytes = simpleSegment.map.bytes;\n      }\n      segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n      if (typeof window.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n        this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n        // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n        this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n          message: 'Error loading vtt.js'\n        }));\n        return;\n      }\n      segment.requested = true;\n      try {\n        this.parseVTTCues_(segmentInfo);\n      } catch (e) {\n        this.stopForError({\n          message: e.message,\n          metadata: {\n            errorType: videojs.Error.StreamingVttParserError,\n            error: e\n          }\n        });\n        return;\n      }\n      if (!isMp4WebVttSegmentWithCues) {\n        this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n      }\n      if (segmentInfo.cues.length) {\n        segmentInfo.timingInfo = {\n          start: segmentInfo.cues[0].startTime,\n          end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n        };\n      } else {\n        segmentInfo.timingInfo = {\n          start: segmentInfo.startOfSegment,\n          end: segmentInfo.startOfSegment + segmentInfo.duration\n        };\n      }\n      if (segmentInfo.isSyncRequest) {\n        this.trigger('syncinfoupdate');\n        this.pendingSegment_ = null;\n        this.state = 'READY';\n        return;\n      }\n      segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n      this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n      // the subtitle track\n\n      segmentInfo.cues.forEach(cue => {\n        this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n      }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n      // cues to have identical time-intervals, but if the text is also identical\n      // we can safely assume it is a duplicate that can be removed (ex. when a cue\n      // \"overlaps\" VTT segments)\n\n      removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n      this.handleAppendsDone_();\n    }\n    handleData_(simpleSegment, result) {\n      const isVttType = simpleSegment && simpleSegment.type === 'vtt';\n      const isTextResult = result && result.type === 'text';\n      const isFmp4VttSegment = isVttType && isTextResult; // handle segment data for fmp4 encapsulated webvtt\n\n      if (isFmp4VttSegment) {\n        super.handleData_(simpleSegment, result);\n      }\n    }\n    updateTimingInfoEnd_() {// noop\n    }\n    /**\n     * Utility function for converting mp4 webvtt cue objects into VTTCues.\n     *\n     * @param {Object} segmentInfo with mp4 webvtt cues for parsing into VTTCue objecs\n     */\n\n    parseMp4VttCues_(segmentInfo) {\n      const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n      segmentInfo.mp4VttCues.forEach(cue => {\n        const start = cue.start + timestampOffset;\n        const end = cue.end + timestampOffset;\n        const vttCue = new window.VTTCue(start, end, cue.cueText);\n        if (cue.settings) {\n          cue.settings.split(' ').forEach(cueSetting => {\n            const keyValString = cueSetting.split(':');\n            const key = keyValString[0];\n            const value = keyValString[1];\n            vttCue[key] = isNaN(value) ? value : Number(value);\n          });\n        }\n        segmentInfo.cues.push(vttCue);\n      });\n    }\n    /**\n     * Uses the WebVTT parser to parse the segment response\n     *\n     * @throws NoVttJsError\n     *\n     * @param {Object} segmentInfo\n     *        a segment info object that describes the current segment\n     * @private\n     */\n\n    parseVTTCues_(segmentInfo) {\n      let decoder;\n      let decodeBytesToString = false;\n      if (typeof window.WebVTT !== 'function') {\n        // caller is responsible for exception handling.\n        throw new NoVttJsError();\n      }\n      segmentInfo.cues = [];\n      segmentInfo.timestampmap = {\n        MPEGTS: 0,\n        LOCAL: 0\n      };\n      if (segmentInfo.mp4VttCues) {\n        this.parseMp4VttCues_(segmentInfo);\n        return;\n      }\n      if (typeof window.TextDecoder === 'function') {\n        decoder = new window.TextDecoder('utf8');\n      } else {\n        decoder = window.WebVTT.StringDecoder();\n        decodeBytesToString = true;\n      }\n      const parser = new window.WebVTT.Parser(window, window.vttjs, decoder);\n      parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n      parser.ontimestampmap = map => {\n        segmentInfo.timestampmap = map;\n      };\n      parser.onparsingerror = error => {\n        videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n      };\n      if (segmentInfo.segment.map) {\n        let mapData = segmentInfo.segment.map.bytes;\n        if (decodeBytesToString) {\n          mapData = uint8ToUtf8(mapData);\n        }\n        parser.parse(mapData);\n      }\n      let segmentData = segmentInfo.bytes;\n      if (decodeBytesToString) {\n        segmentData = uint8ToUtf8(segmentData);\n      }\n      parser.parse(segmentData);\n      parser.flush();\n    }\n    /**\n     * Updates the start and end times of any cues parsed by the WebVTT parser using\n     * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n     * from the SyncController\n     *\n     * @param {Object} segmentInfo\n     *        a segment info object that describes the current segment\n     * @param {Object} mappingObj\n     *        object containing a mapping from TS to media time\n     * @param {Object} playlist\n     *        the playlist object containing the segment\n     * @private\n     */\n\n    updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n      const segment = segmentInfo.segment;\n      if (!mappingObj) {\n        // If the sync controller does not have a mapping of TS to Media Time for the\n        // timeline, then we don't have enough information to update the cue\n        // start/end times\n        return;\n      }\n      if (!segmentInfo.cues.length) {\n        // If there are no cues, we also do not have enough information to figure out\n        // segment timing. Mark that the segment contains no cues so we don't re-request\n        // an empty segment.\n        segment.empty = true;\n        return;\n      }\n      const {\n        MPEGTS,\n        LOCAL\n      } = segmentInfo.timestampmap;\n      /**\n       * From the spec:\n       * The MPEGTS media timestamp MUST use a 90KHz timescale,\n       * even when non-WebVTT Media Segments use a different timescale.\n       */\n\n      const mpegTsInSeconds = MPEGTS / clock_1;\n      const diff = mpegTsInSeconds - LOCAL + mappingObj.mapping;\n      segmentInfo.cues.forEach(cue => {\n        const duration = cue.endTime - cue.startTime;\n        const startTime = this.handleRollover_(cue.startTime + diff, mappingObj.time);\n        cue.startTime = Math.max(startTime, 0);\n        cue.endTime = Math.max(startTime + duration, 0);\n      });\n      if (!playlist.syncInfo) {\n        const firstStart = segmentInfo.cues[0].startTime;\n        const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n        playlist.syncInfo = {\n          mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n          time: Math.min(firstStart, lastStart - segment.duration)\n        };\n      }\n    }\n    /**\n     * MPEG-TS PES timestamps are limited to 2^33.\n     * Once they reach 2^33, they roll over to 0.\n     * mux.js handles PES timestamp rollover for the following scenarios:\n     * [forward rollover(right)] ->\n     *    PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0\n     * [backward rollover(left)] -->\n     *    we seek back to position before rollover.\n     *\n     * According to the HLS SPEC:\n     * When synchronizing WebVTT with PES timestamps, clients SHOULD account\n     * for cases where the 33-bit PES timestamps have wrapped and the WebVTT\n     * cue times have not.  When the PES timestamp wraps, the WebVTT Segment\n     * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT\n     * time to the new (low valued) PES timestamp.\n     *\n     * So we want to handle rollover here and align VTT Cue start/end time to the player's time.\n     */\n\n    handleRollover_(value, reference) {\n      if (reference === null) {\n        return value;\n      }\n      let valueIn90khz = value * clock_1;\n      const referenceIn90khz = reference * clock_1;\n      let offset;\n      if (referenceIn90khz < valueIn90khz) {\n        // - 2^33\n        offset = -8589934592;\n      } else {\n        // + 2^33\n        offset = 8589934592;\n      } // distance(value - reference) > 2^32\n\n      while (Math.abs(valueIn90khz - referenceIn90khz) > 4294967296) {\n        valueIn90khz += offset;\n      }\n      return valueIn90khz / clock_1;\n    }\n  }\n\n  /**\n   * @file ad-cue-tags.js\n   */\n  /**\n   * Searches for an ad cue that overlaps with the given mediaTime\n   *\n   * @param {Object} track\n   *        the track to find the cue for\n   *\n   * @param {number} mediaTime\n   *        the time to find the cue at\n   *\n   * @return {Object|null}\n   *         the found cue or null\n   */\n\n  const findAdCue = function (track, mediaTime) {\n    const cues = track.cues;\n    for (let i = 0; i < cues.length; i++) {\n      const cue = cues[i];\n      if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n        return cue;\n      }\n    }\n    return null;\n  };\n  const updateAdCues = function (media, track, offset = 0) {\n    if (!media.segments) {\n      return;\n    }\n    let mediaTime = offset;\n    let cue;\n    for (let i = 0; i < media.segments.length; i++) {\n      const segment = media.segments[i];\n      if (!cue) {\n        // Since the cues will span for at least the segment duration, adding a fudge\n        // factor of half segment duration will prevent duplicate cues from being\n        // created when timing info is not exact (e.g. cue start time initialized\n        // at 10.006677, but next call mediaTime is 10.003332 )\n        cue = findAdCue(track, mediaTime + segment.duration / 2);\n      }\n      if (cue) {\n        if ('cueIn' in segment) {\n          // Found a CUE-IN so end the cue\n          cue.endTime = mediaTime;\n          cue.adEndTime = mediaTime;\n          mediaTime += segment.duration;\n          cue = null;\n          continue;\n        }\n        if (mediaTime < cue.endTime) {\n          // Already processed this mediaTime for this cue\n          mediaTime += segment.duration;\n          continue;\n        } // otherwise extend cue until a CUE-IN is found\n\n        cue.endTime += segment.duration;\n      } else {\n        if ('cueOut' in segment) {\n          cue = new window.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n          cue.adStartTime = mediaTime; // Assumes tag format to be\n          // #EXT-X-CUE-OUT:30\n\n          cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n          track.addCue(cue);\n        }\n        if ('cueOutCont' in segment) {\n          // Entered into the middle of an ad cue\n          // Assumes tag formate to be\n          // #EXT-X-CUE-OUT-CONT:10/30\n          const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n          cue = new window.VTTCue(mediaTime, mediaTime + segment.duration, '');\n          cue.adStartTime = mediaTime - adOffset;\n          cue.adEndTime = cue.adStartTime + adTotal;\n          track.addCue(cue);\n        }\n      }\n      mediaTime += segment.duration;\n    }\n  };\n  class SyncInfo {\n    /**\n     * @param {number} start - media sequence start\n     * @param {number} end - media sequence end\n     * @param {number} segmentIndex - index for associated segment\n     * @param {number|null} [partIndex] - index for associated part\n     * @param {boolean} [appended] - appended indicator\n     *\n     */\n    constructor({\n      start,\n      end,\n      segmentIndex,\n      partIndex = null,\n      appended = false\n    }) {\n      this.start_ = start;\n      this.end_ = end;\n      this.segmentIndex_ = segmentIndex;\n      this.partIndex_ = partIndex;\n      this.appended_ = appended;\n    }\n    isInRange(targetTime) {\n      return targetTime >= this.start && targetTime < this.end;\n    }\n    markAppended() {\n      this.appended_ = true;\n    }\n    resetAppendedStatus() {\n      this.appended_ = false;\n    }\n    get isAppended() {\n      return this.appended_;\n    }\n    get start() {\n      return this.start_;\n    }\n    get end() {\n      return this.end_;\n    }\n    get segmentIndex() {\n      return this.segmentIndex_;\n    }\n    get partIndex() {\n      return this.partIndex_;\n    }\n  }\n  class SyncInfoData {\n    /**\n     *\n     * @param {SyncInfo} segmentSyncInfo - sync info for a given segment\n     * @param {Array<SyncInfo>} [partsSyncInfo] - sync infos for a list of parts for a given segment\n     */\n    constructor(segmentSyncInfo, partsSyncInfo = []) {\n      this.segmentSyncInfo_ = segmentSyncInfo;\n      this.partsSyncInfo_ = partsSyncInfo;\n    }\n    get segmentSyncInfo() {\n      return this.segmentSyncInfo_;\n    }\n    get partsSyncInfo() {\n      return this.partsSyncInfo_;\n    }\n    get hasPartsSyncInfo() {\n      return this.partsSyncInfo_.length > 0;\n    }\n    resetAppendStatus() {\n      this.segmentSyncInfo_.resetAppendedStatus();\n      this.partsSyncInfo_.forEach(partSyncInfo => partSyncInfo.resetAppendedStatus());\n    }\n  }\n  class MediaSequenceSync {\n    constructor() {\n      /**\n       * @type {Map<number, SyncInfoData>}\n       * @protected\n       */\n      this.storage_ = new Map();\n      this.diagnostics_ = '';\n      this.isReliable_ = false;\n      this.start_ = -Infinity;\n      this.end_ = Infinity;\n    }\n    get start() {\n      return this.start_;\n    }\n    get end() {\n      return this.end_;\n    }\n    get diagnostics() {\n      return this.diagnostics_;\n    }\n    get isReliable() {\n      return this.isReliable_;\n    }\n    resetAppendedStatus() {\n      this.storage_.forEach(syncInfoData => syncInfoData.resetAppendStatus());\n    }\n    /**\n     * update sync storage\n     *\n     * @param {Object} playlist\n     * @param {number} currentTime\n     *\n     * @return {void}\n     */\n\n    update(playlist, currentTime) {\n      const {\n        mediaSequence,\n        segments\n      } = playlist;\n      this.isReliable_ = this.isReliablePlaylist_(mediaSequence, segments);\n      if (!this.isReliable_) {\n        return;\n      }\n      return this.updateStorage_(segments, mediaSequence, this.calculateBaseTime_(mediaSequence, segments, currentTime));\n    }\n    /**\n     * @param {number} targetTime\n     * @return {SyncInfo|null}\n     */\n\n    getSyncInfoForTime(targetTime) {\n      for (const {\n        segmentSyncInfo,\n        partsSyncInfo\n      } of this.storage_.values()) {\n        // Normal segment flow:\n        if (!partsSyncInfo.length) {\n          if (segmentSyncInfo.isInRange(targetTime)) {\n            return segmentSyncInfo;\n          }\n        } else {\n          // Low latency flow:\n          for (const partSyncInfo of partsSyncInfo) {\n            if (partSyncInfo.isInRange(targetTime)) {\n              return partSyncInfo;\n            }\n          }\n        }\n      }\n      return null;\n    }\n    getSyncInfoForMediaSequence(mediaSequence) {\n      return this.storage_.get(mediaSequence);\n    }\n    updateStorage_(segments, startingMediaSequence, startingTime) {\n      const newStorage = new Map();\n      let newDiagnostics = '\\n';\n      let currentStart = startingTime;\n      let currentMediaSequence = startingMediaSequence;\n      this.start_ = currentStart;\n      segments.forEach((segment, segmentIndex) => {\n        const prevSyncInfoData = this.storage_.get(currentMediaSequence);\n        const segmentStart = currentStart;\n        const segmentEnd = segmentStart + segment.duration;\n        const segmentIsAppended = Boolean(prevSyncInfoData && prevSyncInfoData.segmentSyncInfo && prevSyncInfoData.segmentSyncInfo.isAppended);\n        const segmentSyncInfo = new SyncInfo({\n          start: segmentStart,\n          end: segmentEnd,\n          appended: segmentIsAppended,\n          segmentIndex\n        });\n        segment.syncInfo = segmentSyncInfo;\n        let currentPartStart = currentStart;\n        const partsSyncInfo = (segment.parts || []).map((part, partIndex) => {\n          const partStart = currentPartStart;\n          const partEnd = currentPartStart + part.duration;\n          const partIsAppended = Boolean(prevSyncInfoData && prevSyncInfoData.partsSyncInfo && prevSyncInfoData.partsSyncInfo[partIndex] && prevSyncInfoData.partsSyncInfo[partIndex].isAppended);\n          const partSyncInfo = new SyncInfo({\n            start: partStart,\n            end: partEnd,\n            appended: partIsAppended,\n            segmentIndex,\n            partIndex\n          });\n          currentPartStart = partEnd;\n          newDiagnostics += `Media Sequence: ${currentMediaSequence}.${partIndex} | Range: ${partStart} --> ${partEnd} | Appended: ${partIsAppended}\\n`;\n          part.syncInfo = partSyncInfo;\n          return partSyncInfo;\n        });\n        newStorage.set(currentMediaSequence, new SyncInfoData(segmentSyncInfo, partsSyncInfo));\n        newDiagnostics += `${compactSegmentUrlDescription(segment.resolvedUri)} | Media Sequence: ${currentMediaSequence} | Range: ${segmentStart} --> ${segmentEnd} | Appended: ${segmentIsAppended}\\n`;\n        currentMediaSequence++;\n        currentStart = segmentEnd;\n      });\n      this.end_ = currentStart;\n      this.storage_ = newStorage;\n      this.diagnostics_ = newDiagnostics;\n    }\n    calculateBaseTime_(mediaSequence, segments, fallback) {\n      if (!this.storage_.size) {\n        // Initial setup flow.\n        return 0;\n      }\n      if (this.storage_.has(mediaSequence)) {\n        // Normal flow.\n        return this.storage_.get(mediaSequence).segmentSyncInfo.start;\n      }\n      const minMediaSequenceFromStorage = Math.min(...this.storage_.keys()); // This case captures a race condition that can occur if we switch to a new media playlist that is out of date\n      // and still has an older Media Sequence. If this occurs, we extrapolate backwards to get the base time.\n\n      if (mediaSequence < minMediaSequenceFromStorage) {\n        const mediaSequenceDiff = minMediaSequenceFromStorage - mediaSequence;\n        let baseTime = this.storage_.get(minMediaSequenceFromStorage).segmentSyncInfo.start;\n        for (let i = 0; i < mediaSequenceDiff; i++) {\n          const segment = segments[i];\n          baseTime -= segment.duration;\n        }\n        return baseTime;\n      } // Fallback flow.\n      // There is a gap between last recorded playlist and a new one received.\n\n      return fallback;\n    }\n    isReliablePlaylist_(mediaSequence, segments) {\n      return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;\n    }\n  }\n  class DependantMediaSequenceSync extends MediaSequenceSync {\n    constructor(parent) {\n      super();\n      this.parent_ = parent;\n    }\n    calculateBaseTime_(mediaSequence, segments, fallback) {\n      if (!this.storage_.size) {\n        const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);\n        if (info) {\n          return info.segmentSyncInfo.start;\n        }\n        return 0;\n      }\n      return super.calculateBaseTime_(mediaSequence, segments, fallback);\n    }\n  }\n\n  /**\n   * @file sync-controller.js\n   */\n  // synchronize expired playlist segments.\n  // the max media sequence diff is 48 hours of live stream\n  // content with two second segments. Anything larger than that\n  // will likely be invalid.\n\n  const MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\n  const syncPointStrategies = [\n  // Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n  //                the equivalence display-time 0 === segment-index 0\n  {\n    name: 'VOD',\n    run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n      if (duration !== Infinity) {\n        const syncPoint = {\n          time: 0,\n          segmentIndex: 0,\n          partIndex: null\n        };\n        return syncPoint;\n      }\n      return null;\n    }\n  }, {\n    name: 'MediaSequence',\n    /**\n     * run media sequence strategy\n     *\n     * @param {SyncController} syncController\n     * @param {Object} playlist\n     * @param {number} duration\n     * @param {number} currentTimeline\n     * @param {number} currentTime\n     * @param {string} type\n     */\n    run: (syncController, playlist, duration, currentTimeline, currentTime, type) => {\n      const mediaSequenceSync = syncController.getMediaSequenceSync(type);\n      if (!mediaSequenceSync) {\n        return null;\n      }\n      if (!mediaSequenceSync.isReliable) {\n        return null;\n      }\n      const syncInfo = mediaSequenceSync.getSyncInfoForTime(currentTime);\n      if (!syncInfo) {\n        return null;\n      }\n      return {\n        time: syncInfo.start,\n        partIndex: syncInfo.partIndex,\n        segmentIndex: syncInfo.segmentIndex\n      };\n    }\n  },\n  // Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n  {\n    name: 'ProgramDateTime',\n    run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n      if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n        return null;\n      }\n      let syncPoint = null;\n      let lastDistance = null;\n      const partsAndSegments = getPartsAndSegments(playlist);\n      currentTime = currentTime || 0;\n      for (let i = 0; i < partsAndSegments.length; i++) {\n        // start from the end and loop backwards for live\n        // or start from the front and loop forwards for non-live\n        const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n        const partAndSegment = partsAndSegments[index];\n        const segment = partAndSegment.segment;\n        const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n        if (!datetimeMapping || !segment.dateTimeObject) {\n          continue;\n        }\n        const segmentTime = segment.dateTimeObject.getTime() / 1000;\n        let start = segmentTime + datetimeMapping; // take part duration into account.\n\n        if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n          for (let z = 0; z < partAndSegment.partIndex; z++) {\n            start += segment.parts[z].duration;\n          }\n        }\n        const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n        // currentTime and can stop looking for better candidates\n\n        if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n          break;\n        }\n        lastDistance = distance;\n        syncPoint = {\n          time: start,\n          segmentIndex: partAndSegment.segmentIndex,\n          partIndex: partAndSegment.partIndex\n        };\n      }\n      return syncPoint;\n    }\n  },\n  // Stategy \"Segment\": We have a known time mapping for a timeline and a\n  //                    segment in the current timeline with timing data\n  {\n    name: 'Segment',\n    run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n      let syncPoint = null;\n      let lastDistance = null;\n      currentTime = currentTime || 0;\n      const partsAndSegments = getPartsAndSegments(playlist);\n      for (let i = 0; i < partsAndSegments.length; i++) {\n        // start from the end and loop backwards for live\n        // or start from the front and loop forwards for non-live\n        const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n        const partAndSegment = partsAndSegments[index];\n        const segment = partAndSegment.segment;\n        const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n        if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n          const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n          // currentTime and can stop looking for better candidates\n\n          if (lastDistance !== null && lastDistance < distance) {\n            break;\n          }\n          if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n            lastDistance = distance;\n            syncPoint = {\n              time: start,\n              segmentIndex: partAndSegment.segmentIndex,\n              partIndex: partAndSegment.partIndex\n            };\n          }\n        }\n      }\n      return syncPoint;\n    }\n  },\n  // Stategy \"Discontinuity\": We have a discontinuity with a known\n  //                          display-time\n  {\n    name: 'Discontinuity',\n    run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n      let syncPoint = null;\n      currentTime = currentTime || 0;\n      if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n        let lastDistance = null;\n        for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n          const segmentIndex = playlist.discontinuityStarts[i];\n          const discontinuity = playlist.discontinuitySequence + i + 1;\n          const discontinuitySync = syncController.discontinuities[discontinuity];\n          if (discontinuitySync) {\n            const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n            // currentTime and can stop looking for better candidates\n\n            if (lastDistance !== null && lastDistance < distance) {\n              break;\n            }\n            if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n              lastDistance = distance;\n              syncPoint = {\n                time: discontinuitySync.time,\n                segmentIndex,\n                partIndex: null\n              };\n            }\n          }\n        }\n      }\n      return syncPoint;\n    }\n  },\n  // Stategy \"Playlist\": We have a playlist with a known mapping of\n  //                     segment index to display time\n  {\n    name: 'Playlist',\n    run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n      if (playlist.syncInfo) {\n        const syncPoint = {\n          time: playlist.syncInfo.time,\n          segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n          partIndex: null\n        };\n        return syncPoint;\n      }\n      return null;\n    }\n  }];\n  class SyncController extends videojs.EventTarget {\n    constructor(options = {}) {\n      super(); // ...for synching across variants\n\n      this.timelines = [];\n      this.discontinuities = [];\n      this.timelineToDatetimeMappings = {}; // TODO: this map should be only available for HLS. Since only HLS has MediaSequence.\n      //  For some reason this map helps with syncing between quality switch for MPEG-DASH as well.\n      //  Moreover if we disable this map for MPEG-DASH - quality switch will be broken.\n      //  MPEG-DASH should have its own separate sync strategy\n\n      const main = new MediaSequenceSync();\n      const audio = new DependantMediaSequenceSync(main);\n      const vtt = new DependantMediaSequenceSync(main);\n      this.mediaSequenceStorage_ = {\n        main,\n        audio,\n        vtt\n      };\n      this.logger_ = logger('SyncController');\n    }\n    /**\n     *\n     * @param {string} loaderType\n     * @return {MediaSequenceSync|null}\n     */\n\n    getMediaSequenceSync(loaderType) {\n      return this.mediaSequenceStorage_[loaderType] || null;\n    }\n    /**\n     * Find a sync-point for the playlist specified\n     *\n     * A sync-point is defined as a known mapping from display-time to\n     * a segment-index in the current playlist.\n     *\n     * @param {Playlist} playlist\n     *        The playlist that needs a sync-point\n     * @param {number} duration\n     *        Duration of the MediaSource (Infinite if playing a live source)\n     * @param {number} currentTimeline\n     *        The last timeline from which a segment was loaded\n     * @param {number} currentTime\n     *        Current player's time\n     * @param {string} type\n     *        Segment loader type\n     * @return {Object}\n     *          A sync-point object\n     */\n\n    getSyncPoint(playlist, duration, currentTimeline, currentTime, type) {\n      // Always use VOD sync point for VOD\n      if (duration !== Infinity) {\n        const vodSyncPointStrategy = syncPointStrategies.find(({\n          name\n        }) => name === 'VOD');\n        return vodSyncPointStrategy.run(this, playlist, duration);\n      }\n      const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime, type);\n      if (!syncPoints.length) {\n        // Signal that we need to attempt to get a sync-point manually\n        // by fetching a segment in the playlist and constructing\n        // a sync-point from that information\n        return null;\n      } // If we have exact match just return it instead of finding the nearest distance\n\n      for (const syncPointInfo of syncPoints) {\n        const {\n          syncPoint,\n          strategy\n        } = syncPointInfo;\n        const {\n          segmentIndex,\n          time\n        } = syncPoint;\n        if (segmentIndex < 0) {\n          continue;\n        }\n        const selectedSegment = playlist.segments[segmentIndex];\n        const start = time;\n        const end = start + selectedSegment.duration;\n        this.logger_(`Strategy: ${strategy}. Current time: ${currentTime}. selected segment: ${segmentIndex}. Time: [${start} -> ${end}]}`);\n        if (currentTime >= start && currentTime < end) {\n          this.logger_('Found sync point with exact match: ', syncPoint);\n          return syncPoint;\n        }\n      } // Now find the sync-point that is closest to the currentTime because\n      // that should result in the most accurate guess about which segment\n      // to fetch\n\n      return this.selectSyncPoint_(syncPoints, {\n        key: 'time',\n        value: currentTime\n      });\n    }\n    /**\n     * Calculate the amount of time that has expired off the playlist during playback\n     *\n     * @param {Playlist} playlist\n     *        Playlist object to calculate expired from\n     * @param {number} duration\n     *        Duration of the MediaSource (Infinity if playling a live source)\n     * @return {number|null}\n     *          The amount of time that has expired off the playlist during playback. Null\n     *          if no sync-points for the playlist can be found.\n     */\n\n    getExpiredTime(playlist, duration) {\n      if (!playlist || !playlist.segments) {\n        return null;\n      }\n      const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n      if (!syncPoints.length) {\n        return null;\n      }\n      const syncPoint = this.selectSyncPoint_(syncPoints, {\n        key: 'segmentIndex',\n        value: 0\n      }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n      // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n      if (syncPoint.segmentIndex > 0) {\n        syncPoint.time *= -1;\n      }\n      return Math.abs(syncPoint.time + sumDurations({\n        defaultDuration: playlist.targetDuration,\n        durationList: playlist.segments,\n        startIndex: syncPoint.segmentIndex,\n        endIndex: 0\n      }));\n    }\n    /**\n     * Runs each sync-point strategy and returns a list of sync-points returned by the\n     * strategies\n     *\n     * @private\n     * @param {Playlist} playlist\n     *        The playlist that needs a sync-point\n     * @param {number} duration\n     *        Duration of the MediaSource (Infinity if playing a live source)\n     * @param {number} currentTimeline\n     *        The last timeline from which a segment was loaded\n     * @param {number} currentTime\n     *        Current player's time\n     * @param {string} type\n     *        Segment loader type\n     * @return {Array}\n     *          A list of sync-point objects\n     */\n\n    runStrategies_(playlist, duration, currentTimeline, currentTime, type) {\n      const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n      for (let i = 0; i < syncPointStrategies.length; i++) {\n        const strategy = syncPointStrategies[i];\n        const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime, type);\n        if (syncPoint) {\n          syncPoint.strategy = strategy.name;\n          syncPoints.push({\n            strategy: strategy.name,\n            syncPoint\n          });\n        }\n      }\n      return syncPoints;\n    }\n    /**\n     * Selects the sync-point nearest the specified target\n     *\n     * @private\n     * @param {Array} syncPoints\n     *        List of sync-points to select from\n     * @param {Object} target\n     *        Object specifying the property and value we are targeting\n     * @param {string} target.key\n     *        Specifies the property to target. Must be either 'time' or 'segmentIndex'\n     * @param {number} target.value\n     *        The value to target for the specified key.\n     * @return {Object}\n     *          The sync-point nearest the target\n     */\n\n    selectSyncPoint_(syncPoints, target) {\n      let bestSyncPoint = syncPoints[0].syncPoint;\n      let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n      let bestStrategy = syncPoints[0].strategy;\n      for (let i = 1; i < syncPoints.length; i++) {\n        const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n        if (newDistance < bestDistance) {\n          bestDistance = newDistance;\n          bestSyncPoint = syncPoints[i].syncPoint;\n          bestStrategy = syncPoints[i].strategy;\n        }\n      }\n      this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']');\n      return bestSyncPoint;\n    }\n    /**\n     * Save any meta-data present on the segments when segments leave\n     * the live window to the playlist to allow for synchronization at the\n     * playlist level later.\n     *\n     * @param {Playlist} oldPlaylist - The previous active playlist\n     * @param {Playlist} newPlaylist - The updated and most current playlist\n     */\n\n    saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n      const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n      if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n        videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`);\n        return;\n      } // When a segment expires from the playlist and it has a start time\n      // save that information as a possible sync-point reference in future\n\n      for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n        const lastRemovedSegment = oldPlaylist.segments[i];\n        if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n          newPlaylist.syncInfo = {\n            mediaSequence: oldPlaylist.mediaSequence + i,\n            time: lastRemovedSegment.start\n          };\n          this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`);\n          this.trigger('syncinfoupdate');\n          break;\n        }\n      }\n    }\n    /**\n     * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n     * before segments start to load.\n     *\n     * @param {Playlist} playlist - The currently active playlist\n     */\n\n    setDateTimeMappingForStart(playlist) {\n      // It's possible for the playlist to be updated before playback starts, meaning time\n      // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n      // crossed, then the old time zero mapping (for the prior timeline) would be retained\n      // unless the mappings are cleared.\n      this.timelineToDatetimeMappings = {};\n      if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n        const firstSegment = playlist.segments[0];\n        const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n        this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n      }\n    }\n    /**\n     * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n     * based on the latest timing information.\n     *\n     * @param {Object} options\n     *        Options object\n     * @param {SegmentInfo} options.segmentInfo\n     *        The current active request information\n     * @param {boolean} options.shouldSaveTimelineMapping\n     *        If there's a timeline change, determines if the timeline mapping should be\n     *        saved for timeline mapping and program date time mappings.\n     */\n\n    saveSegmentTimingInfo({\n      segmentInfo,\n      shouldSaveTimelineMapping\n    }) {\n      const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n      const segment = segmentInfo.segment;\n      if (didCalculateSegmentTimeMapping) {\n        this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n        // now with segment timing information\n\n        if (!segmentInfo.playlist.syncInfo) {\n          segmentInfo.playlist.syncInfo = {\n            mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n            time: segment.start\n          };\n        }\n      }\n      const dateTime = segment.dateTimeObject;\n      if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n        this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n      }\n    }\n    timestampOffsetForTimeline(timeline) {\n      if (typeof this.timelines[timeline] === 'undefined') {\n        return null;\n      }\n      return this.timelines[timeline].time;\n    }\n    mappingForTimeline(timeline) {\n      if (typeof this.timelines[timeline] === 'undefined') {\n        return null;\n      }\n      return this.timelines[timeline].mapping;\n    }\n    /**\n     * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n     * save that display time to the segment.\n     *\n     * @private\n     * @param {SegmentInfo} segmentInfo\n     *        The current active request information\n     * @param {Object} timingInfo\n     *        The start and end time of the current segment in \"media time\"\n     * @param {boolean} shouldSaveTimelineMapping\n     *        If there's a timeline change, determines if the timeline mapping should be\n     *        saved in timelines.\n     * @return {boolean}\n     *          Returns false if segment time mapping could not be calculated\n     */\n\n    calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n      // TODO: remove side effects\n      const segment = segmentInfo.segment;\n      const part = segmentInfo.part;\n      let mappingObj = this.timelines[segmentInfo.timeline];\n      let start;\n      let end;\n      if (typeof segmentInfo.timestampOffset === 'number') {\n        mappingObj = {\n          time: segmentInfo.startOfSegment,\n          mapping: segmentInfo.startOfSegment - timingInfo.start\n        };\n        if (shouldSaveTimelineMapping) {\n          this.timelines[segmentInfo.timeline] = mappingObj;\n          this.trigger('timestampoffset');\n          this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n        }\n        start = segmentInfo.startOfSegment;\n        end = timingInfo.end + mappingObj.mapping;\n      } else if (mappingObj) {\n        start = timingInfo.start + mappingObj.mapping;\n        end = timingInfo.end + mappingObj.mapping;\n      } else {\n        return false;\n      }\n      if (part) {\n        part.start = start;\n        part.end = end;\n      } // If we don't have a segment start yet or the start value we got\n      // is less than our current segment.start value, save a new start value.\n      // We have to do this because parts will have segment timing info saved\n      // multiple times and we want segment start to be the earliest part start\n      // value for that segment.\n\n      if (!segment.start || start < segment.start) {\n        segment.start = start;\n      }\n      segment.end = end;\n      return true;\n    }\n    /**\n     * Each time we have discontinuity in the playlist, attempt to calculate the location\n     * in display of the start of the discontinuity and save that. We also save an accuracy\n     * value so that we save values with the most accuracy (closest to 0.)\n     *\n     * @private\n     * @param {SegmentInfo} segmentInfo - The current active request information\n     */\n\n    saveDiscontinuitySyncInfo_(segmentInfo) {\n      const playlist = segmentInfo.playlist;\n      const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n      // the start of the range and it's accuracy is 0 (greater accuracy values\n      // mean more approximation)\n\n      if (segment.discontinuity) {\n        this.discontinuities[segment.timeline] = {\n          time: segment.start,\n          accuracy: 0\n        };\n      } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n        // Search for future discontinuities that we can provide better timing\n        // information for and save that information for sync purposes\n        for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n          const segmentIndex = playlist.discontinuityStarts[i];\n          const discontinuity = playlist.discontinuitySequence + i + 1;\n          const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n          const accuracy = Math.abs(mediaIndexDiff);\n          if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n            let time;\n            if (mediaIndexDiff < 0) {\n              time = segment.start - sumDurations({\n                defaultDuration: playlist.targetDuration,\n                durationList: playlist.segments,\n                startIndex: segmentInfo.mediaIndex,\n                endIndex: segmentIndex\n              });\n            } else {\n              time = segment.end + sumDurations({\n                defaultDuration: playlist.targetDuration,\n                durationList: playlist.segments,\n                startIndex: segmentInfo.mediaIndex + 1,\n                endIndex: segmentIndex\n              });\n            }\n            this.discontinuities[discontinuity] = {\n              time,\n              accuracy\n            };\n          }\n        }\n      }\n    }\n    dispose() {\n      this.trigger('dispose');\n      this.off();\n    }\n  }\n\n  /**\n   * The TimelineChangeController acts as a source for segment loaders to listen for and\n   * keep track of latest and pending timeline changes. This is useful to ensure proper\n   * sync, as each loader may need to make a consideration for what timeline the other\n   * loader is on before making changes which could impact the other loader's media.\n   *\n   * @class TimelineChangeController\n   * @extends videojs.EventTarget\n   */\n\n  class TimelineChangeController extends videojs.EventTarget {\n    constructor() {\n      super();\n      this.pendingTimelineChanges_ = {};\n      this.lastTimelineChanges_ = {};\n    }\n    clearPendingTimelineChange(type) {\n      this.pendingTimelineChanges_[type] = null;\n      this.trigger('pendingtimelinechange');\n    }\n    pendingTimelineChange({\n      type,\n      from,\n      to\n    }) {\n      if (typeof from === 'number' && typeof to === 'number') {\n        this.pendingTimelineChanges_[type] = {\n          type,\n          from,\n          to\n        };\n        this.trigger('pendingtimelinechange');\n      }\n      return this.pendingTimelineChanges_[type];\n    }\n    lastTimelineChange({\n      type,\n      from,\n      to\n    }) {\n      if (typeof from === 'number' && typeof to === 'number') {\n        this.lastTimelineChanges_[type] = {\n          type,\n          from,\n          to\n        };\n        delete this.pendingTimelineChanges_[type];\n        const metadata = {\n          timelineChangeInfo: {\n            from,\n            to\n          }\n        };\n        this.trigger({\n          type: 'timelinechange',\n          metadata\n        });\n      }\n      return this.lastTimelineChanges_[type];\n    }\n    dispose() {\n      this.trigger('dispose');\n      this.pendingTimelineChanges_ = {};\n      this.lastTimelineChanges_ = {};\n      this.off();\n    }\n  }\n\n  /* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n  const workerCode = transform(getWorkerString(function () {\n    /**\n     * @file stream.js\n     */\n\n    /**\n     * A lightweight readable stream implemention that handles event dispatching.\n     *\n     * @class Stream\n     */\n\n    var Stream = /*#__PURE__*/function () {\n      function Stream() {\n        this.listeners = {};\n      }\n      /**\n       * Add a listener for a specified event type.\n       *\n       * @param {string} type the event name\n       * @param {Function} listener the callback to be invoked when an event of\n       * the specified type occurs\n       */\n\n      var _proto = Stream.prototype;\n      _proto.on = function on(type, listener) {\n        if (!this.listeners[type]) {\n          this.listeners[type] = [];\n        }\n        this.listeners[type].push(listener);\n      }\n      /**\n       * Remove a listener for a specified event type.\n       *\n       * @param {string} type the event name\n       * @param {Function} listener  a function previously registered for this\n       * type of event through `on`\n       * @return {boolean} if we could turn it off or not\n       */;\n      _proto.off = function off(type, listener) {\n        if (!this.listeners[type]) {\n          return false;\n        }\n        var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n        // In Video.js we slice listener functions\n        // on trigger so that it does not mess up the order\n        // while we loop through.\n        //\n        // Here we slice on off so that the loop in trigger\n        // can continue using it's old reference to loop without\n        // messing up the order.\n\n        this.listeners[type] = this.listeners[type].slice(0);\n        this.listeners[type].splice(index, 1);\n        return index > -1;\n      }\n      /**\n       * Trigger an event of the specified type on this stream. Any additional\n       * arguments to this function are passed as parameters to event listeners.\n       *\n       * @param {string} type the event name\n       */;\n      _proto.trigger = function trigger(type) {\n        var callbacks = this.listeners[type];\n        if (!callbacks) {\n          return;\n        } // Slicing the arguments on every invocation of this method\n        // can add a significant amount of overhead. Avoid the\n        // intermediate object creation for the common case of a\n        // single callback argument\n\n        if (arguments.length === 2) {\n          var length = callbacks.length;\n          for (var i = 0; i < length; ++i) {\n            callbacks[i].call(this, arguments[1]);\n          }\n        } else {\n          var args = Array.prototype.slice.call(arguments, 1);\n          var _length = callbacks.length;\n          for (var _i = 0; _i < _length; ++_i) {\n            callbacks[_i].apply(this, args);\n          }\n        }\n      }\n      /**\n       * Destroys the stream and cleans up.\n       */;\n      _proto.dispose = function dispose() {\n        this.listeners = {};\n      }\n      /**\n       * Forwards all `data` events on this stream to the destination stream. The\n       * destination stream should provide a method `push` to receive the data\n       * events as they arrive.\n       *\n       * @param {Stream} destination the stream that will receive all `data` events\n       * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n       */;\n      _proto.pipe = function pipe(destination) {\n        this.on('data', function (data) {\n          destination.push(data);\n        });\n      };\n      return Stream;\n    }();\n    /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n    /**\n     * Returns the subarray of a Uint8Array without PKCS#7 padding.\n     *\n     * @param padded {Uint8Array} unencrypted bytes that have been padded\n     * @return {Uint8Array} the unpadded bytes\n     * @see http://tools.ietf.org/html/rfc5652\n     */\n\n    function unpad(padded) {\n      return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n    }\n    /*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */\n\n    /**\n     * @file aes.js\n     *\n     * This file contains an adaptation of the AES decryption algorithm\n     * from the Standford Javascript Cryptography Library. That work is\n     * covered by the following copyright and permissions notice:\n     *\n     * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n     * All rights reserved.\n     *\n     * Redistribution and use in source and binary forms, with or without\n     * modification, are permitted provided that the following conditions are\n     * met:\n     *\n     * 1. Redistributions of source code must retain the above copyright\n     *    notice, this list of conditions and the following disclaimer.\n     *\n     * 2. Redistributions in binary form must reproduce the above\n     *    copyright notice, this list of conditions and the following\n     *    disclaimer in the documentation and/or other materials provided\n     *    with the distribution.\n     *\n     * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n     * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n     * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n     * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n     * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n     * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     *\n     * The views and conclusions contained in the software and documentation\n     * are those of the authors and should not be interpreted as representing\n     * official policies, either expressed or implied, of the authors.\n     */\n\n    /**\n     * Expand the S-box tables.\n     *\n     * @private\n     */\n\n    const precompute = function () {\n      const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n      const encTable = tables[0];\n      const decTable = tables[1];\n      const sbox = encTable[4];\n      const sboxInv = decTable[4];\n      let i;\n      let x;\n      let xInv;\n      const d = [];\n      const th = [];\n      let x2;\n      let x4;\n      let x8;\n      let s;\n      let tEnc;\n      let tDec; // Compute double and third tables\n\n      for (i = 0; i < 256; i++) {\n        th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n      }\n      for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n        // Compute sbox\n        s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n        s = s >> 8 ^ s & 255 ^ 99;\n        sbox[x] = s;\n        sboxInv[s] = x; // Compute MixColumns\n\n        x8 = d[x4 = d[x2 = d[x]]];\n        tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n        tEnc = d[s] * 0x101 ^ s * 0x1010100;\n        for (i = 0; i < 4; i++) {\n          encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n          decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n        }\n      } // Compactify. Considerable speedup on Firefox.\n\n      for (i = 0; i < 5; i++) {\n        encTable[i] = encTable[i].slice(0);\n        decTable[i] = decTable[i].slice(0);\n      }\n      return tables;\n    };\n    let aesTables = null;\n    /**\n     * Schedule out an AES key for both encryption and decryption. This\n     * is a low-level class. Use a cipher mode to do bulk encryption.\n     *\n     * @class AES\n     * @param key {Array} The key as an array of 4, 6 or 8 words.\n     */\n\n    class AES {\n      constructor(key) {\n        /**\n        * The expanded S-box and inverse S-box tables. These will be computed\n        * on the client so that we don't have to send them down the wire.\n        *\n        * There are two tables, _tables[0] is for encryption and\n        * _tables[1] is for decryption.\n        *\n        * The first 4 sub-tables are the expanded S-box with MixColumns. The\n        * last (_tables[01][4]) is the S-box itself.\n        *\n        * @private\n        */\n        // if we have yet to precompute the S-box tables\n        // do so now\n        if (!aesTables) {\n          aesTables = precompute();\n        } // then make a copy of that object for use\n\n        this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n        let i;\n        let j;\n        let tmp;\n        const sbox = this._tables[0][4];\n        const decTable = this._tables[1];\n        const keyLen = key.length;\n        let rcon = 1;\n        if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n          throw new Error('Invalid aes key size');\n        }\n        const encKey = key.slice(0);\n        const decKey = [];\n        this._key = [encKey, decKey]; // schedule encryption keys\n\n        for (i = keyLen; i < 4 * keyLen + 28; i++) {\n          tmp = encKey[i - 1]; // apply sbox\n\n          if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n            tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n            if (i % keyLen === 0) {\n              tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n              rcon = rcon << 1 ^ (rcon >> 7) * 283;\n            }\n          }\n          encKey[i] = encKey[i - keyLen] ^ tmp;\n        } // schedule decryption keys\n\n        for (j = 0; i; j++, i--) {\n          tmp = encKey[j & 3 ? i : i - 4];\n          if (i <= 4 || j < 4) {\n            decKey[j] = tmp;\n          } else {\n            decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n          }\n        }\n      }\n      /**\n       * Decrypt 16 bytes, specified as four 32-bit words.\n       *\n       * @param {number} encrypted0 the first word to decrypt\n       * @param {number} encrypted1 the second word to decrypt\n       * @param {number} encrypted2 the third word to decrypt\n       * @param {number} encrypted3 the fourth word to decrypt\n       * @param {Int32Array} out the array to write the decrypted words\n       * into\n       * @param {number} offset the offset into the output array to start\n       * writing results\n       * @return {Array} The plaintext.\n       */\n\n      decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n        const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n        let a = encrypted0 ^ key[0];\n        let b = encrypted3 ^ key[1];\n        let c = encrypted2 ^ key[2];\n        let d = encrypted1 ^ key[3];\n        let a2;\n        let b2;\n        let c2; // key.length === 2 ?\n\n        const nInnerRounds = key.length / 4 - 2;\n        let i;\n        let kIndex = 4;\n        const table = this._tables[1]; // load up the tables\n\n        const table0 = table[0];\n        const table1 = table[1];\n        const table2 = table[2];\n        const table3 = table[3];\n        const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n        for (i = 0; i < nInnerRounds; i++) {\n          a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n          b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n          c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n          d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n          kIndex += 4;\n          a = a2;\n          b = b2;\n          c = c2;\n        } // Last round.\n\n        for (i = 0; i < 4; i++) {\n          out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n          a2 = a;\n          a = b;\n          b = c;\n          c = d;\n          d = a2;\n        }\n      }\n    }\n    /**\n     * @file async-stream.js\n     */\n\n    /**\n     * A wrapper around the Stream class to use setTimeout\n     * and run stream \"jobs\" Asynchronously\n     *\n     * @class AsyncStream\n     * @extends Stream\n     */\n\n    class AsyncStream extends Stream {\n      constructor() {\n        super(Stream);\n        this.jobs = [];\n        this.delay = 1;\n        this.timeout_ = null;\n      }\n      /**\n       * process an async job\n       *\n       * @private\n       */\n\n      processJob_() {\n        this.jobs.shift()();\n        if (this.jobs.length) {\n          this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n        } else {\n          this.timeout_ = null;\n        }\n      }\n      /**\n       * push a job into the stream\n       *\n       * @param {Function} job the job to push into the stream\n       */\n\n      push(job) {\n        this.jobs.push(job);\n        if (!this.timeout_) {\n          this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n        }\n      }\n    }\n    /**\n     * @file decrypter.js\n     *\n     * An asynchronous implementation of AES-128 CBC decryption with\n     * PKCS#7 padding.\n     */\n\n    /**\n     * Convert network-order (big-endian) bytes into their little-endian\n     * representation.\n     */\n\n    const ntoh = function (word) {\n      return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n    };\n    /**\n     * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n     *\n     * @param {Uint8Array} encrypted the encrypted bytes\n     * @param {Uint32Array} key the bytes of the decryption key\n     * @param {Uint32Array} initVector the initialization vector (IV) to\n     * use for the first round of CBC.\n     * @return {Uint8Array} the decrypted bytes\n     *\n     * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n     * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n     * @see https://tools.ietf.org/html/rfc2315\n     */\n\n    const decrypt = function (encrypted, key, initVector) {\n      // word-level access to the encrypted bytes\n      const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n      const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n      const decrypted = new Uint8Array(encrypted.byteLength);\n      const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n      // decrypted data\n\n      let init0;\n      let init1;\n      let init2;\n      let init3;\n      let encrypted0;\n      let encrypted1;\n      let encrypted2;\n      let encrypted3; // iteration variable\n\n      let wordIx; // pull out the words of the IV to ensure we don't modify the\n      // passed-in reference and easier access\n\n      init0 = initVector[0];\n      init1 = initVector[1];\n      init2 = initVector[2];\n      init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n      // to each decrypted block\n\n      for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n        // convert big-endian (network order) words into little-endian\n        // (javascript order)\n        encrypted0 = ntoh(encrypted32[wordIx]);\n        encrypted1 = ntoh(encrypted32[wordIx + 1]);\n        encrypted2 = ntoh(encrypted32[wordIx + 2]);\n        encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n        decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n        // plaintext\n\n        decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n        decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n        decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n        decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n        init0 = encrypted0;\n        init1 = encrypted1;\n        init2 = encrypted2;\n        init3 = encrypted3;\n      }\n      return decrypted;\n    };\n    /**\n     * The `Decrypter` class that manages decryption of AES\n     * data through `AsyncStream` objects and the `decrypt`\n     * function\n     *\n     * @param {Uint8Array} encrypted the encrypted bytes\n     * @param {Uint32Array} key the bytes of the decryption key\n     * @param {Uint32Array} initVector the initialization vector (IV) to\n     * @param {Function} done the function to run when done\n     * @class Decrypter\n     */\n\n    class Decrypter {\n      constructor(encrypted, key, initVector, done) {\n        const step = Decrypter.STEP;\n        const encrypted32 = new Int32Array(encrypted.buffer);\n        const decrypted = new Uint8Array(encrypted.byteLength);\n        let i = 0;\n        this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n        this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n        for (i = step; i < encrypted32.length; i += step) {\n          initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n          this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n        } // invoke the done() callback when everything is finished\n\n        this.asyncStream_.push(function () {\n          // remove pkcs#7 padding from the decrypted bytes\n          done(null, unpad(decrypted));\n        });\n      }\n      /**\n       * a getter for step the maximum number of bytes to process at one time\n       *\n       * @return {number} the value of step 32000\n       */\n\n      static get STEP() {\n        // 4 * 8000;\n        return 32000;\n      }\n      /**\n       * @private\n       */\n\n      decryptChunk_(encrypted, key, initVector, decrypted) {\n        return function () {\n          const bytes = decrypt(encrypted, key, initVector);\n          decrypted.set(bytes, encrypted.byteOffset);\n        };\n      }\n    }\n    var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n    var win;\n    if (typeof window !== \"undefined\") {\n      win = window;\n    } else if (typeof commonjsGlobal !== \"undefined\") {\n      win = commonjsGlobal;\n    } else if (typeof self !== \"undefined\") {\n      win = self;\n    } else {\n      win = {};\n    }\n    var window_1 = win;\n    var isArrayBufferView = function isArrayBufferView(obj) {\n      if (ArrayBuffer.isView === 'function') {\n        return ArrayBuffer.isView(obj);\n      }\n      return obj && obj.buffer instanceof ArrayBuffer;\n    };\n    var BigInt = window_1.BigInt || Number;\n    [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n    (function () {\n      var a = new Uint16Array([0xFFCC]);\n      var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n      if (b[0] === 0xFF) {\n        return 'big';\n      }\n      if (b[0] === 0xCC) {\n        return 'little';\n      }\n      return 'unknown';\n    })();\n    /**\n     * Creates an object for sending to a web worker modifying properties that are TypedArrays\n     * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n     *\n     * @param {Object} message\n     *        Object of properties and values to send to the web worker\n     * @return {Object}\n     *         Modified message with TypedArray values expanded\n     * @function createTransferableMessage\n     */\n\n    const createTransferableMessage = function (message) {\n      const transferable = {};\n      Object.keys(message).forEach(key => {\n        const value = message[key];\n        if (isArrayBufferView(value)) {\n          transferable[key] = {\n            bytes: value.buffer,\n            byteOffset: value.byteOffset,\n            byteLength: value.byteLength\n          };\n        } else {\n          transferable[key] = value;\n        }\n      });\n      return transferable;\n    };\n    /* global self */\n\n    /**\n     * Our web worker interface so that things can talk to aes-decrypter\n     * that will be running in a web worker. the scope is passed to this by\n     * webworkify.\n     */\n\n    self.onmessage = function (event) {\n      const data = event.data;\n      const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n      const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n      const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n      /* eslint-disable no-new, handle-callback-err */\n\n      new Decrypter(encrypted, key, iv, function (err, bytes) {\n        self.postMessage(createTransferableMessage({\n          source: data.source,\n          decrypted: bytes\n        }), [bytes.buffer]);\n      });\n      /* eslint-enable */\n    };\n  }));\n  var Decrypter = factory(workerCode);\n  /* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n  /**\n   * Convert the properties of an HLS track into an audioTrackKind.\n   *\n   * @private\n   */\n\n  const audioTrackKind_ = properties => {\n    let kind = properties.default ? 'main' : 'alternative';\n    if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n      kind = 'main-desc';\n    }\n    return kind;\n  };\n  /**\n   * Pause provided segment loader and playlist loader if active\n   *\n   * @param {SegmentLoader} segmentLoader\n   *        SegmentLoader to pause\n   * @param {Object} mediaType\n   *        Active media type\n   * @function stopLoaders\n   */\n\n  const stopLoaders = (segmentLoader, mediaType) => {\n    segmentLoader.abort();\n    segmentLoader.pause();\n    if (mediaType && mediaType.activePlaylistLoader) {\n      mediaType.activePlaylistLoader.pause();\n      mediaType.activePlaylistLoader = null;\n    }\n  };\n  /**\n   * Start loading provided segment loader and playlist loader\n   *\n   * @param {PlaylistLoader} playlistLoader\n   *        PlaylistLoader to start loading\n   * @param {Object} mediaType\n   *        Active media type\n   * @function startLoaders\n   */\n\n  const startLoaders = (playlistLoader, mediaType) => {\n    // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n    // playlist loader\n    mediaType.activePlaylistLoader = playlistLoader;\n    playlistLoader.load();\n  };\n  /**\n   * Returns a function to be called when the media group changes. It performs a\n   * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n   * change of group is merely a rendition switch of the same content at another encoding,\n   * rather than a change of content, such as switching audio from English to Spanish.\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Handler for a non-destructive resync of SegmentLoader when the active media\n   *         group changes.\n   * @function onGroupChanged\n   */\n\n  const onGroupChanged = (type, settings) => () => {\n    const {\n      segmentLoaders: {\n        [type]: segmentLoader,\n        main: mainSegmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    const activeTrack = mediaType.activeTrack();\n    const activeGroup = mediaType.getActiveGroup();\n    const previousActiveLoader = mediaType.activePlaylistLoader;\n    const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n    if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n      return;\n    }\n    mediaType.lastGroup_ = activeGroup;\n    mediaType.lastTrack_ = activeTrack;\n    stopLoaders(segmentLoader, mediaType);\n    if (!activeGroup || activeGroup.isMainPlaylist) {\n      // there is no group active or active group is a main playlist and won't change\n      return;\n    }\n    if (!activeGroup.playlistLoader) {\n      if (previousActiveLoader) {\n        // The previous group had a playlist loader but the new active group does not\n        // this means we are switching from demuxed to muxed audio. In this case we want to\n        // do a destructive reset of the main segment loader and not restart the audio\n        // loaders.\n        mainSegmentLoader.resetEverything();\n      }\n      return;\n    } // Non-destructive resync\n\n    segmentLoader.resyncLoader();\n    startLoaders(activeGroup.playlistLoader, mediaType);\n  };\n  const onGroupChanging = (type, settings) => () => {\n    const {\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    mediaType.lastGroup_ = null;\n    segmentLoader.abort();\n    segmentLoader.pause();\n  };\n  /**\n   * Returns a function to be called when the media track changes. It performs a\n   * destructive reset of the SegmentLoader to ensure we start loading as close to\n   * currentTime as possible.\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Handler for a destructive reset of SegmentLoader when the active media\n   *         track changes.\n   * @function onTrackChanged\n   */\n\n  const onTrackChanged = (type, settings) => () => {\n    const {\n      mainPlaylistLoader,\n      segmentLoaders: {\n        [type]: segmentLoader,\n        main: mainSegmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    const activeTrack = mediaType.activeTrack();\n    const activeGroup = mediaType.getActiveGroup();\n    const previousActiveLoader = mediaType.activePlaylistLoader;\n    const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n    if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n      return;\n    }\n    mediaType.lastGroup_ = activeGroup;\n    mediaType.lastTrack_ = activeTrack;\n    stopLoaders(segmentLoader, mediaType);\n    if (!activeGroup) {\n      // there is no group active so we do not want to restart loaders\n      return;\n    }\n    if (activeGroup.isMainPlaylist) {\n      // track did not change, do nothing\n      if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n        return;\n      }\n      const pc = settings.vhs.playlistController_;\n      const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n      if (pc.media() === newPlaylist) {\n        return;\n      }\n      mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n      mainPlaylistLoader.pause();\n      mainSegmentLoader.resetEverything();\n      pc.fastQualityChange_(newPlaylist);\n      return;\n    }\n    if (type === 'AUDIO') {\n      if (!activeGroup.playlistLoader) {\n        // when switching from demuxed audio/video to muxed audio/video (noted by no\n        // playlist loader for the audio group), we want to do a destructive reset of the\n        // main segment loader and not restart the audio loaders\n        mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n        // it should be stopped\n\n        mainSegmentLoader.resetEverything();\n        return;\n      } // although the segment loader is an audio segment loader, call the setAudio\n      // function to ensure it is prepared to re-append the init segment (or handle other\n      // config changes)\n\n      segmentLoader.setAudio(true);\n      mainSegmentLoader.setAudio(false);\n    }\n    if (previousActiveLoader === activeGroup.playlistLoader) {\n      // Nothing has actually changed. This can happen because track change events can fire\n      // multiple times for a \"single\" change. One for enabling the new active track, and\n      // one for disabling the track that was active\n      startLoaders(activeGroup.playlistLoader, mediaType);\n      return;\n    }\n    if (segmentLoader.track) {\n      // For WebVTT, set the new text track in the segmentloader\n      segmentLoader.track(activeTrack);\n    } // destructive reset\n\n    segmentLoader.resetEverything();\n    startLoaders(activeGroup.playlistLoader, mediaType);\n  };\n  const onError = {\n    /**\n     * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n     * an error.\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @return {Function}\n     *         Error handler. Logs warning (or error if the playlist is excluded) to\n     *         console and switches back to default audio track.\n     * @function onError.AUDIO\n     */\n    AUDIO: (type, settings) => () => {\n      const {\n        mediaTypes: {\n          [type]: mediaType\n        },\n        excludePlaylist\n      } = settings; // switch back to default audio track\n\n      const activeTrack = mediaType.activeTrack();\n      const activeGroup = mediaType.activeGroup();\n      const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n      const defaultTrack = mediaType.tracks[id];\n      if (activeTrack === defaultTrack) {\n        // Default track encountered an error. All we can do now is exclude the current\n        // rendition and hope another will switch audio groups\n        excludePlaylist({\n          error: {\n            message: 'Problem encountered loading the default audio track.'\n          }\n        });\n        return;\n      }\n      videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n      for (const trackId in mediaType.tracks) {\n        mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n      }\n      mediaType.onTrackChanged();\n    },\n    /**\n     * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n     * an error.\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @return {Function}\n     *         Error handler. Logs warning to console and disables the active subtitle track\n     * @function onError.SUBTITLES\n     */\n    SUBTITLES: (type, settings) => () => {\n      const {\n        mediaTypes: {\n          [type]: mediaType\n        }\n      } = settings;\n      videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n      const track = mediaType.activeTrack();\n      if (track) {\n        track.mode = 'disabled';\n      }\n      mediaType.onTrackChanged();\n    }\n  };\n  const setupListeners = {\n    /**\n     * Setup event listeners for audio playlist loader\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {PlaylistLoader|null} playlistLoader\n     *        PlaylistLoader to register listeners on\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @function setupListeners.AUDIO\n     */\n    AUDIO: (type, playlistLoader, settings) => {\n      if (!playlistLoader) {\n        // no playlist loader means audio will be muxed with the video\n        return;\n      }\n      const {\n        tech,\n        requestOptions,\n        segmentLoaders: {\n          [type]: segmentLoader\n        }\n      } = settings;\n      playlistLoader.on('loadedmetadata', () => {\n        const media = playlistLoader.media();\n        segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n        // permits, start downloading segments\n\n        if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n          segmentLoader.load();\n        }\n      });\n      playlistLoader.on('loadedplaylist', () => {\n        segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n        if (!tech.paused()) {\n          segmentLoader.load();\n        }\n      });\n      playlistLoader.on('error', onError[type](type, settings));\n    },\n    /**\n     * Setup event listeners for subtitle playlist loader\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {PlaylistLoader|null} playlistLoader\n     *        PlaylistLoader to register listeners on\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @function setupListeners.SUBTITLES\n     */\n    SUBTITLES: (type, playlistLoader, settings) => {\n      const {\n        tech,\n        requestOptions,\n        segmentLoaders: {\n          [type]: segmentLoader\n        },\n        mediaTypes: {\n          [type]: mediaType\n        }\n      } = settings;\n      playlistLoader.on('loadedmetadata', () => {\n        const media = playlistLoader.media();\n        segmentLoader.playlist(media, requestOptions);\n        segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n        // permits, start downloading segments\n\n        if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n          segmentLoader.load();\n        }\n      });\n      playlistLoader.on('loadedplaylist', () => {\n        segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n        if (!tech.paused()) {\n          segmentLoader.load();\n        }\n      });\n      playlistLoader.on('error', onError[type](type, settings));\n    }\n  };\n  const initialize = {\n    /**\n     * Setup PlaylistLoaders and AudioTracks for the audio groups\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @function initialize.AUDIO\n     */\n    'AUDIO': (type, settings) => {\n      const {\n        vhs,\n        sourceType,\n        segmentLoaders: {\n          [type]: segmentLoader\n        },\n        requestOptions,\n        main: {\n          mediaGroups\n        },\n        mediaTypes: {\n          [type]: {\n            groups,\n            tracks,\n            logger_\n          }\n        },\n        mainPlaylistLoader\n      } = settings;\n      const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n      if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n        mediaGroups[type] = {\n          main: {\n            default: {\n              default: true\n            }\n          }\n        };\n        if (audioOnlyMain) {\n          mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n        }\n      }\n      for (const groupId in mediaGroups[type]) {\n        if (!groups[groupId]) {\n          groups[groupId] = [];\n        }\n        for (const variantLabel in mediaGroups[type][groupId]) {\n          let properties = mediaGroups[type][groupId][variantLabel];\n          let playlistLoader;\n          if (audioOnlyMain) {\n            logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`);\n            properties.isMainPlaylist = true;\n            playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n            // use the resolved media playlist object\n          } else if (sourceType === 'vhs-json' && properties.playlists) {\n            playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n          } else if (properties.resolvedUri) {\n            playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n            // should we even have properties.playlists in this check.\n          } else if (properties.playlists && sourceType === 'dash') {\n            playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n          } else {\n            // no resolvedUri means the audio is muxed with the video when using this\n            // audio track\n            playlistLoader = null;\n          }\n          properties = merge({\n            id: variantLabel,\n            playlistLoader\n          }, properties);\n          setupListeners[type](type, properties.playlistLoader, settings);\n          groups[groupId].push(properties);\n          if (typeof tracks[variantLabel] === 'undefined') {\n            const track = new videojs.AudioTrack({\n              id: variantLabel,\n              kind: audioTrackKind_(properties),\n              enabled: false,\n              language: properties.language,\n              default: properties.default,\n              label: variantLabel\n            });\n            tracks[variantLabel] = track;\n          }\n        }\n      } // setup single error event handler for the segment loader\n\n      segmentLoader.on('error', onError[type](type, settings));\n    },\n    /**\n     * Setup PlaylistLoaders and TextTracks for the subtitle groups\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @function initialize.SUBTITLES\n     */\n    'SUBTITLES': (type, settings) => {\n      const {\n        tech,\n        vhs,\n        sourceType,\n        segmentLoaders: {\n          [type]: segmentLoader\n        },\n        requestOptions,\n        main: {\n          mediaGroups\n        },\n        mediaTypes: {\n          [type]: {\n            groups,\n            tracks\n          }\n        },\n        mainPlaylistLoader\n      } = settings;\n      for (const groupId in mediaGroups[type]) {\n        if (!groups[groupId]) {\n          groups[groupId] = [];\n        }\n        for (const variantLabel in mediaGroups[type][groupId]) {\n          if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n            // Subtitle playlists with the forced attribute are not selectable in Safari.\n            // According to Apple's HLS Authoring Specification:\n            //   If content has forced subtitles and regular subtitles in a given language,\n            //   the regular subtitles track in that language MUST contain both the forced\n            //   subtitles and the regular subtitles for that language.\n            // Because of this requirement and that Safari does not add forced subtitles,\n            // forced subtitles are skipped here to maintain consistent experience across\n            // all platforms\n            continue;\n          }\n          let properties = mediaGroups[type][groupId][variantLabel];\n          let playlistLoader;\n          if (sourceType === 'hls') {\n            playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n          } else if (sourceType === 'dash') {\n            const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n            if (!playlists.length) {\n              return;\n            }\n            playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n          } else if (sourceType === 'vhs-json') {\n            playlistLoader = new PlaylistLoader(\n            // if the vhs-json object included the media playlist, use the media playlist\n            // as provided, otherwise use the resolved URI to load the playlist\n            properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n          }\n          properties = merge({\n            id: variantLabel,\n            playlistLoader\n          }, properties);\n          setupListeners[type](type, properties.playlistLoader, settings);\n          groups[groupId].push(properties);\n          if (typeof tracks[variantLabel] === 'undefined') {\n            const track = tech.addRemoteTextTrack({\n              id: variantLabel,\n              kind: 'subtitles',\n              default: properties.default && properties.autoselect,\n              language: properties.language,\n              label: variantLabel\n            }, false).track;\n            tracks[variantLabel] = track;\n          }\n        }\n      } // setup single error event handler for the segment loader\n\n      segmentLoader.on('error', onError[type](type, settings));\n    },\n    /**\n     * Setup TextTracks for the closed-caption groups\n     *\n     * @param {String} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @function initialize['CLOSED-CAPTIONS']\n     */\n    'CLOSED-CAPTIONS': (type, settings) => {\n      const {\n        tech,\n        main: {\n          mediaGroups\n        },\n        mediaTypes: {\n          [type]: {\n            groups,\n            tracks\n          }\n        }\n      } = settings;\n      for (const groupId in mediaGroups[type]) {\n        if (!groups[groupId]) {\n          groups[groupId] = [];\n        }\n        for (const variantLabel in mediaGroups[type][groupId]) {\n          const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n          if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n            continue;\n          }\n          const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n          let newProps = {\n            label: variantLabel,\n            language: properties.language,\n            instreamId: properties.instreamId,\n            default: properties.default && properties.autoselect\n          };\n          if (captionServices[newProps.instreamId]) {\n            newProps = merge(newProps, captionServices[newProps.instreamId]);\n          }\n          if (newProps.default === undefined) {\n            delete newProps.default;\n          } // No PlaylistLoader is required for Closed-Captions because the captions are\n          // embedded within the video stream\n\n          groups[groupId].push(merge({\n            id: variantLabel\n          }, properties));\n          if (typeof tracks[variantLabel] === 'undefined') {\n            const track = tech.addRemoteTextTrack({\n              id: newProps.instreamId,\n              kind: 'captions',\n              default: newProps.default,\n              language: newProps.language,\n              label: newProps.label\n            }, false).track;\n            tracks[variantLabel] = track;\n          }\n        }\n      }\n    }\n  };\n  const groupMatch = (list, media) => {\n    for (let i = 0; i < list.length; i++) {\n      if (playlistMatch(media, list[i])) {\n        return true;\n      }\n      if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n        return true;\n      }\n    }\n    return false;\n  };\n  /**\n   * Returns a function used to get the active group of the provided type\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Function that returns the active media group for the provided type. Takes an\n   *         optional parameter {TextTrack} track. If no track is provided, a list of all\n   *         variants in the group, otherwise the variant corresponding to the provided\n   *         track is returned.\n   * @function activeGroup\n   */\n\n  const activeGroup = (type, settings) => track => {\n    const {\n      mainPlaylistLoader,\n      mediaTypes: {\n        [type]: {\n          groups\n        }\n      }\n    } = settings;\n    const media = mainPlaylistLoader.media();\n    if (!media) {\n      return null;\n    }\n    let variants = null; // set to variants to main media active group\n\n    if (media.attributes[type]) {\n      variants = groups[media.attributes[type]];\n    }\n    const groupKeys = Object.keys(groups);\n    if (!variants) {\n      // find the mainPlaylistLoader media\n      // that is in a media group if we are dealing\n      // with audio only\n      if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n        for (let i = 0; i < groupKeys.length; i++) {\n          const groupPropertyList = groups[groupKeys[i]];\n          if (groupMatch(groupPropertyList, media)) {\n            variants = groupPropertyList;\n            break;\n          }\n        } // use the main group if it exists\n      } else if (groups.main) {\n        variants = groups.main; // only one group, use that one\n      } else if (groupKeys.length === 1) {\n        variants = groups[groupKeys[0]];\n      }\n    }\n    if (typeof track === 'undefined') {\n      return variants;\n    }\n    if (track === null || !variants) {\n      // An active track was specified so a corresponding group is expected. track === null\n      // means no track is currently active so there is no corresponding group\n      return null;\n    }\n    return variants.filter(props => props.id === track.id)[0] || null;\n  };\n  const activeTrack = {\n    /**\n     * Returns a function used to get the active track of type provided\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @return {Function}\n     *         Function that returns the active media track for the provided type. Returns\n     *         null if no track is active\n     * @function activeTrack.AUDIO\n     */\n    AUDIO: (type, settings) => () => {\n      const {\n        mediaTypes: {\n          [type]: {\n            tracks\n          }\n        }\n      } = settings;\n      for (const id in tracks) {\n        if (tracks[id].enabled) {\n          return tracks[id];\n        }\n      }\n      return null;\n    },\n    /**\n     * Returns a function used to get the active track of type provided\n     *\n     * @param {string} type\n     *        MediaGroup type\n     * @param {Object} settings\n     *        Object containing required information for media groups\n     * @return {Function}\n     *         Function that returns the active media track for the provided type. Returns\n     *         null if no track is active\n     * @function activeTrack.SUBTITLES\n     */\n    SUBTITLES: (type, settings) => () => {\n      const {\n        mediaTypes: {\n          [type]: {\n            tracks\n          }\n        }\n      } = settings;\n      for (const id in tracks) {\n        if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n          return tracks[id];\n        }\n      }\n      return null;\n    }\n  };\n  const getActiveGroup = (type, {\n    mediaTypes\n  }) => () => {\n    const activeTrack_ = mediaTypes[type].activeTrack();\n    if (!activeTrack_) {\n      return null;\n    }\n    return mediaTypes[type].activeGroup(activeTrack_);\n  };\n  /**\n   * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n   * Closed-Captions) specified in the main manifest.\n   *\n   * @param {Object} settings\n   *        Object containing required information for setting up the media groups\n   * @param {Tech} settings.tech\n   *        The tech of the player\n   * @param {Object} settings.requestOptions\n   *        XHR request options used by the segment loaders\n   * @param {PlaylistLoader} settings.mainPlaylistLoader\n   *        PlaylistLoader for the main source\n   * @param {VhsHandler} settings.vhs\n   *        VHS SourceHandler\n   * @param {Object} settings.main\n   *        The parsed main manifest\n   * @param {Object} settings.mediaTypes\n   *        Object to store the loaders, tracks, and utility methods for each media type\n   * @param {Function} settings.excludePlaylist\n   *        Excludes the current rendition and forces a rendition switch.\n   * @function setupMediaGroups\n   */\n\n  const setupMediaGroups = settings => {\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n      initialize[type](type, settings);\n    });\n    const {\n      mediaTypes,\n      mainPlaylistLoader,\n      tech,\n      vhs,\n      segmentLoaders: {\n        ['AUDIO']: audioSegmentLoader,\n        main: mainSegmentLoader\n      }\n    } = settings; // setup active group and track getters and change event handlers\n\n    ['AUDIO', 'SUBTITLES'].forEach(type => {\n      mediaTypes[type].activeGroup = activeGroup(type, settings);\n      mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n      mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n      mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n      mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n      mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n    }); // DO NOT enable the default subtitle or caption track.\n    // DO enable the default audio track\n\n    const audioGroup = mediaTypes.AUDIO.activeGroup();\n    if (audioGroup) {\n      const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n      mediaTypes.AUDIO.tracks[groupId].enabled = true;\n      mediaTypes.AUDIO.onGroupChanged();\n      mediaTypes.AUDIO.onTrackChanged();\n      const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n      // track is changed, but needs to be handled here since the track may not be considered\n      // changed on the first call to onTrackChanged\n\n      if (!activeAudioGroup.playlistLoader) {\n        // either audio is muxed with video or the stream is audio only\n        mainSegmentLoader.setAudio(true);\n      } else {\n        // audio is demuxed\n        mainSegmentLoader.setAudio(false);\n        audioSegmentLoader.setAudio(true);\n      }\n    }\n    mainPlaylistLoader.on('mediachange', () => {\n      ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n    });\n    mainPlaylistLoader.on('mediachanging', () => {\n      ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n    }); // custom audio track change event handler for usage event\n\n    const onAudioTrackChanged = () => {\n      mediaTypes.AUDIO.onTrackChanged();\n      tech.trigger({\n        type: 'usage',\n        name: 'vhs-audio-change'\n      });\n    };\n    tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n    tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n    vhs.on('dispose', () => {\n      tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n      tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n    }); // clear existing audio tracks and add the ones we just created\n\n    tech.clearTracks('audio');\n    for (const id in mediaTypes.AUDIO.tracks) {\n      tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n    }\n  };\n  /**\n   * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n   * media type\n   *\n   * @return {Object}\n   *         Object to store the loaders, tracks, and utility methods for each media type\n   * @function createMediaTypes\n   */\n\n  const createMediaTypes = () => {\n    const mediaTypes = {};\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n      mediaTypes[type] = {\n        groups: {},\n        tracks: {},\n        activePlaylistLoader: null,\n        activeGroup: noop,\n        activeTrack: noop,\n        getActiveGroup: noop,\n        onGroupChanged: noop,\n        onTrackChanged: noop,\n        lastTrack_: null,\n        logger_: logger(`MediaGroups[${type}]`)\n      };\n    });\n    return mediaTypes;\n  };\n\n  /**\n   * A utility class for setting properties and maintaining the state of the content steering manifest.\n   *\n   * Content Steering manifest format:\n   * VERSION: number (required) currently only version 1 is supported.\n   * TTL: number in seconds (optional) until the next content steering manifest reload.\n   * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n   * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n   * PATHWAY-CLONES: array (optional) (HLS only) pathway clone objects to copy from other playlists.\n   */\n\n  class SteeringManifest {\n    constructor() {\n      this.priority_ = [];\n      this.pathwayClones_ = new Map();\n    }\n    set version(number) {\n      // Only version 1 is currently supported for both DASH and HLS.\n      if (number === 1) {\n        this.version_ = number;\n      }\n    }\n    set ttl(seconds) {\n      // TTL = time-to-live, default = 300 seconds.\n      this.ttl_ = seconds || 300;\n    }\n    set reloadUri(uri) {\n      if (uri) {\n        // reload URI can be relative to the previous reloadUri.\n        this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n      }\n    }\n    set priority(array) {\n      // priority must be non-empty and unique values.\n      if (array && array.length) {\n        this.priority_ = array;\n      }\n    }\n    set pathwayClones(array) {\n      // pathwayClones must be non-empty.\n      if (array && array.length) {\n        this.pathwayClones_ = new Map(array.map(clone => [clone.ID, clone]));\n      }\n    }\n    get version() {\n      return this.version_;\n    }\n    get ttl() {\n      return this.ttl_;\n    }\n    get reloadUri() {\n      return this.reloadUri_;\n    }\n    get priority() {\n      return this.priority_;\n    }\n    get pathwayClones() {\n      return this.pathwayClones_;\n    }\n  }\n  /**\n   * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n   * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n   * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n   * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n   *\n   * @param {function} xhr for making a network request from the browser.\n   * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n   */\n\n  class ContentSteeringController extends videojs.EventTarget {\n    constructor(xhr, bandwidth) {\n      super();\n      this.currentPathway = null;\n      this.defaultPathway = null;\n      this.queryBeforeStart = false;\n      this.availablePathways_ = new Set();\n      this.steeringManifest = new SteeringManifest();\n      this.proxyServerUrl_ = null;\n      this.manifestType_ = null;\n      this.ttlTimeout_ = null;\n      this.request_ = null;\n      this.currentPathwayClones = new Map();\n      this.nextPathwayClones = new Map();\n      this.excludedSteeringManifestURLs = new Set();\n      this.logger_ = logger('Content Steering');\n      this.xhr_ = xhr;\n      this.getBandwidth_ = bandwidth;\n    }\n    /**\n     * Assigns the content steering tag properties to the steering controller\n     *\n     * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url\n     * @param {Object} steeringTag the content steering tag from the main manifest\n     */\n\n    assignTagProperties(baseUrl, steeringTag) {\n      this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n      const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n      if (!steeringUri) {\n        this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`);\n        this.trigger('error');\n        return;\n      } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n      if (steeringUri.startsWith('data:')) {\n        this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n        return;\n      } // reloadUri is the resolution of the main manifest URL and steering URL.\n\n      this.steeringManifest.reloadUri = resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n      this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on <ContentSteering> tags.\n\n      this.queryBeforeStart = steeringTag.queryBeforeStart;\n      this.proxyServerUrl_ = steeringTag.proxyServerURL; // trigger a steering event if we have a pathway from the content steering tag.\n      // this tells VHS which segment pathway to start with.\n      // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n      if (this.defaultPathway && !this.queryBeforeStart) {\n        this.trigger('content-steering');\n      }\n    }\n    /**\n     * Requests the content steering manifest and parse the response. This should only be called after\n     * assignTagProperties was called with a content steering tag.\n     *\n     * @param {string} initialUri The optional uri to make the request with.\n     *    If set, the request should be made with exactly what is passed in this variable.\n     *    This scenario should only happen once on initalization.\n     */\n\n    requestSteeringManifest(initial) {\n      const reloadUri = this.steeringManifest.reloadUri;\n      if (!reloadUri) {\n        return;\n      } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n      // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n      // This request URI accounts for manifest URIs that have been excluded.\n\n      const uri = initial ? reloadUri : this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n      if (!uri) {\n        this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n        this.trigger('error');\n        this.dispose();\n        return;\n      }\n      const metadata = {\n        contentSteeringInfo: {\n          uri\n        }\n      };\n      this.trigger({\n        type: 'contentsteeringloadstart',\n        metadata\n      });\n      this.request_ = this.xhr_({\n        uri,\n        requestType: 'content-steering-manifest'\n      }, (error, errorInfo) => {\n        if (error) {\n          // If the client receives HTTP 410 Gone in response to a manifest request,\n          // it MUST NOT issue another request for that URI for the remainder of the\n          // playback session. It MAY continue to use the most-recently obtained set\n          // of Pathways.\n          if (errorInfo.status === 410) {\n            this.logger_(`manifest request 410 ${error}.`);\n            this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n            this.excludedSteeringManifestURLs.add(uri);\n            return;\n          } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n          // header in response to a manifest request, it SHOULD wait until the time\n          // specified by the Retry-After header to reissue the request.\n\n          if (errorInfo.status === 429) {\n            const retrySeconds = errorInfo.responseHeaders['retry-after'];\n            this.logger_(`manifest request 429 ${error}.`);\n            this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n            this.startTTLTimeout_(parseInt(retrySeconds, 10));\n            return;\n          } // If the Steering Manifest cannot be loaded and parsed correctly, the\n          // client SHOULD continue to use the previous values and attempt to reload\n          // it after waiting for the previously-specified TTL (or 5 minutes if\n          // none).\n\n          this.logger_(`manifest failed to load ${error}.`);\n          this.startTTLTimeout_();\n          return;\n        }\n        this.trigger({\n          type: 'contentsteeringloadcomplete',\n          metadata\n        });\n        let steeringManifestJson;\n        try {\n          steeringManifestJson = JSON.parse(this.request_.responseText);\n        } catch (parseError) {\n          const errorMetadata = {\n            errorType: videojs.Error.StreamingContentSteeringParserError,\n            error: parseError\n          };\n          this.trigger({\n            type: 'error',\n            metadata: errorMetadata\n          });\n        }\n        this.assignSteeringProperties_(steeringManifestJson);\n        const parsedMetadata = {\n          contentSteeringInfo: metadata.contentSteeringInfo,\n          contentSteeringManifest: {\n            version: this.steeringManifest.version,\n            reloadUri: this.steeringManifest.reloadUri,\n            priority: this.steeringManifest.priority\n          }\n        };\n        this.trigger({\n          type: 'contentsteeringparsed',\n          metadata: parsedMetadata\n        });\n        this.startTTLTimeout_();\n      });\n    }\n    /**\n     * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n     *\n     * @param {string} steeringUrl the steering manifest url\n     * @return the steering manifest url to a proxy server with all parameters set\n     */\n\n    setProxyServerUrl_(steeringUrl) {\n      const steeringUrlObject = new window.URL(steeringUrl);\n      const proxyServerUrlObject = new window.URL(this.proxyServerUrl_);\n      proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n      return this.setSteeringParams_(proxyServerUrlObject.toString());\n    }\n    /**\n     * Decodes and parses the data uri encoded steering manifest\n     *\n     * @param {string} dataUri the data uri to be decoded and parsed.\n     */\n\n    decodeDataUriManifest_(dataUri) {\n      const steeringManifestJson = JSON.parse(window.atob(dataUri));\n      this.assignSteeringProperties_(steeringManifestJson);\n    }\n    /**\n     * Set the HLS or DASH content steering manifest request query parameters. For example:\n     * _HLS_pathway=\"<CURRENT-PATHWAY-ID>\" and _HLS_throughput=<THROUGHPUT>\n     * _DASH_pathway and _DASH_throughput\n     *\n     * @param {string} uri to add content steering server parameters to.\n     * @return a new uri as a string with the added steering query parameters.\n     */\n\n    setSteeringParams_(url) {\n      const urlObject = new window.URL(url);\n      const path = this.getPathway();\n      const networkThroughput = this.getBandwidth_();\n      if (path) {\n        const pathwayKey = `_${this.manifestType_}_pathway`;\n        urlObject.searchParams.set(pathwayKey, path);\n      }\n      if (networkThroughput) {\n        const throughputKey = `_${this.manifestType_}_throughput`;\n        urlObject.searchParams.set(throughputKey, networkThroughput);\n      }\n      return urlObject.toString();\n    }\n    /**\n     * Assigns the current steering manifest properties and to the SteeringManifest object\n     *\n     * @param {Object} steeringJson the raw JSON steering manifest\n     */\n\n    assignSteeringProperties_(steeringJson) {\n      this.steeringManifest.version = steeringJson.VERSION;\n      if (!this.steeringManifest.version) {\n        this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n        this.trigger('error');\n        return;\n      }\n      this.steeringManifest.ttl = steeringJson.TTL;\n      this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n      this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // Pathway clones to be created/updated in HLS.\n      // See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n\n      this.steeringManifest.pathwayClones = steeringJson['PATHWAY-CLONES'];\n      this.nextPathwayClones = this.steeringManifest.pathwayClones; // 1. apply first pathway from the array.\n      // 2. if first pathway doesn't exist in manifest, try next pathway.\n      //    a. if all pathways are exhausted, ignore the steering manifest priority.\n      // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n      //    a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n      //       the excluded pathway will be ignored.\n      //       See excludePathway usage in excludePlaylist().\n      // If there are no available pathways, we need to stop content steering.\n\n      if (!this.availablePathways_.size) {\n        this.logger_('There are no available pathways for content steering. Ending content steering.');\n        this.trigger('error');\n        this.dispose();\n      }\n      const chooseNextPathway = pathwaysByPriority => {\n        for (const path of pathwaysByPriority) {\n          if (this.availablePathways_.has(path)) {\n            return path;\n          }\n        } // If no pathway matches, ignore the manifest and choose the first available.\n\n        return [...this.availablePathways_][0];\n      };\n      const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n      if (this.currentPathway !== nextPathway) {\n        this.currentPathway = nextPathway;\n        this.trigger('content-steering');\n      }\n    }\n    /**\n     * Returns the pathway to use for steering decisions\n     *\n     * @return {string} returns the current pathway or the default\n     */\n\n    getPathway() {\n      return this.currentPathway || this.defaultPathway;\n    }\n    /**\n     * Chooses the manifest request URI based on proxy URIs and server URLs.\n     * Also accounts for exclusion on certain manifest URIs.\n     *\n     * @param {string} reloadUri the base uri before parameters\n     *\n     * @return {string} the final URI for the request to the manifest server.\n     */\n\n    getRequestURI(reloadUri) {\n      if (!reloadUri) {\n        return null;\n      }\n      const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n      if (this.proxyServerUrl_) {\n        const proxyURI = this.setProxyServerUrl_(reloadUri);\n        if (!isExcluded(proxyURI)) {\n          return proxyURI;\n        }\n      }\n      const steeringURI = this.setSteeringParams_(reloadUri);\n      if (!isExcluded(steeringURI)) {\n        return steeringURI;\n      } // Return nothing if all valid manifest URIs are excluded.\n\n      return null;\n    }\n    /**\n     * Start the timeout for re-requesting the steering manifest at the TTL interval.\n     *\n     * @param {number} ttl time in seconds of the timeout. Defaults to the\n     *        ttl interval in the steering manifest\n     */\n\n    startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n      // 300 (5 minutes) is the default value.\n      const ttlMS = ttl * 1000;\n      this.ttlTimeout_ = window.setTimeout(() => {\n        this.requestSteeringManifest();\n      }, ttlMS);\n    }\n    /**\n     * Clear the TTL timeout if necessary.\n     */\n\n    clearTTLTimeout_() {\n      window.clearTimeout(this.ttlTimeout_);\n      this.ttlTimeout_ = null;\n    }\n    /**\n     * aborts any current steering xhr and sets the current request object to null\n     */\n\n    abort() {\n      if (this.request_) {\n        this.request_.abort();\n      }\n      this.request_ = null;\n    }\n    /**\n     * aborts steering requests clears the ttl timeout and resets all properties.\n     */\n\n    dispose() {\n      this.off('content-steering');\n      this.off('error');\n      this.abort();\n      this.clearTTLTimeout_();\n      this.currentPathway = null;\n      this.defaultPathway = null;\n      this.queryBeforeStart = null;\n      this.proxyServerUrl_ = null;\n      this.manifestType_ = null;\n      this.ttlTimeout_ = null;\n      this.request_ = null;\n      this.excludedSteeringManifestURLs = new Set();\n      this.availablePathways_ = new Set();\n      this.steeringManifest = new SteeringManifest();\n    }\n    /**\n     * adds a pathway to the available pathways set\n     *\n     * @param {string} pathway the pathway string to add\n     */\n\n    addAvailablePathway(pathway) {\n      if (pathway) {\n        this.availablePathways_.add(pathway);\n      }\n    }\n    /**\n     * Clears all pathways from the available pathways set\n     */\n\n    clearAvailablePathways() {\n      this.availablePathways_.clear();\n    }\n    /**\n     * Removes a pathway from the available pathways set.\n     */\n\n    excludePathway(pathway) {\n      return this.availablePathways_.delete(pathway);\n    }\n    /**\n     * Checks the refreshed DASH manifest content steering tag for changes.\n     *\n     * @param {string} baseURL new steering tag on DASH manifest refresh\n     * @param {Object} newTag the new tag to check for changes\n     * @return a true or false whether the new tag has different values\n     */\n\n    didDASHTagChange(baseURL, newTag) {\n      return !newTag && this.steeringManifest.reloadUri || newTag && (resolveUrl(baseURL, newTag.serverURL) !== this.steeringManifest.reloadUri || newTag.defaultServiceLocation !== this.defaultPathway || newTag.queryBeforeStart !== this.queryBeforeStart || newTag.proxyServerURL !== this.proxyServerUrl_);\n    }\n    getAvailablePathways() {\n      return this.availablePathways_;\n    }\n  }\n  const debounce = (callback, wait) => {\n    let timeoutId = null;\n    return (...args) => {\n      clearTimeout(timeoutId);\n      timeoutId = setTimeout(() => {\n        callback.apply(null, args);\n      }, wait);\n    };\n  };\n  const ABORT_EARLY_EXCLUSION_SECONDS = 10;\n  let Vhs$1; // SegmentLoader stats that need to have each loader's\n  // values summed to calculate the final value\n\n  const loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\n  const sumLoaderStat = function (stat) {\n    return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n  };\n  const shouldSwitchToMedia = function ({\n    currentPlaylist,\n    buffered,\n    currentTime,\n    nextPlaylist,\n    bufferLowWaterLine,\n    bufferHighWaterLine,\n    duration,\n    bufferBasedABR,\n    log\n  }) {\n    // we have no other playlist to switch to\n    if (!nextPlaylist) {\n      videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n      return false;\n    }\n    const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n    if (!currentPlaylist) {\n      log(`${sharedLogLine} as current playlist is not set`);\n      return true;\n    } // no need to switch if playlist is the same\n\n    if (nextPlaylist.id === currentPlaylist.id) {\n      return false;\n    } // determine if current time is in a buffered range.\n\n    const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n    // This is because in LIVE, the player plays 3 segments from the end of the\n    // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n    // in those segments, a viewer will never experience a rendition upswitch.\n\n    if (!currentPlaylist.endList) {\n      // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n      // doubles the time to first playback.\n      if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n        log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n        return false;\n      }\n      log(`${sharedLogLine} as current playlist is live`);\n      return true;\n    }\n    const forwardBuffer = timeAheadOf(buffered, currentTime);\n    const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n    // duration is below the max potential low water line\n\n    if (duration < maxBufferLowWaterLine) {\n      log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n      return true;\n    }\n    const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n    const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n    // we can switch down\n\n    if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n      let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n      if (bufferBasedABR) {\n        logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n      }\n      log(logLine);\n      return true;\n    } // and if our buffer is higher than the low water line,\n    // we can switch up\n\n    if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n      let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n      if (bufferBasedABR) {\n        logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n      }\n      log(logLine);\n      return true;\n    }\n    log(`not ${sharedLogLine} as no switching criteria met`);\n    return false;\n  };\n  /**\n   * the main playlist controller controller all interactons\n   * between playlists and segmentloaders. At this time this mainly\n   * involves a main playlist and a series of audio playlists\n   * if they are available\n   *\n   * @class PlaylistController\n   * @extends videojs.EventTarget\n   */\n\n  class PlaylistController extends videojs.EventTarget {\n    constructor(options) {\n      super(); // Adding a slight debounce to avoid duplicate calls during rapid quality changes, for example:\n      // When selecting quality from the quality list,\n      // where we may have multiple bandwidth profiles for the same vertical resolution.\n\n      this.fastQualityChange_ = debounce(this.fastQualityChange_.bind(this), 100);\n      const {\n        src,\n        withCredentials,\n        tech,\n        bandwidth,\n        externVhs,\n        useCueTags,\n        playlistExclusionDuration,\n        enableLowInitialPlaylist,\n        sourceType,\n        cacheEncryptionKeys,\n        bufferBasedABR,\n        leastPixelDiffSelector,\n        captionServices,\n        experimentalUseMMS\n      } = options;\n      if (!src) {\n        throw new Error('A non-empty playlist URL or JSON manifest string is required');\n      }\n      let {\n        maxPlaylistRetries\n      } = options;\n      if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n        maxPlaylistRetries = Infinity;\n      }\n      Vhs$1 = externVhs;\n      this.bufferBasedABR = Boolean(bufferBasedABR);\n      this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n      this.withCredentials = withCredentials;\n      this.tech_ = tech;\n      this.vhs_ = tech.vhs;\n      this.player_ = options.player_;\n      this.sourceType_ = sourceType;\n      this.useCueTags_ = useCueTags;\n      this.playlistExclusionDuration = playlistExclusionDuration;\n      this.maxPlaylistRetries = maxPlaylistRetries;\n      this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n      this.usingManagedMediaSource_ = false;\n      if (this.useCueTags_) {\n        this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n        this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n      }\n      this.requestOptions_ = {\n        withCredentials,\n        maxPlaylistRetries,\n        timeout: null\n      };\n      this.on('error', this.pauseLoading);\n      this.mediaTypes_ = createMediaTypes();\n      if (experimentalUseMMS && window.ManagedMediaSource) {\n        // Airplay source not yet implemented. Remote playback must be disabled.\n        this.tech_.el_.disableRemotePlayback = true;\n        this.mediaSource = new window.ManagedMediaSource();\n        this.usingManagedMediaSource_ = true;\n        videojs.log('Using ManagedMediaSource');\n      } else if (window.MediaSource) {\n        this.mediaSource = new window.MediaSource();\n      }\n      this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n      this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n      this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n      this.load = this.load.bind(this);\n      this.pause = this.pause.bind(this);\n      this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n      this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n      this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_);\n      this.mediaSource.addEventListener('startstreaming', this.load);\n      this.mediaSource.addEventListener('endstreaming', this.pause); // we don't have to handle sourceclose since dispose will handle termination of\n      // everything, and the MediaSource should not be detached without a proper disposal\n\n      this.seekable_ = createTimeRanges();\n      this.hasPlayed_ = false;\n      this.syncController_ = new SyncController(options);\n      this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n        kind: 'metadata',\n        label: 'segment-metadata'\n      }, false).track;\n      this.segmentMetadataTrack_.mode = 'hidden';\n      this.decrypter_ = new Decrypter();\n      this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n      this.inbandTextTracks_ = {};\n      this.timelineChangeController_ = new TimelineChangeController();\n      this.keyStatusMap_ = new Map();\n      const segmentLoaderSettings = {\n        vhs: this.vhs_,\n        parse708captions: options.parse708captions,\n        useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n        captionServices,\n        mediaSource: this.mediaSource,\n        currentTime: this.tech_.currentTime.bind(this.tech_),\n        seekable: () => this.seekable(),\n        seeking: () => this.tech_.seeking(),\n        duration: () => this.duration(),\n        hasPlayed: () => this.hasPlayed_,\n        goalBufferLength: () => this.goalBufferLength(),\n        bandwidth,\n        syncController: this.syncController_,\n        decrypter: this.decrypter_,\n        sourceType: this.sourceType_,\n        inbandTextTracks: this.inbandTextTracks_,\n        cacheEncryptionKeys,\n        sourceUpdater: this.sourceUpdater_,\n        timelineChangeController: this.timelineChangeController_,\n        exactManifestTimings: options.exactManifestTimings,\n        addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n      }; // The source type check not only determines whether a special DASH playlist loader\n      // should be used, but also covers the case where the provided src is a vhs-json\n      // manifest object (instead of a URL). In the case of vhs-json, the default\n      // PlaylistLoader should be used.\n\n      this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n        addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n      })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n        addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n      }));\n      this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n      // combined audio/video or just video when alternate audio track is selected\n\n      this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n        segmentMetadataTrack: this.segmentMetadataTrack_,\n        loaderType: 'main'\n      }), options); // alternate audio track\n\n      this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n        loaderType: 'audio'\n      }), options);\n      this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n        loaderType: 'vtt',\n        featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n        loadVttJs: () => new Promise((resolve, reject) => {\n          function onLoad() {\n            tech.off('vttjserror', onError);\n            resolve();\n          }\n          function onError() {\n            tech.off('vttjsloaded', onLoad);\n            reject();\n          }\n          tech.one('vttjsloaded', onLoad);\n          tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n          tech.addWebVttScript_();\n        })\n      }), options);\n      const getBandwidth = () => {\n        return this.mainSegmentLoader_.bandwidth;\n      };\n      this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n      this.setupSegmentLoaderListeners_();\n      if (this.bufferBasedABR) {\n        this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n        this.tech_.on('pause', () => this.stopABRTimer_());\n        this.tech_.on('play', () => this.startABRTimer_());\n      } // Create SegmentLoader stat-getters\n      // mediaRequests_\n      // mediaRequestsAborted_\n      // mediaRequestsTimedout_\n      // mediaRequestsErrored_\n      // mediaTransferDuration_\n      // mediaBytesTransferred_\n      // mediaAppends_\n\n      loaderStats.forEach(stat => {\n        this[stat + '_'] = sumLoaderStat.bind(this, stat);\n      });\n      this.logger_ = logger('pc');\n      this.triggeredFmp4Usage = false;\n      if (this.tech_.preload() === 'none') {\n        this.loadOnPlay_ = () => {\n          this.loadOnPlay_ = null;\n          this.mainPlaylistLoader_.load();\n        };\n        this.tech_.one('play', this.loadOnPlay_);\n      } else {\n        this.mainPlaylistLoader_.load();\n      }\n      this.timeToLoadedData__ = -1;\n      this.mainAppendsToLoadedData__ = -1;\n      this.audioAppendsToLoadedData__ = -1;\n      const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n      this.tech_.one(event, () => {\n        const timeToLoadedDataStart = Date.now();\n        this.tech_.one('loadeddata', () => {\n          this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n          this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n          this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n        });\n      });\n    }\n    mainAppendsToLoadedData_() {\n      return this.mainAppendsToLoadedData__;\n    }\n    audioAppendsToLoadedData_() {\n      return this.audioAppendsToLoadedData__;\n    }\n    appendsToLoadedData_() {\n      const main = this.mainAppendsToLoadedData_();\n      const audio = this.audioAppendsToLoadedData_();\n      if (main === -1 || audio === -1) {\n        return -1;\n      }\n      return main + audio;\n    }\n    timeToLoadedData_() {\n      return this.timeToLoadedData__;\n    }\n    /**\n     * Run selectPlaylist and switch to the new playlist if we should\n     *\n     * @param {string} [reason=abr] a reason for why the ABR check is made\n     * @private\n     */\n\n    checkABR_(reason = 'abr') {\n      const nextPlaylist = this.selectPlaylist();\n      if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n        this.switchMedia_(nextPlaylist, reason);\n      }\n    }\n    switchMedia_(playlist, cause, delay) {\n      const oldMedia = this.media();\n      const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n      const newId = playlist && (playlist.id || playlist.uri);\n      if (oldId && oldId !== newId) {\n        this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n        const metadata = {\n          renditionInfo: {\n            id: newId,\n            bandwidth: playlist.attributes.BANDWIDTH,\n            resolution: playlist.attributes.RESOLUTION,\n            codecs: playlist.attributes.CODECS\n          },\n          cause\n        };\n        this.trigger({\n          type: 'renditionselected',\n          metadata\n        });\n        this.tech_.trigger({\n          type: 'usage',\n          name: `vhs-rendition-change-${cause}`\n        });\n      }\n      this.mainPlaylistLoader_.media(playlist, delay);\n    }\n    /**\n     * A function that ensures we switch our playlists inside of `mediaTypes`\n     * to match the current `serviceLocation` provided by the contentSteering controller.\n     * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n     *\n     * This should only be called on a DASH playback scenario while using content steering.\n     * This is necessary due to differences in how media in HLS manifests are generally tied to\n     * a video playlist, where in DASH that is not always the case.\n     */\n\n    switchMediaForDASHContentSteering_() {\n      ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n        const mediaType = this.mediaTypes_[type];\n        const activeGroup = mediaType ? mediaType.activeGroup() : null;\n        const pathway = this.contentSteeringController_.getPathway();\n        if (activeGroup && pathway) {\n          // activeGroup can be an array or a single group\n          const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n          const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n          if (dashMediaPlaylists.length) {\n            this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n          }\n        }\n      });\n    }\n    /**\n     * Start a timer that periodically calls checkABR_\n     *\n     * @private\n     */\n\n    startABRTimer_() {\n      this.stopABRTimer_();\n      this.abrTimer_ = window.setInterval(() => this.checkABR_(), 250);\n    }\n    /**\n     * Stop the timer that periodically calls checkABR_\n     *\n     * @private\n     */\n\n    stopABRTimer_() {\n      // if we're scrubbing, we don't need to pause.\n      // This getter will be added to Video.js in version 7.11.\n      if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n        return;\n      }\n      window.clearInterval(this.abrTimer_);\n      this.abrTimer_ = null;\n    }\n    /**\n     * Get a list of playlists for the currently selected audio playlist\n     *\n     * @return {Array} the array of audio playlists\n     */\n\n    getAudioTrackPlaylists_() {\n      const main = this.main();\n      const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n      // assume that the audio tracks are contained in main\n      // playlist array, use that or an empty array.\n\n      if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n        return defaultPlaylists;\n      }\n      const AUDIO = main.mediaGroups.AUDIO;\n      const groupKeys = Object.keys(AUDIO);\n      let track; // get the current active track\n\n      if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n        track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n      } else {\n        // default group is `main` or just the first group.\n        const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n        for (const label in defaultGroup) {\n          if (defaultGroup[label].default) {\n            track = {\n              label\n            };\n            break;\n          }\n        }\n      } // no active track no playlists.\n\n      if (!track) {\n        return defaultPlaylists;\n      }\n      const playlists = []; // get all of the playlists that are possible for the\n      // active track.\n\n      for (const group in AUDIO) {\n        if (AUDIO[group][track.label]) {\n          const properties = AUDIO[group][track.label];\n          if (properties.playlists && properties.playlists.length) {\n            playlists.push.apply(playlists, properties.playlists);\n          } else if (properties.uri) {\n            playlists.push(properties);\n          } else if (main.playlists.length) {\n            // if an audio group does not have a uri\n            // see if we have main playlists that use it as a group.\n            // if we do then add those to the playlists list.\n            for (let i = 0; i < main.playlists.length; i++) {\n              const playlist = main.playlists[i];\n              if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n                playlists.push(playlist);\n              }\n            }\n          }\n        }\n      }\n      if (!playlists.length) {\n        return defaultPlaylists;\n      }\n      return playlists;\n    }\n    /**\n     * Register event handlers on the main playlist loader. A helper\n     * function for construction time.\n     *\n     * @private\n     */\n\n    setupMainPlaylistLoaderListeners_() {\n      this.mainPlaylistLoader_.on('loadedmetadata', () => {\n        const media = this.mainPlaylistLoader_.media();\n        const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n        // timeout the request.\n\n        if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n          this.requestOptions_.timeout = 0;\n        } else {\n          this.requestOptions_.timeout = requestTimeout;\n        } // if this isn't a live video and preload permits, start\n        // downloading segments\n\n        if (media.endList && this.tech_.preload() !== 'none') {\n          this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n          this.mainSegmentLoader_.load();\n        }\n        setupMediaGroups({\n          sourceType: this.sourceType_,\n          segmentLoaders: {\n            AUDIO: this.audioSegmentLoader_,\n            SUBTITLES: this.subtitleSegmentLoader_,\n            main: this.mainSegmentLoader_\n          },\n          tech: this.tech_,\n          requestOptions: this.requestOptions_,\n          mainPlaylistLoader: this.mainPlaylistLoader_,\n          vhs: this.vhs_,\n          main: this.main(),\n          mediaTypes: this.mediaTypes_,\n          excludePlaylist: this.excludePlaylist.bind(this)\n        });\n        this.triggerPresenceUsage_(this.main(), media);\n        this.setupFirstPlay();\n        if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n          this.trigger('selectedinitialmedia');\n        } else {\n          // We must wait for the active audio playlist loader to\n          // finish setting up before triggering this event so the\n          // representations API and EME setup is correct\n          this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n            this.trigger('selectedinitialmedia');\n          });\n        }\n      });\n      this.mainPlaylistLoader_.on('loadedplaylist', () => {\n        if (this.loadOnPlay_) {\n          this.tech_.off('play', this.loadOnPlay_);\n        }\n        let updatedPlaylist = this.mainPlaylistLoader_.media();\n        if (!updatedPlaylist) {\n          // Add content steering listeners on first load and init.\n          this.attachContentSteeringListeners_();\n          this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n          // an initial media as the playlist selectors do not consider browser support\n\n          this.excludeUnsupportedVariants_();\n          let selectedMedia;\n          if (this.enableLowInitialPlaylist) {\n            selectedMedia = this.selectInitialPlaylist();\n          }\n          if (!selectedMedia) {\n            selectedMedia = this.selectPlaylist();\n          }\n          if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n            return;\n          }\n          this.initialMedia_ = selectedMedia;\n          this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n          // fire again since the playlist will be requested. In the case of vhs-json\n          // (where the manifest object is provided as the source), when the media\n          // playlist's `segments` list is already available, a media playlist won't be\n          // requested, and loadedplaylist won't fire again, so the playlist handler must be\n          // called on its own here.\n\n          const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n          if (!haveJsonSource) {\n            return;\n          }\n          updatedPlaylist = this.initialMedia_;\n        }\n        this.handleUpdatedMediaPlaylist(updatedPlaylist);\n      });\n      this.mainPlaylistLoader_.on('error', () => {\n        const error = this.mainPlaylistLoader_.error;\n        this.excludePlaylist({\n          playlistToExclude: error.playlist,\n          error\n        });\n      });\n      this.mainPlaylistLoader_.on('mediachanging', () => {\n        this.mainSegmentLoader_.abort();\n        this.mainSegmentLoader_.pause();\n      });\n      this.mainPlaylistLoader_.on('mediachange', () => {\n        const media = this.mainPlaylistLoader_.media();\n        const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n        // timeout the request.\n\n        if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n          this.requestOptions_.timeout = 0;\n        } else {\n          this.requestOptions_.timeout = requestTimeout;\n        }\n        if (this.sourceType_ === 'dash') {\n          // we don't want to re-request the same hls playlist right after it was changed\n          // Initially it was implemented as workaround to restart playlist loader for live\n          // when playlist loader is paused because of playlist exclusions:\n          // see: https://github.com/videojs/http-streaming/pull/1339\n          // but this introduces duplicate \"loadedplaylist\" event.\n          // Ideally we want to re-think playlist loader life-cycle events,\n          // but simply checking \"paused\" state should help a lot\n          if (this.mainPlaylistLoader_.isPaused) {\n            this.mainPlaylistLoader_.load();\n          }\n        } // TODO: Create a new event on the PlaylistLoader that signals\n        // that the segments have changed in some way and use that to\n        // update the SegmentLoader instead of doing it twice here and\n        // on `loadedplaylist`\n\n        this.mainSegmentLoader_.pause();\n        this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n        if (this.waitingForFastQualityPlaylistReceived_) {\n          this.runFastQualitySwitch_();\n        } else {\n          this.mainSegmentLoader_.load();\n        }\n        this.tech_.trigger({\n          type: 'mediachange',\n          bubbles: true\n        });\n      });\n      this.mainPlaylistLoader_.on('playlistunchanged', () => {\n        const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n        // excluded for not-changing. We likely just have a really slowly updating\n        // playlist.\n\n        if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n          return;\n        }\n        const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n        if (playlistOutdated) {\n          // Playlist has stopped updating and we're stuck at its end. Try to\n          // exclude it and switch to another playlist in the hope that that\n          // one is updating (and give the player a chance to re-adjust to the\n          // safe live point).\n          this.excludePlaylist({\n            error: {\n              message: 'Playlist no longer updating.',\n              reason: 'playlist-unchanged'\n            }\n          }); // useful for monitoring QoS\n\n          this.tech_.trigger('playliststuck');\n        }\n      });\n      this.mainPlaylistLoader_.on('renditiondisabled', () => {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-rendition-disabled'\n        });\n      });\n      this.mainPlaylistLoader_.on('renditionenabled', () => {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-rendition-enabled'\n        });\n      });\n      const playlistLoaderEvents = ['manifestrequeststart', 'manifestrequestcomplete', 'manifestparsestart', 'manifestparsecomplete', 'playlistrequeststart', 'playlistrequestcomplete', 'playlistparsestart', 'playlistparsecomplete', 'renditiondisabled', 'renditionenabled'];\n      playlistLoaderEvents.forEach(eventName => {\n        this.mainPlaylistLoader_.on(eventName, metadata => {\n          // trigger directly on the player to ensure early events are fired.\n          this.player_.trigger(_extends$1({}, metadata));\n        });\n      });\n    }\n    /**\n     * Given an updated media playlist (whether it was loaded for the first time, or\n     * refreshed for live playlists), update any relevant properties and state to reflect\n     * changes in the media that should be accounted for (e.g., cues and duration).\n     *\n     * @param {Object} updatedPlaylist the updated media playlist object\n     *\n     * @private\n     */\n\n    handleUpdatedMediaPlaylist(updatedPlaylist) {\n      if (this.useCueTags_) {\n        this.updateAdCues_(updatedPlaylist);\n      } // TODO: Create a new event on the PlaylistLoader that signals\n      // that the segments have changed in some way and use that to\n      // update the SegmentLoader instead of doing it twice here and\n      // on `mediachange`\n\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n      if (this.waitingForFastQualityPlaylistReceived_) {\n        this.runFastQualitySwitch_();\n      }\n      this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n      // as it is possible that it was temporarily stopped while waiting for\n      // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n      if (!this.tech_.paused()) {\n        this.mainSegmentLoader_.load();\n        if (this.audioSegmentLoader_) {\n          this.audioSegmentLoader_.load();\n        }\n      }\n    }\n    /**\n     * A helper function for triggerring presence usage events once per source\n     *\n     * @private\n     */\n\n    triggerPresenceUsage_(main, media) {\n      const mediaGroups = main.mediaGroups || {};\n      let defaultDemuxed = true;\n      const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n      for (const mediaGroup in mediaGroups.AUDIO) {\n        for (const label in mediaGroups.AUDIO[mediaGroup]) {\n          const properties = mediaGroups.AUDIO[mediaGroup][label];\n          if (!properties.uri) {\n            defaultDemuxed = false;\n          }\n        }\n      }\n      if (defaultDemuxed) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-demuxed'\n        });\n      }\n      if (Object.keys(mediaGroups.SUBTITLES).length) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-webvtt'\n        });\n      }\n      if (Vhs$1.Playlist.isAes(media)) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-aes'\n        });\n      }\n      if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-alternate-audio'\n        });\n      }\n      if (this.useCueTags_) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-playlist-cue-tags'\n        });\n      }\n    }\n    shouldSwitchToMedia_(nextPlaylist) {\n      const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n      const currentTime = this.tech_.currentTime();\n      const bufferLowWaterLine = this.bufferLowWaterLine();\n      const bufferHighWaterLine = this.bufferHighWaterLine();\n      const buffered = this.tech_.buffered();\n      return shouldSwitchToMedia({\n        buffered,\n        currentTime,\n        currentPlaylist,\n        nextPlaylist,\n        bufferLowWaterLine,\n        bufferHighWaterLine,\n        duration: this.duration(),\n        bufferBasedABR: this.bufferBasedABR,\n        log: this.logger_\n      });\n    }\n    /**\n     * Register event handlers on the segment loaders. A helper function\n     * for construction time.\n     *\n     * @private\n     */\n\n    setupSegmentLoaderListeners_() {\n      this.mainSegmentLoader_.on('bandwidthupdate', () => {\n        // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n        // useful to check to see if a rendition switch should be made.\n        this.checkABR_('bandwidthupdate');\n        this.tech_.trigger('bandwidthupdate');\n      });\n      this.mainSegmentLoader_.on('timeout', () => {\n        if (this.bufferBasedABR) {\n          // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n          // Here the only consideration is that for buffer based ABR there's no guarantee\n          // of an immediate switch (since the bandwidth is averaged with a timeout\n          // bandwidth value of 1), so force a load on the segment loader to keep it going.\n          this.mainSegmentLoader_.load();\n        }\n      }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n      // based ABR.\n\n      if (!this.bufferBasedABR) {\n        this.mainSegmentLoader_.on('progress', () => {\n          this.trigger('progress');\n        });\n      }\n      this.mainSegmentLoader_.on('error', () => {\n        const error = this.mainSegmentLoader_.error();\n        this.excludePlaylist({\n          playlistToExclude: error.playlist,\n          error\n        });\n      });\n      this.mainSegmentLoader_.on('appenderror', () => {\n        this.error = this.mainSegmentLoader_.error_;\n        this.trigger('error');\n      });\n      this.mainSegmentLoader_.on('syncinfoupdate', () => {\n        this.onSyncInfoUpdate_();\n      });\n      this.mainSegmentLoader_.on('timestampoffset', () => {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-timestamp-offset'\n        });\n      });\n      this.audioSegmentLoader_.on('syncinfoupdate', () => {\n        this.onSyncInfoUpdate_();\n      });\n      this.audioSegmentLoader_.on('appenderror', () => {\n        this.error = this.audioSegmentLoader_.error_;\n        this.trigger('error');\n      });\n      this.mainSegmentLoader_.on('ended', () => {\n        this.logger_('main segment loader ended');\n        this.onEndOfStream();\n      }); // There is the possibility of the video segment and the audio segment\n      // at a current time to be on different timelines. When this occurs, the player\n      // forwards playback to a point where these two segment types are back on the same\n      // timeline. This time will be just after the end of the audio segment that is on\n      // a previous timeline.\n\n      this.timelineChangeController_.on('audioTimelineBehind', () => {\n        const segmentInfo = this.audioSegmentLoader_.pendingSegment_;\n        if (!segmentInfo || !segmentInfo.segment || !segmentInfo.segment.syncInfo) {\n          return;\n        } // Update the current time to just after the faulty audio segment.\n        // This moves playback to a spot where both audio and video segments\n        // are on the same timeline.\n\n        const newTime = segmentInfo.segment.syncInfo.end + 0.01;\n        this.tech_.setCurrentTime(newTime);\n      });\n      this.timelineChangeController_.on('fixBadTimelineChange', () => {\n        // pause, reset-everything and load for all segment-loaders\n        this.logger_('Fix bad timeline change. Restarting al segment loaders...');\n        this.mainSegmentLoader_.pause();\n        this.mainSegmentLoader_.resetEverything();\n        if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n          this.audioSegmentLoader_.pause();\n          this.audioSegmentLoader_.resetEverything();\n        }\n        if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n          this.subtitleSegmentLoader_.pause();\n          this.subtitleSegmentLoader_.resetEverything();\n        } // start segment loader loading in case they are paused\n\n        this.load();\n      });\n      this.mainSegmentLoader_.on('earlyabort', event => {\n        // never try to early abort with the new ABR algorithm\n        if (this.bufferBasedABR) {\n          return;\n        }\n        this.delegateLoaders_('all', ['abort']);\n        this.excludePlaylist({\n          error: {\n            message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n          },\n          playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n        });\n      });\n      const updateCodecs = () => {\n        if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n          return this.tryToCreateSourceBuffers_();\n        }\n        const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n        if (!codecs) {\n          return;\n        }\n        this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n      };\n      this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n      this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n      this.mainSegmentLoader_.on('fmp4', () => {\n        if (!this.triggeredFmp4Usage) {\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'vhs-fmp4'\n          });\n          this.triggeredFmp4Usage = true;\n        }\n      });\n      this.audioSegmentLoader_.on('fmp4', () => {\n        if (!this.triggeredFmp4Usage) {\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'vhs-fmp4'\n          });\n          this.triggeredFmp4Usage = true;\n        }\n      });\n      this.audioSegmentLoader_.on('ended', () => {\n        this.logger_('audioSegmentLoader ended');\n        this.onEndOfStream();\n      });\n      const segmentLoaderEvents = ['segmentselected', 'segmentloadstart', 'segmentloaded', 'segmentkeyloadstart', 'segmentkeyloadcomplete', 'segmentdecryptionstart', 'segmentdecryptioncomplete', 'segmenttransmuxingstart', 'segmenttransmuxingcomplete', 'segmenttransmuxingtrackinfoavailable', 'segmenttransmuxingtiminginfoavailable', 'segmentappendstart', 'appendsdone', 'bandwidthupdated', 'timelinechange', 'codecschange'];\n      segmentLoaderEvents.forEach(eventName => {\n        this.mainSegmentLoader_.on(eventName, metadata => {\n          this.player_.trigger(_extends$1({}, metadata));\n        });\n        this.audioSegmentLoader_.on(eventName, metadata => {\n          this.player_.trigger(_extends$1({}, metadata));\n        });\n        this.subtitleSegmentLoader_.on(eventName, metadata => {\n          this.player_.trigger(_extends$1({}, metadata));\n        });\n      });\n    }\n    mediaSecondsLoaded_() {\n      return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n    }\n    /**\n     * Call load on our SegmentLoaders\n     */\n\n    load() {\n      this.mainSegmentLoader_.load();\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        this.audioSegmentLoader_.load();\n      }\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n        this.subtitleSegmentLoader_.load();\n      }\n    }\n    /**\n     * Call pause on our SegmentLoaders\n     */\n\n    pause() {\n      this.mainSegmentLoader_.pause();\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        this.audioSegmentLoader_.pause();\n      }\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n        this.subtitleSegmentLoader_.pause();\n      }\n    }\n    /**\n     * Re-tune playback quality level for the current player\n     * conditions. This method will perform destructive actions like removing\n     * already buffered content in order to readjust the currently active\n     * playlist quickly. This is good for manual quality changes\n     *\n     * @private\n     */\n\n    fastQualityChange_(media = this.selectPlaylist()) {\n      if (media && media === this.mainPlaylistLoader_.media()) {\n        this.logger_('skipping fastQualityChange because new media is same as old');\n        return;\n      }\n      this.switchMedia_(media, 'fast-quality'); // we would like to avoid race condition when we call fastQuality,\n      // reset everything and start loading segments from prev segments instead of new because new playlist is not received yet\n\n      this.waitingForFastQualityPlaylistReceived_ = true;\n    }\n    runFastQualitySwitch_() {\n      this.waitingForFastQualityPlaylistReceived_ = false;\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.resetEverything();\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        this.audioSegmentLoader_.pause();\n        this.audioSegmentLoader_.resetEverything();\n      }\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n        this.subtitleSegmentLoader_.pause();\n        this.subtitleSegmentLoader_.resetEverything();\n      } // start segment loader loading in case they are paused\n\n      this.load();\n    }\n    /**\n     * Begin playback.\n     */\n\n    play() {\n      if (this.setupFirstPlay()) {\n        return;\n      }\n      if (this.tech_.ended()) {\n        this.tech_.setCurrentTime(0);\n      }\n      if (this.hasPlayed_) {\n        this.load();\n      }\n      const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n      // seek forward to the live point\n\n      if (this.tech_.duration() === Infinity) {\n        if (this.tech_.currentTime() < seekable.start(0)) {\n          return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n        }\n      }\n    }\n    /**\n     * Seek to the latest media position if this is a live video and the\n     * player and video are loaded and initialized.\n     */\n\n    setupFirstPlay() {\n      const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n      //  If 1) there is no active media\n      //     2) the player is paused\n      //     3) the first play has already been setup\n      // then exit early\n\n      if (!media || this.tech_.paused() || this.hasPlayed_) {\n        return false;\n      } // when the video is a live stream and/or has a start time\n\n      if (!media.endList || media.start) {\n        const seekable = this.seekable();\n        if (!seekable.length) {\n          // without a seekable range, the player cannot seek to begin buffering at the\n          // live or start point\n          return false;\n        }\n        const seekableEnd = seekable.end(0);\n        let startPoint = seekableEnd;\n        if (media.start) {\n          const offset = media.start.timeOffset;\n          if (offset < 0) {\n            startPoint = Math.max(seekableEnd + offset, seekable.start(0));\n          } else {\n            startPoint = Math.min(seekableEnd, offset);\n          }\n        } // trigger firstplay to inform the source handler to ignore the next seek event\n\n        this.trigger('firstplay'); // seek to the live point\n\n        this.tech_.setCurrentTime(startPoint);\n      }\n      this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n      this.load();\n      return true;\n    }\n    /**\n     * handle the sourceopen event on the MediaSource\n     *\n     * @private\n     */\n\n    handleSourceOpen_() {\n      // Only attempt to create the source buffer if none already exist.\n      // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n      // after `endOfStream` has been called (in response to a seek for instance)\n      this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n      // code in video.js but is required because play() must be invoked\n      // *after* the media source has opened.\n\n      if (this.tech_.autoplay()) {\n        const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n        // on browsers which return a promise\n\n        if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n          playPromise.then(null, e => {});\n        }\n      }\n      this.trigger('sourceopen');\n    }\n    /**\n     * handle the sourceended event on the MediaSource\n     *\n     * @private\n     */\n\n    handleSourceEnded_() {\n      if (!this.inbandTextTracks_.metadataTrack_) {\n        return;\n      }\n      const cues = this.inbandTextTracks_.metadataTrack_.cues;\n      if (!cues || !cues.length) {\n        return;\n      }\n      const duration = this.duration();\n      cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n    }\n    /**\n     * handle the durationchange event on the MediaSource\n     *\n     * @private\n     */\n\n    handleDurationChange_() {\n      this.tech_.trigger('durationchange');\n    }\n    /**\n     * Calls endOfStream on the media source when all active stream types have called\n     * endOfStream\n     *\n     * @param {string} streamType\n     *        Stream type of the segment loader that called endOfStream\n     * @private\n     */\n\n    onEndOfStream() {\n      let isEndOfStream = this.mainSegmentLoader_.ended_;\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n        if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n          // if we do not know if the main segment loader contains video yet or if we\n          // definitively know the main segment loader contains video, then we need to wait\n          // for both main and audio segment loaders to call endOfStream\n          isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n        } else {\n          // otherwise just rely on the audio loader\n          isEndOfStream = this.audioSegmentLoader_.ended_;\n        }\n      }\n      if (!isEndOfStream) {\n        return;\n      }\n      this.stopABRTimer_();\n      this.sourceUpdater_.endOfStream();\n    }\n    /**\n     * Check if a playlist has stopped being updated\n     *\n     * @param {Object} playlist the media playlist object\n     * @return {boolean} whether the playlist has stopped being updated or not\n     */\n\n    stuckAtPlaylistEnd_(playlist) {\n      const seekable = this.seekable();\n      if (!seekable.length) {\n        // playlist doesn't have enough information to determine whether we are stuck\n        return false;\n      }\n      const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n      if (expired === null) {\n        return false;\n      } // does not use the safe live end to calculate playlist end, since we\n      // don't want to say we are stuck while there is still content\n\n      const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n      const currentTime = this.tech_.currentTime();\n      const buffered = this.tech_.buffered();\n      if (!buffered.length) {\n        // return true if the playhead reached the absolute end of the playlist\n        return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n      }\n      const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n      // end of playlist\n\n      return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n    }\n    /**\n     * Exclude a playlist for a set amount of time, making it unavailable for selection by\n     * the rendition selection algorithm, then force a new playlist (rendition) selection.\n     *\n     * @param {Object=} playlistToExclude\n     *                  the playlist to exclude, defaults to the currently selected playlist\n     * @param {Object=} error\n     *                  an optional error\n     * @param {number=} playlistExclusionDuration\n     *                  an optional number of seconds to exclude the playlist\n     */\n\n    excludePlaylist({\n      playlistToExclude = this.mainPlaylistLoader_.media(),\n      error = {},\n      playlistExclusionDuration\n    }) {\n      // If the `error` was generated by the playlist loader, it will contain\n      // the playlist we were trying to load (but failed) and that should be\n      // excluded instead of the currently selected playlist which is likely\n      // out-of-date in this scenario\n      playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n      playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n      // trying to load the main OR while we were disposing of the tech\n\n      if (!playlistToExclude) {\n        this.error = error;\n        if (this.mediaSource.readyState !== 'open') {\n          this.trigger('error');\n        } else {\n          this.sourceUpdater_.endOfStream('network');\n        }\n        return;\n      }\n      playlistToExclude.playlistErrors_++;\n      const playlists = this.mainPlaylistLoader_.main.playlists;\n      const enabledPlaylists = playlists.filter(isEnabled);\n      const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n      // forever\n\n      if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n        videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.');\n        this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n        return this.mainPlaylistLoader_.load(isFinalRendition);\n      }\n      if (isFinalRendition) {\n        // If we're content steering, try other pathways.\n        if (this.main().contentSteering) {\n          const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n          const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n          this.contentSteeringController_.excludePathway(pathway);\n          this.excludeThenChangePathway_();\n          setTimeout(() => {\n            this.contentSteeringController_.addAvailablePathway(pathway);\n          }, reIncludeDelay);\n          return;\n        } // Since we're on the final non-excluded playlist, and we're about to exclude\n        // it, instead of erring the player or retrying this playlist, clear out the current\n        // exclusion list. This allows other playlists to be attempted in case any have been\n        // fixed.\n\n        let reincluded = false;\n        playlists.forEach(playlist => {\n          // skip current playlist which is about to be excluded\n          if (playlist === playlistToExclude) {\n            return;\n          }\n          const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n          if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n            reincluded = true;\n            delete playlist.excludeUntil;\n          }\n        });\n        if (reincluded) {\n          videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n          // playlist. This is needed for users relying on the retryplaylist event to catch a\n          // case where the player might be stuck and looping through \"dead\" playlists.\n\n          this.tech_.trigger('retryplaylist');\n        }\n      } // Exclude this playlist\n\n      let excludeUntil;\n      if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n        excludeUntil = Infinity;\n      } else {\n        excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n      }\n      playlistToExclude.excludeUntil = excludeUntil;\n      if (error.reason) {\n        playlistToExclude.lastExcludeReason_ = error.reason;\n      }\n      this.tech_.trigger('excludeplaylist');\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-excluded'\n      }); // TODO: only load a new playlist if we're excluding the current playlist\n      // If this function was called with a playlist that's not the current active playlist\n      // (e.g., media().id !== playlistToExclude.id),\n      // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n      const nextPlaylist = this.selectPlaylist();\n      if (!nextPlaylist) {\n        this.error = 'Playback cannot continue. No available working or supported playlists.';\n        this.trigger('error');\n        return;\n      }\n      const logFn = error.internal ? this.logger_ : videojs.log.warn;\n      const errorMessage = error.message ? ' ' + error.message : '';\n      logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders\n\n      if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n        this.delegateLoaders_('audio', ['abort', 'pause']);\n      } // if subtitle group changed reset subtitle loaders\n\n      if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n        this.delegateLoaders_('subtitle', ['abort', 'pause']);\n      }\n      this.delegateLoaders_('main', ['abort', 'pause']);\n      const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n      const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n      return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n    }\n    /**\n     * Pause all segment/playlist loaders\n     */\n\n    pauseLoading() {\n      this.delegateLoaders_('all', ['abort', 'pause']);\n      this.stopABRTimer_();\n    }\n    /**\n     * Call a set of functions in order on playlist loaders, segment loaders,\n     * or both types of loaders.\n     *\n     * @param {string} filter\n     *        Filter loaders that should call fnNames using a string. Can be:\n     *        * all - run on all loaders\n     *        * audio - run on all audio loaders\n     *        * subtitle - run on all subtitle loaders\n     *        * main - run on the main loaders\n     *\n     * @param {Array|string} fnNames\n     *        A string or array of function names to call.\n     */\n\n    delegateLoaders_(filter, fnNames) {\n      const loaders = [];\n      const dontFilterPlaylist = filter === 'all';\n      if (dontFilterPlaylist || filter === 'main') {\n        loaders.push(this.mainPlaylistLoader_);\n      }\n      const mediaTypes = [];\n      if (dontFilterPlaylist || filter === 'audio') {\n        mediaTypes.push('AUDIO');\n      }\n      if (dontFilterPlaylist || filter === 'subtitle') {\n        mediaTypes.push('CLOSED-CAPTIONS');\n        mediaTypes.push('SUBTITLES');\n      }\n      mediaTypes.forEach(mediaType => {\n        const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n        if (loader) {\n          loaders.push(loader);\n        }\n      });\n      ['main', 'audio', 'subtitle'].forEach(name => {\n        const loader = this[`${name}SegmentLoader_`];\n        if (loader && (filter === name || filter === 'all')) {\n          loaders.push(loader);\n        }\n      });\n      loaders.forEach(loader => fnNames.forEach(fnName => {\n        if (typeof loader[fnName] === 'function') {\n          loader[fnName]();\n        }\n      }));\n    }\n    /**\n     * set the current time on all segment loaders\n     *\n     * @param {TimeRange} currentTime the current time to set\n     * @return {TimeRange} the current time\n     */\n\n    setCurrentTime(currentTime) {\n      const buffered = findRange(this.tech_.buffered(), currentTime);\n      if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n        // return immediately if the metadata is not ready yet\n        return 0;\n      } // it's clearly an edge-case but don't thrown an error if asked to\n      // seek within an empty playlist\n\n      if (!this.mainPlaylistLoader_.media().segments) {\n        return 0;\n      } // if the seek location is already buffered, continue buffering as usual\n\n      if (buffered && buffered.length) {\n        return currentTime;\n      } // cancel outstanding requests so we begin buffering at the new\n      // location\n\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.resetEverything();\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        this.audioSegmentLoader_.pause();\n        this.audioSegmentLoader_.resetEverything();\n      }\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n        this.subtitleSegmentLoader_.pause();\n        this.subtitleSegmentLoader_.resetEverything();\n      } // start segment loader loading in case they are paused\n\n      this.load();\n    }\n    /**\n     * get the current duration\n     *\n     * @return {TimeRange} the duration\n     */\n\n    duration() {\n      if (!this.mainPlaylistLoader_) {\n        return 0;\n      }\n      const media = this.mainPlaylistLoader_.media();\n      if (!media) {\n        // no playlists loaded yet, so can't determine a duration\n        return 0;\n      } // Don't rely on the media source for duration in the case of a live playlist since\n      // setting the native MediaSource's duration to infinity ends up with consequences to\n      // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n      //\n      // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n      // however, few browsers have support for setLiveSeekableRange()\n      // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n      //\n      // Until a time when the duration of the media source can be set to infinity, and a\n      // seekable range specified across browsers, just return Infinity.\n\n      if (!media.endList) {\n        return Infinity;\n      } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n      // available). If it's not available, fall back to a playlist-calculated estimate.\n\n      if (this.mediaSource) {\n        return this.mediaSource.duration;\n      }\n      return Vhs$1.Playlist.duration(media);\n    }\n    /**\n     * check the seekable range\n     *\n     * @return {TimeRange} the seekable range\n     */\n\n    seekable() {\n      return this.seekable_;\n    }\n    getSeekableRange_(playlistLoader, mediaType) {\n      const media = playlistLoader.media();\n      if (!media) {\n        return null;\n      }\n      const mediaSequenceSync = this.syncController_.getMediaSequenceSync(mediaType);\n      if (mediaSequenceSync && mediaSequenceSync.isReliable) {\n        const start = mediaSequenceSync.start;\n        const end = mediaSequenceSync.end;\n        if (!isFinite(start) || !isFinite(end)) {\n          return null;\n        }\n        const liveEdgeDelay = Vhs$1.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main, media); // Make sure our seekable end is not less than the seekable start\n\n        const calculatedEnd = Math.max(start, end - liveEdgeDelay);\n        return createTimeRanges([[start, calculatedEnd]]);\n      }\n      const expired = this.syncController_.getExpiredTime(media, this.duration());\n      if (expired === null) {\n        return null;\n      }\n      const seekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main, media));\n      return seekable.length ? seekable : null;\n    }\n    computeFinalSeekable_(mainSeekable, audioSeekable) {\n      if (!audioSeekable) {\n        return mainSeekable;\n      }\n      const mainStart = mainSeekable.start(0);\n      const mainEnd = mainSeekable.end(0);\n      const audioStart = audioSeekable.start(0);\n      const audioEnd = audioSeekable.end(0);\n      if (audioStart > mainEnd || mainStart > audioEnd) {\n        // Seekables are far apart, rely on main\n        return mainSeekable;\n      } // Return the overlapping seekable range\n\n      return createTimeRanges([[Math.max(mainStart, audioStart), Math.min(mainEnd, audioEnd)]]);\n    }\n    onSyncInfoUpdate_() {\n      // TODO check for creation of both source buffers before updating seekable\n      //\n      // A fix was made to this function where a check for\n      // this.sourceUpdater_.hasCreatedSourceBuffers\n      // was added to ensure that both source buffers were created before seekable was\n      // updated. However, it originally had a bug where it was checking for a true and\n      // returning early instead of checking for false. Setting it to check for false to\n      // return early though created other issues. A call to play() would check for seekable\n      // end without verifying that a seekable range was present. In addition, even checking\n      // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n      // due to a media update calling load on the segment loaders, skipping a seek to live,\n      // thereby starting live streams at the beginning of the stream rather than at the end.\n      //\n      // This conditional should be fixed to wait for the creation of two source buffers at\n      // the same time as the other sections of code are fixed to properly seek to live and\n      // not throw an error due to checking for a seekable end when no seekable range exists.\n      //\n      // For now, fall back to the older behavior, with the understanding that the seekable\n      // range may not be completely correct, leading to a suboptimal initial live point.\n      if (!this.mainPlaylistLoader_) {\n        return;\n      }\n      const mainSeekable = this.getSeekableRange_(this.mainPlaylistLoader_, 'main');\n      if (!mainSeekable) {\n        return;\n      }\n      let audioSeekable;\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        audioSeekable = this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader, 'audio');\n        if (!audioSeekable) {\n          return;\n        }\n      }\n      const oldSeekable = this.seekable_;\n      this.seekable_ = this.computeFinalSeekable_(mainSeekable, audioSeekable);\n      if (!this.seekable_) {\n        return;\n      }\n      if (oldSeekable && oldSeekable.length && this.seekable_.length) {\n        if (oldSeekable.start(0) === this.seekable_.start(0) && oldSeekable.end(0) === this.seekable_.end(0)) {\n          // Seekable range hasn't changed\n          return;\n        }\n      }\n      this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n      const metadata = {\n        seekableRanges: this.seekable_\n      };\n      this.trigger({\n        type: 'seekablerangeschanged',\n        metadata\n      });\n      this.tech_.trigger('seekablechanged');\n    }\n    /**\n     * Update the player duration\n     */\n\n    updateDuration(isLive) {\n      if (this.updateDuration_) {\n        this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n        this.updateDuration_ = null;\n      }\n      if (this.mediaSource.readyState !== 'open') {\n        this.updateDuration_ = this.updateDuration.bind(this, isLive);\n        this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n        return;\n      }\n      if (isLive) {\n        const seekable = this.seekable();\n        if (!seekable.length) {\n          return;\n        } // Even in the case of a live playlist, the native MediaSource's duration should not\n        // be set to Infinity (even though this would be expected for a live playlist), since\n        // setting the native MediaSource's duration to infinity ends up with consequences to\n        // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n        //\n        // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n        // however, few browsers have support for setLiveSeekableRange()\n        // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n        //\n        // Until a time when the duration of the media source can be set to infinity, and a\n        // seekable range specified across browsers, the duration should be greater than or\n        // equal to the last possible seekable value.\n        // MediaSource duration starts as NaN\n        // It is possible (and probable) that this case will never be reached for many\n        // sources, since the MediaSource reports duration as the highest value without\n        // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n        // we buffered times 0 to 100 with real times of 100 to 200, even though current\n        // time will be between 0 and 100, the native media source may report the duration\n        // as 200. However, since we report duration separate from the media source (as\n        // Infinity), and as long as the native media source duration value is greater than\n        // our reported seekable range, seeks will work as expected. The large number as\n        // duration for live is actually a strategy used by some players to work around the\n        // issue of live seekable ranges cited above.\n\n        if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n          this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n        }\n        return;\n      }\n      const buffered = this.tech_.buffered();\n      let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n      if (buffered.length > 0) {\n        duration = Math.max(duration, buffered.end(buffered.length - 1));\n      }\n      if (this.mediaSource.duration !== duration) {\n        this.sourceUpdater_.setDuration(duration);\n      }\n    }\n    /**\n     * dispose of the PlaylistController and everything\n     * that it controls\n     */\n\n    dispose() {\n      this.trigger('dispose');\n      this.decrypter_.terminate();\n      this.mainPlaylistLoader_.dispose();\n      this.mainSegmentLoader_.dispose();\n      this.contentSteeringController_.dispose();\n      this.keyStatusMap_.clear();\n      if (this.loadOnPlay_) {\n        this.tech_.off('play', this.loadOnPlay_);\n      }\n      ['AUDIO', 'SUBTITLES'].forEach(type => {\n        const groups = this.mediaTypes_[type].groups;\n        for (const id in groups) {\n          groups[id].forEach(group => {\n            if (group.playlistLoader) {\n              group.playlistLoader.dispose();\n            }\n          });\n        }\n      });\n      this.audioSegmentLoader_.dispose();\n      this.subtitleSegmentLoader_.dispose();\n      this.sourceUpdater_.dispose();\n      this.timelineChangeController_.dispose();\n      this.stopABRTimer_();\n      if (this.updateDuration_) {\n        this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n      }\n      this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n      this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n      this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n      this.off();\n    }\n    /**\n     * return the main playlist object if we have one\n     *\n     * @return {Object} the main playlist object that we parsed\n     */\n\n    main() {\n      return this.mainPlaylistLoader_.main;\n    }\n    /**\n     * return the currently selected playlist\n     *\n     * @return {Object} the currently selected playlist object that we parsed\n     */\n\n    media() {\n      // playlist loader will not return media if it has not been fully loaded\n      return this.mainPlaylistLoader_.media() || this.initialMedia_;\n    }\n    areMediaTypesKnown_() {\n      const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n      const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n      // otherwise check on the segment loader.\n\n      const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n      if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n        return false;\n      }\n      return true;\n    } // find from and to for codec switch event\n\n    getCodecsOrExclude_() {\n      const media = {\n        main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n        audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n      };\n      const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n      media.video = media.main;\n      const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n      const codecs = {};\n      const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n      if (media.main.hasVideo) {\n        codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n      }\n      if (media.main.isMuxed) {\n        codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n      }\n      if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n        codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n        media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n      } // no codecs, no playback.\n\n      if (!codecs.audio && !codecs.video) {\n        this.excludePlaylist({\n          playlistToExclude: playlist,\n          error: {\n            message: 'Could not determine codecs for playlist.'\n          },\n          playlistExclusionDuration: Infinity\n        });\n        return;\n      } // fmp4 relies on browser support, while ts relies on muxer support\n\n      const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec, this.usingManagedMediaSource_) : muxerSupportsCodec(codec);\n      const unsupportedCodecs = {};\n      let unsupportedAudio;\n      ['video', 'audio'].forEach(function (type) {\n        if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n          const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n          unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n          unsupportedCodecs[supporter].push(codecs[type]);\n          if (type === 'audio') {\n            unsupportedAudio = supporter;\n          }\n        }\n      });\n      if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n        const audioGroup = playlist.attributes.AUDIO;\n        this.main().playlists.forEach(variant => {\n          const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n          if (variantAudioGroup === audioGroup && variant !== playlist) {\n            variant.excludeUntil = Infinity;\n          }\n        });\n        this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n      } // if we have any unsupported codecs exclude this playlist.\n\n      if (Object.keys(unsupportedCodecs).length) {\n        const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n          if (acc) {\n            acc += ', ';\n          }\n          acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n          return acc;\n        }, '') + '.';\n        this.excludePlaylist({\n          playlistToExclude: playlist,\n          error: {\n            internal: true,\n            message\n          },\n          playlistExclusionDuration: Infinity\n        });\n        return;\n      } // check if codec switching is happening\n\n      if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n        const switchMessages = [];\n        ['video', 'audio'].forEach(type => {\n          const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n          const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n          if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n            switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n          }\n        });\n        if (switchMessages.length) {\n          this.excludePlaylist({\n            playlistToExclude: playlist,\n            error: {\n              message: `Codec switching not supported: ${switchMessages.join(', ')}.`,\n              internal: true\n            },\n            playlistExclusionDuration: Infinity\n          });\n          return;\n        }\n      } // TODO: when using the muxer shouldn't we just return\n      // the codecs that the muxer outputs?\n\n      return codecs;\n    }\n    /**\n     * Create source buffers and exlude any incompatible renditions.\n     *\n     * @private\n     */\n\n    tryToCreateSourceBuffers_() {\n      // media source is not ready yet or sourceBuffers are already\n      // created.\n      if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n        return;\n      }\n      if (!this.areMediaTypesKnown_()) {\n        return;\n      }\n      const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n      if (!codecs) {\n        return;\n      }\n      this.sourceUpdater_.createSourceBuffers(codecs);\n      const codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n      this.excludeIncompatibleVariants_(codecString);\n    }\n    /**\n     * Excludes playlists with codecs that are unsupported by the muxer and browser.\n     */\n\n    excludeUnsupportedVariants_() {\n      const playlists = this.main().playlists;\n      const ids = []; // TODO: why don't we have a property to loop through all\n      // playlist? Why did we ever mix indexes and keys?\n\n      Object.keys(playlists).forEach(key => {\n        const variant = playlists[key]; // check if we already processed this playlist.\n\n        if (ids.indexOf(variant.id) !== -1) {\n          return;\n        }\n        ids.push(variant.id);\n        const codecs = codecsForPlaylist(this.main, variant);\n        const unsupported = [];\n        if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio, this.usingManagedMediaSource_)) {\n          unsupported.push(`audio codec ${codecs.audio}`);\n        }\n        if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video, this.usingManagedMediaSource_)) {\n          unsupported.push(`video codec ${codecs.video}`);\n        }\n        if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n          unsupported.push(`text codec ${codecs.text}`);\n        }\n        if (unsupported.length) {\n          variant.excludeUntil = Infinity;\n          this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`);\n        }\n      });\n    }\n    /**\n     * Exclude playlists that are known to be codec or\n     * stream-incompatible with the SourceBuffer configuration. For\n     * instance, Media Source Extensions would cause the video element to\n     * stall waiting for video data if you switched from a variant with\n     * video and audio to an audio-only one.\n     *\n     * @param {Object} media a media playlist compatible with the current\n     * set of SourceBuffers. Variants in the current main playlist that\n     * do not appear to have compatible codec or stream configurations\n     * will be excluded from the default playlist selection algorithm\n     * indefinitely.\n     * @private\n     */\n\n    excludeIncompatibleVariants_(codecString) {\n      const ids = [];\n      const playlists = this.main().playlists;\n      const codecs = unwrapCodecList(parseCodecs(codecString));\n      const codecCount_ = codecCount(codecs);\n      const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n      const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n      Object.keys(playlists).forEach(key => {\n        const variant = playlists[key]; // check if we already processed this playlist.\n        // or it if it is already excluded forever.\n\n        if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n          return;\n        }\n        ids.push(variant.id);\n        const exclusionReasons = []; // get codecs from the playlist for this variant\n\n        const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n        const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n        // variant is incompatible. Wait for mux.js to probe\n\n        if (!variantCodecs.audio && !variantCodecs.video) {\n          return;\n        } // TODO: we can support this by removing the\n        // old media source and creating a new one, but it will take some work.\n        // The number of streams cannot change\n\n        if (variantCodecCount !== codecCount_) {\n          exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n        } // only exclude playlists by codec change, if codecs cannot switch\n        // during playback.\n\n        if (!this.sourceUpdater_.canChangeType()) {\n          const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n          const variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n          if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n            exclusionReasons.push(`video codec \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n          } // the audio codec cannot change\n\n          if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n            exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n          }\n        }\n        if (exclusionReasons.length) {\n          variant.excludeUntil = Infinity;\n          this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n        }\n      });\n    }\n    updateAdCues_(media) {\n      let offset = 0;\n      const seekable = this.seekable();\n      if (seekable.length) {\n        offset = seekable.start(0);\n      }\n      updateAdCues(media, this.cueTagsTrack_, offset);\n    }\n    /**\n     * Calculates the desired forward buffer length based on current time\n     *\n     * @return {number} Desired forward buffer length in seconds\n     */\n\n    goalBufferLength() {\n      const currentTime = this.tech_.currentTime();\n      const initial = Config.GOAL_BUFFER_LENGTH;\n      const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n      const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n      return Math.min(initial + currentTime * rate, max);\n    }\n    /**\n     * Calculates the desired buffer low water line based on current time\n     *\n     * @return {number} Desired buffer low water line in seconds\n     */\n\n    bufferLowWaterLine() {\n      const currentTime = this.tech_.currentTime();\n      const initial = Config.BUFFER_LOW_WATER_LINE;\n      const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n      const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n      const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n      return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n    }\n    bufferHighWaterLine() {\n      return Config.BUFFER_HIGH_WATER_LINE;\n    }\n    addDateRangesToTextTrack_(dateRanges) {\n      createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n      addDateRangeMetadata({\n        inbandTextTracks: this.inbandTextTracks_,\n        dateRanges\n      });\n    }\n    addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n      const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n      // audio/video source with a metadata track, and an alt audio with a metadata track.\n      // However, this probably won't happen, and if it does it can be handled then.\n\n      createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n      addMetadata({\n        inbandTextTracks: this.inbandTextTracks_,\n        metadataArray,\n        timestampOffset,\n        videoDuration\n      });\n    }\n    /**\n     * Utility for getting the pathway or service location from an HLS or DASH playlist.\n     *\n     * @param {Object} playlist for getting pathway from.\n     * @return the pathway attribute of a playlist\n     */\n\n    pathwayAttribute_(playlist) {\n      return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n    }\n    /**\n     * Initialize available pathways and apply the tag properties.\n     */\n\n    initContentSteeringController_() {\n      const main = this.main();\n      if (!main.contentSteering) {\n        return;\n      }\n      for (const playlist of main.playlists) {\n        this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n      }\n      this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); // request the steering manifest immediately if queryBeforeStart is set.\n\n      if (this.contentSteeringController_.queryBeforeStart) {\n        // When queryBeforeStart is true, initial request should omit steering parameters.\n        this.contentSteeringController_.requestSteeringManifest(true);\n        return;\n      } // otherwise start content steering after playback starts\n\n      this.tech_.one('canplay', () => {\n        this.contentSteeringController_.requestSteeringManifest();\n      });\n    }\n    /**\n     * Reset the content steering controller and re-init.\n     */\n\n    resetContentSteeringController_() {\n      this.contentSteeringController_.clearAvailablePathways();\n      this.contentSteeringController_.dispose();\n      this.initContentSteeringController_();\n    }\n    /**\n     * Attaches the listeners for content steering.\n     */\n\n    attachContentSteeringListeners_() {\n      this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));\n      const contentSteeringEvents = ['contentsteeringloadstart', 'contentsteeringloadcomplete', 'contentsteeringparsed'];\n      contentSteeringEvents.forEach(eventName => {\n        this.contentSteeringController_.on(eventName, metadata => {\n          this.trigger(_extends$1({}, metadata));\n        });\n      });\n      if (this.sourceType_ === 'dash') {\n        this.mainPlaylistLoader_.on('loadedplaylist', () => {\n          const main = this.main(); // check if steering tag or pathways changed.\n\n          const didDashTagChange = this.contentSteeringController_.didDASHTagChange(main.uri, main.contentSteering);\n          const didPathwaysChange = () => {\n            const availablePathways = this.contentSteeringController_.getAvailablePathways();\n            const newPathways = [];\n            for (const playlist of main.playlists) {\n              const serviceLocation = playlist.attributes.serviceLocation;\n              if (serviceLocation) {\n                newPathways.push(serviceLocation);\n                if (!availablePathways.has(serviceLocation)) {\n                  return true;\n                }\n              }\n            } // If we have no new serviceLocations and previously had availablePathways\n\n            if (!newPathways.length && availablePathways.size) {\n              return true;\n            }\n            return false;\n          };\n          if (didDashTagChange || didPathwaysChange()) {\n            this.resetContentSteeringController_();\n          }\n        });\n      }\n    }\n    /**\n     * Simple exclude and change playlist logic for content steering.\n     */\n\n    excludeThenChangePathway_() {\n      const currentPathway = this.contentSteeringController_.getPathway();\n      if (!currentPathway) {\n        return;\n      }\n      this.handlePathwayClones_();\n      const main = this.main();\n      const playlists = main.playlists;\n      const ids = new Set();\n      let didEnablePlaylists = false;\n      Object.keys(playlists).forEach(key => {\n        const variant = playlists[key];\n        const pathwayId = this.pathwayAttribute_(variant);\n        const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n        const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n        if (steeringExclusion && !differentPathwayId) {\n          delete variant.excludeUntil;\n          delete variant.lastExcludeReason_;\n          didEnablePlaylists = true;\n        }\n        const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n        const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n        if (!shouldExclude) {\n          return;\n        }\n        ids.add(variant.id);\n        variant.excludeUntil = Infinity;\n        variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n        this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n      });\n      if (this.contentSteeringController_.manifestType_ === 'DASH') {\n        Object.keys(this.mediaTypes_).forEach(key => {\n          const type = this.mediaTypes_[key];\n          if (type.activePlaylistLoader) {\n            const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n            if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n              didEnablePlaylists = true;\n            }\n          }\n        });\n      }\n      if (didEnablePlaylists) {\n        this.changeSegmentPathway_();\n      }\n    }\n    /**\n     * Add, update, or delete playlists and media groups for\n     * the pathway clones for HLS Content Steering.\n     *\n     * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n     *\n     * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and\n     * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or\n     * `STABLE-RENDITION-ID` values.\n     */\n\n    handlePathwayClones_() {\n      const main = this.main();\n      const playlists = main.playlists;\n      const currentPathwayClones = this.contentSteeringController_.currentPathwayClones;\n      const nextPathwayClones = this.contentSteeringController_.nextPathwayClones;\n      const hasClones = currentPathwayClones && currentPathwayClones.size || nextPathwayClones && nextPathwayClones.size;\n      if (!hasClones) {\n        return;\n      }\n      for (const [id, clone] of currentPathwayClones.entries()) {\n        const newClone = nextPathwayClones.get(id); // Delete the old pathway clone.\n\n        if (!newClone) {\n          this.mainPlaylistLoader_.updateOrDeleteClone(clone);\n          this.contentSteeringController_.excludePathway(id);\n        }\n      }\n      for (const [id, clone] of nextPathwayClones.entries()) {\n        const oldClone = currentPathwayClones.get(id); // Create a new pathway if it is a new pathway clone object.\n\n        if (!oldClone) {\n          const playlistsToClone = playlists.filter(p => {\n            return p.attributes['PATHWAY-ID'] === clone['BASE-ID'];\n          });\n          playlistsToClone.forEach(p => {\n            this.mainPlaylistLoader_.addClonePathway(clone, p);\n          });\n          this.contentSteeringController_.addAvailablePathway(id);\n          continue;\n        } // There have not been changes to the pathway clone object, so skip.\n\n        if (this.equalPathwayClones_(oldClone, clone)) {\n          continue;\n        } // Update a preexisting cloned pathway.\n        // True is set for the update flag.\n\n        this.mainPlaylistLoader_.updateOrDeleteClone(clone, true);\n        this.contentSteeringController_.addAvailablePathway(id);\n      } // Deep copy contents of next to current pathways.\n\n      this.contentSteeringController_.currentPathwayClones = new Map(JSON.parse(JSON.stringify([...nextPathwayClones])));\n    }\n    /**\n     * Determines whether two pathway clone objects are equivalent.\n     *\n     * @param {Object} a The first pathway clone object.\n     * @param {Object} b The second pathway clone object.\n     * @return {boolean} True if the pathway clone objects are equal, false otherwise.\n     */\n\n    equalPathwayClones_(a, b) {\n      if (a['BASE-ID'] !== b['BASE-ID'] || a.ID !== b.ID || a['URI-REPLACEMENT'].HOST !== b['URI-REPLACEMENT'].HOST) {\n        return false;\n      }\n      const aParams = a['URI-REPLACEMENT'].PARAMS;\n      const bParams = b['URI-REPLACEMENT'].PARAMS; // We need to iterate through both lists of params because one could be\n      // missing a parameter that the other has.\n\n      for (const p in aParams) {\n        if (aParams[p] !== bParams[p]) {\n          return false;\n        }\n      }\n      for (const p in bParams) {\n        if (aParams[p] !== bParams[p]) {\n          return false;\n        }\n      }\n      return true;\n    }\n    /**\n     * Changes the current playlists for audio, video and subtitles after a new pathway\n     * is chosen from content steering.\n     */\n\n    changeSegmentPathway_() {\n      const nextPlaylist = this.selectPlaylist();\n      this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n      if (this.contentSteeringController_.manifestType_ === 'DASH') {\n        this.switchMediaForDASHContentSteering_();\n      }\n      this.switchMedia_(nextPlaylist, 'content-steering');\n    }\n    /**\n     * Iterates through playlists and check their keyId set and compare with the\n     * keyStatusMap, only enable playlists that have a usable key. If the playlist\n     * has no keyId leave it enabled by default.\n     */\n\n    excludeNonUsablePlaylistsByKeyId_() {\n      if (!this.mainPlaylistLoader_ || !this.mainPlaylistLoader_.main) {\n        return;\n      }\n      let nonUsableKeyStatusCount = 0;\n      const NON_USABLE = 'non-usable';\n      this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n        const keyIdSet = this.mainPlaylistLoader_.getKeyIdSet(playlist); // If the playlist doesn't have keyIDs lets not exclude it.\n\n        if (!keyIdSet || !keyIdSet.size) {\n          return;\n        }\n        keyIdSet.forEach(key => {\n          const USABLE = 'usable';\n          const hasUsableKeyStatus = this.keyStatusMap_.has(key) && this.keyStatusMap_.get(key) === USABLE;\n          const nonUsableExclusion = playlist.lastExcludeReason_ === NON_USABLE && playlist.excludeUntil === Infinity;\n          if (!hasUsableKeyStatus) {\n            // Only exclude playlists that haven't already been excluded as non-usable.\n            if (playlist.excludeUntil !== Infinity && playlist.lastExcludeReason_ !== NON_USABLE) {\n              playlist.excludeUntil = Infinity;\n              playlist.lastExcludeReason_ = NON_USABLE;\n              this.logger_(`excluding playlist ${playlist.id} because the key ID ${key} doesn't exist in the keyStatusMap or is not ${USABLE}`);\n            } // count all nonUsableKeyStatus\n\n            nonUsableKeyStatusCount++;\n          } else if (hasUsableKeyStatus && nonUsableExclusion) {\n            delete playlist.excludeUntil;\n            delete playlist.lastExcludeReason_;\n            this.logger_(`enabling playlist ${playlist.id} because key ID ${key} is ${USABLE}`);\n          }\n        });\n      }); // If for whatever reason every playlist has a non usable key status. Lets try re-including the SD renditions as a failsafe.\n\n      if (nonUsableKeyStatusCount >= this.mainPlaylistLoader_.main.playlists.length) {\n        this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n          const isNonHD = playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height < 720;\n          const excludedForNonUsableKey = playlist.excludeUntil === Infinity && playlist.lastExcludeReason_ === NON_USABLE;\n          if (isNonHD && excludedForNonUsableKey) {\n            // Only delete the excludeUntil so we don't try and re-exclude these playlists.\n            delete playlist.excludeUntil;\n            videojs.log.warn(`enabling non-HD playlist ${playlist.id} because all playlists were excluded due to ${NON_USABLE} key IDs`);\n          }\n        });\n      }\n    }\n    /**\n     * Adds a keystatus to the keystatus map, tries to convert to string if necessary.\n     *\n     * @param {any} keyId the keyId to add a status for\n     * @param {string} status the status of the keyId\n     */\n\n    addKeyStatus_(keyId, status) {\n      const isString = typeof keyId === 'string';\n      const keyIdHexString = isString ? keyId : bufferToHexString(keyId);\n      const formattedKeyIdString = keyIdHexString.slice(0, 32).toLowerCase();\n      this.logger_(`KeyStatus '${status}' with key ID ${formattedKeyIdString} added to the keyStatusMap`);\n      this.keyStatusMap_.set(formattedKeyIdString, status);\n    }\n    /**\n     * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.\n     *\n     * @param {any} keyId the keyId from the keystatuschange event\n     * @param {string} status the key status string\n     */\n\n    updatePlaylistByKeyStatus(keyId, status) {\n      this.addKeyStatus_(keyId, status);\n      if (!this.waitingForFastQualityPlaylistReceived_) {\n        this.excludeNonUsableThenChangePlaylist_();\n      } // Listen to loadedplaylist with a single listener and check for new contentProtection elements when a playlist is updated.\n\n      this.mainPlaylistLoader_.off('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n      this.mainPlaylistLoader_.on('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n    }\n    excludeNonUsableThenChangePlaylist_() {\n      this.excludeNonUsablePlaylistsByKeyId_();\n      this.fastQualityChange_();\n    }\n  }\n\n  /**\n   * Returns a function that acts as the Enable/disable playlist function.\n   *\n   * @param {PlaylistLoader} loader - The main playlist loader\n   * @param {string} playlistID - id of the playlist\n   * @param {Function} changePlaylistFn - A function to be called after a\n   * playlist's enabled-state has been changed. Will NOT be called if a\n   * playlist's enabled-state is unchanged\n   * @param {boolean=} enable - Value to set the playlist enabled-state to\n   * or if undefined returns the current enabled-state for the playlist\n   * @return {Function} Function for setting/getting enabled\n   */\n\n  const enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n    const playlist = loader.main.playlists[playlistID];\n    const incompatible = isIncompatible(playlist);\n    const currentlyEnabled = isEnabled(playlist);\n    if (typeof enable === 'undefined') {\n      return currentlyEnabled;\n    }\n    if (enable) {\n      delete playlist.disabled;\n    } else {\n      playlist.disabled = true;\n    }\n    const metadata = {\n      renditionInfo: {\n        id: playlistID,\n        bandwidth: playlist.attributes.BANDWIDTH,\n        resolution: playlist.attributes.RESOLUTION,\n        codecs: playlist.attributes.CODECS\n      },\n      cause: 'fast-quality'\n    };\n    if (enable !== currentlyEnabled && !incompatible) {\n      // Ensure the outside world knows about our changes\n      if (enable) {\n        // call fast quality change only when the playlist is enabled\n        changePlaylistFn(playlist);\n        loader.trigger({\n          type: 'renditionenabled',\n          metadata\n        });\n      } else {\n        loader.trigger({\n          type: 'renditiondisabled',\n          metadata\n        });\n      }\n    }\n    return enable;\n  };\n  /**\n   * The representation object encapsulates the publicly visible information\n   * in a media playlist along with a setter/getter-type function (enabled)\n   * for changing the enabled-state of a particular playlist entry\n   *\n   * @class Representation\n   */\n\n  class Representation {\n    constructor(vhsHandler, playlist, id) {\n      const {\n        playlistController_: pc\n      } = vhsHandler;\n      const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n      if (playlist.attributes) {\n        const resolution = playlist.attributes.RESOLUTION;\n        this.width = resolution && resolution.width;\n        this.height = resolution && resolution.height;\n        this.bandwidth = playlist.attributes.BANDWIDTH;\n        this.frameRate = playlist.attributes['FRAME-RATE'];\n      }\n      this.codecs = codecsForPlaylist(pc.main(), playlist);\n      this.playlist = playlist; // The id is simply the ordinality of the media playlist\n      // within the main playlist\n\n      this.id = id; // Partially-apply the enableFunction to create a playlist-\n      // specific variant\n\n      this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n    }\n  }\n  /**\n   * A mixin function that adds the `representations` api to an instance\n   * of the VhsHandler class\n   *\n   * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n   * representation API into\n   */\n\n  const renditionSelectionMixin = function (vhsHandler) {\n    // Add a single API-specific function to the VhsHandler instance\n    vhsHandler.representations = () => {\n      const main = vhsHandler.playlistController_.main();\n      const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n      if (!playlists) {\n        return [];\n      }\n      return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\n    };\n  };\n\n  /**\n   * @file playback-watcher.js\n   *\n   * Playback starts, and now my watch begins. It shall not end until my death. I shall\n   * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n   * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n   * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n   * my life and honor to the Playback Watch, for this Player and all the Players to come.\n   */\n\n  const timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n  /**\n   * @class PlaybackWatcher\n   */\n\n  class PlaybackWatcher extends videojs.EventTarget {\n    /**\n     * Represents an PlaybackWatcher object.\n     *\n     * @class\n     * @param {Object} options an object that includes the tech and settings\n     */\n    constructor(options) {\n      super();\n      this.playlistController_ = options.playlistController;\n      this.tech_ = options.tech;\n      this.seekable = options.seekable;\n      this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n      this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n      this.media = options.media;\n      this.playedRanges_ = [];\n      this.consecutiveUpdates = 0;\n      this.lastRecordedTime = null;\n      this.checkCurrentTimeTimeout_ = null;\n      this.logger_ = logger('PlaybackWatcher');\n      this.logger_('initialize');\n      const playHandler = () => this.monitorCurrentTime_();\n      const canPlayHandler = () => this.monitorCurrentTime_();\n      const waitingHandler = () => this.techWaiting_();\n      const cancelTimerHandler = () => this.resetTimeUpdate_();\n      const pc = this.playlistController_;\n      const loaderTypes = ['main', 'subtitle', 'audio'];\n      const loaderChecks = {};\n      loaderTypes.forEach(type => {\n        loaderChecks[type] = {\n          reset: () => this.resetSegmentDownloads_(type),\n          updateend: () => this.checkSegmentDownloads_(type)\n        };\n        pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n        // isn't changing we want to reset. We cannot assume that the new rendition\n        // will also be stalled, until after new appends.\n\n        pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n        // This prevents one segment playlists (single vtt or single segment content)\n        // from being detected as stalling. As the buffer will not change in those cases, since\n        // the buffer is the entire video duration.\n\n        this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n      });\n      /**\n       * We check if a seek was into a gap through the following steps:\n       * 1. We get a seeking event and we do not get a seeked event. This means that\n       *    a seek was attempted but not completed.\n       * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n       *    removed everything from our buffer and appended a segment, and should be ready\n       *    to check for gaps.\n       */\n\n      const setSeekingHandlers = fn => {\n        ['main', 'audio'].forEach(type => {\n          pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n        });\n      };\n      this.seekingAppendCheck_ = () => {\n        if (this.fixesBadSeeks_()) {\n          this.consecutiveUpdates = 0;\n          this.lastRecordedTime = this.tech_.currentTime();\n          setSeekingHandlers('off');\n        }\n      };\n      this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n      this.watchForBadSeeking_ = () => {\n        this.clearSeekingAppendCheck_();\n        setSeekingHandlers('on');\n      };\n      this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n      this.tech_.on('seeking', this.watchForBadSeeking_);\n      this.tech_.on('waiting', waitingHandler);\n      this.tech_.on(timerCancelEvents, cancelTimerHandler);\n      this.tech_.on('canplay', canPlayHandler);\n      /*\n        An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n        is surfaced in one of two ways:\n         1)  The `waiting` event is fired before the player has buffered content, making it impossible\n            to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n            we can check if playback is stalled due to a gap, and skip the gap if necessary.\n        2)  A source with a gap at the beginning of the stream is loaded programatically while the player\n            is in a playing state. To catch this case, it's important that our one-time play listener is setup\n            even if the player is in a playing state\n      */\n\n      this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n      this.dispose = () => {\n        this.clearSeekingAppendCheck_();\n        this.logger_('dispose');\n        this.tech_.off('waiting', waitingHandler);\n        this.tech_.off(timerCancelEvents, cancelTimerHandler);\n        this.tech_.off('canplay', canPlayHandler);\n        this.tech_.off('play', playHandler);\n        this.tech_.off('seeking', this.watchForBadSeeking_);\n        this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n        loaderTypes.forEach(type => {\n          pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n          pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n          this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n        });\n        if (this.checkCurrentTimeTimeout_) {\n          window.clearTimeout(this.checkCurrentTimeTimeout_);\n        }\n        this.resetTimeUpdate_();\n      };\n    }\n    /**\n     * Periodically check current time to see if playback stopped\n     *\n     * @private\n     */\n\n    monitorCurrentTime_() {\n      this.checkCurrentTime_();\n      if (this.checkCurrentTimeTimeout_) {\n        window.clearTimeout(this.checkCurrentTimeTimeout_);\n      } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n      this.checkCurrentTimeTimeout_ = window.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n    }\n    /**\n     * Reset stalled download stats for a specific type of loader\n     *\n     * @param {string} type\n     *        The segment loader type to check.\n     *\n     * @listens SegmentLoader#playlistupdate\n     * @listens Tech#seeking\n     * @listens Tech#seeked\n     */\n\n    resetSegmentDownloads_(type) {\n      const loader = this.playlistController_[`${type}SegmentLoader_`];\n      if (this[`${type}StalledDownloads_`] > 0) {\n        this.logger_(`resetting possible stalled download count for ${type} loader`);\n      }\n      this[`${type}StalledDownloads_`] = 0;\n      this[`${type}Buffered_`] = loader.buffered_();\n    }\n    /**\n     * Checks on every segment `appendsdone` to see\n     * if segment appends are making progress. If they are not\n     * and we are still downloading bytes. We exclude the playlist.\n     *\n     * @param {string} type\n     *        The segment loader type to check.\n     *\n     * @listens SegmentLoader#appendsdone\n     */\n\n    checkSegmentDownloads_(type) {\n      const pc = this.playlistController_;\n      const loader = pc[`${type}SegmentLoader_`];\n      const buffered = loader.buffered_();\n      const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n      this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or\n      // the buffered value for this loader changed\n      // appends are working\n\n      if (isBufferedDifferent) {\n        const metadata = {\n          bufferedRanges: buffered\n        };\n        pc.trigger({\n          type: 'bufferedrangeschanged',\n          metadata\n        });\n        this.resetSegmentDownloads_(type);\n        return;\n      }\n      this[`${type}StalledDownloads_`]++;\n      this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, {\n        playlistId: loader.playlist_ && loader.playlist_.id,\n        buffered: timeRangesToArray(buffered)\n      }); // after 10 possibly stalled appends with no reset, exclude\n\n      if (this[`${type}StalledDownloads_`] < 10) {\n        return;\n      }\n      this.logger_(`${type} loader stalled download exclusion`);\n      this.resetSegmentDownloads_(type);\n      this.tech_.trigger({\n        type: 'usage',\n        name: `vhs-${type}-download-exclusion`\n      });\n      if (type === 'subtitle') {\n        return;\n      } // TODO: should we exclude audio tracks rather than main tracks\n      // when type is audio?\n\n      pc.excludePlaylist({\n        error: {\n          message: `Excessive ${type} segment downloading detected.`\n        },\n        playlistExclusionDuration: Infinity\n      });\n    }\n    /**\n     * The purpose of this function is to emulate the \"waiting\" event on\n     * browsers that do not emit it when they are waiting for more\n     * data to continue playback\n     *\n     * @private\n     */\n\n    checkCurrentTime_() {\n      if (this.tech_.paused() || this.tech_.seeking()) {\n        return;\n      }\n      const currentTime = this.tech_.currentTime();\n      const buffered = this.tech_.buffered();\n      if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n        // If current time is at the end of the final buffered region, then any playback\n        // stall is most likely caused by buffering in a low bandwidth environment. The tech\n        // should fire a `waiting` event in this scenario, but due to browser and tech\n        // inconsistencies. Calling `techWaiting_` here allows us to simulate\n        // responding to a native `waiting` event when the tech fails to emit one.\n        return this.techWaiting_();\n      }\n      if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n        this.consecutiveUpdates++;\n        this.waiting_();\n      } else if (currentTime === this.lastRecordedTime) {\n        this.consecutiveUpdates++;\n      } else {\n        this.playedRanges_.push(createTimeRanges([this.lastRecordedTime, currentTime]));\n        const metadata = {\n          playedRanges: this.playedRanges_\n        };\n        this.playlistController_.trigger({\n          type: 'playedrangeschanged',\n          metadata\n        });\n        this.consecutiveUpdates = 0;\n        this.lastRecordedTime = currentTime;\n      }\n    }\n    /**\n     * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n     *\n     * @private\n     */\n\n    resetTimeUpdate_() {\n      this.consecutiveUpdates = 0;\n    }\n    /**\n     * Fixes situations where there's a bad seek\n     *\n     * @return {boolean} whether an action was taken to fix the seek\n     * @private\n     */\n\n    fixesBadSeeks_() {\n      const seeking = this.tech_.seeking();\n      if (!seeking) {\n        return false;\n      } // TODO: It's possible that these seekable checks should be moved out of this function\n      // and into a function that runs on seekablechange. It's also possible that we only need\n      // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n      // seekable range.\n\n      const seekable = this.seekable();\n      const currentTime = this.tech_.currentTime();\n      const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n      let seekTo;\n      if (isAfterSeekableRange) {\n        const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n        seekTo = seekableEnd;\n      }\n      if (this.beforeSeekableWindow_(seekable, currentTime)) {\n        const seekableStart = seekable.start(0); // sync to the beginning of the live window\n        // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n        seekTo = seekableStart + (\n        // if the playlist is too short and the seekable range is an exact time (can\n        // happen in live with a 3 segment playlist), then don't use a time delta\n        seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n      }\n      if (typeof seekTo !== 'undefined') {\n        this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n        this.tech_.setCurrentTime(seekTo);\n        return true;\n      }\n      const sourceUpdater = this.playlistController_.sourceUpdater_;\n      const buffered = this.tech_.buffered();\n      const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n      const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n      const media = this.media(); // verify that at least two segment durations or one part duration have been\n      // appended before checking for a gap.\n\n      const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n      // appended before checking for a gap.\n\n      const bufferedToCheck = [audioBuffered, videoBuffered];\n      for (let i = 0; i < bufferedToCheck.length; i++) {\n        // skip null buffered\n        if (!bufferedToCheck[i]) {\n          continue;\n        }\n        const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n        // duration behind we haven't appended enough to call this a bad seek.\n\n        if (timeAhead < minAppendedDuration) {\n          return false;\n        }\n      }\n      const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n      // to seek over the gap\n\n      if (nextRange.length === 0) {\n        return false;\n      }\n      seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n      this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`);\n      this.tech_.setCurrentTime(seekTo);\n      return true;\n    }\n    /**\n     * Handler for situations when we determine the player is waiting.\n     *\n     * @private\n     */\n\n    waiting_() {\n      if (this.techWaiting_()) {\n        return;\n      } // All tech waiting checks failed. Use last resort correction\n\n      const currentTime = this.tech_.currentTime();\n      const buffered = this.tech_.buffered();\n      const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n      // region with no indication that anything is amiss (seen in Firefox). Seeking to\n      // currentTime is usually enough to kickstart the player. This checks that the player\n      // is currently within a buffered region before attempting a corrective seek.\n      // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n      // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n      // make sure there is ~3 seconds of forward buffer before taking any corrective action\n      // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n      if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n        this.resetTimeUpdate_();\n        this.tech_.setCurrentTime(currentTime);\n        this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-unknown-waiting'\n        });\n        return;\n      }\n    }\n    /**\n     * Handler for situations when the tech fires a `waiting` event\n     *\n     * @return {boolean}\n     *         True if an action (or none) was needed to correct the waiting. False if no\n     *         checks passed\n     * @private\n     */\n\n    techWaiting_() {\n      const seekable = this.seekable();\n      const currentTime = this.tech_.currentTime();\n      if (this.tech_.seeking()) {\n        // Tech is seeking or already waiting on another action, no action needed\n        return true;\n      }\n      if (this.beforeSeekableWindow_(seekable, currentTime)) {\n        const livePoint = seekable.end(seekable.length - 1);\n        this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`);\n        this.resetTimeUpdate_();\n        this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-live-resync'\n        });\n        return true;\n      }\n      const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n      const buffered = this.tech_.buffered();\n      const videoUnderflow = this.videoUnderflow_({\n        audioBuffered: sourceUpdater.audioBuffered(),\n        videoBuffered: sourceUpdater.videoBuffered(),\n        currentTime\n      });\n      if (videoUnderflow) {\n        // Even though the video underflowed and was stuck in a gap, the audio overplayed\n        // the gap, leading currentTime into a buffered range. Seeking to currentTime\n        // allows the video to catch up to the audio position without losing any audio\n        // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n        this.resetTimeUpdate_();\n        this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-video-underflow'\n        });\n        return true;\n      }\n      const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n      if (nextRange.length > 0) {\n        this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`);\n        this.resetTimeUpdate_();\n        this.skipTheGap_(currentTime);\n        return true;\n      } // All checks failed. Returning false to indicate failure to correct waiting\n\n      return false;\n    }\n    afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) {\n      if (!seekable.length) {\n        // we can't make a solid case if there's no seekable, default to false\n        return false;\n      }\n      let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n      const isLive = !playlist.endList;\n      const isLLHLS = typeof playlist.partTargetDuration === 'number';\n      if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n        allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n      }\n      if (currentTime > allowedEnd) {\n        return true;\n      }\n      return false;\n    }\n    beforeSeekableWindow_(seekable, currentTime) {\n      if (seekable.length &&\n      // can't fall before 0 and 0 seekable start identifies VOD stream\n      seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n        return true;\n      }\n      return false;\n    }\n    videoUnderflow_({\n      videoBuffered,\n      audioBuffered,\n      currentTime\n    }) {\n      // audio only content will not have video underflow :)\n      if (!videoBuffered) {\n        return;\n      }\n      let gap; // find a gap in demuxed content.\n\n      if (videoBuffered.length && audioBuffered.length) {\n        // in Chrome audio will continue to play for ~3s when we run out of video\n        // so we have to check that the video buffer did have some buffer in the\n        // past.\n        const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n        const videoRange = findRange(videoBuffered, currentTime);\n        const audioRange = findRange(audioBuffered, currentTime);\n        if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n          gap = {\n            start: lastVideoRange.end(0),\n            end: audioRange.end(0)\n          };\n        } // find a gap in muxed content.\n      } else {\n        const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n        // stuck in a gap due to video underflow.\n\n        if (!nextRange.length) {\n          gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n        }\n      }\n      if (gap) {\n        this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n        return true;\n      }\n      return false;\n    }\n    /**\n     * Timer callback. If playback still has not proceeded, then we seek\n     * to the start of the next buffered region.\n     *\n     * @private\n     */\n\n    skipTheGap_(scheduledCurrentTime) {\n      const buffered = this.tech_.buffered();\n      const currentTime = this.tech_.currentTime();\n      const nextRange = findNextRange(buffered, currentTime);\n      this.resetTimeUpdate_();\n      if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n        return;\n      }\n      this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n      this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n      const metadata = {\n        gapInfo: {\n          from: currentTime,\n          to: nextRange.start(0)\n        }\n      };\n      this.playlistController_.trigger({\n        type: 'gapjumped',\n        metadata\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-gap-skip'\n      });\n    }\n    gapFromVideoUnderflow_(buffered, currentTime) {\n      // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n      // playing for ~3 seconds after the video gap starts. This is done to account for\n      // video buffer underflow/underrun (note that this is not done when there is audio\n      // buffer underflow/underrun -- in that case the video will stop as soon as it\n      // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n      // video stalls). The player's time will reflect the playthrough of audio, so the\n      // time will appear as if we are in a buffered region, even if we are stuck in a\n      // \"gap.\"\n      //\n      // Example:\n      // video buffer:   0 => 10.1, 10.2 => 20\n      // audio buffer:   0 => 20\n      // overall buffer: 0 => 10.1, 10.2 => 20\n      // current time: 13\n      //\n      // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n      // however, the audio continued playing until it reached ~3 seconds past the gap\n      // (13 seconds), at which point it stops as well. Since current time is past the\n      // gap, findNextRange will return no ranges.\n      //\n      // To check for this issue, we see if there is a gap that starts somewhere within\n      // a 3 second range (3 seconds +/- 1 second) back from our current time.\n      const gaps = findGaps(buffered);\n      for (let i = 0; i < gaps.length; i++) {\n        const start = gaps.start(i);\n        const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n        if (currentTime - start < 4 && currentTime - start > 2) {\n          return {\n            start,\n            end\n          };\n        }\n      }\n      return null;\n    }\n  }\n  const defaultOptions = {\n    errorInterval: 30,\n    getSource(next) {\n      const tech = this.tech({\n        IWillNotUseThisInPlugins: true\n      });\n      const sourceObj = tech.currentSource_ || this.currentSource();\n      return next(sourceObj);\n    }\n  };\n  /**\n   * Main entry point for the plugin\n   *\n   * @param {Player} player a reference to a videojs Player instance\n   * @param {Object} [options] an object with plugin options\n   * @private\n   */\n\n  const initPlugin = function (player, options) {\n    let lastCalled = 0;\n    let seekTo = 0;\n    const localOptions = merge(defaultOptions, options);\n    player.ready(() => {\n      player.trigger({\n        type: 'usage',\n        name: 'vhs-error-reload-initialized'\n      });\n    });\n    /**\n     * Player modifications to perform that must wait until `loadedmetadata`\n     * has been triggered\n     *\n     * @private\n     */\n\n    const loadedMetadataHandler = function () {\n      if (seekTo) {\n        player.currentTime(seekTo);\n      }\n    };\n    /**\n     * Set the source on the player element, play, and seek if necessary\n     *\n     * @param {Object} sourceObj An object specifying the source url and mime-type to play\n     * @private\n     */\n\n    const setSource = function (sourceObj) {\n      if (sourceObj === null || sourceObj === undefined) {\n        return;\n      }\n      seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n      player.one('loadedmetadata', loadedMetadataHandler);\n      player.src(sourceObj);\n      player.trigger({\n        type: 'usage',\n        name: 'vhs-error-reload'\n      });\n      player.play();\n    };\n    /**\n     * Attempt to get a source from either the built-in getSource function\n     * or a custom function provided via the options\n     *\n     * @private\n     */\n\n    const errorHandler = function () {\n      // Do not attempt to reload the source if a source-reload occurred before\n      // 'errorInterval' time has elapsed since the last source-reload\n      if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n        player.trigger({\n          type: 'usage',\n          name: 'vhs-error-reload-canceled'\n        });\n        return;\n      }\n      if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n        videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n        return;\n      }\n      lastCalled = Date.now();\n      return localOptions.getSource.call(player, setSource);\n    };\n    /**\n     * Unbind any event handlers that were bound by the plugin\n     *\n     * @private\n     */\n\n    const cleanupEvents = function () {\n      player.off('loadedmetadata', loadedMetadataHandler);\n      player.off('error', errorHandler);\n      player.off('dispose', cleanupEvents);\n    };\n    /**\n     * Cleanup before re-initializing the plugin\n     *\n     * @param {Object} [newOptions] an object with plugin options\n     * @private\n     */\n\n    const reinitPlugin = function (newOptions) {\n      cleanupEvents();\n      initPlugin(player, newOptions);\n    };\n    player.on('error', errorHandler);\n    player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n    // initializing the plugin\n\n    player.reloadSourceOnError = reinitPlugin;\n  };\n  /**\n   * Reload the source when an error is detected as long as there\n   * wasn't an error previously within the last 30 seconds\n   *\n   * @param {Object} [options] an object with plugin options\n   */\n\n  const reloadSourceOnError = function (options) {\n    initPlugin(this, options);\n  };\n  var version$4 = \"3.17.0\";\n  var version$3 = \"7.1.0\";\n  var version$2 = \"1.3.1\";\n  var version$1 = \"7.2.0\";\n  var version = \"4.0.2\";\n  const Vhs = {\n    PlaylistLoader,\n    Playlist,\n    utils,\n    STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n    INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n    lastBandwidthSelector,\n    movingAverageBandwidthSelector,\n    comparePlaylistBandwidth,\n    comparePlaylistResolution,\n    xhr: xhrFactory()\n  }; // Define getter/setters for config properties\n\n  Object.keys(Config).forEach(prop => {\n    Object.defineProperty(Vhs, prop, {\n      get() {\n        videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n        return Config[prop];\n      },\n      set(value) {\n        videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n        if (typeof value !== 'number' || value < 0) {\n          videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n          return;\n        }\n        Config[prop] = value;\n      }\n    });\n  });\n  const LOCAL_STORAGE_KEY = 'videojs-vhs';\n  /**\n   * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n   *\n   * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n   * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n   * @function handleVhsMediaChange\n   */\n\n  const handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n    const newPlaylist = playlistLoader.media();\n    let selectedIndex = -1;\n    for (let i = 0; i < qualityLevels.length; i++) {\n      if (qualityLevels[i].id === newPlaylist.id) {\n        selectedIndex = i;\n        break;\n      }\n    }\n    qualityLevels.selectedIndex_ = selectedIndex;\n    qualityLevels.trigger({\n      selectedIndex,\n      type: 'change'\n    });\n  };\n  /**\n   * Adds quality levels to list once playlist metadata is available\n   *\n   * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n   * @param {Object} vhs Vhs object to listen to for media events.\n   * @function handleVhsLoadedMetadata\n   */\n\n  const handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n    vhs.representations().forEach(rep => {\n      qualityLevels.addQualityLevel(rep);\n    });\n    handleVhsMediaChange(qualityLevels, vhs.playlists);\n  }; // VHS is a source handler, not a tech. Make sure attempts to use it\n  // as one do not cause exceptions.\n\n  Vhs.canPlaySource = function () {\n    return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n  };\n  const emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n    if (!keySystemOptions) {\n      return keySystemOptions;\n    }\n    let codecs = {};\n    if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n      codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n    }\n    if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n      codecs.audio = audioPlaylist.attributes.CODECS;\n    }\n    const videoContentType = getMimeForCodec(codecs.video);\n    const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n    const keySystemContentTypes = {};\n    for (const keySystem in keySystemOptions) {\n      keySystemContentTypes[keySystem] = {};\n      if (audioContentType) {\n        keySystemContentTypes[keySystem].audioContentType = audioContentType;\n      }\n      if (videoContentType) {\n        keySystemContentTypes[keySystem].videoContentType = videoContentType;\n      } // Default to using the video playlist's PSSH even though they may be different, as\n      // videojs-contrib-eme will only accept one in the options.\n      //\n      // This shouldn't be an issue for most cases as early intialization will handle all\n      // unique PSSH values, and if they aren't, then encrypted events should have the\n      // specific information needed for the unique license.\n\n      if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n        keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n      } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n      // so we need to prevent overwriting the URL entirely\n\n      if (typeof keySystemOptions[keySystem] === 'string') {\n        keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n      }\n    }\n    return merge(keySystemOptions, keySystemContentTypes);\n  };\n  /**\n   * @typedef {Object} KeySystems\n   *\n   * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n   * Note: not all options are listed here.\n   *\n   * @property {Uint8Array} [pssh]\n   *           Protection System Specific Header\n   */\n\n  /**\n   * Goes through all the playlists and collects an array of KeySystems options objects\n   * containing each playlist's keySystems and their pssh values, if available.\n   *\n   * @param {Object[]} playlists\n   *        The playlists to look through\n   * @param {string[]} keySystems\n   *        The keySystems to collect pssh values for\n   *\n   * @return {KeySystems[]}\n   *         An array of KeySystems objects containing available key systems and their\n   *         pssh values\n   */\n\n  const getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n    return playlists.reduce((keySystemsArr, playlist) => {\n      if (!playlist.contentProtection) {\n        return keySystemsArr;\n      }\n      const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n        const keySystemOptions = playlist.contentProtection[keySystem];\n        if (keySystemOptions && keySystemOptions.pssh) {\n          keySystemsObj[keySystem] = {\n            pssh: keySystemOptions.pssh\n          };\n        }\n        return keySystemsObj;\n      }, {});\n      if (Object.keys(keySystemsOptions).length) {\n        keySystemsArr.push(keySystemsOptions);\n      }\n      return keySystemsArr;\n    }, []);\n  };\n  /**\n   * Returns a promise that waits for the\n   * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n   *\n   * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n   * browsers.\n   *\n   * As per the above ticket, this is particularly important for Chrome, where, if\n   * unencrypted content is appended before encrypted content and the key session has not\n   * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n   * during playback.\n   *\n   * @param {Object} player\n   *        The player instance\n   * @param {Object[]} sourceKeySystems\n   *        The key systems options from the player source\n   * @param {Object} [audioMedia]\n   *        The active audio media playlist (optional)\n   * @param {Object[]} mainPlaylists\n   *        The playlists found on the main playlist object\n   *\n   * @return {Object}\n   *         Promise that resolves when the key session has been created\n   */\n\n  const waitForKeySessionCreation = ({\n    player,\n    sourceKeySystems,\n    audioMedia,\n    mainPlaylists\n  }) => {\n    if (!player.eme.initializeMediaKeys) {\n      return Promise.resolve();\n    } // TODO should all audio PSSH values be initialized for DRM?\n    //\n    // All unique video rendition pssh values are initialized for DRM, but here only\n    // the initial audio playlist license is initialized. In theory, an encrypted\n    // event should be fired if the user switches to an alternative audio playlist\n    // where a license is required, but this case hasn't yet been tested. In addition, there\n    // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n    // languages).\n\n    const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n    const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n    const initializationFinishedPromises = [];\n    const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n    // only place where it should not be deduped is for ms-prefixed APIs, but\n    // the existence of modern EME APIs in addition to\n    // ms-prefixed APIs on Edge should prevent this from being a concern.\n    // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n    keySystemsOptionsArr.forEach(keySystemsOptions => {\n      keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n        player.tech_.one('keysessioncreated', resolve);\n      }));\n      initializationFinishedPromises.push(new Promise((resolve, reject) => {\n        player.eme.initializeMediaKeys({\n          keySystems: keySystemsOptions\n        }, err => {\n          if (err) {\n            reject(err);\n            return;\n          }\n          resolve();\n        });\n      }));\n    }); // The reasons Promise.race is chosen over Promise.any:\n    //\n    // * Promise.any is only available in Safari 14+.\n    // * None of these promises are expected to reject. If they do reject, it might be\n    //   better here for the race to surface the rejection, rather than mask it by using\n    //   Promise.any.\n\n    return Promise.race([\n    // If a session was previously created, these will all finish resolving without\n    // creating a new session, otherwise it will take until the end of all license\n    // requests, which is why the key session check is used (to make setup much faster).\n    Promise.all(initializationFinishedPromises),\n    // Once a single session is created, the browser knows DRM will be used.\n    Promise.race(keySessionCreatedPromises)]);\n  };\n  /**\n   * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n   * there are keySystems on the source, sets up source options to prepare the source for\n   * eme.\n   *\n   * @param {Object} player\n   *        The player instance\n   * @param {Object[]} sourceKeySystems\n   *        The key systems options from the player source\n   * @param {Object} media\n   *        The active media playlist\n   * @param {Object} [audioMedia]\n   *        The active audio media playlist (optional)\n   *\n   * @return {boolean}\n   *         Whether or not options were configured and EME is available\n   */\n\n  const setupEmeOptions = ({\n    player,\n    sourceKeySystems,\n    media,\n    audioMedia\n  }) => {\n    const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n    if (!sourceOptions) {\n      return false;\n    }\n    player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n    // do nothing.\n\n    if (sourceOptions && !player.eme) {\n      videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n      return false;\n    }\n    return true;\n  };\n  const getVhsLocalStorage = () => {\n    if (!window.localStorage) {\n      return null;\n    }\n    const storedObject = window.localStorage.getItem(LOCAL_STORAGE_KEY);\n    if (!storedObject) {\n      return null;\n    }\n    try {\n      return JSON.parse(storedObject);\n    } catch (e) {\n      // someone may have tampered with the value\n      return null;\n    }\n  };\n  const updateVhsLocalStorage = options => {\n    if (!window.localStorage) {\n      return false;\n    }\n    let objectToStore = getVhsLocalStorage();\n    objectToStore = objectToStore ? merge(objectToStore, options) : options;\n    try {\n      window.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n    } catch (e) {\n      // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n      // storage is set to 0).\n      // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n      // No need to perform any operation.\n      return false;\n    }\n    return objectToStore;\n  };\n  /**\n   * Parses VHS-supported media types from data URIs. See\n   * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n   * for information on data URIs.\n   *\n   * @param {string} dataUri\n   *        The data URI\n   *\n   * @return {string|Object}\n   *         The parsed object/string, or the original string if no supported media type\n   *         was found\n   */\n\n  const expandDataUri = dataUri => {\n    if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n      return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n    } // no known case for this data URI, return the string as-is\n\n    return dataUri;\n  };\n  /**\n   * Adds a request hook to an xhr object\n   *\n   * @param {Object} xhr object to add the onRequest hook to\n   * @param {function} callback hook function for an xhr request\n   */\n\n  const addOnRequestHook = (xhr, callback) => {\n    if (!xhr._requestCallbackSet) {\n      xhr._requestCallbackSet = new Set();\n    }\n    xhr._requestCallbackSet.add(callback);\n  };\n  /**\n   * Adds a response hook to an xhr object\n   *\n   * @param {Object} xhr object to add the onResponse hook to\n   * @param {function} callback hook function for an xhr response\n   */\n\n  const addOnResponseHook = (xhr, callback) => {\n    if (!xhr._responseCallbackSet) {\n      xhr._responseCallbackSet = new Set();\n    }\n    xhr._responseCallbackSet.add(callback);\n  };\n  /**\n   * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n   *\n   * @param {Object} xhr object to remove the onRequest hook from\n   * @param {function} callback hook function to remove\n   */\n\n  const removeOnRequestHook = (xhr, callback) => {\n    if (!xhr._requestCallbackSet) {\n      return;\n    }\n    xhr._requestCallbackSet.delete(callback);\n    if (!xhr._requestCallbackSet.size) {\n      delete xhr._requestCallbackSet;\n    }\n  };\n  /**\n   * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n   *\n   * @param {Object} xhr object to remove the onResponse hook from\n   * @param {function} callback hook function to remove\n   */\n\n  const removeOnResponseHook = (xhr, callback) => {\n    if (!xhr._responseCallbackSet) {\n      return;\n    }\n    xhr._responseCallbackSet.delete(callback);\n    if (!xhr._responseCallbackSet.size) {\n      delete xhr._responseCallbackSet;\n    }\n  };\n  /**\n   * Whether the browser has built-in HLS support.\n   */\n\n  Vhs.supportsNativeHls = function () {\n    if (!document || !document.createElement) {\n      return false;\n    }\n    const video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n    if (!videojs.getTech('Html5').isSupported()) {\n      return false;\n    } // HLS manifests can go by many mime-types\n\n    const canPlay = [\n    // Apple santioned\n    'application/vnd.apple.mpegurl',\n    // Apple sanctioned for backwards compatibility\n    'audio/mpegurl',\n    // Very common\n    'audio/x-mpegurl',\n    // Very common\n    'application/x-mpegurl',\n    // Included for completeness\n    'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n    return canPlay.some(function (canItPlay) {\n      return /maybe|probably/i.test(video.canPlayType(canItPlay));\n    });\n  }();\n  Vhs.supportsNativeDash = function () {\n    if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n      return false;\n    }\n    return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n  }();\n  Vhs.supportsTypeNatively = type => {\n    if (type === 'hls') {\n      return Vhs.supportsNativeHls;\n    }\n    if (type === 'dash') {\n      return Vhs.supportsNativeDash;\n    }\n    return false;\n  };\n  /**\n   * VHS is a source handler, not a tech. Make sure attempts to use it\n   * as one do not cause exceptions.\n   */\n\n  Vhs.isSupported = function () {\n    return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n  };\n  /**\n   * A global function for setting an onRequest hook\n   *\n   * @param {function} callback for request modifiction\n   */\n\n  Vhs.xhr.onRequest = function (callback) {\n    addOnRequestHook(Vhs.xhr, callback);\n  };\n  /**\n   * A global function for setting an onResponse hook\n   *\n   * @param {callback} callback for response data retrieval\n   */\n\n  Vhs.xhr.onResponse = function (callback) {\n    addOnResponseHook(Vhs.xhr, callback);\n  };\n  /**\n   * Deletes a global onRequest callback if it exists\n   *\n   * @param {function} callback to delete from the global set\n   */\n\n  Vhs.xhr.offRequest = function (callback) {\n    removeOnRequestHook(Vhs.xhr, callback);\n  };\n  /**\n   * Deletes a global onResponse callback if it exists\n   *\n   * @param {function} callback to delete from the global set\n   */\n\n  Vhs.xhr.offResponse = function (callback) {\n    removeOnResponseHook(Vhs.xhr, callback);\n  };\n  const Component = videojs.getComponent('Component');\n  /**\n   * The Vhs Handler object, where we orchestrate all of the parts\n   * of VHS to interact with video.js\n   *\n   * @class VhsHandler\n   * @extends videojs.Component\n   * @param {Object} source the soruce object\n   * @param {Tech} tech the parent tech object\n   * @param {Object} options optional and required options\n   */\n\n  class VhsHandler extends Component {\n    constructor(source, tech, options) {\n      super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n      // use that over the VHS level `bandwidth` option\n\n      if (typeof options.initialBandwidth === 'number') {\n        this.options_.bandwidth = options.initialBandwidth;\n      }\n      this.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n      // so, get it from Video.js via the `playerId`\n\n      if (tech.options_ && tech.options_.playerId) {\n        const _player = videojs.getPlayer(tech.options_.playerId);\n        this.player_ = _player;\n      }\n      this.tech_ = tech;\n      this.source_ = source;\n      this.stats = {};\n      this.ignoreNextSeekingEvent_ = false;\n      this.setOptions_();\n      if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n        tech.overrideNativeAudioTracks(true);\n        tech.overrideNativeVideoTracks(true);\n      } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n        // overriding native VHS only works if audio tracks have been emulated\n        // error early if we're misconfigured\n        throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n      } // listen for fullscreenchange events for this player so that we\n      // can adjust our quality selection quickly\n\n      this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n        const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n        if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n          this.playlistController_.fastQualityChange_();\n        } else {\n          // When leaving fullscreen, since the in page pixel dimensions should be smaller\n          // than full screen, see if there should be a rendition switch down to preserve\n          // bandwidth.\n          this.playlistController_.checkABR_();\n        }\n      });\n      this.on(this.tech_, 'seeking', function () {\n        if (this.ignoreNextSeekingEvent_) {\n          this.ignoreNextSeekingEvent_ = false;\n          return;\n        }\n        this.setCurrentTime(this.tech_.currentTime());\n      });\n      this.on(this.tech_, 'error', function () {\n        // verify that the error was real and we are loaded\n        // enough to have pc loaded.\n        if (this.tech_.error() && this.playlistController_) {\n          this.playlistController_.pauseLoading();\n        }\n      });\n      this.on(this.tech_, 'play', this.play);\n    }\n    /**\n     * Set VHS options based on options from configuration, as well as partial\n     * options to be passed at a later time.\n     *\n     * @param {Object} options A partial chunk of config options\n     */\n\n    setOptions_(options = {}) {\n      this.options_ = merge(this.options_, options); // defaults\n\n      this.options_.withCredentials = this.options_.withCredentials || false;\n      this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n      this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n      this.options_.usePlayerObjectFit = this.options_.usePlayerObjectFit || false;\n      this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n      this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n      this.options_.useNetworkInformationApi = typeof this.options_.useNetworkInformationApi !== 'undefined' ? this.options_.useNetworkInformationApi : true;\n      this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n      this.options_.customTagParsers = this.options_.customTagParsers || [];\n      this.options_.customTagMappers = this.options_.customTagMappers || [];\n      this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n      this.options_.llhls = this.options_.llhls === false ? false : true;\n      this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n      if (typeof this.options_.playlistExclusionDuration !== 'number') {\n        this.options_.playlistExclusionDuration = 60;\n      }\n      if (typeof this.options_.bandwidth !== 'number') {\n        if (this.options_.useBandwidthFromLocalStorage) {\n          const storedObject = getVhsLocalStorage();\n          if (storedObject && storedObject.bandwidth) {\n            this.options_.bandwidth = storedObject.bandwidth;\n            this.tech_.trigger({\n              type: 'usage',\n              name: 'vhs-bandwidth-from-local-storage'\n            });\n          }\n          if (storedObject && storedObject.throughput) {\n            this.options_.throughput = storedObject.throughput;\n            this.tech_.trigger({\n              type: 'usage',\n              name: 'vhs-throughput-from-local-storage'\n            });\n          }\n        }\n      } // if bandwidth was not set by options or pulled from local storage, start playlist\n      // selection at a reasonable bandwidth\n\n      if (typeof this.options_.bandwidth !== 'number') {\n        this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n      } // If the bandwidth number is unchanged from the initial setting\n      // then this takes precedence over the enableLowInitialPlaylist option\n\n      this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n      ['withCredentials', 'useDevicePixelRatio', 'usePlayerObjectFit', 'customPixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n        if (typeof this.source_[option] !== 'undefined') {\n          this.options_[option] = this.source_[option];\n        }\n      });\n      this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n      this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n      this.usePlayerObjectFit = this.options_.usePlayerObjectFit;\n      const customPixelRatio = this.options_.customPixelRatio; // Ensure the custom pixel ratio is a number greater than or equal to 0\n\n      if (typeof customPixelRatio === 'number' && customPixelRatio >= 0) {\n        this.customPixelRatio = customPixelRatio;\n      }\n    } // alias for public method to set options\n\n    setOptions(options = {}) {\n      this.setOptions_(options);\n    }\n    /**\n     * called when player.src gets called, handle a new source\n     *\n     * @param {Object} src the source object to handle\n     */\n\n    src(src, type) {\n      // do nothing if the src is falsey\n      if (!src) {\n        return;\n      }\n      this.setOptions_(); // add main playlist controller options\n\n      this.options_.src = expandDataUri(this.source_.src);\n      this.options_.tech = this.tech_;\n      this.options_.externVhs = Vhs;\n      this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n      this.options_.seekTo = time => {\n        this.tech_.setCurrentTime(time);\n      }; // pass player to allow for player level eventing on construction.\n\n      this.options_.player_ = this.player_;\n      this.playlistController_ = new PlaylistController(this.options_);\n      const playbackWatcherOptions = merge({\n        liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n      }, this.options_, {\n        seekable: () => this.seekable(),\n        media: () => this.playlistController_.media(),\n        playlistController: this.playlistController_\n      });\n      this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n      this.attachStreamingEventListeners_();\n      this.playlistController_.on('error', () => {\n        const player = videojs.players[this.tech_.options_.playerId];\n        let error = this.playlistController_.error;\n        if (typeof error === 'object' && !error.code) {\n          error.code = 3;\n        } else if (typeof error === 'string') {\n          error = {\n            message: error,\n            code: 3\n          };\n        }\n        player.error(error);\n      });\n      const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n      // compatibility with < v2\n\n      this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n      this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n      this.playlists = this.playlistController_.mainPlaylistLoader_;\n      this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n      // controller. Using a custom property for backwards compatibility\n      // with < v2\n\n      Object.defineProperties(this, {\n        selectPlaylist: {\n          get() {\n            return this.playlistController_.selectPlaylist;\n          },\n          set(selectPlaylist) {\n            this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n          }\n        },\n        throughput: {\n          get() {\n            return this.playlistController_.mainSegmentLoader_.throughput.rate;\n          },\n          set(throughput) {\n            this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n            // for the cumulative average\n\n            this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n          }\n        },\n        bandwidth: {\n          get() {\n            let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n            const networkInformation = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;\n            const tenMbpsAsBitsPerSecond = 10e6;\n            if (this.options_.useNetworkInformationApi && networkInformation) {\n              // downlink returns Mbps\n              // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n              const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n              // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n              // high quality streams are not filtered out.\n\n              if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n                playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n              } else {\n                playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n              }\n            }\n            return playerBandwidthEst;\n          },\n          set(bandwidth) {\n            this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n            // `count` is set to zero that current value of `rate` isn't included\n            // in the cumulative average\n\n            this.playlistController_.mainSegmentLoader_.throughput = {\n              rate: 0,\n              count: 0\n            };\n          }\n        },\n        /**\n         * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n         * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n         * the entire process after that - decryption, transmuxing, and appending - provided\n         * by `throughput`.\n         *\n         * Since the two process are serial, the overall system bandwidth is given by:\n         *   sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n         */\n        systemBandwidth: {\n          get() {\n            const invBandwidth = 1 / (this.bandwidth || 1);\n            let invThroughput;\n            if (this.throughput > 0) {\n              invThroughput = 1 / this.throughput;\n            } else {\n              invThroughput = 0;\n            }\n            const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n            return systemBitrate;\n          },\n          set() {\n            videojs.log.error('The \"systemBandwidth\" property is read-only');\n          }\n        }\n      });\n      if (this.options_.bandwidth) {\n        this.bandwidth = this.options_.bandwidth;\n      }\n      if (this.options_.throughput) {\n        this.throughput = this.options_.throughput;\n      }\n      Object.defineProperties(this.stats, {\n        bandwidth: {\n          get: () => this.bandwidth || 0,\n          enumerable: true\n        },\n        mediaRequests: {\n          get: () => this.playlistController_.mediaRequests_() || 0,\n          enumerable: true\n        },\n        mediaRequestsAborted: {\n          get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n          enumerable: true\n        },\n        mediaRequestsTimedout: {\n          get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n          enumerable: true\n        },\n        mediaRequestsErrored: {\n          get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n          enumerable: true\n        },\n        mediaTransferDuration: {\n          get: () => this.playlistController_.mediaTransferDuration_() || 0,\n          enumerable: true\n        },\n        mediaBytesTransferred: {\n          get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n          enumerable: true\n        },\n        mediaSecondsLoaded: {\n          get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n          enumerable: true\n        },\n        mediaAppends: {\n          get: () => this.playlistController_.mediaAppends_() || 0,\n          enumerable: true\n        },\n        mainAppendsToLoadedData: {\n          get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n          enumerable: true\n        },\n        audioAppendsToLoadedData: {\n          get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n          enumerable: true\n        },\n        appendsToLoadedData: {\n          get: () => this.playlistController_.appendsToLoadedData_() || 0,\n          enumerable: true\n        },\n        timeToLoadedData: {\n          get: () => this.playlistController_.timeToLoadedData_() || 0,\n          enumerable: true\n        },\n        buffered: {\n          get: () => timeRangesToArray(this.tech_.buffered()),\n          enumerable: true\n        },\n        currentTime: {\n          get: () => this.tech_.currentTime(),\n          enumerable: true\n        },\n        currentSource: {\n          get: () => this.tech_.currentSource_,\n          enumerable: true\n        },\n        currentTech: {\n          get: () => this.tech_.name_,\n          enumerable: true\n        },\n        duration: {\n          get: () => this.tech_.duration(),\n          enumerable: true\n        },\n        main: {\n          get: () => this.playlists.main,\n          enumerable: true\n        },\n        playerDimensions: {\n          get: () => this.tech_.currentDimensions(),\n          enumerable: true\n        },\n        seekable: {\n          get: () => timeRangesToArray(this.tech_.seekable()),\n          enumerable: true\n        },\n        timestamp: {\n          get: () => Date.now(),\n          enumerable: true\n        },\n        videoPlaybackQuality: {\n          get: () => this.tech_.getVideoPlaybackQuality(),\n          enumerable: true\n        }\n      });\n      this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n      this.tech_.on('bandwidthupdate', () => {\n        if (this.options_.useBandwidthFromLocalStorage) {\n          updateVhsLocalStorage({\n            bandwidth: this.bandwidth,\n            throughput: Math.round(this.throughput)\n          });\n        }\n      });\n      this.playlistController_.on('selectedinitialmedia', () => {\n        // Add the manual rendition mix-in to VhsHandler\n        renditionSelectionMixin(this);\n      });\n      this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n        this.setupEme_();\n      }); // the bandwidth of the primary segment loader is our best\n      // estimate of overall bandwidth\n\n      this.on(this.playlistController_, 'progress', function () {\n        this.tech_.trigger('progress');\n      }); // In the live case, we need to ignore the very first `seeking` event since\n      // that will be the result of the seek-to-live behavior\n\n      this.on(this.playlistController_, 'firstplay', function () {\n        this.ignoreNextSeekingEvent_ = true;\n      });\n      this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n      // this can occur if someone sets the src in player.ready(), for instance\n\n      if (!this.tech_.el()) {\n        return;\n      }\n      this.mediaSourceUrl_ = window.URL.createObjectURL(this.playlistController_.mediaSource); // If we are playing HLS with MSE in Safari, add source elements for both the blob and manifest URLs.\n      // The latter will enable Airplay playback on receiver devices.\n\n      if ((videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS) && this.options_.overrideNative && this.options_.sourceType === 'hls' && typeof this.tech_.addSourceElement === 'function') {\n        this.tech_.addSourceElement(this.mediaSourceUrl_);\n        this.tech_.addSourceElement(this.source_.src);\n      } else {\n        this.tech_.src(this.mediaSourceUrl_);\n      }\n    }\n    createKeySessions_() {\n      const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n      this.logger_('waiting for EME key session creation');\n      waitForKeySessionCreation({\n        player: this.player_,\n        sourceKeySystems: this.source_.keySystems,\n        audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n        mainPlaylists: this.playlists.main.playlists\n      }).then(() => {\n        this.logger_('created EME key session');\n        this.playlistController_.sourceUpdater_.initializedEme();\n      }).catch(err => {\n        this.logger_('error while creating EME key session', err);\n        this.player_.error({\n          message: 'Failed to initialize media keys for EME',\n          code: 3\n        });\n      });\n    }\n    handleWaitingForKey_() {\n      // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n      // the key is in the manifest. While this should've happened on initial source load, it\n      // may happen again in live streams where the keys change, and the manifest info\n      // reflects the update.\n      //\n      // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n      // already requested keys for, we don't have to worry about this generating extraneous\n      // requests.\n      this.logger_('waitingforkey fired, attempting to create any new key sessions');\n      this.createKeySessions_();\n    }\n    /**\n     * If necessary and EME is available, sets up EME options and waits for key session\n     * creation.\n     *\n     * This function also updates the source updater so taht it can be used, as for some\n     * browsers, EME must be configured before content is appended (if appending unencrypted\n     * content before encrypted content).\n     */\n\n    setupEme_() {\n      const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n      const didSetupEmeOptions = setupEmeOptions({\n        player: this.player_,\n        sourceKeySystems: this.source_.keySystems,\n        media: this.playlists.media(),\n        audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n      });\n      this.player_.tech_.on('keystatuschange', e => {\n        this.playlistController_.updatePlaylistByKeyStatus(e.keyId, e.status);\n      });\n      this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n      this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n      if (!didSetupEmeOptions) {\n        // If EME options were not set up, we've done all we could to initialize EME.\n        this.playlistController_.sourceUpdater_.initializedEme();\n        return;\n      }\n      this.createKeySessions_();\n    }\n    /**\n     * Initializes the quality levels and sets listeners to update them.\n     *\n     * @method setupQualityLevels_\n     * @private\n     */\n\n    setupQualityLevels_() {\n      const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n      // or qualityLevels_ listeners have already been setup, do nothing.\n\n      if (!player || !player.qualityLevels || this.qualityLevels_) {\n        return;\n      }\n      this.qualityLevels_ = player.qualityLevels();\n      this.playlistController_.on('selectedinitialmedia', () => {\n        handleVhsLoadedMetadata(this.qualityLevels_, this);\n      });\n      this.playlists.on('mediachange', () => {\n        handleVhsMediaChange(this.qualityLevels_, this.playlists);\n      });\n    }\n    /**\n     * return the version\n     */\n\n    static version() {\n      return {\n        '@videojs/http-streaming': version$4,\n        'mux.js': version$3,\n        'mpd-parser': version$2,\n        'm3u8-parser': version$1,\n        'aes-decrypter': version\n      };\n    }\n    /**\n     * return the version\n     */\n\n    version() {\n      return this.constructor.version();\n    }\n    canChangeType() {\n      return SourceUpdater.canChangeType();\n    }\n    /**\n     * Begin playing the video.\n     */\n\n    play() {\n      this.playlistController_.play();\n    }\n    /**\n     * a wrapper around the function in PlaylistController\n     */\n\n    setCurrentTime(currentTime) {\n      this.playlistController_.setCurrentTime(currentTime);\n    }\n    /**\n     * a wrapper around the function in PlaylistController\n     */\n\n    duration() {\n      return this.playlistController_.duration();\n    }\n    /**\n     * a wrapper around the function in PlaylistController\n     */\n\n    seekable() {\n      return this.playlistController_.seekable();\n    }\n    /**\n     * Abort all outstanding work and cleanup.\n     */\n\n    dispose() {\n      if (this.playbackWatcher_) {\n        this.playbackWatcher_.dispose();\n      }\n      if (this.playlistController_) {\n        this.playlistController_.dispose();\n      }\n      if (this.qualityLevels_) {\n        this.qualityLevels_.dispose();\n      }\n      if (this.tech_ && this.tech_.vhs) {\n        delete this.tech_.vhs;\n      }\n      if (this.mediaSourceUrl_ && window.URL.revokeObjectURL) {\n        window.URL.revokeObjectURL(this.mediaSourceUrl_);\n        this.mediaSourceUrl_ = null;\n      }\n      if (this.tech_) {\n        this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n      }\n      super.dispose();\n    }\n    convertToProgramTime(time, callback) {\n      return getProgramTime({\n        playlist: this.playlistController_.media(),\n        time,\n        callback\n      });\n    } // the player must be playing before calling this\n\n    seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n      return seekToProgramTime({\n        programTime,\n        playlist: this.playlistController_.media(),\n        retryCount,\n        pauseAfterSeek,\n        seekTo: this.options_.seekTo,\n        tech: this.options_.tech,\n        callback\n      });\n    }\n    /**\n     * Adds the onRequest, onResponse, offRequest and offResponse functions\n     * to the VhsHandler xhr Object.\n     */\n\n    setupXhrHooks_() {\n      /**\n       * A player function for setting an onRequest hook\n       *\n       * @param {function} callback for request modifiction\n       */\n      this.xhr.onRequest = callback => {\n        addOnRequestHook(this.xhr, callback);\n      };\n      /**\n       * A player function for setting an onResponse hook\n       *\n       * @param {callback} callback for response data retrieval\n       */\n\n      this.xhr.onResponse = callback => {\n        addOnResponseHook(this.xhr, callback);\n      };\n      /**\n       * Deletes a player onRequest callback if it exists\n       *\n       * @param {function} callback to delete from the player set\n       */\n\n      this.xhr.offRequest = callback => {\n        removeOnRequestHook(this.xhr, callback);\n      };\n      /**\n       * Deletes a player onResponse callback if it exists\n       *\n       * @param {function} callback to delete from the player set\n       */\n\n      this.xhr.offResponse = callback => {\n        removeOnResponseHook(this.xhr, callback);\n      }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n      // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n      this.player_.trigger('xhr-hooks-ready');\n    }\n    attachStreamingEventListeners_() {\n      const playlistControllerEvents = ['seekablerangeschanged', 'bufferedrangeschanged', 'contentsteeringloadstart', 'contentsteeringloadcomplete', 'contentsteeringparsed'];\n      const playbackWatcher = ['gapjumped', 'playedrangeschanged']; // re-emit streaming events and payloads on the player.\n\n      playlistControllerEvents.forEach(eventName => {\n        this.playlistController_.on(eventName, metadata => {\n          this.player_.trigger(_extends$1({}, metadata));\n        });\n      });\n      playbackWatcher.forEach(eventName => {\n        this.playbackWatcher_.on(eventName, metadata => {\n          this.player_.trigger(_extends$1({}, metadata));\n        });\n      });\n    }\n  }\n  /**\n   * The Source Handler object, which informs video.js what additional\n   * MIME types are supported and sets up playback. It is registered\n   * automatically to the appropriate tech based on the capabilities of\n   * the browser it is running in. It is not necessary to use or modify\n   * this object in normal usage.\n   */\n\n  const VhsSourceHandler = {\n    name: 'videojs-http-streaming',\n    VERSION: version$4,\n    canHandleSource(srcObj, options = {}) {\n      const localOptions = merge(videojs.options, options); // If not opting to experimentalUseMMS, and playback is only supported with MediaSource, cannot handle source\n\n      if (!localOptions.vhs.experimentalUseMMS && !browserSupportsCodec('avc1.4d400d,mp4a.40.2', false)) {\n        return false;\n      }\n      return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n    },\n    handleSource(source, tech, options = {}) {\n      const localOptions = merge(videojs.options, options);\n      tech.vhs = new VhsHandler(source, tech, localOptions);\n      tech.vhs.xhr = xhrFactory();\n      tech.vhs.setupXhrHooks_();\n      tech.vhs.src(source.src, source.type);\n      return tech.vhs;\n    },\n    canPlayType(type, options) {\n      const simpleType = simpleTypeFromSourceType(type);\n      if (!simpleType) {\n        return '';\n      }\n      const overrideNative = VhsSourceHandler.getOverrideNative(options);\n      const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n      const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n      return canUseMsePlayback ? 'maybe' : '';\n    },\n    getOverrideNative(options = {}) {\n      const {\n        vhs = {}\n      } = options;\n      const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n      const {\n        overrideNative = defaultOverrideNative\n      } = vhs;\n      return overrideNative;\n    }\n  };\n  /**\n   * Check to see if either the native MediaSource or ManagedMediaSource\n   * objectx exist and support an MP4 container with both H.264 video\n   * and AAC-LC audio.\n   *\n   * @return {boolean} if  native media sources are supported\n   */\n\n  const supportsNativeMediaSources = () => {\n    return browserSupportsCodec('avc1.4d400d,mp4a.40.2', true);\n  }; // register source handlers with the appropriate techs\n\n  if (supportsNativeMediaSources()) {\n    videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n  }\n  videojs.VhsHandler = VhsHandler;\n  videojs.VhsSourceHandler = VhsSourceHandler;\n  videojs.Vhs = Vhs;\n  if (!videojs.use) {\n    videojs.registerComponent('Vhs', Vhs);\n  }\n  videojs.options.vhs = videojs.options.vhs || {};\n  if (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n    videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n  }\n\n  return videojs;\n\n}));\n","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var he = moment.defineLocale('he', {\n        months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n            '_'\n        ),\n        monthsShort:\n            'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n        weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n        weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n        weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [ב]MMMM YYYY',\n            LLL: 'D [ב]MMMM YYYY HH:mm',\n            LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n            l: 'D/M/YYYY',\n            ll: 'D MMM YYYY',\n            lll: 'D MMM YYYY HH:mm',\n            llll: 'ddd, D MMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[היום ב־]LT',\n            nextDay: '[מחר ב־]LT',\n            nextWeek: 'dddd [בשעה] LT',\n            lastDay: '[אתמול ב־]LT',\n            lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'בעוד %s',\n            past: 'לפני %s',\n            s: 'מספר שניות',\n            ss: '%d שניות',\n            m: 'דקה',\n            mm: '%d דקות',\n            h: 'שעה',\n            hh: function (number) {\n                if (number === 2) {\n                    return 'שעתיים';\n                }\n                return number + ' שעות';\n            },\n            d: 'יום',\n            dd: function (number) {\n                if (number === 2) {\n                    return 'יומיים';\n                }\n                return number + ' ימים';\n            },\n            M: 'חודש',\n            MM: function (number) {\n                if (number === 2) {\n                    return 'חודשיים';\n                }\n                return number + ' חודשים';\n            },\n            y: 'שנה',\n            yy: function (number) {\n                if (number === 2) {\n                    return 'שנתיים';\n                } else if (number % 10 === 0 && number !== 10) {\n                    return number + ' שנה';\n                }\n                return number + ' שנים';\n            },\n        },\n        meridiemParse:\n            /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n        isPM: function (input) {\n            return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 5) {\n                return 'לפנות בוקר';\n            } else if (hour < 10) {\n                return 'בבוקר';\n            } else if (hour < 12) {\n                return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n            } else if (hour < 18) {\n                return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n            } else {\n                return 'בערב';\n            }\n        },\n    });\n\n    return he;\n\n})));\n","//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = [\n            'Eanáir',\n            'Feabhra',\n            'Márta',\n            'Aibreán',\n            'Bealtaine',\n            'Meitheamh',\n            'Iúil',\n            'Lúnasa',\n            'Meán Fómhair',\n            'Deireadh Fómhair',\n            'Samhain',\n            'Nollaig',\n        ],\n        monthsShort = [\n            'Ean',\n            'Feabh',\n            'Márt',\n            'Aib',\n            'Beal',\n            'Meith',\n            'Iúil',\n            'Lún',\n            'M.F.',\n            'D.F.',\n            'Samh',\n            'Noll',\n        ],\n        weekdays = [\n            'Dé Domhnaigh',\n            'Dé Luain',\n            'Dé Máirt',\n            'Dé Céadaoin',\n            'Déardaoin',\n            'Dé hAoine',\n            'Dé Sathairn',\n        ],\n        weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n        weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n    var ga = moment.defineLocale('ga', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsParseExact: true,\n        weekdays: weekdays,\n        weekdaysShort: weekdaysShort,\n        weekdaysMin: weekdaysMin,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Inniu ag] LT',\n            nextDay: '[Amárach ag] LT',\n            nextWeek: 'dddd [ag] LT',\n            lastDay: '[Inné ag] LT',\n            lastWeek: 'dddd [seo caite] [ag] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i %s',\n            past: '%s ó shin',\n            s: 'cúpla soicind',\n            ss: '%d soicind',\n            m: 'nóiméad',\n            mm: '%d nóiméad',\n            h: 'uair an chloig',\n            hh: '%d uair an chloig',\n            d: 'lá',\n            dd: '%d lá',\n            M: 'mí',\n            MM: '%d míonna',\n            y: 'bliain',\n            yy: '%d bliain',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n        ordinal: function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ga;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tzm = moment.defineLocale('tzm', {\n        months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n                '_'\n            ),\n        weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n            nextWeek: 'dddd [ⴴ] LT',\n            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n            lastWeek: 'dddd [ⴴ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n            past: 'ⵢⴰⵏ %s',\n            s: 'ⵉⵎⵉⴽ',\n            ss: '%d ⵉⵎⵉⴽ',\n            m: 'ⵎⵉⵏⵓⴺ',\n            mm: '%d ⵎⵉⵏⵓⴺ',\n            h: 'ⵙⴰⵄⴰ',\n            hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n            d: 'ⴰⵙⵙ',\n            dd: '%d oⵙⵙⴰⵏ',\n            M: 'ⴰⵢoⵓⵔ',\n            MM: '%d ⵉⵢⵢⵉⵔⵏ',\n            y: 'ⴰⵙⴳⴰⵙ',\n            yy: '%d ⵉⵙⴳⴰⵙⵏ',\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return tzm;\n\n})));\n","/*!\n * Knockout JavaScript library v3.5.1\n * (c) The Knockout.js team - http://knockoutjs.com/\n * License: MIT (http://www.opensource.org/licenses/mit-license.php)\n */\n\n(function() {(function(n){var A=this||(0,eval)(\"this\"),w=A.document,R=A.navigator,v=A.jQuery,H=A.JSON;v||\"undefined\"===typeof jQuery||(v=jQuery);(function(n){\"function\"===typeof define&&define.amd?define([\"exports\",\"require\"],n):\"object\"===typeof exports&&\"object\"===typeof module?n(module.exports||exports):n(A.ko={})})(function(S,T){function K(a,c){return null===a||typeof a in W?a===c:!1}function X(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function Y(b,c){var d;return function(){clearTimeout(d);\nd=a.a.setTimeout(b,c)}}function Z(a,c){c&&\"change\"!==c?\"beforeChange\"===c?this.pc(a):this.gb(a,c):this.qc(a)}function aa(a,c){null!==c&&c.s&&c.s()}function ba(a,c){var d=this.qd,e=d[r];e.ra||(this.Qb&&this.mb[c]?(d.uc(c,a,this.mb[c]),this.mb[c]=null,--this.Qb):e.I[c]||d.uc(c,a,e.J?{da:a}:d.$c(a)),a.Ja&&a.gd())}var a=\"undefined\"!==typeof S?S:{};a.b=function(b,c){for(var d=b.split(\".\"),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.L=function(a,c,d){a[c]=d};a.version=\"3.5.1\";a.b(\"version\",\na.version);a.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1};a.a=function(){function b(a,b){for(var c in a)f.call(a,c)&&b(c,a[c])}function c(a,b){if(b)for(var c in b)f.call(b,c)&&(a[c]=b[c]);return a}function d(a,b){a.__proto__=b;return a}function e(b,c,d,e){var l=b[c].match(q)||[];a.a.D(d.match(q),function(b){a.a.Na(l,b,e)});b[c]=l.join(\" \")}var f=Object.prototype.hasOwnProperty,g={__proto__:[]}instanceof Array,h=\"function\"===typeof Symbol,m={},k={};m[R&&/Firefox\\/2/i.test(R.userAgent)?\n\"KeyboardEvent\":\"UIEvents\"]=[\"keyup\",\"keydown\",\"keypress\"];m.MouseEvents=\"click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave\".split(\" \");b(m,function(a,b){if(b.length)for(var c=0,d=b.length;c<d;c++)k[b[c]]=a});var l={propertychange:!0},p=w&&function(){for(var a=3,b=w.createElement(\"div\"),c=b.getElementsByTagName(\"i\");b.innerHTML=\"\\x3c!--[if gt IE \"+ ++a+\"]><i></i><![endif]--\\x3e\",c[0];);return 4<a?a:n}(),q=/\\S+/g,t;return{Jc:[\"authenticity_token\",/^__RequestVerificationToken(_.*)?$/],\nD:function(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c,a[d],d,a)},A:\"function\"==typeof Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b)}:function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},Lb:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a))return a[d];return n},Pa:function(b,c){var d=a.a.A(b,c);0<d?b.splice(d,1):0===d&&b.shift()},wc:function(b){var c=[];b&&a.a.D(b,function(b){0>a.a.A(c,b)&&c.push(b)});return c},Mb:function(a,\nb,c){var d=[];if(a)for(var e=0,l=a.length;e<l;e++)d.push(b.call(c,a[e],e));return d},jb:function(a,b,c){var d=[];if(a)for(var e=0,l=a.length;e<l;e++)b.call(c,a[e],e)&&d.push(a[e]);return d},Nb:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},Na:function(b,c,d){var e=a.a.A(a.a.bc(b),c);0>e?d&&b.push(c):d||b.splice(e,1)},Ba:g,extend:c,setPrototypeOf:d,Ab:g?d:c,P:b,Ga:function(a,b,c){if(!a)return a;var d={},e;for(e in a)f.call(a,e)&&(d[e]=\nb.call(c,a[e],e,a));return d},Tb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Yb:function(b){b=a.a.la(b);for(var c=(b[0]&&b[0].ownerDocument||w).createElement(\"div\"),d=0,e=b.length;d<e;d++)c.appendChild(a.oa(b[d]));return c},Ca:function(b,c){for(var d=0,e=b.length,l=[];d<e;d++){var k=b[d].cloneNode(!0);l.push(c?a.oa(k):k)}return l},va:function(b,c){a.a.Tb(b);if(c)for(var d=0,e=c.length;d<e;d++)b.appendChild(c[d])},Xc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var e=d[0],\nl=e.parentNode,k=0,f=c.length;k<f;k++)l.insertBefore(c[k],e);k=0;for(f=d.length;k<f;k++)a.removeNode(d[k])}},Ua:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==b;)a.length--;if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),c=c.nextSibling;a.push(d)}}return a},Zc:function(a,b){7>p?a.setAttribute(\"selected\",b):a.selected=b},Db:function(a){return null===a||a===n?\"\":a.trim?\na.trim():a.toString().replace(/^[\\s\\xa0]+|[\\s\\xa0]+$/g,\"\")},Ud:function(a,b){a=a||\"\";return b.length>a.length?!1:a.substring(0,b.length)===b},vd:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(1!==a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},Sb:function(b){return a.a.vd(b,b.ownerDocument.documentElement)},kd:function(b){return!!a.a.Lb(b,a.a.Sb)},R:function(a){return a&&\na.tagName&&a.tagName.toLowerCase()},Ac:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.Ac(b),c)},Gc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},B:function(b,c,d){var e=a.a.Ac(d);d=l[c];if(a.options.useOnlyNativeEvents||d||!v)if(d||\"function\"!=typeof b.addEventListener)if(\"undefined\"!=typeof b.attachEvent){var k=function(a){e.call(b,a)},f=\"on\"+c;b.attachEvent(f,\nk);a.a.K.za(b,function(){b.detachEvent(f,k)})}else throw Error(\"Browser doesn't support addEventListener or attachEvent\");else b.addEventListener(c,e,!1);else t||(t=\"function\"==typeof v(b).on?\"on\":\"bind\"),v(b)[t](c,e)},Fb:function(b,c){if(!b||!b.nodeType)throw Error(\"element must be a DOM node when calling triggerEvent\");var d;\"input\"===a.a.R(b)&&b.type&&\"click\"==c.toLowerCase()?(d=b.type,d=\"checkbox\"==d||\"radio\"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if(\"function\"==typeof w.createEvent)if(\"function\"==\ntypeof b.dispatchEvent)d=w.createEvent(k[c]||\"HTMLEvents\"),d.initEvent(c,!0,!0,A,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error(\"The supplied element doesn't support dispatchEvent\");else if(d&&b.click)b.click();else if(\"undefined\"!=typeof b.fireEvent)b.fireEvent(\"on\"+c);else throw Error(\"Browser doesn't support triggering events\");else v(b).trigger(c)},f:function(b){return a.O(b)?b():b},bc:function(b){return a.O(b)?b.v():b},Eb:function(b,c,d){var l;c&&(\"object\"===typeof b.classList?\n(l=b.classList[d?\"add\":\"remove\"],a.a.D(c.match(q),function(a){l.call(b.classList,a)})):\"string\"===typeof b.className.baseVal?e(b.className,\"baseVal\",c,d):e(b,\"className\",c,d))},Bb:function(b,c){var d=a.a.f(c);if(null===d||d===n)d=\"\";var e=a.h.firstChild(b);!e||3!=e.nodeType||a.h.nextSibling(e)?a.h.va(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Ad(b)},Yc:function(a,b){a.name=b;if(7>=p)try{var c=a.name.replace(/[&<>'\"]/g,function(a){return\"&#\"+a.charCodeAt(0)+\";\"});a.mergeAttributes(w.createElement(\"<input name='\"+\nc+\"'/>\"),!1)}catch(d){}},Ad:function(a){9<=p&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},wd:function(a){if(p){var b=a.style.width;a.style.width=0;a.style.width=b}},Pd:function(b,c){b=a.a.f(b);c=a.a.f(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},la:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},Da:function(a){return h?Symbol(a):a},Zd:6===p,$d:7===p,W:p,Lc:function(b,c){for(var d=a.a.la(b.getElementsByTagName(\"input\")).concat(a.a.la(b.getElementsByTagName(\"textarea\"))),\ne=\"string\"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},l=[],k=d.length-1;0<=k;k--)e(d[k])&&l.push(d[k]);return l},Nd:function(b){return\"string\"==typeof b&&(b=a.a.Db(b))?H&&H.parse?H.parse(b):(new Function(\"return \"+b))():null},hc:function(b,c,d){if(!H||!H.stringify)throw Error(\"Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js\");\nreturn H.stringify(a.a.f(b),c,d)},Od:function(c,d,e){e=e||{};var l=e.params||{},k=e.includeFields||this.Jc,f=c;if(\"object\"==typeof c&&\"form\"===a.a.R(c))for(var f=c.action,h=k.length-1;0<=h;h--)for(var g=a.a.Lc(c,k[h]),m=g.length-1;0<=m;m--)l[g[m].name]=g[m].value;d=a.a.f(d);var p=w.createElement(\"form\");p.style.display=\"none\";p.action=f;p.method=\"post\";for(var q in d)c=w.createElement(\"input\"),c.type=\"hidden\",c.name=q,c.value=a.a.hc(a.a.f(d[q])),p.appendChild(c);b(l,function(a,b){var c=w.createElement(\"input\");\nc.type=\"hidden\";c.name=a;c.value=b;p.appendChild(c)});w.body.appendChild(p);e.submitter?e.submitter(p):p.submit();setTimeout(function(){p.parentNode.removeChild(p)},0)}}}();a.b(\"utils\",a.a);a.b(\"utils.arrayForEach\",a.a.D);a.b(\"utils.arrayFirst\",a.a.Lb);a.b(\"utils.arrayFilter\",a.a.jb);a.b(\"utils.arrayGetDistinctValues\",a.a.wc);a.b(\"utils.arrayIndexOf\",a.a.A);a.b(\"utils.arrayMap\",a.a.Mb);a.b(\"utils.arrayPushAll\",a.a.Nb);a.b(\"utils.arrayRemoveItem\",a.a.Pa);a.b(\"utils.cloneNodes\",a.a.Ca);a.b(\"utils.createSymbolOrString\",\na.a.Da);a.b(\"utils.extend\",a.a.extend);a.b(\"utils.fieldsIncludedWithJsonPost\",a.a.Jc);a.b(\"utils.getFormFields\",a.a.Lc);a.b(\"utils.objectMap\",a.a.Ga);a.b(\"utils.peekObservable\",a.a.bc);a.b(\"utils.postJson\",a.a.Od);a.b(\"utils.parseJson\",a.a.Nd);a.b(\"utils.registerEventHandler\",a.a.B);a.b(\"utils.stringifyJson\",a.a.hc);a.b(\"utils.range\",a.a.Pd);a.b(\"utils.toggleDomNodeCssClass\",a.a.Eb);a.b(\"utils.triggerEvent\",a.a.Fb);a.b(\"utils.unwrapObservable\",a.a.f);a.b(\"utils.objectForEach\",a.a.P);a.b(\"utils.addOrRemoveItem\",\na.a.Na);a.b(\"utils.setTextContent\",a.a.Bb);a.b(\"unwrap\",a.a.f);Function.prototype.bind||(Function.prototype.bind=function(a){var c=this;if(1===arguments.length)return function(){return c.apply(a,arguments)};var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice(0);e.push.apply(e,arguments);return c.apply(a,e)}});a.a.g=new function(){var b=0,c=\"__ko__\"+(new Date).getTime(),d={},e,f;a.a.W?(e=function(a,e){var f=a[c];if(!f||\"null\"===f||!d[f]){if(!e)return n;f=a[c]=\"ko\"+b++;d[f]=\n{}}return d[f]},f=function(a){var b=a[c];return b?(delete d[b],a[c]=null,!0):!1}):(e=function(a,b){var d=a[c];!d&&b&&(d=a[c]={});return d},f=function(a){return a[c]?(delete a[c],!0):!1});return{get:function(a,b){var c=e(a,!1);return c&&c[b]},set:function(a,b,c){(a=e(a,c!==n))&&(a[b]=c)},Ub:function(a,b,c){a=e(a,!0);return a[b]||(a[b]=c)},clear:f,Z:function(){return b++ +c}}};a.b(\"utils.domData\",a.a.g);a.b(\"utils.domData.clear\",a.a.g.clear);a.a.K=new function(){function b(b,c){var d=a.a.g.get(b,e);\nd===n&&c&&(d=[],a.a.g.set(b,e,d));return d}function c(c){var e=b(c,!1);if(e)for(var e=e.slice(0),k=0;k<e.length;k++)e[k](c);a.a.g.clear(c);a.a.K.cleanExternalData(c);g[c.nodeType]&&d(c.childNodes,!0)}function d(b,d){for(var e=[],l,f=0;f<b.length;f++)if(!d||8===b[f].nodeType)if(c(e[e.length]=l=b[f]),b[f]!==l)for(;f--&&-1==a.a.A(e,b[f]););}var e=a.a.g.Z(),f={1:!0,8:!0,9:!0},g={1:!0,9:!0};return{za:function(a,c){if(\"function\"!=typeof c)throw Error(\"Callback must be a function\");b(a,!0).push(c)},yb:function(c,\nd){var f=b(c,!1);f&&(a.a.Pa(f,d),0==f.length&&a.a.g.set(c,e,n))},oa:function(b){a.u.G(function(){f[b.nodeType]&&(c(b),g[b.nodeType]&&d(b.getElementsByTagName(\"*\")))});return b},removeNode:function(b){a.oa(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){v&&\"function\"==typeof v.cleanData&&v.cleanData([a])}}};a.oa=a.a.K.oa;a.removeNode=a.a.K.removeNode;a.b(\"cleanNode\",a.oa);a.b(\"removeNode\",a.removeNode);a.b(\"utils.domNodeDisposal\",a.a.K);a.b(\"utils.domNodeDisposal.addDisposeCallback\",\na.a.K.za);a.b(\"utils.domNodeDisposal.removeDisposeCallback\",a.a.K.yb);(function(){var b=[0,\"\",\"\"],c=[1,\"<table>\",\"</table>\"],d=[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],e=[1,\"<select multiple='multiple'>\",\"</select>\"],f={thead:c,tbody:c,tfoot:c,tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:d,th:d,option:e,optgroup:e},g=8>=a.a.W;a.a.ua=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var l=e[0];l.parentNode&&11!==l.parentNode.nodeType;)l=l.parentNode;\nl.parentNode&&l.parentNode.removeChild(l)}}else{(e=d)||(e=w);var l=e.parentWindow||e.defaultView||A,p=a.a.Db(c).toLowerCase(),q=e.createElement(\"div\"),t;t=(p=p.match(/^(?:\\x3c!--.*?--\\x3e\\s*?)*?<([a-z]+)[\\s>]/))&&f[p[1]]||b;p=t[0];t=\"ignored<div>\"+t[1]+c+t[2]+\"</div>\";\"function\"==typeof l.innerShiv?q.appendChild(l.innerShiv(t)):(g&&e.body.appendChild(q),q.innerHTML=t,g&&q.parentNode.removeChild(q));for(;p--;)q=q.lastChild;e=a.a.la(q.lastChild.childNodes)}return e};a.a.Md=function(b,c){var d=a.a.ua(b,\nc);return d.length&&d[0].parentElement||a.a.Yb(d)};a.a.fc=function(b,c){a.a.Tb(b);c=a.a.f(c);if(null!==c&&c!==n)if(\"string\"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.ua(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}})();a.b(\"utils.parseHtmlFragment\",a.a.ua);a.b(\"utils.setHtml\",a.a.fc);a.aa=function(){function b(c,e){if(c)if(8==c.nodeType){var f=a.aa.Uc(c.nodeValue);null!=f&&e.push({ud:c,Kd:f})}else if(1==c.nodeType)for(var f=0,g=c.childNodes,h=g.length;f<h;f++)b(g[f],\ne)}var c={};return{Xb:function(a){if(\"function\"!=typeof a)throw Error(\"You can only pass a function to ko.memoization.memoize()\");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return\"\\x3c!--[ko_memo:\"+b+\"]--\\x3e\"},bd:function(a,b){var f=c[a];if(f===n)throw Error(\"Couldn't find any memo with ID \"+a+\". Perhaps it's already been unmemoized.\");try{return f.apply(null,b||[]),!0}finally{delete c[a]}},cd:function(c,e){var f=\n[];b(c,f);for(var g=0,h=f.length;g<h;g++){var m=f[g].ud,k=[m];e&&a.a.Nb(k,e);a.aa.bd(f[g].Kd,k);m.nodeValue=\"\";m.parentNode&&m.parentNode.removeChild(m)}},Uc:function(a){return(a=a.match(/^\\[ko_memo\\:(.*?)\\]$/))?a[1]:null}}}();a.b(\"memoization\",a.aa);a.b(\"memoization.memoize\",a.aa.Xb);a.b(\"memoization.unmemoize\",a.aa.bd);a.b(\"memoization.parseMemoText\",a.aa.Uc);a.b(\"memoization.unmemoizeDomNodeAndDescendants\",a.aa.cd);a.na=function(){function b(){if(f)for(var b=f,c=0,d;h<f;)if(d=e[h++]){if(h>b){if(5E3<=\n++c){h=f;a.a.Gc(Error(\"'Too much recursion' after processing \"+c+\" task groups.\"));break}b=f}try{d()}catch(p){a.a.Gc(p)}}}function c(){b();h=f=e.length=0}var d,e=[],f=0,g=1,h=0;A.MutationObserver?d=function(a){var b=w.createElement(\"div\");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle(\"foo\")}}(c):d=w&&\"onreadystatechange\"in w.createElement(\"script\")?function(a){var b=w.createElement(\"script\");b.onreadystatechange=function(){b.onreadystatechange=null;w.documentElement.removeChild(b);\nb=null;a()};w.documentElement.appendChild(b)}:function(a){setTimeout(a,0)};return{scheduler:d,zb:function(b){f||a.na.scheduler(c);e[f++]=b;return g++},cancel:function(a){a=a-(g-f);a>=h&&a<f&&(e[a]=null)},resetForTesting:function(){var a=f-h;h=f=e.length=0;return a},Sd:b}}();a.b(\"tasks\",a.na);a.b(\"tasks.schedule\",a.na.zb);a.b(\"tasks.runEarly\",a.na.Sd);a.Ta={throttle:function(b,c){b.throttleEvaluation=c;var d=null;return a.$({read:b,write:function(e){clearTimeout(d);d=a.a.setTimeout(function(){b(e)},\nc)}})},rateLimit:function(a,c){var d,e,f;\"number\"==typeof c?d=c:(d=c.timeout,e=c.method);a.Hb=!1;f=\"function\"==typeof e?e:\"notifyWhenChangesStop\"==e?Y:X;a.ub(function(a){return f(a,d,c)})},deferred:function(b,c){if(!0!==c)throw Error(\"The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.\");b.Hb||(b.Hb=!0,b.ub(function(c){var e,f=!1;return function(){if(!f){a.na.cancel(e);e=a.na.zb(c);try{f=!0,b.notifySubscribers(n,\"dirty\")}finally{f=\n!1}}}}))},notify:function(a,c){a.equalityComparer=\"always\"==c?null:K}};var W={undefined:1,\"boolean\":1,number:1,string:1};a.b(\"extenders\",a.Ta);a.ic=function(b,c,d){this.da=b;this.lc=c;this.mc=d;this.Ib=!1;this.fb=this.Jb=null;a.L(this,\"dispose\",this.s);a.L(this,\"disposeWhenNodeIsRemoved\",this.l)};a.ic.prototype.s=function(){this.Ib||(this.fb&&a.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)};a.ic.prototype.l=function(b){this.Jb=b;a.a.K.za(b,this.fb=this.s.bind(this))};\na.T=function(){a.a.Ab(this,D);D.qb(this)};var D={qb:function(a){a.U={change:[]};a.sc=1},subscribe:function(b,c,d){var e=this;d=d||\"change\";var f=new a.ic(e,c?b.bind(c):b,function(){a.a.Pa(e.U[d],f);e.hb&&e.hb(d)});e.Qa&&e.Qa(d);e.U[d]||(e.U[d]=[]);e.U[d].push(f);return f},notifySubscribers:function(b,c){c=c||\"change\";\"change\"===c&&this.Gb();if(this.Wa(c)){var d=\"change\"===c&&this.ed||this.U[c].slice(0);try{a.u.xc();for(var e=0,f;f=d[e];++e)f.Ib||f.lc(b)}finally{a.u.end()}}},ob:function(){return this.sc},\nDd:function(a){return this.ob()!==a},Gb:function(){++this.sc},ub:function(b){var c=this,d=a.O(c),e,f,g,h,m;c.gb||(c.gb=c.notifySubscribers,c.notifySubscribers=Z);var k=b(function(){c.Ja=!1;d&&h===c&&(h=c.nc?c.nc():c());var a=f||m&&c.sb(g,h);m=f=e=!1;a&&c.gb(g=h)});c.qc=function(a,b){b&&c.Ja||(m=!b);c.ed=c.U.change.slice(0);c.Ja=e=!0;h=a;k()};c.pc=function(a){e||(g=a,c.gb(a,\"beforeChange\"))};c.rc=function(){m=!0};c.gd=function(){c.sb(g,c.v(!0))&&(f=!0)}},Wa:function(a){return this.U[a]&&this.U[a].length},\nBd:function(b){if(b)return this.U[b]&&this.U[b].length||0;var c=0;a.a.P(this.U,function(a,b){\"dirty\"!==a&&(c+=b.length)});return c},sb:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},toString:function(){return\"[object Object]\"},extend:function(b){var c=this;b&&a.a.P(b,function(b,e){var f=a.Ta[b];\"function\"==typeof f&&(c=f(c,e)||c)});return c}};a.L(D,\"init\",D.qb);a.L(D,\"subscribe\",D.subscribe);a.L(D,\"extend\",D.extend);a.L(D,\"getSubscriptionsCount\",D.Bd);a.a.Ba&&a.a.setPrototypeOf(D,\nFunction.prototype);a.T.fn=D;a.Qc=function(a){return null!=a&&\"function\"==typeof a.subscribe&&\"function\"==typeof a.notifySubscribers};a.b(\"subscribable\",a.T);a.b(\"isSubscribable\",a.Qc);a.S=a.u=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=[],e,f=0;return{xc:b,end:c,cc:function(b){if(e){if(!a.Qc(b))throw Error(\"Only subscribable things can act as dependencies\");e.od.call(e.pd,b,b.fd||(b.fd=++f))}},G:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},qa:function(){if(e)return e.o.qa()},\nVa:function(){if(e)return e.o.Va()},Ya:function(){if(e)return e.Ya},o:function(){if(e)return e.o}}}();a.b(\"computedContext\",a.S);a.b(\"computedContext.getDependenciesCount\",a.S.qa);a.b(\"computedContext.getDependencies\",a.S.Va);a.b(\"computedContext.isInitial\",a.S.Ya);a.b(\"computedContext.registerDependency\",a.S.cc);a.b(\"ignoreDependencies\",a.Yd=a.u.G);var I=a.a.Da(\"_latestValue\");a.ta=function(b){function c(){if(0<arguments.length)return c.sb(c[I],arguments[0])&&(c.ya(),c[I]=arguments[0],c.xa()),this;\na.u.cc(c);return c[I]}c[I]=b;a.a.Ba||a.a.extend(c,a.T.fn);a.T.fn.qb(c);a.a.Ab(c,F);a.options.deferUpdates&&a.Ta.deferred(c,!0);return c};var F={equalityComparer:K,v:function(){return this[I]},xa:function(){this.notifySubscribers(this[I],\"spectate\");this.notifySubscribers(this[I])},ya:function(){this.notifySubscribers(this[I],\"beforeChange\")}};a.a.Ba&&a.a.setPrototypeOf(F,a.T.fn);var G=a.ta.Ma=\"__ko_proto__\";F[G]=a.ta;a.O=function(b){if((b=\"function\"==typeof b&&b[G])&&b!==F[G]&&b!==a.o.fn[G])throw Error(\"Invalid object that looks like an observable; possibly from another Knockout instance\");\nreturn!!b};a.Za=function(b){return\"function\"==typeof b&&(b[G]===F[G]||b[G]===a.o.fn[G]&&b.Nc)};a.b(\"observable\",a.ta);a.b(\"isObservable\",a.O);a.b(\"isWriteableObservable\",a.Za);a.b(\"isWritableObservable\",a.Za);a.b(\"observable.fn\",F);a.L(F,\"peek\",F.v);a.L(F,\"valueHasMutated\",F.xa);a.L(F,\"valueWillMutate\",F.ya);a.Ha=function(b){b=b||[];if(\"object\"!=typeof b||!(\"length\"in b))throw Error(\"The argument passed when initializing an observable array must be an array, or null, or undefined.\");b=a.ta(b);a.a.Ab(b,\na.Ha.fn);return b.extend({trackArrayChanges:!0})};a.Ha.fn={remove:function(b){for(var c=this.v(),d=[],e=\"function\"!=typeof b||a.O(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var g=c[f];if(e(g)){0===d.length&&this.ya();if(c[f]!==g)throw Error(\"Array modified during remove; cannot remove item\");d.push(g);c.splice(f,1);f--}}d.length&&this.xa();return d},removeAll:function(b){if(b===n){var c=this.v(),d=c.slice(0);this.ya();c.splice(0,c.length);this.xa();return d}return b?this.remove(function(c){return 0<=\na.a.A(b,c)}):[]},destroy:function(b){var c=this.v(),d=\"function\"!=typeof b||a.O(b)?function(a){return a===b}:b;this.ya();for(var e=c.length-1;0<=e;e--){var f=c[e];d(f)&&(f._destroy=!0)}this.xa()},destroyAll:function(b){return b===n?this.destroy(function(){return!0}):b?this.destroy(function(c){return 0<=a.a.A(b,c)}):[]},indexOf:function(b){var c=this();return a.a.A(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.ya(),this.v()[d]=c,this.xa())},sorted:function(a){var c=this().slice(0);\nreturn a?c.sort(a):c.sort()},reversed:function(){return this().slice(0).reverse()}};a.a.Ba&&a.a.setPrototypeOf(a.Ha.fn,a.ta.fn);a.a.D(\"pop push reverse shift sort splice unshift\".split(\" \"),function(b){a.Ha.fn[b]=function(){var a=this.v();this.ya();this.zc(a,b,arguments);var d=a[b].apply(a,arguments);this.xa();return d===a?this:d}});a.a.D([\"slice\"],function(b){a.Ha.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.Pc=function(b){return a.O(b)&&\"function\"==typeof b.remove&&\"function\"==\ntypeof b.push};a.b(\"observableArray\",a.Ha);a.b(\"isObservableArray\",a.Pc);a.Ta.trackArrayChanges=function(b,c){function d(){function c(){if(m){var d=[].concat(b.v()||[]),e;if(b.Wa(\"arrayChange\")){if(!f||1<m)f=a.a.Pb(k,d,b.Ob);e=f}k=d;f=null;m=0;e&&e.length&&b.notifySubscribers(e,\"arrayChange\")}}e?c():(e=!0,h=b.subscribe(function(){++m},null,\"spectate\"),k=[].concat(b.v()||[]),f=null,g=b.subscribe(c))}b.Ob={};c&&\"object\"==typeof c&&a.a.extend(b.Ob,c);b.Ob.sparse=!0;if(!b.zc){var e=!1,f=null,g,h,m=0,\nk,l=b.Qa,p=b.hb;b.Qa=function(a){l&&l.call(b,a);\"arrayChange\"===a&&d()};b.hb=function(a){p&&p.call(b,a);\"arrayChange\"!==a||b.Wa(\"arrayChange\")||(g&&g.s(),h&&h.s(),h=g=null,e=!1,k=n)};b.zc=function(b,c,d){function l(a,b,c){return k[k.length]={status:a,value:b,index:c}}if(e&&!m){var k=[],p=b.length,g=d.length,h=0;switch(c){case \"push\":h=p;case \"unshift\":for(c=0;c<g;c++)l(\"added\",d[c],h+c);break;case \"pop\":h=p-1;case \"shift\":p&&l(\"deleted\",b[h],h);break;case \"splice\":c=Math.min(Math.max(0,0>d[0]?p+d[0]:\nd[0]),p);for(var p=1===g?p:Math.min(c+(d[1]||0),p),g=c+g-2,h=Math.max(p,g),U=[],L=[],n=2;c<h;++c,++n)c<p&&L.push(l(\"deleted\",b[c],c)),c<g&&U.push(l(\"added\",d[n],c));a.a.Kc(L,U);break;default:return}f=k}}}};var r=a.a.Da(\"_state\");a.o=a.$=function(b,c,d){function e(){if(0<arguments.length){if(\"function\"===typeof f)f.apply(g.nb,arguments);else throw Error(\"Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.\");return this}g.ra||\na.u.cc(e);(g.ka||g.J&&e.Xa())&&e.ha();return g.X}\"object\"===typeof b?d=b:(d=d||{},b&&(d.read=b));if(\"function\"!=typeof d.read)throw Error(\"Pass a function that returns the value of the ko.computed\");var f=d.write,g={X:n,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:d.read,nb:c||d.owner,l:d.disposeWhenNodeIsRemoved||d.l||null,Sa:d.disposeWhen||d.Sa,Rb:null,I:{},V:0,Ic:null};e[r]=g;e.Nc=\"function\"===typeof f;a.a.Ba||a.a.extend(e,a.T.fn);a.T.fn.qb(e);a.a.Ab(e,C);d.pure?(g.wb=!0,g.J=!0,a.a.extend(e,da)):\nd.deferEvaluation&&a.a.extend(e,ea);a.options.deferUpdates&&a.Ta.deferred(e,!0);g.l&&(g.jc=!0,g.l.nodeType||(g.l=null));g.J||d.deferEvaluation||e.ha();g.l&&e.ja()&&a.a.K.za(g.l,g.Rb=function(){e.s()});return e};var C={equalityComparer:K,qa:function(){return this[r].V},Va:function(){var b=[];a.a.P(this[r].I,function(a,d){b[d.Ka]=d.da});return b},Vb:function(b){if(!this[r].V)return!1;var c=this.Va();return-1!==a.a.A(c,b)?!0:!!a.a.Lb(c,function(a){return a.Vb&&a.Vb(b)})},uc:function(a,c,d){if(this[r].wb&&\nc===this)throw Error(\"A 'pure' computed must not be called recursively\");this[r].I[a]=d;d.Ka=this[r].V++;d.La=c.ob()},Xa:function(){var a,c,d=this[r].I;for(a in d)if(Object.prototype.hasOwnProperty.call(d,a)&&(c=d[a],this.Ia&&c.da.Ja||c.da.Dd(c.La)))return!0},Jd:function(){this.Ia&&!this[r].rb&&this.Ia(!1)},ja:function(){var a=this[r];return a.ka||0<a.V},Rd:function(){this.Ja?this[r].ka&&(this[r].sa=!0):this.Hc()},$c:function(a){if(a.Hb){var c=a.subscribe(this.Jd,this,\"dirty\"),d=a.subscribe(this.Rd,\nthis);return{da:a,s:function(){c.s();d.s()}}}return a.subscribe(this.Hc,this)},Hc:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[r].Ic),this[r].Ic=a.a.setTimeout(function(){b.ha(!0)},c)):b.Ia?b.Ia(!0):b.ha(!0)},ha:function(b){var c=this[r],d=c.Sa,e=!1;if(!c.rb&&!c.ra){if(c.l&&!a.a.Sb(c.l)||d&&d()){if(!c.jc){this.s();return}}else c.jc=!1;c.rb=!0;try{e=this.zd(b)}finally{c.rb=!1}return e}},zd:function(b){var c=this[r],d=!1,e=c.wb?n:!c.V,d={qd:this,mb:c.I,Qb:c.V};a.u.xc({pd:d,\nod:ba,o:this,Ya:e});c.I={};c.V=0;var f=this.yd(c,d);c.V?d=this.sb(c.X,f):(this.s(),d=!0);d&&(c.J?this.Gb():this.notifySubscribers(c.X,\"beforeChange\"),c.X=f,this.notifySubscribers(c.X,\"spectate\"),!c.J&&b&&this.notifySubscribers(c.X),this.rc&&this.rc());e&&this.notifySubscribers(c.X,\"awake\");return d},yd:function(b,c){try{var d=b.Wc;return b.nb?d.call(b.nb):d()}finally{a.u.end(),c.Qb&&!b.J&&a.a.P(c.mb,aa),b.sa=b.ka=!1}},v:function(a){var c=this[r];(c.ka&&(a||!c.V)||c.J&&this.Xa())&&this.ha();return c.X},\nub:function(b){a.T.fn.ub.call(this,b);this.nc=function(){this[r].J||(this[r].sa?this.ha():this[r].ka=!1);return this[r].X};this.Ia=function(a){this.pc(this[r].X);this[r].ka=!0;a&&(this[r].sa=!0);this.qc(this,!a)}},s:function(){var b=this[r];!b.J&&b.I&&a.a.P(b.I,function(a,b){b.s&&b.s()});b.l&&b.Rb&&a.a.K.yb(b.l,b.Rb);b.I=n;b.V=0;b.ra=!0;b.sa=!1;b.ka=!1;b.J=!1;b.l=n;b.Sa=n;b.Wc=n;this.Nc||(b.nb=n)}},da={Qa:function(b){var c=this,d=c[r];if(!d.ra&&d.J&&\"change\"==b){d.J=!1;if(d.sa||c.Xa())d.I=null,d.V=\n0,c.ha()&&c.Gb();else{var e=[];a.a.P(d.I,function(a,b){e[b.Ka]=a});a.a.D(e,function(a,b){var e=d.I[a],m=c.$c(e.da);m.Ka=b;m.La=e.La;d.I[a]=m});c.Xa()&&c.ha()&&c.Gb()}d.ra||c.notifySubscribers(d.X,\"awake\")}},hb:function(b){var c=this[r];c.ra||\"change\"!=b||this.Wa(\"change\")||(a.a.P(c.I,function(a,b){b.s&&(c.I[a]={da:b.da,Ka:b.Ka,La:b.La},b.s())}),c.J=!0,this.notifySubscribers(n,\"asleep\"))},ob:function(){var b=this[r];b.J&&(b.sa||this.Xa())&&this.ha();return a.T.fn.ob.call(this)}},ea={Qa:function(a){\"change\"!=\na&&\"beforeChange\"!=a||this.v()}};a.a.Ba&&a.a.setPrototypeOf(C,a.T.fn);var N=a.ta.Ma;C[N]=a.o;a.Oc=function(a){return\"function\"==typeof a&&a[N]===C[N]};a.Fd=function(b){return a.Oc(b)&&b[r]&&b[r].wb};a.b(\"computed\",a.o);a.b(\"dependentObservable\",a.o);a.b(\"isComputed\",a.Oc);a.b(\"isPureComputed\",a.Fd);a.b(\"computed.fn\",C);a.L(C,\"peek\",C.v);a.L(C,\"dispose\",C.s);a.L(C,\"isActive\",C.ja);a.L(C,\"getDependenciesCount\",C.qa);a.L(C,\"getDependencies\",C.Va);a.xb=function(b,c){if(\"function\"===typeof b)return a.o(b,\nc,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.o(b,c)};a.b(\"pureComputed\",a.xb);(function(){function b(a,f,g){g=g||new d;a=f(a);if(\"object\"!=typeof a||null===a||a===n||a instanceof RegExp||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var h=a instanceof Array?[]:{};g.save(a,h);c(a,function(c){var d=f(a[c]);switch(typeof d){case \"boolean\":case \"number\":case \"string\":case \"function\":h[c]=d;break;case \"object\":case \"undefined\":var l=g.get(d);h[c]=l!==\nn?l:b(d,f,g)}});return h}function c(a,b){if(a instanceof Array){for(var c=0;c<a.length;c++)b(c);\"function\"==typeof a.toJSON&&b(\"toJSON\")}else for(c in a)b(c)}function d(){this.keys=[];this.values=[]}a.ad=function(c){if(0==arguments.length)throw Error(\"When calling ko.toJS, pass the object you want to convert.\");return b(c,function(b){for(var c=0;a.O(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.ad(b);return a.a.hc(b,c,d)};d.prototype={constructor:d,save:function(b,c){var d=a.a.A(this.keys,\nb);0<=d?this.values[d]=c:(this.keys.push(b),this.values.push(c))},get:function(b){b=a.a.A(this.keys,b);return 0<=b?this.values[b]:n}}})();a.b(\"toJS\",a.ad);a.b(\"toJSON\",a.toJSON);a.Wd=function(b,c,d){function e(c){var e=a.xb(b,d).extend({ma:\"always\"}),h=e.subscribe(function(a){a&&(h.s(),c(a))});e.notifySubscribers(e.v());return h}return\"function\"!==typeof Promise||c?e(c.bind(d)):new Promise(e)};a.b(\"when\",a.Wd);(function(){a.w={M:function(b){switch(a.a.R(b)){case \"option\":return!0===b.__ko__hasDomDataOptionValue__?\na.a.g.get(b,a.c.options.$b):7>=a.a.W?b.getAttributeNode(\"value\")&&b.getAttributeNode(\"value\").specified?b.value:b.text:b.value;case \"select\":return 0<=b.selectedIndex?a.w.M(b.options[b.selectedIndex]):n;default:return b.value}},cb:function(b,c,d){switch(a.a.R(b)){case \"option\":\"string\"===typeof c?(a.a.g.set(b,a.c.options.$b,n),\"__ko__hasDomDataOptionValue__\"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.g.set(b,a.c.options.$b,c),b.__ko__hasDomDataOptionValue__=!0,b.value=\"number\"===\ntypeof c?c:\"\");break;case \"select\":if(\"\"===c||null===c)c=n;for(var e=-1,f=0,g=b.options.length,h;f<g;++f)if(h=a.w.M(b.options[f]),h==c||\"\"===h&&c===n){e=f;break}if(d||0<=e||c===n&&1<b.size)b.selectedIndex=e,6===a.a.W&&a.a.setTimeout(function(){b.selectedIndex=e},0);break;default:if(null===c||c===n)c=\"\";b.value=c}}}})();a.b(\"selectExtensions\",a.w);a.b(\"selectExtensions.readValue\",a.w.M);a.b(\"selectExtensions.writeValue\",a.w.cb);a.m=function(){function b(b){b=a.a.Db(b);123===b.charCodeAt(0)&&(b=b.slice(1,\n-1));b+=\"\\n,\";var c=[],d=b.match(e),p,q=[],h=0;if(1<d.length){for(var x=0,B;B=d[x];++x){var u=B.charCodeAt(0);if(44===u){if(0>=h){c.push(p&&q.length?{key:p,value:q.join(\"\")}:{unknown:p||q.join(\"\")});p=h=0;q=[];continue}}else if(58===u){if(!h&&!p&&1===q.length){p=q.pop();continue}}else if(47===u&&1<B.length&&(47===B.charCodeAt(1)||42===B.charCodeAt(1)))continue;else 47===u&&x&&1<B.length?(u=d[x-1].match(f))&&!g[u[0]]&&(b=b.substr(b.indexOf(B)+1),d=b.match(e),x=-1,B=\"/\"):40===u||123===u||91===u?++h:\n41===u||125===u||93===u?--h:p||q.length||34!==u&&39!==u||(B=B.slice(1,-1));q.push(B)}if(0<h)throw Error(\"Unbalanced parentheses, braces, or brackets\");}return c}var c=[\"true\",\"false\",\"null\",\"undefined\"],d=/^(?:[$_a-z][$\\w]*|(.+)(\\.\\s*[$_a-z][$\\w]*|\\[.+\\]))$/i,e=RegExp(\"\\\"(?:\\\\\\\\.|[^\\\"])*\\\"|'(?:\\\\\\\\.|[^'])*'|`(?:\\\\\\\\.|[^`])*`|/\\\\*(?:[^*]|\\\\*+[^*/])*\\\\*+/|//.*\\n|/(?:\\\\\\\\.|[^/])+/w*|[^\\\\s:,/][^,\\\"'`{}()/:[\\\\]]*[^\\\\s,\\\"'`{}()/:[\\\\]]|[^\\\\s]\",\"g\"),f=/[\\])\"'A-Za-z0-9_$]+$/,g={\"in\":1,\"return\":1,\"typeof\":1},\nh={};return{Ra:[],wa:h,ac:b,vb:function(e,f){function l(b,e){var f;if(!x){var k=a.getBindingHandler(b);if(k&&k.preprocess&&!(e=k.preprocess(e,b,l)))return;if(k=h[b])f=e,0<=a.a.A(c,f)?f=!1:(k=f.match(d),f=null===k?!1:k[1]?\"Object(\"+k[1]+\")\"+k[2]:f),k=f;k&&q.push(\"'\"+(\"string\"==typeof h[b]?h[b]:b)+\"':function(_z){\"+f+\"=_z}\")}g&&(e=\"function(){return \"+e+\" }\");p.push(\"'\"+b+\"':\"+e)}f=f||{};var p=[],q=[],g=f.valueAccessors,x=f.bindingParams,B=\"string\"===typeof e?b(e):e;a.a.D(B,function(a){l(a.key||a.unknown,\na.value)});q.length&&l(\"_ko_property_writers\",\"{\"+q.join(\",\")+\" }\");return p.join(\",\")},Id:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},eb:function(b,c,d,e,f){if(b&&a.O(b))!a.Za(b)||f&&b.v()===e||b(e);else if((b=c.get(\"_ko_property_writers\"))&&b[d])b[d](e)}}}();a.b(\"expressionRewriting\",a.m);a.b(\"expressionRewriting.bindingRewriteValidators\",a.m.Ra);a.b(\"expressionRewriting.parseObjectLiteral\",a.m.ac);a.b(\"expressionRewriting.preProcessBindings\",a.m.vb);a.b(\"expressionRewriting._twoWayBindings\",\na.m.wa);a.b(\"jsonExpressionRewriting\",a.m);a.b(\"jsonExpressionRewriting.insertPropertyAccessorsIntoJson\",a.m.vb);(function(){function b(a){return 8==a.nodeType&&g.test(f?a.text:a.nodeValue)}function c(a){return 8==a.nodeType&&h.test(f?a.text:a.nodeValue)}function d(d,e){for(var f=d,h=1,g=[];f=f.nextSibling;){if(c(f)&&(a.a.g.set(f,k,!0),h--,0===h))return g;g.push(f);b(f)&&h++}if(!e)throw Error(\"Cannot find closing comment tag to match: \"+d.nodeValue);return null}function e(a,b){var c=d(a,b);return c?\n0<c.length?c[c.length-1].nextSibling:a.nextSibling:null}var f=w&&\"\\x3c!--test--\\x3e\"===w.createComment(\"test\").text,g=f?/^\\x3c!--\\s*ko(?:\\s+([\\s\\S]+))?\\s*--\\x3e$/:/^\\s*ko(?:\\s+([\\s\\S]+))?\\s*$/,h=f?/^\\x3c!--\\s*\\/ko\\s*--\\x3e$/:/^\\s*\\/ko\\s*$/,m={ul:!0,ol:!0},k=\"__ko_matchedEndComment__\";a.h={ea:{},childNodes:function(a){return b(a)?d(a):a.childNodes},Ea:function(c){if(b(c)){c=a.h.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.Tb(c)},va:function(c,d){if(b(c)){a.h.Ea(c);for(var e=\nc.nextSibling,f=0,k=d.length;f<k;f++)e.parentNode.insertBefore(d[f],e)}else a.a.va(c,d)},Vc:function(a,c){var d;b(a)?(d=a.nextSibling,a=a.parentNode):d=a.firstChild;d?c!==d&&a.insertBefore(c,d):a.appendChild(c)},Wb:function(c,d,e){e?(e=e.nextSibling,b(c)&&(c=c.parentNode),e?d!==e&&c.insertBefore(d,e):c.appendChild(d)):a.h.Vc(c,d)},firstChild:function(a){if(b(a))return!a.nextSibling||c(a.nextSibling)?null:a.nextSibling;if(a.firstChild&&c(a.firstChild))throw Error(\"Found invalid end comment, as the first child of \"+\na);return a.firstChild},nextSibling:function(d){b(d)&&(d=e(d));if(d.nextSibling&&c(d.nextSibling)){var f=d.nextSibling;if(c(f)&&!a.a.g.get(f,k))throw Error(\"Found end comment without a matching opening comment, as child of \"+d);return null}return d.nextSibling},Cd:b,Vd:function(a){return(a=(f?a.text:a.nodeValue).match(g))?a[1]:null},Sc:function(d){if(m[a.a.R(d)]){var f=d.firstChild;if(f){do if(1===f.nodeType){var k;k=f.firstChild;var h=null;if(k){do if(h)h.push(k);else if(b(k)){var g=e(k,!0);g?k=\ng:h=[k]}else c(k)&&(h=[k]);while(k=k.nextSibling)}if(k=h)for(h=f.nextSibling,g=0;g<k.length;g++)h?d.insertBefore(k[g],h):d.appendChild(k[g])}while(f=f.nextSibling)}}}}})();a.b(\"virtualElements\",a.h);a.b(\"virtualElements.allowedBindings\",a.h.ea);a.b(\"virtualElements.emptyNode\",a.h.Ea);a.b(\"virtualElements.insertAfter\",a.h.Wb);a.b(\"virtualElements.prepend\",a.h.Vc);a.b(\"virtualElements.setDomNodeChildren\",a.h.va);(function(){a.ga=function(){this.nd={}};a.a.extend(a.ga.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=\nb.getAttribute(\"data-bind\")||a.j.getComponentNameForNode(b);case 8:return a.h.Cd(b);default:return!1}},getBindings:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b):null;return a.j.tc(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.j.tc(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute(\"data-bind\");case 8:return a.h.Vd(b);default:return null}},\nparseBindingsString:function(b,c,d,e){try{var f=this.nd,g=b+(e&&e.valueAccessors||\"\"),h;if(!(h=f[g])){var m,k=\"with($context){with($data||{}){return{\"+a.m.vb(b,e)+\"}}}\";m=new Function(\"$context\",\"$element\",k);h=f[g]=m}return h(c,d)}catch(l){throw l.message=\"Unable to parse bindings.\\nBindings value: \"+b+\"\\nMessage: \"+l.message,l;}}});a.ga.instance=new a.ga})();a.b(\"bindingProvider\",a.ga);(function(){function b(b){var c=(b=a.a.g.get(b,z))&&b.N;c&&(b.N=null,c.Tc())}function c(c,d,e){this.node=c;this.yc=\nd;this.kb=[];this.H=!1;d.N||a.a.K.za(c,b);e&&e.N&&(e.N.kb.push(c),this.Kb=e)}function d(a){return function(){return a}}function e(a){return a()}function f(b){return a.a.Ga(a.u.G(b),function(a,c){return function(){return b()[c]}})}function g(b,c,e){return\"function\"===typeof b?f(b.bind(null,c,e)):a.a.Ga(b,d)}function h(a,b){return f(this.getBindings.bind(this,a,b))}function m(b,c){var d=a.h.firstChild(c);if(d){var e,f=a.ga.instance,l=f.preprocessNode;if(l){for(;e=d;)d=a.h.nextSibling(e),l.call(f,e);\nd=a.h.firstChild(c)}for(;e=d;)d=a.h.nextSibling(e),k(b,e)}a.i.ma(c,a.i.H)}function k(b,c){var d=b,e=1===c.nodeType;e&&a.h.Sc(c);if(e||a.ga.instance.nodeHasBindings(c))d=p(c,null,b).bindingContextForDescendants;d&&!u[a.a.R(c)]&&m(d,c)}function l(b){var c=[],d={},e=[];a.a.P(b,function ca(f){if(!d[f]){var k=a.getBindingHandler(f);k&&(k.after&&(e.push(f),a.a.D(k.after,function(c){if(b[c]){if(-1!==a.a.A(e,c))throw Error(\"Cannot combine the following bindings, because they have a cyclic dependency: \"+e.join(\", \"));\nca(c)}}),e.length--),c.push({key:f,Mc:k}));d[f]=!0}});return c}function p(b,c,d){var f=a.a.g.Ub(b,z,{}),k=f.hd;if(!c){if(k)throw Error(\"You cannot apply bindings multiple times to the same element.\");f.hd=!0}k||(f.context=d);f.Zb||(f.Zb={});var g;if(c&&\"function\"!==typeof c)g=c;else{var p=a.ga.instance,q=p.getBindingAccessors||h,m=a.$(function(){if(g=c?c(d,b):q.call(p,b,d)){if(d[t])d[t]();if(d[B])d[B]()}return g},null,{l:b});g&&m.ja()||(m=null)}var x=d,u;if(g){var J=function(){return a.a.Ga(m?m():\ng,e)},r=m?function(a){return function(){return e(m()[a])}}:function(a){return g[a]};J.get=function(a){return g[a]&&e(r(a))};J.has=function(a){return a in g};a.i.H in g&&a.i.subscribe(b,a.i.H,function(){var c=(0,g[a.i.H])();if(c){var d=a.h.childNodes(b);d.length&&c(d,a.Ec(d[0]))}});a.i.pa in g&&(x=a.i.Cb(b,d),a.i.subscribe(b,a.i.pa,function(){var c=(0,g[a.i.pa])();c&&a.h.firstChild(b)&&c(b)}));f=l(g);a.a.D(f,function(c){var d=c.Mc.init,e=c.Mc.update,f=c.key;if(8===b.nodeType&&!a.h.ea[f])throw Error(\"The binding '\"+\nf+\"' cannot be used with virtual elements\");try{\"function\"==typeof d&&a.u.G(function(){var a=d(b,r(f),J,x.$data,x);if(a&&a.controlsDescendantBindings){if(u!==n)throw Error(\"Multiple bindings (\"+u+\" and \"+f+\") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.\");u=f}}),\"function\"==typeof e&&a.$(function(){e(b,r(f),J,x.$data,x)},null,{l:b})}catch(k){throw k.message='Unable to process binding \"'+f+\": \"+g[f]+'\"\\nMessage: '+k.message,\nk;}})}f=u===n;return{shouldBindDescendants:f,bindingContextForDescendants:f&&x}}function q(b,c){return b&&b instanceof a.fa?b:new a.fa(b,n,n,c)}var t=a.a.Da(\"_subscribable\"),x=a.a.Da(\"_ancestorBindingInfo\"),B=a.a.Da(\"_dataDependency\");a.c={};var u={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.c[b]};var J={};a.fa=function(b,c,d,e,f){function k(){var b=p?h():h,f=a.a.f(b);c?(a.a.extend(l,c),x in c&&(l[x]=c[x])):(l.$parents=[],l.$root=f,l.ko=a);l[t]=q;g?f=l.$data:(l.$rawData=\nb,l.$data=f);d&&(l[d]=f);e&&e(l,c,f);if(c&&c[t]&&!a.S.o().Vb(c[t]))c[t]();m&&(l[B]=m);return l.$data}var l=this,g=b===J,h=g?n:b,p=\"function\"==typeof h&&!a.O(h),q,m=f&&f.dataDependency;f&&f.exportDependencies?k():(q=a.xb(k),q.v(),q.ja()?q.equalityComparer=null:l[t]=n)};a.fa.prototype.createChildContext=function(b,c,d,e){!e&&c&&\"object\"==typeof c&&(e=c,c=e.as,d=e.extend);if(c&&e&&e.noChildContext){var f=\"function\"==typeof b&&!a.O(b);return new a.fa(J,this,null,function(a){d&&d(a);a[c]=f?b():b},e)}return new a.fa(b,\nthis,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)},e)};a.fa.prototype.extend=function(b,c){return new a.fa(J,this,null,function(c){a.a.extend(c,\"function\"==typeof b?b(c):b)},c)};var z=a.a.g.Z();c.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)};c.prototype.sd=function(b){a.a.Pa(this.kb,b);!this.kb.length&&this.H&&this.Cc()};c.prototype.Cc=function(){this.H=!0;this.yc.N&&!this.kb.length&&(this.yc.N=\nnull,a.a.K.yb(this.node,b),a.i.ma(this.node,a.i.pa),this.Tc())};a.i={H:\"childrenComplete\",pa:\"descendantsComplete\",subscribe:function(b,c,d,e,f){var k=a.a.g.Ub(b,z,{});k.Fa||(k.Fa=new a.T);f&&f.notifyImmediately&&k.Zb[c]&&a.u.G(d,e,[b]);return k.Fa.subscribe(d,e,c)},ma:function(b,c){var d=a.a.g.get(b,z);if(d&&(d.Zb[c]=!0,d.Fa&&d.Fa.notifySubscribers(b,c),c==a.i.H))if(d.N)d.N.Cc();else if(d.N===n&&d.Fa&&d.Fa.Wa(a.i.pa))throw Error(\"descendantsComplete event not supported for bindings on this node\");\n},Cb:function(b,d){var e=a.a.g.Ub(b,z,{});e.N||(e.N=new c(b,e,d[x]));return d[x]==e?d:d.extend(function(a){a[x]=e})}};a.Td=function(b){return(b=a.a.g.get(b,z))&&b.context};a.ib=function(b,c,d){1===b.nodeType&&a.h.Sc(b);return p(b,c,q(d))};a.ld=function(b,c,d){d=q(d);return a.ib(b,g(c,d,b),d)};a.Oa=function(a,b){1!==b.nodeType&&8!==b.nodeType||m(q(a),b)};a.vc=function(a,b,c){!v&&A.jQuery&&(v=A.jQuery);if(2>arguments.length){if(b=w.body,!b)throw Error(\"ko.applyBindings: could not find document.body; has the document been loaded?\");\n}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error(\"ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node\");k(q(a,c),b)};a.Dc=function(b){return!b||1!==b.nodeType&&8!==b.nodeType?n:a.Td(b)};a.Ec=function(b){return(b=a.Dc(b))?b.$data:n};a.b(\"bindingHandlers\",a.c);a.b(\"bindingEvent\",a.i);a.b(\"bindingEvent.subscribe\",a.i.subscribe);a.b(\"bindingEvent.startPossiblyAsyncContentBinding\",a.i.Cb);a.b(\"applyBindings\",a.vc);a.b(\"applyBindingsToDescendants\",a.Oa);\na.b(\"applyBindingAccessorsToNode\",a.ib);a.b(\"applyBindingsToNode\",a.ld);a.b(\"contextFor\",a.Dc);a.b(\"dataFor\",a.Ec)})();(function(b){function c(c,e){var k=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,l;k?k.subscribe(e):(k=f[c]=new a.T,k.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,Gd:e};delete f[c];l||e?k.notifySubscribers(b):a.na.zb(function(){k.notifySubscribers(b)})}),l=!0)}function d(a,b){e(\"getConfig\",[a],function(c){c?e(\"loadComponent\",[a,c],function(a){b(a,\nc)}):b(null,null)})}function e(c,d,f,l){l||(l=a.j.loaders.slice(0));var g=l.shift();if(g){var q=g[c];if(q){var t=!1;if(q.apply(g,d.concat(function(a){t?f(null):null!==a?f(a):e(c,d,f,l)}))!==b&&(t=!0,!g.suppressLoaderExceptions))throw Error(\"Component loaders must supply values by invoking the callback, not by returning values synchronously.\");}else e(c,d,f,l)}else f(null)}var f={},g={};a.j={get:function(d,e){var f=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;f?f.Gd?a.u.G(function(){e(f.definition)}):\na.na.zb(function(){e(f.definition)}):c(d,e)},Bc:function(a){delete g[a]},oc:e};a.j.loaders=[];a.b(\"components\",a.j);a.b(\"components.get\",a.j.get);a.b(\"components.clearCachedDefinition\",a.j.Bc)})();(function(){function b(b,c,d,e){function g(){0===--B&&e(h)}var h={},B=2,u=d.template;d=d.viewModel;u?f(c,u,function(c){a.j.oc(\"loadTemplate\",[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.j.oc(\"loadViewModel\",[b,c],function(a){h[m]=a;g()})}):g()}function c(a,b,d){if(\"function\"===typeof b)d(function(a){return new b(a)});\nelse if(\"function\"===typeof b[m])d(b[m]);else if(\"instance\"in b){var e=b.instance;d(function(){return e})}else\"viewModel\"in b?c(a,b.viewModel,d):a(\"Unknown viewModel value: \"+b)}function d(b){switch(a.a.R(b)){case \"script\":return a.a.ua(b.text);case \"textarea\":return a.a.ua(b.value);case \"template\":if(e(b.content))return a.a.Ca(b.content.childNodes)}return a.a.Ca(b.childNodes)}function e(a){return A.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){\"string\"===typeof b.require?\nT||A.require?(T||A.require)([b.require],function(a){a&&\"object\"===typeof a&&a.Xd&&a[\"default\"]&&(a=a[\"default\"]);c(a)}):a(\"Uses require, but no AMD loader is present\"):c(b)}function g(a){return function(b){throw Error(\"Component '\"+a+\"': \"+b);}}var h={};a.j.register=function(b,c){if(!c)throw Error(\"Invalid configuration for \"+b);if(a.j.tb(b))throw Error(\"Component \"+b+\" is already registered\");h[b]=c};a.j.tb=function(a){return Object.prototype.hasOwnProperty.call(h,a)};a.j.unregister=function(b){delete h[b];\na.j.Bc(b)};a.j.Fc={getConfig:function(b,c){c(a.j.tb(b)?h[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if(\"string\"===typeof c)f(a.a.ua(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.la(c.childNodes));else if(c.element)if(c=c.element,A.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if(\"string\"===typeof c){var h=w.getElementById(c);h?f(d(h)):b(\"Cannot find element with ID \"+c)}else b(\"Unknown element type: \"+\nc);else b(\"Unknown template value: \"+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var m=\"createViewModel\";a.b(\"components.register\",a.j.register);a.b(\"components.isRegistered\",a.j.tb);a.b(\"components.unregister\",a.j.unregister);a.b(\"components.defaultLoader\",a.j.Fc);a.j.loaders.push(a.j.Fc);a.j.dd=h})();(function(){function b(b,e){var f=b.getAttribute(\"params\");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ga(f,function(c){return a.o(c,null,{l:b})}),g=a.a.Ga(f,\nfunction(c){var e=c.v();return c.ja()?a.o({read:function(){return a.a.f(c())},write:a.Za(e)&&function(a){c()(a)},l:b}):e});Object.prototype.hasOwnProperty.call(g,\"$raw\")||(g.$raw=f);return g}return{$raw:{}}}a.j.getComponentNameForNode=function(b){var c=a.a.R(b);if(a.j.tb(c)&&(-1!=c.indexOf(\"-\")||\"[object HTMLUnknownElement]\"==\"\"+b||8>=a.a.W&&b.tagName===c))return c};a.j.tc=function(c,e,f,g){if(1===e.nodeType){var h=a.j.getComponentNameForNode(e);if(h){c=c||{};if(c.component)throw Error('Cannot use the \"component\" binding on a custom element matching a component');\nvar m={name:h,params:b(e,f)};c.component=g?function(){return m}:m}}return c};var c=new a.ga;9>a.a.W&&(a.j.register=function(a){return function(b){return a.apply(this,arguments)}}(a.j.register),w.createDocumentFragment=function(b){return function(){var c=b(),f=a.j.dd,g;for(g in f);return c}}(w.createDocumentFragment))})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error(\"Component '\"+b+\"' has no template\");b=a.a.Ca(c);a.h.va(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a,\nb,c):b}var d=0;a.c.component={init:function(e,f,g,h,m){function k(){var a=l&&l.dispose;\"function\"===typeof a&&a.call(l);q&&q.s();p=l=q=null}var l,p,q,t=a.a.la(a.h.childNodes(e));a.h.Ea(e);a.a.K.za(e,k);a.o(function(){var g=a.a.f(f()),h,u;\"string\"===typeof g?h=g:(h=a.a.f(g.name),u=a.a.f(g.params));if(!h)throw Error(\"No component name specified\");var n=a.i.Cb(e,m),z=p=++d;a.j.get(h,function(d){if(p===z){k();if(!d)throw Error(\"Unknown component '\"+h+\"'\");b(h,d,e);var f=c(d,u,{element:e,templateNodes:t});\nd=n.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=t}});f&&f.koDescendantsComplete&&(q=a.i.subscribe(e,a.i.pa,f.koDescendantsComplete,f));l=f;a.Oa(d,e)}})},null,{l:e});return{controlsDescendantBindings:!0}}};a.h.ea.component=!0})();var V={\"class\":\"className\",\"for\":\"htmlFor\"};a.c.attr={update:function(b,c){var d=a.a.f(c())||{};a.a.P(d,function(c,d){d=a.a.f(d);var g=c.indexOf(\":\"),g=\"lookupNamespaceURI\"in b&&0<g&&b.lookupNamespaceURI(c.substr(0,g)),h=!1===d||null===\nd||d===n;h?g?b.removeAttributeNS(g,c):b.removeAttribute(c):d=d.toString();8>=a.a.W&&c in V?(c=V[c],h?b.removeAttribute(c):b[c]=d):h||(g?b.setAttributeNS(g,c,d):b.setAttribute(c,d));\"name\"===c&&a.a.Yc(b,h?\"\":d)})}};(function(){a.c.checked={after:[\"value\",\"attr\"],init:function(b,c,d){function e(){var e=b.checked,f=g();if(!a.S.Ya()&&(e||!m&&!a.S.qa())){var k=a.u.G(c);if(l){var q=p?k.v():k,z=t;t=f;z!==f?e&&(a.a.Na(q,f,!0),a.a.Na(q,z,!1)):a.a.Na(q,f,e);p&&a.Za(k)&&k(q)}else h&&(f===n?f=e:e||(f=n)),a.m.eb(k,\nd,\"checked\",f,!0)}}function f(){var d=a.a.f(c()),e=g();l?(b.checked=0<=a.a.A(d,e),t=e):b.checked=h&&e===n?!!d:g()===d}var g=a.xb(function(){if(d.has(\"checkedValue\"))return a.a.f(d.get(\"checkedValue\"));if(q)return d.has(\"value\")?a.a.f(d.get(\"value\")):b.value}),h=\"checkbox\"==b.type,m=\"radio\"==b.type;if(h||m){var k=c(),l=h&&a.a.f(k)instanceof Array,p=!(l&&k.push&&k.splice),q=m||l,t=l?g():n;m&&!b.name&&a.c.uniqueName.init(b,function(){return!0});a.o(e,null,{l:b});a.a.B(b,\"click\",e);a.o(f,null,{l:b});\nk=n}}};a.m.wa.checked=!0;a.c.checkedValue={update:function(b,c){b.value=a.a.f(c())}}})();a.c[\"class\"]={update:function(b,c){var d=a.a.Db(a.a.f(c()));a.a.Eb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.Eb(b,d,!0)}};a.c.css={update:function(b,c){var d=a.a.f(c());null!==d&&\"object\"==typeof d?a.a.P(d,function(c,d){d=a.a.f(d);a.a.Eb(b,c,d)}):a.c[\"class\"].update(b,c)}};a.c.enable={update:function(b,c){var d=a.a.f(c());d&&b.disabled?b.removeAttribute(\"disabled\"):d||b.disabled||(b.disabled=!0)}};a.c.disable=\n{update:function(b,c){a.c.enable.update(b,function(){return!a.a.f(c())})}};a.c.event={init:function(b,c,d,e,f){var g=c()||{};a.a.P(g,function(g){\"string\"==typeof g&&a.a.B(b,g,function(b){var k,l=c()[g];if(l){try{var p=a.a.la(arguments);e=f.$data;p.unshift(e);k=l.apply(e,p)}finally{!0!==k&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+\"Bubble\")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.c.foreach={Rc:function(b){return function(){var c=b(),d=a.a.bc(c);\nif(!d||\"number\"==typeof d.length)return{foreach:c,templateEngine:a.ba.Ma};a.a.f(c);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.ba.Ma}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.Rc(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c.foreach.Rc(c),d,e,f)}};a.m.Ra.foreach=!1;a.h.ea.foreach=\n!0;a.c.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if(\"activeElement\"in f){var g;try{g=f.activeElement}catch(l){g=f.body}e=g===b}f=c();a.m.eb(f,d,\"hasfocus\",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.B(b,\"focus\",f);a.a.B(b,\"focusin\",f);a.a.B(b,\"blur\",g);a.a.B(b,\"focusout\",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.f(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===\nd||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.u.G(a.a.Fb,null,[b,d?\"focusin\":\"focusout\"]))}};a.m.wa.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.m.wa.hasFocus=\"hasfocus\";a.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.fc(b,c())}};(function(){function b(b,d,e){a.c[b]={init:function(b,c,h,m,k){var l,p,q={},t,x,n;if(d){m=h.get(\"as\");var u=h.get(\"noChildContext\");n=!(m&&u);q={as:m,noChildContext:u,exportDependencies:n}}x=(t=\n\"render\"==h.get(\"completeOn\"))||h.has(a.i.pa);a.o(function(){var h=a.a.f(c()),m=!e!==!h,u=!p,r;if(n||m!==l){x&&(k=a.i.Cb(b,k));if(m){if(!d||n)q.dataDependency=a.S.o();r=d?k.createChildContext(\"function\"==typeof h?h:c,q):a.S.qa()?k.extend(null,q):k}u&&a.S.qa()&&(p=a.a.Ca(a.h.childNodes(b),!0));m?(u||a.h.va(b,a.a.Ca(p)),a.Oa(r,b)):(a.h.Ea(b),t||a.i.ma(b,a.i.H));l=m}},null,{l:b});return{controlsDescendantBindings:!0}}};a.m.Ra[b]=!1;a.h.ea[b]=!0}b(\"if\");b(\"ifnot\",!1,!0);b(\"with\",!0)})();a.c.let={init:function(b,\nc,d,e,f){c=f.extend(c);a.Oa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.let=!0;var Q={};a.c.options={init:function(b){if(\"select\"!==a.a.R(b))throw Error(\"options binding applies only to SELECT elements\");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function e(){return a.a.jb(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return\"function\"==d?b(a):\"string\"==d?a[b]:c}function g(c,d){if(x&&l)a.i.ma(b,a.i.H);else if(t.length){var e=\n0<=a.a.A(t,a.w.M(d[0]));a.a.Zc(d[0],e);x&&!e&&a.u.G(a.a.Fb,null,[b,\"change\"])}}var h=b.multiple,m=0!=b.length&&h?b.scrollTop:null,k=a.a.f(c()),l=d.get(\"valueAllowUnset\")&&d.has(\"value\"),p=d.get(\"optionsIncludeDestroyed\");c={};var q,t=[];l||(h?t=a.a.Mb(e(),a.w.M):0<=b.selectedIndex&&t.push(a.w.M(b.options[b.selectedIndex])));k&&(\"undefined\"==typeof k.length&&(k=[k]),q=a.a.jb(k,function(b){return p||b===n||null===b||!a.a.f(b._destroy)}),d.has(\"optionsCaption\")&&(k=a.a.f(d.get(\"optionsCaption\")),null!==\nk&&k!==n&&q.unshift(Q)));var x=!1;c.beforeRemove=function(a){b.removeChild(a)};k=g;d.has(\"optionsAfterRender\")&&\"function\"==typeof d.get(\"optionsAfterRender\")&&(k=function(b,c){g(0,c);a.u.G(d.get(\"optionsAfterRender\"),null,[c[0],b!==Q?b:n])});a.a.ec(b,q,function(c,e,g){g.length&&(t=!l&&g[0].selected?[a.w.M(g[0])]:[],x=!0);e=b.ownerDocument.createElement(\"option\");c===Q?(a.a.Bb(e,d.get(\"optionsCaption\")),a.w.cb(e,n)):(g=f(c,d.get(\"optionsValue\"),c),a.w.cb(e,a.a.f(g)),c=f(c,d.get(\"optionsText\"),g),\na.a.Bb(e,c));return[e]},c,k);if(!l){var B;h?B=t.length&&e().length<t.length:B=t.length&&0<=b.selectedIndex?a.w.M(b.options[b.selectedIndex])!==t[0]:t.length||0<=b.selectedIndex;B&&a.u.G(a.a.Fb,null,[b,\"change\"])}(l||a.S.Ya())&&a.i.ma(b,a.i.H);a.a.wd(b);m&&20<Math.abs(m-b.scrollTop)&&(b.scrollTop=m)}};a.c.options.$b=a.a.g.Z();a.c.selectedOptions={init:function(b,c,d){function e(){var e=c(),f=[];a.a.D(b.getElementsByTagName(\"option\"),function(b){b.selected&&f.push(a.w.M(b))});a.m.eb(e,d,\"selectedOptions\",\nf)}function f(){var d=a.a.f(c()),e=b.scrollTop;d&&\"number\"==typeof d.length&&a.a.D(b.getElementsByTagName(\"option\"),function(b){var c=0<=a.a.A(d,a.w.M(b));b.selected!=c&&a.a.Zc(b,c)});b.scrollTop=e}if(\"select\"!=a.a.R(b))throw Error(\"selectedOptions binding applies only to SELECT elements\");var g;a.i.subscribe(b,a.i.H,function(){g?e():(a.a.B(b,\"change\",e),g=a.o(f,null,{l:b}))},null,{notifyImmediately:!0})},update:function(){}};a.m.wa.selectedOptions=!0;a.c.style={update:function(b,c){var d=a.a.f(c()||\n{});a.a.P(d,function(c,d){d=a.a.f(d);if(null===d||d===n||!1===d)d=\"\";if(v)v(b).css(c,d);else if(/^--/.test(c))b.style.setProperty(c,d);else{c=c.replace(/-(\\w)/g,function(a,b){return b.toUpperCase()});var g=b.style[c];b.style[c]=d;d===g||b.style[c]!=g||isNaN(d)||(b.style[c]=d+\"px\")}})}};a.c.submit={init:function(b,c,d,e,f){if(\"function\"!=typeof c())throw Error(\"The value for a submit binding must be a function\");a.a.B(b,\"submit\",function(a){var d,e=c();try{d=e.call(f.$data,b)}finally{!0!==d&&(a.preventDefault?\na.preventDefault():a.returnValue=!1)}})}};a.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Bb(b,c())}};a.h.ea.text=!0;(function(){if(A&&A.navigator){var b=function(a){if(a)return parseFloat(a[1])},c=A.navigator.userAgent,d,e,f,g,h;(d=A.opera&&A.opera.version&&parseInt(A.opera.version()))||(h=b(c.match(/Edge\\/([^ ]+)$/)))||b(c.match(/Chrome\\/([^ ]+)/))||(e=b(c.match(/Version\\/([^ ]+) Safari/)))||(f=b(c.match(/Firefox\\/([^ ]+)/)))||(g=a.a.W||b(c.match(/MSIE ([^ ]+)/)))||\n(g=b(c.match(/rv:([^ )]+)/)))}if(8<=g&&10>g)var m=a.a.g.Z(),k=a.a.g.Z(),l=function(b){var c=this.activeElement;(c=c&&a.a.g.get(c,k))&&c(b)},p=function(b,c){var d=b.ownerDocument;a.a.g.get(d,m)||(a.a.g.set(d,m,!0),a.a.B(d,\"selectionchange\",l));a.a.g.set(b,k,c)};a.c.textInput={init:function(b,c,k){function l(c,d){a.a.B(b,c,d)}function m(){var d=a.a.f(c());if(null===d||d===n)d=\"\";L!==n&&d===L?a.a.setTimeout(m,4):b.value!==d&&(y=!0,b.value=d,y=!1,v=b.value)}function r(){w||(L=b.value,w=a.a.setTimeout(z,\n4))}function z(){clearTimeout(w);L=w=n;var d=b.value;v!==d&&(v=d,a.m.eb(c(),k,\"textInput\",d))}var v=b.value,w,L,A=9==a.a.W?r:z,y=!1;g&&l(\"keypress\",z);11>g&&l(\"propertychange\",function(a){y||\"value\"!==a.propertyName||A(a)});8==g&&(l(\"keyup\",z),l(\"keydown\",z));p&&(p(b,A),l(\"dragend\",r));(!g||9<=g)&&l(\"input\",A);5>e&&\"textarea\"===a.a.R(b)?(l(\"keydown\",r),l(\"paste\",r),l(\"cut\",r)):11>d?l(\"keydown\",r):4>f?(l(\"DOMAutoComplete\",z),l(\"dragdrop\",z),l(\"drop\",z)):h&&\"number\"===b.type&&l(\"keydown\",r);l(\"change\",\nz);l(\"blur\",z);a.o(m,null,{l:b})}};a.m.wa.textInput=!0;a.c.textinput={preprocess:function(a,b,c){c(\"textInput\",a)}}})();a.c.uniqueName={init:function(b,c){if(c()){var d=\"ko_unique_\"+ ++a.c.uniqueName.rd;a.a.Yc(b,d)}}};a.c.uniqueName.rd=0;a.c.using={init:function(b,c,d,e,f){var g;d.has(\"as\")&&(g={as:d.get(\"as\"),noChildContext:d.get(\"noChildContext\")});c=f.createChildContext(c,g);a.Oa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.using=!0;a.c.value={init:function(b,c,d){var e=a.a.R(b),f=\"input\"==\ne;if(!f||\"checkbox\"!=b.type&&\"radio\"!=b.type){var g=[],h=d.get(\"valueUpdate\"),m=!1,k=null;h&&(\"string\"==typeof h?g=[h]:g=a.a.wc(h),a.a.Pa(g,\"change\"));var l=function(){k=null;m=!1;var e=c(),f=a.w.M(b);a.m.eb(e,d,\"value\",f)};!a.a.W||!f||\"text\"!=b.type||\"off\"==b.autocomplete||b.form&&\"off\"==b.form.autocomplete||-1!=a.a.A(g,\"propertychange\")||(a.a.B(b,\"propertychange\",function(){m=!0}),a.a.B(b,\"focus\",function(){m=!1}),a.a.B(b,\"blur\",function(){m&&l()}));a.a.D(g,function(c){var d=l;a.a.Ud(c,\"after\")&&\n(d=function(){k=a.w.M(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.B(b,c,d)});var p;p=f&&\"file\"==b.type?function(){var d=a.a.f(c());null===d||d===n||\"\"===d?b.value=\"\":a.u.G(l)}:function(){var f=a.a.f(c()),g=a.w.M(b);if(null!==k&&f===k)a.a.setTimeout(p,0);else if(f!==g||g===n)\"select\"===e?(g=d.get(\"valueAllowUnset\"),a.w.cb(b,f,g),g||f===a.w.M(b)||a.u.G(l)):a.w.cb(b,f)};if(\"select\"===e){var q;a.i.subscribe(b,a.i.H,function(){q?d.get(\"valueAllowUnset\")?p():l():(a.a.B(b,\"change\",l),q=a.o(p,null,{l:b}))},\nnull,{notifyImmediately:!0})}else a.a.B(b,\"change\",l),a.o(p,null,{l:b})}else a.ib(b,{checkedValue:c})},update:function(){}};a.m.wa.value=!0;a.c.visible={update:function(b,c){var d=a.a.f(c()),e=\"none\"!=b.style.display;d&&!e?b.style.display=\"\":!d&&e&&(b.style.display=\"none\")}};a.c.hidden={update:function(b,c){a.c.visible.update(b,function(){return!a.a.f(c())})}};(function(b){a.c[b]={init:function(c,d,e,f,g){return a.c.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})(\"click\");\na.ca=function(){};a.ca.prototype.renderTemplateSource=function(){throw Error(\"Override renderTemplateSource\");};a.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error(\"Override createJavaScriptEvaluatorBlock\");};a.ca.prototype.makeTemplateSource=function(b,c){if(\"string\"==typeof b){c=c||w;var d=c.getElementById(b);if(!d)throw Error(\"Cannot find template with ID \"+b);return new a.C.F(d)}if(1==b.nodeType||8==b.nodeType)return new a.C.ia(b);throw Error(\"Unknown template type: \"+b);};a.ca.prototype.renderTemplate=\nfunction(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.ca.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data(\"isRewritten\")};a.ca.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data(\"isRewritten\",!0)};a.b(\"templateEngine\",a.ca);a.kc=function(){function b(b,c,d,h){b=a.m.ac(b);for(var m=a.m.Ra,k=0;k<b.length;k++){var l=b[k].key;if(Object.prototype.hasOwnProperty.call(m,\nl)){var p=m[l];if(\"function\"===typeof p){if(l=p(b[k].value))throw Error(l);}else if(!p)throw Error(\"This template engine does not support the '\"+l+\"' binding within its templates\");}}d=\"ko.__tr_ambtns(function($context,$element){return(function(){return{ \"+a.m.vb(b,{valueAccessors:!0})+\" } })()},'\"+d.toLowerCase()+\"')\";return h.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\\d*)(?:\\s+(?!data-bind\\s*=\\s*)[a-z0-9\\-]+(?:=(?:\\\"[^\\\"]*\\\"|\\'[^\\']*\\'|[^>]*))?)*\\s+)data-bind\\s*=\\s*([\"'])([\\s\\S]*?)\\3/gi,\nd=/\\x3c!--\\s*ko\\b\\s*([\\s\\S]*?)\\s*--\\x3e/g;return{xd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.kc.Ld(b,c)},d)},Ld:function(a,f){return a.replace(c,function(a,c,d,e,l){return b(l,c,d,f)}).replace(d,function(a,c){return b(c,\"\\x3c!-- ko --\\x3e\",\"#comment\",f)})},md:function(b,c){return a.aa.Xb(function(d,h){var m=d.nextSibling;m&&m.nodeName.toLowerCase()===c&&a.ib(m,b,h)})}}}();a.b(\"__tr_ambtns\",a.kc.md);(function(){a.C={};a.C.F=function(b){if(this.F=b){var c=\na.a.R(b);this.ab=\"script\"===c?1:\"textarea\"===c?2:\"template\"==c&&b.content&&11===b.content.nodeType?3:4}};a.C.F.prototype.text=function(){var b=1===this.ab?\"text\":2===this.ab?\"value\":\"innerHTML\";if(0==arguments.length)return this.F[b];var c=arguments[0];\"innerHTML\"===b?a.a.fc(this.F,c):this.F[b]=c};var b=a.a.g.Z()+\"_\";a.C.F.prototype.data=function(c){if(1===arguments.length)return a.a.g.get(this.F,b+c);a.a.g.set(this.F,b+c,arguments[1])};var c=a.a.g.Z();a.C.F.prototype.nodes=function(){var b=this.F;\nif(0==arguments.length){var e=a.a.g.get(b,c)||{},f=e.lb||(3===this.ab?b.content:4===this.ab?b:n);if(!f||e.jd){var g=this.text();g&&g!==e.bb&&(f=a.a.Md(g,b.ownerDocument),a.a.g.set(b,c,{lb:f,bb:g,jd:!0}))}return f}e=arguments[0];this.ab!==n&&this.text(\"\");a.a.g.set(b,c,{lb:e})};a.C.ia=function(a){this.F=a};a.C.ia.prototype=new a.C.F;a.C.ia.prototype.constructor=a.C.ia;a.C.ia.prototype.text=function(){if(0==arguments.length){var b=a.a.g.get(this.F,c)||{};b.bb===n&&b.lb&&(b.bb=b.lb.innerHTML);return b.bb}a.a.g.set(this.F,\nc,{bb:arguments[0]})};a.b(\"templateSources\",a.C);a.b(\"templateSources.domElement\",a.C.F);a.b(\"templateSources.anonymousTemplate\",a.C.ia)})();(function(){function b(b,c,d){var e;for(c=a.h.nextSibling(c);b&&(e=b)!==c;)b=a.h.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=a.ga.instance,m=h.preprocessNode;if(m){b(e,f,function(a,b){var c=a.previousSibling,d=m.call(h,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):\n(c.push(e,f),a.a.Ua(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.vc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.aa.cd(b,[d])});a.a.Ua(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,h,m){m=m||{};var n=(b&&d(b)||f||{}).ownerDocument,B=m.templateEngine||g;a.kc.xd(f,B,n);f=B.renderTemplate(f,h,m,n);if(\"number\"!=typeof f.length||0<f.length&&\"number\"!=typeof f[0].nodeType)throw Error(\"Template engine must return an array of DOM nodes\");n=!1;switch(e){case \"replaceChildren\":a.h.va(b,\nf);n=!0;break;case \"replaceNode\":a.a.Xc(b,f);n=!0;break;case \"ignoreTargetNode\":break;default:throw Error(\"Unknown renderMode: \"+e);}n&&(c(f,h),m.afterRender&&a.u.G(m.afterRender,null,[f,h[m.as||\"$data\"]]),\"replaceChildren\"==e&&a.i.ma(b,a.i.H));return f}function f(b,c,d){return a.O(b)?b():\"function\"===typeof b?b(c,d):b}var g;a.gc=function(b){if(b!=n&&!(b instanceof a.ca))throw Error(\"templateEngine must inherit from ko.templateEngine\");g=b};a.dc=function(b,c,h,m,t){h=h||{};if((h.templateEngine||g)==\nn)throw Error(\"Set a template engine before calling renderTemplate\");t=t||\"replaceChildren\";if(m){var x=d(m);return a.$(function(){var g=c&&c instanceof a.fa?c:new a.fa(c,null,null,null,{exportDependencies:!0}),n=f(b,g.$data,g),g=e(m,t,n,g,h);\"replaceNode\"==t&&(m=g,x=d(m))},null,{Sa:function(){return!x||!a.a.Sb(x)},l:x&&\"replaceNode\"==t?x.parentNode:x})}return a.aa.Xb(function(d){a.dc(b,c,h,d,\"replaceNode\")})};a.Qd=function(b,d,g,h,m){function x(b,c){a.u.G(a.a.ec,null,[h,b,u,g,r,c]);a.i.ma(h,a.i.H)}\nfunction r(a,b){c(b,v);g.afterRender&&g.afterRender(b,a);v=null}function u(a,c){v=m.createChildContext(a,{as:z,noChildContext:g.noChildContext,extend:function(a){a.$index=c;z&&(a[z+\"Index\"]=c)}});var d=f(b,a,v);return e(h,\"ignoreTargetNode\",d,v,g)}var v,z=g.as,w=!1===g.includeDestroyed||a.options.foreachHidesDestroyed&&!g.includeDestroyed;if(w||g.beforeRemove||!a.Pc(d))return a.$(function(){var b=a.a.f(d)||[];\"undefined\"==typeof b.length&&(b=[b]);w&&(b=a.a.jb(b,function(b){return b===n||null===b||\n!a.a.f(b._destroy)}));x(b)},null,{l:h});x(d.v());var A=d.subscribe(function(a){x(d(),a)},null,\"arrayChange\");A.l(h);return A};var h=a.a.g.Z(),m=a.a.g.Z();a.c.template={init:function(b,c){var d=a.a.f(c());if(\"string\"==typeof d||\"name\"in d)a.h.Ea(b);else if(\"nodes\"in d){d=d.nodes||[];if(a.O(d))throw Error('The \"nodes\" option must be a plain, non-observable array.');var e=d[0]&&d[0].parentNode;e&&a.a.g.get(e,m)||(e=a.a.Yb(d),a.a.g.set(e,m,!0));(new a.C.ia(b)).nodes(e)}else if(d=a.h.childNodes(b),0<d.length)e=\na.a.Yb(d),(new a.C.ia(b)).nodes(e);else throw Error(\"Anonymous template defined, but no template content was provided\");return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var g=c();c=a.a.f(g);d=!0;e=null;\"string\"==typeof c?c={}:(g=\"name\"in c?c.name:b,\"if\"in c&&(d=a.a.f(c[\"if\"])),d&&\"ifnot\"in c&&(d=!a.a.f(c.ifnot)),d&&!g&&(d=!1));\"foreach\"in c?e=a.Qd(g,d&&c.foreach||[],c,b,f):d?(d=f,\"data\"in c&&(d=f.createChildContext(c.data,{as:c.as,noChildContext:c.noChildContext,exportDependencies:!0})),\ne=a.dc(g,d,c,b)):a.h.Ea(b);f=e;(c=a.a.g.get(b,h))&&\"function\"==typeof c.s&&c.s();a.a.g.set(b,h,!f||f.ja&&!f.ja()?n:f)}};a.m.Ra.template=function(b){b=a.m.ac(b);return 1==b.length&&b[0].unknown||a.m.Id(b,\"name\")?null:\"This template engine does not support anonymous templates nested within its templates\"};a.h.ea.template=!0})();a.b(\"setTemplateEngine\",a.gc);a.b(\"renderTemplate\",a.dc);a.a.Kc=function(a,c,d){if(a.length&&c.length){var e,f,g,h,m;for(e=f=0;(!d||e<d)&&(h=a[f]);++f){for(g=0;m=c[g];++g)if(h.value===\nm.value){h.moved=m.index;m.moved=h.index;c.splice(g,1);e=g=0;break}e+=g}}};a.a.Pb=function(){function b(b,d,e,f,g){var h=Math.min,m=Math.max,k=[],l,p=b.length,q,n=d.length,r=n-p||1,v=p+n+1,u,w,z;for(l=0;l<=p;l++)for(w=u,k.push(u=[]),z=h(n,l+r),q=m(0,l-1);q<=z;q++)u[q]=q?l?b[l-1]===d[q-1]?w[q-1]:h(w[q]||v,u[q-1]||v)+1:q+1:l+1;h=[];m=[];r=[];l=p;for(q=n;l||q;)n=k[l][q]-1,q&&n===k[l][q-1]?m.push(h[h.length]={status:e,value:d[--q],index:q}):l&&n===k[l-1][q]?r.push(h[h.length]={status:f,value:b[--l],index:l}):\n(--q,--l,g.sparse||h.push({status:\"retained\",value:d[q]}));a.a.Kc(r,m,!g.dontLimitMoves&&10*p);return h.reverse()}return function(a,d,e){e=\"boolean\"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,\"added\",\"deleted\",e):b(d,a,\"deleted\",\"added\",e)}}();a.b(\"utils.compareArrays\",a.a.Pb);(function(){function b(b,c,d,h,m){var k=[],l=a.$(function(){var l=c(d,m,a.a.Ua(k,b))||[];0<k.length&&(a.a.Xc(k,l),h&&a.u.G(h,null,[d,l,m]));k.length=0;a.a.Nb(k,l)},null,{l:b,Sa:function(){return!a.a.kd(k)}});\nreturn{Y:k,$:l.ja()?l:n}}var c=a.a.g.Z(),d=a.a.g.Z();a.a.ec=function(e,f,g,h,m,k){function l(b){y={Aa:b,pb:a.ta(w++)};v.push(y);r||F.push(y)}function p(b){y=t[b];w!==y.pb.v()&&D.push(y);y.pb(w++);a.a.Ua(y.Y,e);v.push(y)}function q(b,c){if(b)for(var d=0,e=c.length;d<e;d++)a.a.D(c[d].Y,function(a){b(a,d,c[d].Aa)})}f=f||[];\"undefined\"==typeof f.length&&(f=[f]);h=h||{};var t=a.a.g.get(e,c),r=!t,v=[],u=0,w=0,z=[],A=[],C=[],D=[],F=[],y,I=0;if(r)a.a.D(f,l);else{if(!k||t&&t._countWaitingForRemove){var E=\na.a.Mb(t,function(a){return a.Aa});k=a.a.Pb(E,f,{dontLimitMoves:h.dontLimitMoves,sparse:!0})}for(var E=0,G,H,K;G=k[E];E++)switch(H=G.moved,K=G.index,G.status){case \"deleted\":for(;u<K;)p(u++);H===n&&(y=t[u],y.$&&(y.$.s(),y.$=n),a.a.Ua(y.Y,e).length&&(h.beforeRemove&&(v.push(y),I++,y.Aa===d?y=null:C.push(y)),y&&z.push.apply(z,y.Y)));u++;break;case \"added\":for(;w<K;)p(u++);H!==n?(A.push(v.length),p(H)):l(G.value)}for(;w<f.length;)p(u++);v._countWaitingForRemove=I}a.a.g.set(e,c,v);q(h.beforeMove,D);a.a.D(z,\nh.beforeRemove?a.oa:a.removeNode);var M,O,P;try{P=e.ownerDocument.activeElement}catch(N){}if(A.length)for(;(E=A.shift())!=n;){y=v[E];for(M=n;E;)if((O=v[--E].Y)&&O.length){M=O[O.length-1];break}for(f=0;u=y.Y[f];M=u,f++)a.h.Wb(e,u,M)}for(E=0;y=v[E];E++){y.Y||a.a.extend(y,b(e,g,y.Aa,m,y.pb));for(f=0;u=y.Y[f];M=u,f++)a.h.Wb(e,u,M);!y.Ed&&m&&(m(y.Aa,y.Y,y.pb),y.Ed=!0,M=y.Y[y.Y.length-1])}P&&e.ownerDocument.activeElement!=P&&P.focus();q(h.beforeRemove,C);for(E=0;E<C.length;++E)C[E].Aa=d;q(h.afterMove,D);\nq(h.afterAdd,F)}})();a.b(\"utils.setDomNodeChildrenFromArrayMapping\",a.a.ec);a.ba=function(){this.allowTemplateRewriting=!1};a.ba.prototype=new a.ca;a.ba.prototype.constructor=a.ba;a.ba.prototype.renderTemplateSource=function(b,c,d,e){if(c=(9>a.a.W?0:b.nodes)?b.nodes():null)return a.a.la(c.cloneNode(!0).childNodes);b=b.text();return a.a.ua(b,e)};a.ba.Ma=new a.ba;a.gc(a.ba.Ma);a.b(\"nativeTemplateEngine\",a.ba);(function(){a.$a=function(){var a=this.Hd=function(){if(!v||!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf(\"__\"))return 2}catch(a){}return 1}();\nthis.renderTemplateSource=function(b,e,f,g){g=g||w;f=f||{};if(2>a)throw Error(\"Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.\");var h=b.data(\"precompiled\");h||(h=b.text()||\"\",h=v.template(null,\"{{ko_with $item.koBindingContext}}\"+h+\"{{/ko_with}}\"),b.data(\"precompiled\",h));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(h,b,e);e.appendTo(g.createElement(\"div\"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return\"{{ko_code ((function() { return \"+\na+\" })()) }}\"};this.addTemplate=function(a,b){w.write(\"<script type='text/html' id='\"+a+\"'>\"+b+\"\\x3c/script>\")};0<a&&(v.tmpl.tag.ko_code={open:\"__.push($1 || '');\"},v.tmpl.tag.ko_with={open:\"with($1) {\",close:\"} \"})};a.$a.prototype=new a.ca;a.$a.prototype.constructor=a.$a;var b=new a.$a;0<b.Hd&&a.gc(b);a.b(\"jqueryTmplTemplateEngine\",a.$a)})()})})();})();\n","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ka = moment.defineLocale('ka', {\n        months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n            '_'\n        ),\n        monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n        weekdays: {\n            standalone:\n                'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n                    '_'\n                ),\n            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n                '_'\n            ),\n            isFormat: /(წინა|შემდეგ)/,\n        },\n        weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n        weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[დღეს] LT[-ზე]',\n            nextDay: '[ხვალ] LT[-ზე]',\n            lastDay: '[გუშინ] LT[-ზე]',\n            nextWeek: '[შემდეგ] dddd LT[-ზე]',\n            lastWeek: '[წინა] dddd LT-ზე',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return s.replace(\n                    /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n                    function ($0, $1, $2) {\n                        return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n                    }\n                );\n            },\n            past: function (s) {\n                if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n                    return s.replace(/(ი|ე)$/, 'ის წინ');\n                }\n                if (/წელი/.test(s)) {\n                    return s.replace(/წელი$/, 'წლის წინ');\n                }\n                return s;\n            },\n            s: 'რამდენიმე წამი',\n            ss: '%d წამი',\n            m: 'წუთი',\n            mm: '%d წუთი',\n            h: 'საათი',\n            hh: '%d საათი',\n            d: 'დღე',\n            dd: '%d დღე',\n            M: 'თვე',\n            MM: '%d თვე',\n            y: 'წელი',\n            yy: '%d წელი',\n        },\n        dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n        ordinal: function (number) {\n            if (number === 0) {\n                return number;\n            }\n            if (number === 1) {\n                return number + '-ლი';\n            }\n            if (\n                number < 20 ||\n                (number <= 100 && number % 20 === 0) ||\n                number % 100 === 0\n            ) {\n                return 'მე-' + number;\n            }\n            return number + '-ე';\n        },\n        week: {\n            dow: 1,\n            doy: 7,\n        },\n    });\n\n    return ka;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var itCh = moment.defineLocale('it-ch', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Oggi alle] LT',\n            nextDay: '[Domani alle] LT',\n            nextWeek: 'dddd [alle] LT',\n            lastDay: '[Ieri alle] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[la scorsa] dddd [alle] LT';\n                    default:\n                        return '[lo scorso] dddd [alle] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (s) {\n                return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n            },\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mi = moment.defineLocale('mi', {\n        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n            '_'\n        ),\n        monthsShort:\n            'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n                '_'\n            ),\n        monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [i] HH:mm',\n            LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i teie mahana, i] LT',\n            nextDay: '[apopo i] LT',\n            nextWeek: 'dddd [i] LT',\n            lastDay: '[inanahi i] LT',\n            lastWeek: 'dddd [whakamutunga i] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'i roto i %s',\n            past: '%s i mua',\n            s: 'te hēkona ruarua',\n            ss: '%d hēkona',\n            m: 'he meneti',\n            mm: '%d meneti',\n            h: 'te haora',\n            hh: '%d haora',\n            d: 'he ra',\n            dd: '%d ra',\n            M: 'he marama',\n            MM: '%d marama',\n            y: 'he tau',\n            yy: '%d tau',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var te = moment.defineLocale('te', {\n        months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n            '_'\n        ),\n        monthsShort:\n            'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n                '_'\n            ),\n        weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n        weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[నేడు] LT',\n            nextDay: '[రేపు] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[నిన్న] LT',\n            lastWeek: '[గత] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s లో',\n            past: '%s క్రితం',\n            s: 'కొన్ని క్షణాలు',\n            ss: '%d సెకన్లు',\n            m: 'ఒక నిమిషం',\n            mm: '%d నిమిషాలు',\n            h: 'ఒక గంట',\n            hh: '%d గంటలు',\n            d: 'ఒక రోజు',\n            dd: '%d రోజులు',\n            M: 'ఒక నెల',\n            MM: '%d నెలలు',\n            y: 'ఒక సంవత్సరం',\n            yy: '%d సంవత్సరాలు',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n        ordinal: '%dవ',\n        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'రాత్రి') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ఉదయం') {\n                return hour;\n            } else if (meridiem === 'మధ్యాహ్నం') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'సాయంత్రం') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'రాత్రి';\n            } else if (hour < 10) {\n                return 'ఉదయం';\n            } else if (hour < 17) {\n                return 'మధ్యాహ్నం';\n            } else if (hour < 20) {\n                return 'సాయంత్రం';\n            } else {\n                return 'రాత్రి';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return te;\n\n})));\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!./moment.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"moment\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"moment\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n            ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n            m: ['एका मिणटान', 'एक मिनूट'],\n            mm: [number + ' मिणटांनी', number + ' मिणटां'],\n            h: ['एका वरान', 'एक वर'],\n            hh: [number + ' वरांनी', number + ' वरां'],\n            d: ['एका दिसान', 'एक दीस'],\n            dd: [number + ' दिसांनी', number + ' दीस'],\n            M: ['एका म्हयन्यान', 'एक म्हयनो'],\n            MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n            y: ['एका वर्सान', 'एक वर्स'],\n            yy: [number + ' वर्सांनी', number + ' वर्सां'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomDeva = moment.defineLocale('gom-deva', {\n        months: {\n            standalone:\n                'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n                    '_'\n                ),\n            format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort:\n            'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n        weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n        weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [वाजतां]',\n            LTS: 'A h:mm:ss [वाजतां]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n            llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n        },\n        calendar: {\n            sameDay: '[आयज] LT',\n            nextDay: '[फाल्यां] LT',\n            nextWeek: '[फुडलो] dddd[,] LT',\n            lastDay: '[काल] LT',\n            lastWeek: '[फाटलो] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s आदीं',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'वेर' only applies to day of the month\n                case 'D':\n                    return number + 'वेर';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राती') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सकाळीं') {\n                return hour;\n            } else if (meridiem === 'दनपारां') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'सांजे') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'राती';\n            } else if (hour < 12) {\n                return 'सकाळीं';\n            } else if (hour < 16) {\n                return 'दनपारां';\n            } else if (hour < 20) {\n                return 'सांजे';\n            } else {\n                return 'राती';\n            }\n        },\n    });\n\n    return gomDeva;\n\n})));\n","//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var yo = moment.defineLocale('yo', {\n        months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n            '_'\n        ),\n        monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n        weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n        weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n        weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Ònì ni] LT',\n            nextDay: '[Ọ̀la ni] LT',\n            nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n            lastDay: '[Àna ni] LT',\n            lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ní %s',\n            past: '%s kọjá',\n            s: 'ìsẹjú aayá die',\n            ss: 'aayá %d',\n            m: 'ìsẹjú kan',\n            mm: 'ìsẹjú %d',\n            h: 'wákati kan',\n            hh: 'wákati %d',\n            d: 'ọjọ́ kan',\n            dd: 'ọjọ́ %d',\n            M: 'osù kan',\n            MM: 'osù %d',\n            y: 'ọdún kan',\n            yy: 'ọdún %d',\n        },\n        dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n        ordinal: 'ọjọ́ %d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return yo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '၁',\n            2: '၂',\n            3: '၃',\n            4: '၄',\n            5: '၅',\n            6: '၆',\n            7: '၇',\n            8: '၈',\n            9: '၉',\n            0: '၀',\n        },\n        numberMap = {\n            '၁': '1',\n            '၂': '2',\n            '၃': '3',\n            '၄': '4',\n            '၅': '5',\n            '၆': '6',\n            '၇': '7',\n            '၈': '8',\n            '၉': '9',\n            '၀': '0',\n        };\n\n    var my = moment.defineLocale('my', {\n        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n            '_'\n        ),\n        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n            '_'\n        ),\n        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[ယနေ.] LT [မှာ]',\n            nextDay: '[မနက်ဖြန်] LT [မှာ]',\n            nextWeek: 'dddd LT [မှာ]',\n            lastDay: '[မနေ.က] LT [မှာ]',\n            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'လာမည့် %s မှာ',\n            past: 'လွန်ခဲ့သော %s က',\n            s: 'စက္ကန်.အနည်းငယ်',\n            ss: '%d စက္ကန့်',\n            m: 'တစ်မိနစ်',\n            mm: '%d မိနစ်',\n            h: 'တစ်နာရီ',\n            hh: '%d နာရီ',\n            d: 'တစ်ရက်',\n            dd: '%d ရက်',\n            M: 'တစ်လ',\n            MM: '%d လ',\n            y: 'တစ်နှစ်',\n            yy: '%d နှစ်',\n        },\n        preparse: function (string) {\n            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return my;\n\n})));\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n              ? forms[1]\n              : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n            hh: 'час_часа_часов',\n            dd: 'день_дня_дней',\n            ww: 'неделя_недели_недель',\n            MM: 'месяц_месяца_месяцев',\n            yy: 'год_года_лет',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'минута' : 'минуту';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    var monthsParse = [\n        /^янв/i,\n        /^фев/i,\n        /^мар/i,\n        /^апр/i,\n        /^ма[йя]/i,\n        /^июн/i,\n        /^июл/i,\n        /^авг/i,\n        /^сен/i,\n        /^окт/i,\n        /^ноя/i,\n        /^дек/i,\n    ];\n\n    // http://new.gramota.ru/spravka/rules/139-prop : § 103\n    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n    var ru = moment.defineLocale('ru', {\n        months: {\n            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n                '_'\n            ),\n            standalone:\n                'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n                    '_'\n                ),\n        },\n        monthsShort: {\n            // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n                '_'\n            ),\n            standalone:\n                'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n                    '_'\n                ),\n        },\n        weekdays: {\n            standalone:\n                'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n                    '_'\n                ),\n            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n                '_'\n            ),\n            isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n        },\n        weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n        monthsRegex:\n            /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // копия предыдущего\n        monthsShortRegex:\n            /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // полные названия с падежами\n        monthsStrictRegex:\n            /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n        // Выражение, которое соответствует только сокращённым формам\n        monthsShortStrictRegex:\n            /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., H:mm',\n            LLLL: 'dddd, D MMMM YYYY г., H:mm',\n        },\n        calendar: {\n            sameDay: '[Сегодня, в] LT',\n            nextDay: '[Завтра, в] LT',\n            lastDay: '[Вчера, в] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В следующее] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В следующий] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В следующую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            lastWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В прошлое] dddd, [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В прошлый] dddd, [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В прошлую] dddd, [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd, [в] LT';\n                    } else {\n                        return '[В] dddd, [в] LT';\n                    }\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'через %s',\n            past: '%s назад',\n            s: 'несколько секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'час',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            w: 'неделя',\n            ww: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночи|утра|дня|вечера/i,\n        isPM: function (input) {\n            return /^(дня|вечера)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночи';\n            } else if (hour < 12) {\n                return 'утра';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечера';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                case 'w':\n                case 'W':\n                    return number + '-я';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ru;\n\n})));\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n//!           Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var nb = moment.defineLocale('nb', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] HH:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[forrige] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'noen sekunder',\n            ss: '%d sekunder',\n            m: 'ett minutt',\n            mm: '%d minutter',\n            h: 'én time',\n            hh: '%d timer',\n            d: 'én dag',\n            dd: '%d dager',\n            w: 'én uke',\n            ww: '%d uker',\n            M: 'én måned',\n            MM: '%d måneder',\n            y: 'ett år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var msMy = moment.defineLocale('ms-my', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return msMy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '1',\n            2: '2',\n            3: '3',\n            4: '4',\n            5: '5',\n            6: '6',\n            7: '7',\n            8: '8',\n            9: '9',\n            0: '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                  ? 1\n                  : n === 2\n                    ? 2\n                    : n % 100 >= 3 && n % 100 <= 10\n                      ? 3\n                      : n % 100 >= 11\n                        ? 4\n                        : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var arLy = moment.defineLocale('ar-ly', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return arLy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var uzLatn = moment.defineLocale('uz-latn', {\n        months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n        weekdays:\n            'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n                '_'\n            ),\n        weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n        weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bugun soat] LT [da]',\n            nextDay: '[Ertaga] LT [da]',\n            nextWeek: 'dddd [kuni soat] LT [da]',\n            lastDay: '[Kecha soat] LT [da]',\n            lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Yaqin %s ichida',\n            past: 'Bir necha %s oldin',\n            s: 'soniya',\n            ss: '%d soniya',\n            m: 'bir daqiqa',\n            mm: '%d daqiqa',\n            h: 'bir soat',\n            hh: '%d soat',\n            d: 'bir kun',\n            dd: '%d kun',\n            M: 'bir oy',\n            MM: '%d oy',\n            y: 'bir yil',\n            yy: '%d yil',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uzLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var fo = moment.defineLocale('fo', {\n        months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n        weekdays:\n            'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n                '_'\n            ),\n        weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n        weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D. MMMM, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Í dag kl.] LT',\n            nextDay: '[Í morgin kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[Í gjár kl.] LT',\n            lastWeek: '[síðstu] dddd [kl] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'um %s',\n            past: '%s síðani',\n            s: 'fá sekund',\n            ss: '%d sekundir',\n            m: 'ein minuttur',\n            mm: '%d minuttir',\n            h: 'ein tími',\n            hh: '%d tímar',\n            d: 'ein dagur',\n            dd: '%d dagar',\n            M: 'ein mánaður',\n            MM: '%d mánaðir',\n            y: 'eitt ár',\n            yy: '%d ár',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots =\n            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^(maart|mrt\\.?)$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex =\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nl = moment.defineLocale('nl', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex:\n            /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays:\n            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            w: 'één week',\n            ww: '%d weken',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var zhCn = moment.defineLocale('zh-cn', {\n        months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n            '_'\n        ),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n        weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日Ah点mm分',\n            LLLL: 'YYYY年M月D日ddddAh点mm分',\n            l: 'YYYY/M/D',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日dddd HH:mm',\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            } else {\n                // '中午'\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar: {\n            sameDay: '[今天]LT',\n            nextDay: '[明天]LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[下]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            lastDay: '[昨天]LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[上]dddLT';\n                } else {\n                    return '[本]dddLT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '周';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s后',\n            past: '%s前',\n            s: '几秒',\n            ss: '%d 秒',\n            m: '1 分钟',\n            mm: '%d 分钟',\n            h: '1 小时',\n            hh: '%d 小时',\n            d: '1 天',\n            dd: '%d 天',\n            w: '1 周',\n            ww: '%d 周',\n            M: '1 个月',\n            MM: '%d 个月',\n            y: '1 年',\n            yy: '%d 年',\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return zhCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        };\n\n    var arSa = moment.defineLocale('ar-sa', {\n        months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return arSa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var eo = moment.defineLocale('eo', {\n        months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n        weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n        weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: '[la] D[-an de] MMMM, YYYY',\n            LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n            LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n            llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n        },\n        meridiemParse: /[ap]\\.t\\.m/i,\n        isPM: function (input) {\n            return input.charAt(0).toLowerCase() === 'p';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'p.t.m.' : 'P.T.M.';\n            } else {\n                return isLower ? 'a.t.m.' : 'A.T.M.';\n            }\n        },\n        calendar: {\n            sameDay: '[Hodiaŭ je] LT',\n            nextDay: '[Morgaŭ je] LT',\n            nextWeek: 'dddd[n je] LT',\n            lastDay: '[Hieraŭ je] LT',\n            lastWeek: '[pasintan] dddd[n je] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'post %s',\n            past: 'antaŭ %s',\n            s: 'kelkaj sekundoj',\n            ss: '%d sekundoj',\n            m: 'unu minuto',\n            mm: '%d minutoj',\n            h: 'unu horo',\n            hh: '%d horoj',\n            d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n            dd: '%d tagoj',\n            M: 'unu monato',\n            MM: '%d monatoj',\n            y: 'unu jaro',\n            yy: '%d jaroj',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}a/,\n        ordinal: '%da',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eo;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enSg = moment.defineLocale('en-sg', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enSg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n            ss: [number + 'sekundi', number + 'sekundit'],\n            m: ['ühe minuti', 'üks minut'],\n            mm: [number + ' minuti', number + ' minutit'],\n            h: ['ühe tunni', 'tund aega', 'üks tund'],\n            hh: [number + ' tunni', number + ' tundi'],\n            d: ['ühe päeva', 'üks päev'],\n            M: ['kuu aja', 'kuu aega', 'üks kuu'],\n            MM: [number + ' kuu', number + ' kuud'],\n            y: ['ühe aasta', 'aasta', 'üks aasta'],\n            yy: [number + ' aasta', number + ' aastat'],\n        };\n        if (withoutSuffix) {\n            return format[key][2] ? format[key][2] : format[key][1];\n        }\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var et = moment.defineLocale('et', {\n        months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n        weekdays:\n            'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n                '_'\n            ),\n        weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n        weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Täna,] LT',\n            nextDay: '[Homme,] LT',\n            nextWeek: '[Järgmine] dddd LT',\n            lastDay: '[Eile,] LT',\n            lastWeek: '[Eelmine] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s pärast',\n            past: '%s tagasi',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: '%d päeva',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return et;\n\n})));\n","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ko = moment.defineLocale('ko', {\n        months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n        monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n            '_'\n        ),\n        weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n        weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n        weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'YYYY.MM.DD.',\n            LL: 'YYYY년 MMMM D일',\n            LLL: 'YYYY년 MMMM D일 A h:mm',\n            LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n            l: 'YYYY.MM.DD.',\n            ll: 'YYYY년 MMMM D일',\n            lll: 'YYYY년 MMMM D일 A h:mm',\n            llll: 'YYYY년 MMMM D일 dddd A h:mm',\n        },\n        calendar: {\n            sameDay: '오늘 LT',\n            nextDay: '내일 LT',\n            nextWeek: 'dddd LT',\n            lastDay: '어제 LT',\n            lastWeek: '지난주 dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s 후',\n            past: '%s 전',\n            s: '몇 초',\n            ss: '%d초',\n            m: '1분',\n            mm: '%d분',\n            h: '한 시간',\n            hh: '%d시간',\n            d: '하루',\n            dd: '%d일',\n            M: '한 달',\n            MM: '%d달',\n            y: '일 년',\n            yy: '%d년',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '일';\n                case 'M':\n                    return number + '월';\n                case 'w':\n                case 'W':\n                    return number + '주';\n                default:\n                    return number;\n            }\n        },\n        meridiemParse: /오전|오후/,\n        isPM: function (token) {\n            return token === '오후';\n        },\n        meridiem: function (hour, minute, isUpper) {\n            return hour < 12 ? '오전' : '오후';\n        },\n    });\n\n    return ko;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['секунда', 'секунде', 'секунди'],\n            m: ['један минут', 'једног минута'],\n            mm: ['минут', 'минута', 'минута'],\n            h: ['један сат', 'једног сата'],\n            hh: ['сат', 'сата', 'сати'],\n            d: ['један дан', 'једног дана'],\n            dd: ['дан', 'дана', 'дана'],\n            M: ['један месец', 'једног месеца'],\n            MM: ['месец', 'месеца', 'месеци'],\n            y: ['једну годину', 'једне године'],\n            yy: ['годину', 'године', 'година'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            if (\n                number % 10 >= 1 &&\n                number % 10 <= 4 &&\n                (number % 100 < 10 || number % 100 >= 20)\n            ) {\n                return number % 10 === 1 ? wordKey[0] : wordKey[1];\n            }\n            return wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key, isFuture) {\n            var wordKey = translator.words[key],\n                word;\n\n            if (key.length === 1) {\n                // Nominativ\n                if (key === 'y' && withoutSuffix) return 'једна година';\n                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n            }\n\n            word = translator.correctGrammaticalCase(number, wordKey);\n            // Nominativ\n            if (key === 'yy' && withoutSuffix && word === 'годину') {\n                return number + ' година';\n            }\n\n            return number + ' ' + word;\n        },\n    };\n\n    var srCyrl = moment.defineLocale('sr-cyrl', {\n        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n            '_'\n        ),\n        monthsShort:\n            'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[данас у] LT',\n            nextDay: '[сутра у] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[у] [недељу] [у] LT';\n                    case 3:\n                        return '[у] [среду] [у] LT';\n                    case 6:\n                        return '[у] [суботу] [у] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[у] dddd [у] LT';\n                }\n            },\n            lastDay: '[јуче у] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[прошле] [недеље] [у] LT',\n                    '[прошлог] [понедељка] [у] LT',\n                    '[прошлог] [уторка] [у] LT',\n                    '[прошле] [среде] [у] LT',\n                    '[прошлог] [четвртка] [у] LT',\n                    '[прошлог] [петка] [у] LT',\n                    '[прошле] [суботе] [у] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: 'пре %s',\n            s: 'неколико секунди',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: translator.translate,\n            dd: translator.translate,\n            M: translator.translate,\n            MM: translator.translate,\n            y: translator.translate,\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return srCyrl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['thoddea sekondamni', 'thodde sekond'],\n            ss: [number + ' sekondamni', number + ' sekond'],\n            m: ['eka mintan', 'ek minut'],\n            mm: [number + ' mintamni', number + ' mintam'],\n            h: ['eka voran', 'ek vor'],\n            hh: [number + ' voramni', number + ' voram'],\n            d: ['eka disan', 'ek dis'],\n            dd: [number + ' disamni', number + ' dis'],\n            M: ['eka mhoinean', 'ek mhoino'],\n            MM: [number + ' mhoineamni', number + ' mhoine'],\n            y: ['eka vorsan', 'ek voros'],\n            yy: [number + ' vorsamni', number + ' vorsam'],\n        };\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var gomLatn = moment.defineLocale('gom-latn', {\n        months: {\n            standalone:\n                'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n                    '_'\n                ),\n            format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n                '_'\n            ),\n            isFormat: /MMMM(\\s)+D[oD]?/,\n        },\n        monthsShort:\n            'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n        weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n        weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'A h:mm [vazta]',\n            LTS: 'A h:mm:ss [vazta]',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY A h:mm [vazta]',\n            LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n            llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n        },\n        calendar: {\n            sameDay: '[Aiz] LT',\n            nextDay: '[Faleam] LT',\n            nextWeek: '[Fuddlo] dddd[,] LT',\n            lastDay: '[Kal] LT',\n            lastWeek: '[Fattlo] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s',\n            past: '%s adim',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // the ordinal 'er' only applies to day of the month\n                case 'D':\n                    return number + 'er';\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                case 'w':\n                case 'W':\n                    return number;\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week\n            doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n        },\n        meridiemParse: /rati|sokallim|donparam|sanje/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'rati') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'sokallim') {\n                return hour;\n            } else if (meridiem === 'donparam') {\n                return hour > 12 ? hour : hour + 12;\n            } else if (meridiem === 'sanje') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'rati';\n            } else if (hour < 12) {\n                return 'sokallim';\n            } else if (hour < 16) {\n                return 'donparam';\n            } else if (hour < 20) {\n                return 'sanje';\n            } else {\n                return 'rati';\n            }\n        },\n    });\n\n    return gomLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ms = moment.defineLocale('ms', {\n        months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Esok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kelmarin pukul] LT',\n            lastWeek: 'dddd [lepas pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lepas',\n            s: 'beberapa saat',\n            ss: '%d saat',\n            m: 'seminit',\n            mm: '%d minit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ms;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var se = moment.defineLocale('se', {\n        months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n            '_'\n        ),\n        monthsShort:\n            'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n        weekdays:\n            'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n                '_'\n            ),\n        weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n        weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'MMMM D. [b.] YYYY',\n            LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n            LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[otne ti] LT',\n            nextDay: '[ihttin ti] LT',\n            nextWeek: 'dddd [ti] LT',\n            lastDay: '[ikte ti] LT',\n            lastWeek: '[ovddit] dddd [ti] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s geažes',\n            past: 'maŋit %s',\n            s: 'moadde sekunddat',\n            ss: '%d sekunddat',\n            m: 'okta minuhta',\n            mm: '%d minuhtat',\n            h: 'okta diimmu',\n            hh: '%d diimmut',\n            d: 'okta beaivi',\n            dd: '%d beaivvit',\n            M: 'okta mánnu',\n            MM: '%d mánut',\n            y: 'okta jahki',\n            yy: '%d jagit',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return se;\n\n})));\n","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var eu = moment.defineLocale('eu', {\n        months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n            '_'\n        ),\n        monthsShort:\n            'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n                '_'\n            ),\n        weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n        weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY[ko] MMMM[ren] D[a]',\n            LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n            LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n            l: 'YYYY-M-D',\n            ll: 'YYYY[ko] MMM D[a]',\n            lll: 'YYYY[ko] MMM D[a] HH:mm',\n            llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n        },\n        calendar: {\n            sameDay: '[gaur] LT[etan]',\n            nextDay: '[bihar] LT[etan]',\n            nextWeek: 'dddd LT[etan]',\n            lastDay: '[atzo] LT[etan]',\n            lastWeek: '[aurreko] dddd LT[etan]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s barru',\n            past: 'duela %s',\n            s: 'segundo batzuk',\n            ss: '%d segundo',\n            m: 'minutu bat',\n            mm: '%d minutu',\n            h: 'ordu bat',\n            hh: '%d ordu',\n            d: 'egun bat',\n            dd: '%d egun',\n            M: 'hilabete bat',\n            MM: '%d hilabete',\n            y: 'urte bat',\n            yy: '%d urte',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return eu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var da = moment.defineLocale('da', {\n        months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n        weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'på dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[i] dddd[s kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s siden',\n            s: 'få sekunder',\n            ss: '%d sekunder',\n            m: 'et minut',\n            mm: '%d minutter',\n            h: 'en time',\n            hh: '%d timer',\n            d: 'en dag',\n            dd: '%d dage',\n            M: 'en måned',\n            MM: '%d måneder',\n            y: 'et år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return da;\n\n})));\n","var MAX_UINT32 = Math.pow(2, 32);\n\nvar getUint64 = function(uint8) {\n  var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n  var value;\n\n  if (dv.getBigUint64) {\n    value = dv.getBigUint64(0);\n\n    if (value < Number.MAX_SAFE_INTEGER) {\n      return Number(value);\n    }\n\n    return value;\n  }\n\n  return (dv.getUint32(0) * MAX_UINT32) + dv.getUint32(4);\n};\n\nmodule.exports = {\n  getUint64: getUint64,\n  MAX_UINT32: MAX_UINT32\n};\n","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var cv = moment.defineLocale('cv', {\n        months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n            '_'\n        ),\n        monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n        weekdays:\n            'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n                '_'\n            ),\n        weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n        weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n            LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n            LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n        },\n        calendar: {\n            sameDay: '[Паян] LT [сехетре]',\n            nextDay: '[Ыран] LT [сехетре]',\n            lastDay: '[Ӗнер] LT [сехетре]',\n            nextWeek: '[Ҫитес] dddd LT [сехетре]',\n            lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (output) {\n                var affix = /сехет$/i.exec(output)\n                    ? 'рен'\n                    : /ҫул$/i.exec(output)\n                      ? 'тан'\n                      : 'ран';\n                return output + affix;\n            },\n            past: '%s каялла',\n            s: 'пӗр-ик ҫеккунт',\n            ss: '%d ҫеккунт',\n            m: 'пӗр минут',\n            mm: '%d минут',\n            h: 'пӗр сехет',\n            hh: '%d сехет',\n            d: 'пӗр кун',\n            dd: '%d кун',\n            M: 'пӗр уйӑх',\n            MM: '%d уйӑх',\n            y: 'пӗр ҫул',\n            yy: '%d ҫул',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n        ordinal: '%d-мӗш',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return cv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ml = moment.defineLocale('ml', {\n        months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n                '_'\n            ),\n        weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n        weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm -നു',\n            LTS: 'A h:mm:ss -നു',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm -നു',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n        },\n        calendar: {\n            sameDay: '[ഇന്ന്] LT',\n            nextDay: '[നാളെ] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ഇന്നലെ] LT',\n            lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s കഴിഞ്ഞ്',\n            past: '%s മുൻപ്',\n            s: 'അൽപ നിമിഷങ്ങൾ',\n            ss: '%d സെക്കൻഡ്',\n            m: 'ഒരു മിനിറ്റ്',\n            mm: '%d മിനിറ്റ്',\n            h: 'ഒരു മണിക്കൂർ',\n            hh: '%d മണിക്കൂർ',\n            d: 'ഒരു ദിവസം',\n            dd: '%d ദിവസം',\n            M: 'ഒരു മാസം',\n            MM: '%d മാസം',\n            y: 'ഒരു വർഷം',\n            yy: '%d വർഷം',\n        },\n        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                (meridiem === 'രാത്രി' && hour >= 4) ||\n                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n                meridiem === 'വൈകുന്നേരം'\n            ) {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'രാത്രി';\n            } else if (hour < 12) {\n                return 'രാവിലെ';\n            } else if (hour < 17) {\n                return 'ഉച്ച കഴിഞ്ഞ്';\n            } else if (hour < 20) {\n                return 'വൈകുന്നേരം';\n            } else {\n                return 'രാത്രി';\n            }\n        },\n    });\n\n    return ml;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots =\n            'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        monthsParse = [\n            /^jan/i,\n            /^feb/i,\n            /^(maart|mrt\\.?)$/i,\n            /^apr/i,\n            /^mei$/i,\n            /^jun[i.]?$/i,\n            /^jul[i.]?$/i,\n            /^aug/i,\n            /^sep/i,\n            /^okt/i,\n            /^nov/i,\n            /^dec/i,\n        ],\n        monthsRegex =\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nlBe = moment.defineLocale('nl-be', {\n        months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex:\n            /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n\n        weekdays:\n            'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'over %s',\n            past: '%s geleden',\n            s: 'een paar seconden',\n            ss: '%d seconden',\n            m: 'één minuut',\n            mm: '%d minuten',\n            h: 'één uur',\n            hh: '%d uur',\n            d: 'één dag',\n            dd: '%d dagen',\n            M: 'één maand',\n            MM: '%d maanden',\n            y: 'één jaar',\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nlBe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ja = moment.defineLocale('ja', {\n        eras: [\n            {\n                since: '2019-05-01',\n                offset: 1,\n                name: '令和',\n                narrow: '㋿',\n                abbr: 'R',\n            },\n            {\n                since: '1989-01-08',\n                until: '2019-04-30',\n                offset: 1,\n                name: '平成',\n                narrow: '㍻',\n                abbr: 'H',\n            },\n            {\n                since: '1926-12-25',\n                until: '1989-01-07',\n                offset: 1,\n                name: '昭和',\n                narrow: '㍼',\n                abbr: 'S',\n            },\n            {\n                since: '1912-07-30',\n                until: '1926-12-24',\n                offset: 1,\n                name: '大正',\n                narrow: '㍽',\n                abbr: 'T',\n            },\n            {\n                since: '1873-01-01',\n                until: '1912-07-29',\n                offset: 6,\n                name: '明治',\n                narrow: '㍾',\n                abbr: 'M',\n            },\n            {\n                since: '0001-01-01',\n                until: '1873-12-31',\n                offset: 1,\n                name: '西暦',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: '紀元前',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        eraYearOrdinalRegex: /(元|\\d+)年/,\n        eraYearOrdinalParse: function (input, match) {\n            return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n        },\n        months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n            '_'\n        ),\n        weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n        weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n        weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY年M月D日',\n            LLL: 'YYYY年M月D日 HH:mm',\n            LLLL: 'YYYY年M月D日 dddd HH:mm',\n            l: 'YYYY/MM/DD',\n            ll: 'YYYY年M月D日',\n            lll: 'YYYY年M月D日 HH:mm',\n            llll: 'YYYY年M月D日(ddd) HH:mm',\n        },\n        meridiemParse: /午前|午後/i,\n        isPM: function (input) {\n            return input === '午後';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return '午前';\n            } else {\n                return '午後';\n            }\n        },\n        calendar: {\n            sameDay: '[今日] LT',\n            nextDay: '[明日] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    return '[来週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            lastDay: '[昨日] LT',\n            lastWeek: function (now) {\n                if (this.week() !== now.week()) {\n                    return '[先週]dddd LT';\n                } else {\n                    return 'dddd LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}日/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'y':\n                    return number === 1 ? '元年' : number + '年';\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                default:\n                    return number;\n            }\n        },\n        relativeTime: {\n            future: '%s後',\n            past: '%s前',\n            s: '数秒',\n            ss: '%d秒',\n            m: '1分',\n            mm: '%d分',\n            h: '1時間',\n            hh: '%d時間',\n            d: '1日',\n            dd: '%d日',\n            M: '1ヶ月',\n            MM: '%dヶ月',\n            y: '1年',\n            yy: '%d年',\n        },\n    });\n\n    return ja;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        },\n        monthsParse = [\n            /^जन/i,\n            /^फ़र|फर/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सितं|सित/i,\n            /^अक्टू/i,\n            /^नव|नवं/i,\n            /^दिसं|दिस/i,\n        ],\n        shortMonthsParse = [\n            /^जन/i,\n            /^फ़र/i,\n            /^मार्च/i,\n            /^अप्रै/i,\n            /^मई/i,\n            /^जून/i,\n            /^जुल/i,\n            /^अग/i,\n            /^सित/i,\n            /^अक्टू/i,\n            /^नव/i,\n            /^दिस/i,\n        ];\n\n    var hi = moment.defineLocale('hi', {\n        months: {\n            format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n                '_'\n            ),\n            standalone:\n                'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n        weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm बजे',\n            LTS: 'A h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n        },\n\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: shortMonthsParse,\n\n        monthsRegex:\n            /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsShortRegex:\n            /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n        monthsStrictRegex:\n            /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n        monthsShortStrictRegex:\n            /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[कल] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[कल] LT',\n            lastWeek: '[पिछले] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s में',\n            past: '%s पहले',\n            s: 'कुछ ही क्षण',\n            ss: '%d सेकंड',\n            m: 'एक मिनट',\n            mm: '%d मिनट',\n            h: 'एक घंटा',\n            hh: '%d घंटे',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महीने',\n            MM: '%d महीने',\n            y: 'एक वर्ष',\n            yy: '%d वर्ष',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n        meridiemParse: /रात|सुबह|दोपहर|शाम/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'रात') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सुबह') {\n                return hour;\n            } else if (meridiem === 'दोपहर') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'शाम') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'रात';\n            } else if (hour < 10) {\n                return 'सुबह';\n            } else if (hour < 17) {\n                return 'दोपहर';\n            } else if (hour < 20) {\n                return 'शाम';\n            } else {\n                return 'रात';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return hi;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enAu = moment.defineLocale('en-au', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enAu;\n\n})));\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!./jquery.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] = ___EXPOSE_LOADER_IMPORT___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var xPseudo = moment.defineLocale('x-pseudo', {\n        months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n            '_'\n        ),\n        monthsShort:\n            'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n                '_'\n            ),\n        weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n        weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[T~ódá~ý át] LT',\n            nextDay: '[T~ómó~rró~w át] LT',\n            nextWeek: 'dddd [át] LT',\n            lastDay: '[Ý~ést~érdá~ý át] LT',\n            lastWeek: '[L~ást] dddd [át] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'í~ñ %s',\n            past: '%s á~gó',\n            s: 'á ~féw ~sécó~ñds',\n            ss: '%d s~écóñ~ds',\n            m: 'á ~míñ~úté',\n            mm: '%d m~íñú~tés',\n            h: 'á~ñ hó~úr',\n            hh: '%d h~óúrs',\n            d: 'á ~dáý',\n            dd: '%d d~áýs',\n            M: 'á ~móñ~th',\n            MM: '%d m~óñt~hs',\n            y: 'á ~ýéár',\n            yy: '%d ý~éárs',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return xPseudo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var id = moment.defineLocale('id', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /pagi|siang|sore|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'siang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sore' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'siang';\n            } else if (hours < 19) {\n                return 'sore';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar: {\n            sameDay: '[Hari ini pukul] LT',\n            nextDay: '[Besok pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kemarin pukul] LT',\n            lastWeek: 'dddd [lalu pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dalam %s',\n            past: '%s yang lalu',\n            s: 'beberapa detik',\n            ss: '%d detik',\n            m: 'semenit',\n            mm: '%d menit',\n            h: 'sejam',\n            hh: '%d jam',\n            d: 'sehari',\n            dd: '%d hari',\n            M: 'sebulan',\n            MM: '%d bulan',\n            y: 'setahun',\n            yy: '%d tahun',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return id;\n\n})));\n","require('datatables.net');\nrequire('datatables.net-responsive');\nrequire('datatables.net-datetime');\nrequire('datatables.net-select');\nrequire('datatables.net-buttons');\nrequire('datatables.net-fixedheader');\n","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n  if (typeof globalThis === \"object\") {\n    return globalThis;\n  }\n  var g;\n  try {\n    // This works if eval is allowed (see CSP)\n    // eslint-disable-next-line no-new-func\n    g = this || new Function(\"return this\")();\n  } catch (e) {\n    // This works if the window reference is available\n    if (typeof window === \"object\") {\n      return window;\n    }\n\n    // This works if the self reference is available\n    if (typeof self === \"object\") {\n      return self;\n    }\n\n    // This works if the global reference is available\n    if (typeof global !== \"undefined\") {\n      return global;\n    }\n  }\n  return g;\n}();","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var cy = moment.defineLocale('cy', {\n        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n            '_'\n        ),\n        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n            '_'\n        ),\n        weekdays:\n            'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n                '_'\n            ),\n        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n        weekdaysParseExact: true,\n        // time formats are the same as en-gb\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Heddiw am] LT',\n            nextDay: '[Yfory am] LT',\n            nextWeek: 'dddd [am] LT',\n            lastDay: '[Ddoe am] LT',\n            lastWeek: 'dddd [diwethaf am] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'mewn %s',\n            past: '%s yn ôl',\n            s: 'ychydig eiliadau',\n            ss: '%d eiliad',\n            m: 'munud',\n            mm: '%d munud',\n            h: 'awr',\n            hh: '%d awr',\n            d: 'diwrnod',\n            dd: '%d diwrnod',\n            M: 'mis',\n            MM: '%d mis',\n            y: 'blwyddyn',\n            yy: '%d flynedd',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n        ordinal: function (number) {\n            var b = number,\n                output = '',\n                lookup = [\n                    '',\n                    'af',\n                    'il',\n                    'ydd',\n                    'ydd',\n                    'ed',\n                    'ed',\n                    'ed',\n                    'fed',\n                    'fed',\n                    'fed', // 1af to 10fed\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'eg',\n                    'fed',\n                    'eg',\n                    'fed', // 11eg to 20fed\n                ];\n            if (b > 20) {\n                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n                    output = 'fed'; // not 30ain, 70ain or 90ain\n                } else {\n                    output = 'ain';\n                }\n            } else if (b > 0) {\n                output = lookup[b];\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsNominative =\n            'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n                '_'\n            ),\n        monthsSubjective =\n            'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n                '_'\n            ),\n        monthsParse = [\n            /^sty/i,\n            /^lut/i,\n            /^mar/i,\n            /^kwi/i,\n            /^maj/i,\n            /^cze/i,\n            /^lip/i,\n            /^sie/i,\n            /^wrz/i,\n            /^paź/i,\n            /^lis/i,\n            /^gru/i,\n        ];\n    function plural(n) {\n        return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n    }\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                return result + (plural(number) ? 'sekundy' : 'sekund');\n            case 'm':\n                return withoutSuffix ? 'minuta' : 'minutę';\n            case 'mm':\n                return result + (plural(number) ? 'minuty' : 'minut');\n            case 'h':\n                return withoutSuffix ? 'godzina' : 'godzinę';\n            case 'hh':\n                return result + (plural(number) ? 'godziny' : 'godzin');\n            case 'ww':\n                return result + (plural(number) ? 'tygodnie' : 'tygodni');\n            case 'MM':\n                return result + (plural(number) ? 'miesiące' : 'miesięcy');\n            case 'yy':\n                return result + (plural(number) ? 'lata' : 'lat');\n        }\n    }\n\n    var pl = moment.defineLocale('pl', {\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return monthsNominative;\n            } else if (/D MMMM/.test(format)) {\n                return monthsSubjective[momentToFormat.month()];\n            } else {\n                return monthsNominative[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays:\n            'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n        weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n        weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Dziś o] LT',\n            nextDay: '[Jutro o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W niedzielę o] LT';\n\n                    case 2:\n                        return '[We wtorek o] LT';\n\n                    case 3:\n                        return '[W środę o] LT';\n\n                    case 6:\n                        return '[W sobotę o] LT';\n\n                    default:\n                        return '[W] dddd [o] LT';\n                }\n            },\n            lastDay: '[Wczoraj o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W zeszłą niedzielę o] LT';\n                    case 3:\n                        return '[W zeszłą środę o] LT';\n                    case 6:\n                        return '[W zeszłą sobotę o] LT';\n                    default:\n                        return '[W zeszły] dddd [o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: '%s temu',\n            s: 'kilka sekund',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: '1 dzień',\n            dd: '%d dni',\n            w: 'tydzień',\n            ww: translate,\n            M: 'miesiąc',\n            MM: translate,\n            y: 'rok',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! author : Rasid Redzic : https://github.com/rasidre\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        switch (key) {\n            case 'm':\n                return withoutSuffix\n                    ? 'jedna minuta'\n                    : isFuture\n                      ? 'jednu minutu'\n                      : 'jedne minute';\n        }\n    }\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jedan sat';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var bs = moment.defineLocale('bs', {\n        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                        return '[prošlu] dddd [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: processRelativeTime,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '೧',\n            2: '೨',\n            3: '೩',\n            4: '೪',\n            5: '೫',\n            6: '೬',\n            7: '೭',\n            8: '೮',\n            9: '೯',\n            0: '೦',\n        },\n        numberMap = {\n            '೧': '1',\n            '೨': '2',\n            '೩': '3',\n            '೪': '4',\n            '೫': '5',\n            '೬': '6',\n            '೭': '7',\n            '೮': '8',\n            '೯': '9',\n            '೦': '0',\n        };\n\n    var kn = moment.defineLocale('kn', {\n        months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n            '_'\n        ),\n        monthsShort:\n            'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n        weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm',\n            LTS: 'A h:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm',\n        },\n        calendar: {\n            sameDay: '[ಇಂದು] LT',\n            nextDay: '[ನಾಳೆ] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ನಿನ್ನೆ] LT',\n            lastWeek: '[ಕೊನೆಯ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ನಂತರ',\n            past: '%s ಹಿಂದೆ',\n            s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n            ss: '%d ಸೆಕೆಂಡುಗಳು',\n            m: 'ಒಂದು ನಿಮಿಷ',\n            mm: '%d ನಿಮಿಷ',\n            h: 'ಒಂದು ಗಂಟೆ',\n            hh: '%d ಗಂಟೆ',\n            d: 'ಒಂದು ದಿನ',\n            dd: '%d ದಿನ',\n            M: 'ಒಂದು ತಿಂಗಳು',\n            MM: '%d ತಿಂಗಳು',\n            y: 'ಒಂದು ವರ್ಷ',\n            yy: '%d ವರ್ಷ',\n        },\n        preparse: function (string) {\n            return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ರಾತ್ರಿ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n                return hour;\n            } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ಸಂಜೆ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ರಾತ್ರಿ';\n            } else if (hour < 10) {\n                return 'ಬೆಳಿಗ್ಗೆ';\n            } else if (hour < 17) {\n                return 'ಮಧ್ಯಾಹ್ನ';\n            } else if (hour < 20) {\n                return 'ಸಂಜೆ';\n            } else {\n                return 'ರಾತ್ರಿ';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n        ordinal: function (number) {\n            return number + 'ನೇ';\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return kn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n                ss: 'secunde',\n                mm: 'minute',\n                hh: 'ore',\n                dd: 'zile',\n                ww: 'săptămâni',\n                MM: 'luni',\n                yy: 'ani',\n            },\n            separator = ' ';\n        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n            separator = ' de ';\n        }\n        return number + separator + format[key];\n    }\n\n    var ro = moment.defineLocale('ro', {\n        months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n            '_'\n        ),\n        monthsShort:\n            'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n        weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n        weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[azi la] LT',\n            nextDay: '[mâine la] LT',\n            nextWeek: 'dddd [la] LT',\n            lastDay: '[ieri la] LT',\n            lastWeek: '[fosta] dddd [la] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'peste %s',\n            past: '%s în urmă',\n            s: 'câteva secunde',\n            ss: relativeTimeWithPlural,\n            m: 'un minut',\n            mm: relativeTimeWithPlural,\n            h: 'o oră',\n            hh: relativeTimeWithPlural,\n            d: 'o zi',\n            dd: relativeTimeWithPlural,\n            w: 'o săptămână',\n            ww: relativeTimeWithPlural,\n            M: 'o lună',\n            MM: relativeTimeWithPlural,\n            y: 'un an',\n            yy: relativeTimeWithPlural,\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ro;\n\n})));\n","var NAMESPACE = require(\"./conventions\").NAMESPACE;\n\n//[4]   \tNameStartChar\t   ::=   \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a]   \tNameChar\t   ::=   \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5]   \tName\t   ::=   \tNameStartChar (NameChar)*\nvar nameStartChar = /[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]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring\nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el<el />\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t    \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t    \t\t\tdoc.appendChild(text);\n\t    \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t        \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t        \t\tend = tagStart+1+tagName.length;\n\t        \t}else if(tagName.match(/\\s</)){\n\t        \t\ttagName = tagName.replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' maybe not complete');\n\t        \t\tend = tagStart+1+tagName.length;\n\t\t\t\t}\n\t\t\t\tvar localNSMap = config.localNSMap;\n\t\t\t\tvar endMatch = config.tagName == tagName;\n\t\t\t\tvar endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()\n\t\t        if(endIgnoreCaseMach){\n\t\t        \tdomBuilder.endElement(config.uri,config.localName,tagName);\n\t\t\t\t\tif(localNSMap){\n\t\t\t\t\t\tfor (var prefix in localNSMap) {\n\t\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!endMatch){\n\t\t            \terrorHandler.fatalError(\"end tag name: \"+tagName+' is not match the current start tagName:'+config.tagName ); // No known test case\n\t\t\t\t\t}\n\t\t        }else{\n\t\t        \tparseStack.push(config)\n\t\t        }\n\n\t\t\t\tend++;\n\t\t\t\tbreak;\n\t\t\t\t// end elment\n\t\t\tcase '?':// <?...?>\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// <!doctype,<![CDATA,<!--\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseDCC(source,tagStart,domBuilder,errorHandler);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tvar el = new ElementAttributes();\n\t\t\t\tvar currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\t\t\t\t//elStartEnd\n\t\t\t\tvar end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);\n\t\t\t\tvar len = el.length;\n\n\n\t\t\t\tif(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tif(!entityMap.nbsp){\n\t\t\t\t\t\terrorHandler.warning('unclosed xml attribute');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(locator && len){\n\t\t\t\t\tvar locator2 = copyLocator(locator,{});\n\t\t\t\t\t//try{//attribute position fixed\n\t\t\t\t\tfor(var i = 0;i<len;i++){\n\t\t\t\t\t\tvar a = el[i];\n\t\t\t\t\t\tposition(a.offset);\n\t\t\t\t\t\ta.locator = copyLocator(locator,{});\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator2\n\t\t\t\t\tif(appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator;\n\t\t\t\t}else{\n\t\t\t\t\tif(appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (NAMESPACE.isHTML(el.uri) && !el.closed) {\n\t\t\t\t\tend = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)\n\t\t\t\t} else {\n\t\t\t\t\tend++;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(e){\n\t\t\tif (e instanceof ParseError) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\terrorHandler.error('element parse error: '+e)\n\t\t\tend = -1;\n\t\t}\n\t\tif(end>start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退,有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\n\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed  = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName =  el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart =  source.indexOf('</'+tagName+'>',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos =  source.lastIndexOf('</'+tagName+'>')\n\t\tif(pos<elStartEnd){//忘记闭合\n\t\t\tpos = source.lastIndexOf('</'+tagName)\n\t\t}\n\t\tcloseMap[tagName] =pos\n\t}\n\treturn pos<elStartEnd;\n\t//}\n}\n\nfunction _copy (source, target) {\n\tfor (var n in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, n)) {\n\t\t\ttarget[n] = source[n];\n\t\t}\n\t}\n}\n\nfunction parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'\n\tvar next= source.charAt(start+2)\n\tswitch(next){\n\tcase '-':\n\t\tif(source.charAt(start + 3) === '-'){\n\t\t\tvar end = source.indexOf('-->',start+4);\n\t\t\t//append comment source.substring(4,end)//<!--\n\t\t\tif(end>start){\n\t\t\t\tdomBuilder.comment(source,start+4,end-start-4);\n\t\t\t\treturn end+3;\n\t\t\t}else{\n\t\t\t\terrorHandler.error(\"Unclosed comment\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}else{\n\t\t\t//error\n\t\t\treturn -1;\n\t\t}\n\tdefault:\n\t\tif(source.substr(start+3,6) == 'CDATA['){\n\t\t\tvar end = source.indexOf(']]>',start+9);\n\t\t\tdomBuilder.startCDATA();\n\t\t\tdomBuilder.characters(source,start+9,end-start-9);\n\t\t\tdomBuilder.endCDATA()\n\t\t\treturn end+3;\n\t\t}\n\t\t//<!DOCTYPE\n\t\t//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)\n\t\tvar matchs = split(source,start);\n\t\tvar len = matchs.length;\n\t\tif(len>1 && /!doctype/i.test(matchs[0][0])){\n\t\t\tvar name = matchs[1][0];\n\t\t\tvar pubid = false;\n\t\t\tvar sysid = false;\n\t\t\tif(len>3){\n\t\t\t\tif(/^public$/i.test(matchs[2][0])){\n\t\t\t\t\tpubid = matchs[3][0];\n\t\t\t\t\tsysid = len>4 && matchs[4][0];\n\t\t\t\t}else if(/^system$/i.test(matchs[2][0])){\n\t\t\t\t\tsysid = matchs[3][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar lastMatch = matchs[len-1]\n\t\t\tdomBuilder.startDTD(name, pubid, sysid);\n\t\t\tdomBuilder.endDTD();\n\n\t\t\treturn lastMatch.index+lastMatch[0].length\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n\nfunction parseInstruction(source,start,domBuilder){\n\tvar end = source.indexOf('?>',start);\n\tif(end){\n\t\tvar match = source.substring(start,end).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n\t\tif(match){\n\t\t\tvar len = match[0].length;\n\t\t\tdomBuilder.processingInstruction(match[1], match[2]) ;\n\t\t\treturn end+2;\n\t\t}else{//error\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction ElementAttributes(){\n\tthis.attributeNames = {}\n}\nElementAttributes.prototype = {\n\tsetTagName:function(tagName){\n\t\tif(!tagNamePattern.test(tagName)){\n\t\t\tthrow new Error('invalid tagName:'+tagName)\n\t\t}\n\t\tthis.tagName = tagName\n\t},\n\taddValue:function(qName, value, offset) {\n\t\tif(!tagNamePattern.test(qName)){\n\t\t\tthrow new Error('invalid attribute:'+qName)\n\t\t}\n\t\tthis.attributeNames[qName] = this.length;\n\t\tthis[this.length++] = {qName:qName,value:value,offset:offset}\n\t},\n\tlength:0,\n\tgetLocalName:function(i){return this[i].localName},\n\tgetLocator:function(i){return this[i].locator},\n\tgetQName:function(i){return this[i].qName},\n\tgetURI:function(i){return this[i].uri},\n\tgetValue:function(i){return this[i].value}\n//\t,getIndex:function(uri, localName)){\n//\t\tif(localName){\n//\n//\t\t}else{\n//\t\t\tvar qName = uri\n//\t\t}\n//\t},\n//\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\n//\tgetType:function(uri,localName){}\n//\tgetType:function(i){},\n}\n\n\n\nfunction split(source,start){\n\tvar match;\n\tvar buf = [];\n\tvar reg = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n\treg.lastIndex = start;\n\treg.exec(source);//skip <\n\twhile(match = reg.exec(source)){\n\t\tbuf.push(match);\n\t\tif(match[1])return buf;\n\t}\n}\n\nexports.XMLReader = XMLReader;\nexports.ParseError = ParseError;\n","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arMa = moment.defineLocale('ar-ma', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arMa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//!           Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var nn = moment.defineLocale('nn', {\n        months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n        weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n        weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n        },\n        calendar: {\n            sameDay: '[I dag klokka] LT',\n            nextDay: '[I morgon klokka] LT',\n            nextWeek: 'dddd [klokka] LT',\n            lastDay: '[I går klokka] LT',\n            lastWeek: '[Føregåande] dddd [klokka] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'om %s',\n            past: '%s sidan',\n            s: 'nokre sekund',\n            ss: '%d sekund',\n            m: 'eit minutt',\n            mm: '%d minutt',\n            h: 'ein time',\n            hh: '%d timar',\n            d: 'ein dag',\n            dd: '%d dagar',\n            w: 'ei veke',\n            ww: '%d veker',\n            M: 'ein månad',\n            MM: '%d månader',\n            y: 'eit år',\n            yy: '%d år',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return nn;\n\n})));\n","'use strict'\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array<T> | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array<T> | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial<Pick<ArrayConstructor['prototype'], 'find'>>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick<ObjectConstructor, 'freeze'> = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly<T>}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn target\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n})\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n","function _extends() {\n  return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    var el = moment.defineLocale('el', {\n        monthsNominativeEl:\n            'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n                '_'\n            ),\n        monthsGenitiveEl:\n            'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n                '_'\n            ),\n        months: function (momentToFormat, format) {\n            if (!momentToFormat) {\n                return this._monthsNominativeEl;\n            } else if (\n                typeof format === 'string' &&\n                /D/.test(format.substring(0, format.indexOf('MMMM')))\n            ) {\n                // if there is a day number before 'MMMM'\n                return this._monthsGenitiveEl[momentToFormat.month()];\n            } else {\n                return this._monthsNominativeEl[momentToFormat.month()];\n            }\n        },\n        monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n        weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n            '_'\n        ),\n        weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n        weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'μμ' : 'ΜΜ';\n            } else {\n                return isLower ? 'πμ' : 'ΠΜ';\n            }\n        },\n        isPM: function (input) {\n            return (input + '').toLowerCase()[0] === 'μ';\n        },\n        meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendarEl: {\n            sameDay: '[Σήμερα {}] LT',\n            nextDay: '[Αύριο {}] LT',\n            nextWeek: 'dddd [{}] LT',\n            lastDay: '[Χθες {}] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 6:\n                        return '[το προηγούμενο] dddd [{}] LT';\n                    default:\n                        return '[την προηγούμενη] dddd [{}] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        calendar: function (key, mom) {\n            var output = this._calendarEl[key],\n                hours = mom && mom.hours();\n            if (isFunction(output)) {\n                output = output.apply(mom);\n            }\n            return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n        },\n        relativeTime: {\n            future: 'σε %s',\n            past: '%s πριν',\n            s: 'λίγα δευτερόλεπτα',\n            ss: '%d δευτερόλεπτα',\n            m: 'ένα λεπτό',\n            mm: '%d λεπτά',\n            h: 'μία ώρα',\n            hh: '%d ώρες',\n            d: 'μία μέρα',\n            dd: '%d μέρες',\n            M: 'ένας μήνας',\n            MM: '%d μήνες',\n            y: 'ένας χρόνος',\n            yy: '%d χρόνια',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}η/,\n        ordinal: '%dη',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4st is the first week of the year.\n        },\n    });\n\n    return el;\n\n})));\n","/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this\n\t\t\t.on( \"mouseenter\", fnOver )\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deCh = moment.defineLocale('de-ch', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deCh;\n\n})));\n","var conventions = require(\"./conventions\");\n\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString (input) {\n\treturn input !== ''\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : []\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record<string, boolean | undefined>} current\n * @param {string} element\n * @returns {Record<string, boolean | undefined>}\n */\nfunction orderedSetReducer (current, element) {\n\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn Object.keys(list.reduce(orderedSetReducer, {}))\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes (list) {\n\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\n\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE                = NodeType.ELEMENT_NODE                = 1;\nvar ATTRIBUTE_NODE              = NodeType.ATTRIBUTE_NODE              = 2;\nvar TEXT_NODE                   = NodeType.TEXT_NODE                   = 3;\nvar CDATA_SECTION_NODE          = NodeType.CDATA_SECTION_NODE          = 4;\nvar ENTITY_REFERENCE_NODE       = NodeType.ENTITY_REFERENCE_NODE       = 5;\nvar ENTITY_NODE                 = NodeType.ENTITY_NODE                 = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE                = NodeType.COMMENT_NODE                = 8;\nvar DOCUMENT_NODE               = NodeType.DOCUMENT_NODE               = 9;\nvar DOCUMENT_TYPE_NODE          = NodeType.DOCUMENT_TYPE_NODE          = 10;\nvar DOCUMENT_FRAGMENT_NODE      = NodeType.DOCUMENT_FRAGMENT_NODE      = 11;\nvar NOTATION_NODE               = NodeType.NOTATION_NODE               = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR              = ExceptionCode.INDEX_SIZE_ERR              = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR          = ExceptionCode.DOMSTRING_SIZE_ERR          = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR       = ExceptionCode.HIERARCHY_REQUEST_ERR       = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR          = ExceptionCode.WRONG_DOCUMENT_ERR          = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR       = ExceptionCode.INVALID_CHARACTER_ERR       = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR         = ExceptionCode.NO_DATA_ALLOWED_ERR         = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR               = ExceptionCode.NOT_FOUND_ERR               = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR           = ExceptionCode.NOT_SUPPORTED_ERR           = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR         = ExceptionCode.INUSE_ATTRIBUTE_ERR         = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR        \t= ExceptionCode.INVALID_STATE_ERR        \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR               \t= ExceptionCode.SYNTAX_ERR               \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR            \t= ExceptionCode.NAMESPACE_ERR           \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR       \t= ExceptionCode.INVALID_ACCESS_ERR      \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index  unsigned long\n\t *   Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i<this.length;i++){\n\t\t\tserializeToString(this[i],buf,isHTML,nodeFilter);\n\t\t}\n\t\treturn buf.join('');\n\t},\n\t/**\n\t * @private\n\t * @param {function (Node):boolean} predicate\n\t * @returns {Node[]}\n\t */\n\tfilter: function (predicate) {\n\t\treturn Array.prototype.filter.call(this, predicate);\n\t},\n\t/**\n\t * @private\n\t * @param {Node} item\n\t * @returns {number}\n\t */\n\tindexOf: function (item) {\n\t\treturn Array.prototype.indexOf.call(this, item);\n\t},\n};\n\nfunction LiveNodeList(node,refresh){\n\tthis._node = node;\n\tthis._refresh = refresh\n\t_updateLiveList(this);\n}\nfunction _updateLiveList(list){\n\tvar inc = list._node._inc || list._node.ownerDocument._inc;\n\tif (list._inc !== inc) {\n\t\tvar ls = list._refresh(list._node);\n\t\t__set__(list,'length',ls.length);\n\t\tif (!list.$$length || ls.length < list.$$length) {\n\t\t\tfor (var i = ls.length; i in list; i++) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\t\t\tdelete list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcopy(ls,list);\n\t\tlist._inc = inc;\n\t}\n}\nLiveNodeList.prototype.item = function(i){\n\t_updateLiveList(this);\n\treturn this[i] || null;\n}\n\n_extends(LiveNodeList,NodeList);\n\n/**\n * Objects implementing the NamedNodeMap interface are used\n * to represent collections of nodes that can be accessed by name.\n * Note that NamedNodeMap does not inherit from NodeList;\n * NamedNodeMaps are not maintained in any particular order.\n * Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index,\n * but this is simply to allow convenient enumeration of the contents of a NamedNodeMap,\n * and does not imply that the DOM specifies an order to these Nodes.\n * NamedNodeMap objects in the DOM are live.\n * used for attributes or DocumentType entities\n */\nfunction NamedNodeMap() {\n};\n\nfunction _findNodeIndex(list,node){\n\tvar i = list.length;\n\twhile(i--){\n\t\tif(list[i] === node){return i}\n\t}\n}\n\nfunction _addNamedNode(el,list,newAttr,oldAttr){\n\tif(oldAttr){\n\t\tlist[_findNodeIndex(list,oldAttr)] = newAttr;\n\t}else{\n\t\tlist[list.length++] = newAttr;\n\t}\n\tif(el){\n\t\tnewAttr.ownerElement = el;\n\t\tvar doc = el.ownerDocument;\n\t\tif(doc){\n\t\t\toldAttr && _onRemoveAttribute(doc,el,oldAttr);\n\t\t\t_onAddAttribute(doc,el,newAttr);\n\t\t}\n\t}\n}\nfunction _removeNamedNode(el,list,attr){\n\t//console.log('remove attr:'+attr)\n\tvar i = _findNodeIndex(list,attr);\n\tif(i>=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i<lastIndex){\n\t\t\tlist[i] = list[++i]\n\t\t}\n\t\tlist.length = lastIndex;\n\t\tif(el){\n\t\t\tvar doc = el.ownerDocument;\n\t\t\tif(doc){\n\t\t\t\t_onRemoveAttribute(doc,el,attr);\n\t\t\t\tattr.ownerElement = null;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tthrow new DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))\n\t}\n}\nNamedNodeMap.prototype = {\n\tlength:0,\n\titem:NodeList.prototype.item,\n\tgetNamedItem: function(key) {\n//\t\tif(key.indexOf(':')>0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t *   (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument  DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI,  qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t *   (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t  or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n  \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n    // Introduced in DOM Level 2:\n    hasAttributes:function(){\n    \treturn this.attributes.length>0;\n    },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n    lookupPrefix:function(namespaceURI){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    lookupNamespaceURI:function(prefix){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n    \t\t\t\treturn map[prefix] ;\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    isDefaultNamespace:function(namespaceURI){\n    \tvar prefix = this.lookupPrefix(namespaceURI);\n    \treturn prefix == null;\n    }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '&lt;' ||\n         c == '>' && '&gt;' ||\n         c == '&' && '&amp;' ||\n         c == '\"' && '&quot;' ||\n         '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n        }while(node=node.nextSibling)\n    }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild (doc, el, newChild) {\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild (parentNode, child) {\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n\treturn node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n\treturn node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn node;\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild (parentNode, newChild) {\n\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName :  '#document',\n\tnodeType :  DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype :  null,\n\tdocumentElement :  null,\n\t_inc : 1,\n\n\tinsertBefore :  function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\tnewChild.ownerDocument = this;\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild :  function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\tnewChild.ownerDocument = this;\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i<len;i++){\n\t\t\t// add namespaces for attributes\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (attr.prefix == 'xmlns') {\n\t\t\t\tvisibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });\n\t\t\t}else if(attr.nodeName == 'xmlns'){\n\t\t\t\tvisibleNamespaces.push({ prefix: '', namespace: attr.value });\n\t\t\t}\n\t\t}\n\n\t\tfor(var i=0;i<len;i++){\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {\n\t\t\t\tvar prefix = attr.prefix||'';\n\t\t\t\tvar uri = attr.namespaceURI;\n\t\t\t\taddSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n\t\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t\t}\n\t\t\tserializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t}\n\n\t\t// add namespace for current node\n\t\tif (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {\n\t\t\tvar prefix = node.prefix||'';\n\t\t\tvar uri = node.namespaceURI;\n\t\t\taddSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : \"xmlns\", uri);\n\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t}\n\n\t\tif(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){\n\t\t\tbuf.push('>');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('</',prefixedNodeName,'>');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&amp;` and `&lt;` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" &gt; \", and must, for compatibility,\n\t\t * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '<![CDATA[',node.data,']]>');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"<!--\",node.data,\"-->\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('<!DOCTYPE ',node.name);\n\t\tif(pubid){\n\t\t\tbuf.push(' PUBLIC ', pubid);\n\t\t\tif (sysid && sysid!='.') {\n\t\t\t\tbuf.push(' ', sysid);\n\t\t\t}\n\t\t\tbuf.push('>');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"<?\",node.target,\" \",node.data,\"?>\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i<len;i++){\n\t\t\t//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\n\t\t//}\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tbreak;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t\tbreak;\n\t//case ENTITY_REFERENCE_NODE:\n\t//case PROCESSING_INSTRUCTION_NODE:\n\t////case TEXT_NODE:\n\t//case CDATA_SECTION_NODE:\n\t//case COMMENT_NODE:\n\t//\tdeep = false;\n\t//\tbreak;\n\t//case DOCUMENT_NODE:\n\t//case DOCUMENT_TYPE_NODE:\n\t//cannot be imported.\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\t//can not hit in level3\n\t//default:throw e;\n\t}\n\tif(!node2){\n\t\tnode2 = node.cloneNode(false);//false\n\t}\n\tnode2.ownerDocument = doc;\n\tnode2.parentNode = null;\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(importNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n//\n//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\n//\t\t\t\t\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\nfunction cloneNode(doc,node,deep){\n\tvar node2 = new node.constructor();\n\tfor (var n in node) {\n\t\tif (Object.prototype.hasOwnProperty.call(node, n)) {\n\t\t\tvar v = node[n];\n\t\t\tif (typeof v != \"object\") {\n\t\t\t\tif (v != node2[n]) {\n\t\t\t\t\tnode2[n] = v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(node.childNodes){\n\t\tnode2.childNodes = new NodeList();\n\t}\n\tnode2.ownerDocument = doc;\n\tswitch (node2.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tvar attrs\t= node.attributes;\n\t\tvar attrs2\t= node2.attributes = new NamedNodeMap();\n\t\tvar len = attrs.length\n\t\tattrs2._ownerElement = node2;\n\t\tfor(var i=0;i<len;i++){\n\t\t\tnode2.setAttributeNode(cloneNode(doc,attrs.item(i),true));\n\t\t}\n\t\tbreak;;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t}\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(cloneNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n\nfunction __set__(object,key,value){\n\tobject[key] = value\n}\n//do dynamic\ntry{\n\tif(Object.defineProperty){\n\t\tObject.defineProperty(LiveNodeList.prototype,'length',{\n\t\t\tget:function(){\n\t\t\t\t_updateLiveList(this);\n\t\t\t\treturn this.$$length;\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(Node.prototype,'textContent',{\n\t\t\tget:function(){\n\t\t\t\treturn getTextContent(this);\n\t\t\t},\n\n\t\t\tset:function(data){\n\t\t\t\tswitch(this.nodeType){\n\t\t\t\tcase ELEMENT_NODE:\n\t\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\t\twhile(this.firstChild){\n\t\t\t\t\t\tthis.removeChild(this.firstChild);\n\t\t\t\t\t}\n\t\t\t\t\tif(data || String(data)){\n\t\t\t\t\t\tthis.appendChild(this.ownerDocument.createTextNode(data));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.data = data;\n\t\t\t\t\tthis.value = data;\n\t\t\t\t\tthis.nodeValue = data;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tfunction getTextContent(node){\n\t\t\tswitch(node.nodeType){\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\tvar buf = [];\n\t\t\t\tnode = node.firstChild;\n\t\t\t\twhile(node){\n\t\t\t\t\tif(node.nodeType!==7 && node.nodeType !==8){\n\t\t\t\t\t\tbuf.push(getTextContent(node));\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t}\n\t\t\t\treturn buf.join('');\n\t\t\tdefault:\n\t\t\t\treturn node.nodeValue;\n\t\t\t}\n\t\t}\n\n\t\t__set__ = function(object,key,value){\n\t\t\t//console.log(value)\n\t\t\tobject['$$'+key] = value\n\t\t}\n\t}\n}catch(e){//ie8\n}\n\n//if(typeof require == 'function'){\n\texports.DocumentType = DocumentType;\n\texports.DOMException = DOMException;\n\texports.DOMImplementation = DOMImplementation;\n\texports.Element = Element;\n\texports.Node = Node;\n\texports.NodeList = NodeList;\n\texports.XMLSerializer = XMLSerializer;\n//}\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = require('global/window');\n\nvar vttjs = module.exports = {\n  WebVTT: require(\"./vtt.js\"),\n  VTTCue: require(\"./vttcue.js\"),\n  VTTRegion: require(\"./vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n  window.VTTCue = cueShim;\n  window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n  window.VTTCue = nativeVTTCue;\n  window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n  vttjs.shim();\n}\n","//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var bm = moment.defineLocale('bm', {\n        months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n            '_'\n        ),\n        monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n        weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n        weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n        weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'MMMM [tile] D [san] YYYY',\n            LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n            LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Bi lɛrɛ] LT',\n            nextDay: '[Sini lɛrɛ] LT',\n            nextWeek: 'dddd [don lɛrɛ] LT',\n            lastDay: '[Kunu lɛrɛ] LT',\n            lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s kɔnɔ',\n            past: 'a bɛ %s bɔ',\n            s: 'sanga dama dama',\n            ss: 'sekondi %d',\n            m: 'miniti kelen',\n            mm: 'miniti %d',\n            h: 'lɛrɛ kelen',\n            hh: 'lɛrɛ %d',\n            d: 'tile kelen',\n            dd: 'tile %d',\n            M: 'kalo kelen',\n            MM: 'kalo %d',\n            y: 'san kelen',\n            yy: 'san %d',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return bm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '૧',\n            2: '૨',\n            3: '૩',\n            4: '૪',\n            5: '૫',\n            6: '૬',\n            7: '૭',\n            8: '૮',\n            9: '૯',\n            0: '૦',\n        },\n        numberMap = {\n            '૧': '1',\n            '૨': '2',\n            '૩': '3',\n            '૪': '4',\n            '૫': '5',\n            '૬': '6',\n            '૭': '7',\n            '૮': '8',\n            '૯': '9',\n            '૦': '0',\n        };\n\n    var gu = moment.defineLocale('gu', {\n        months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n            '_'\n        ),\n        monthsShort:\n            'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n            '_'\n        ),\n        weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n        weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm વાગ્યે',\n            LTS: 'A h:mm:ss વાગ્યે',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n        },\n        calendar: {\n            sameDay: '[આજ] LT',\n            nextDay: '[કાલે] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[ગઇકાલે] LT',\n            lastWeek: '[પાછલા] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s મા',\n            past: '%s પહેલા',\n            s: 'અમુક પળો',\n            ss: '%d સેકંડ',\n            m: 'એક મિનિટ',\n            mm: '%d મિનિટ',\n            h: 'એક કલાક',\n            hh: '%d કલાક',\n            d: 'એક દિવસ',\n            dd: '%d દિવસ',\n            M: 'એક મહિનો',\n            MM: '%d મહિનો',\n            y: 'એક વર્ષ',\n            yy: '%d વર્ષ',\n        },\n        preparse: function (string) {\n            return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n        meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'રાત') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'સવાર') {\n                return hour;\n            } else if (meridiem === 'બપોર') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'સાંજ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'રાત';\n            } else if (hour < 10) {\n                return 'સવાર';\n            } else if (hour < 17) {\n                return 'બપોર';\n            } else if (hour < 20) {\n                return 'સાંજ';\n            } else {\n                return 'રાત';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return gu;\n\n})));\n","\"use strict\";\n\n/* istanbul ignore next  */\nfunction setAttributesWithoutAttributes(styleElement) {\n  var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n  if (nonce) {\n    styleElement.setAttribute(\"nonce\", nonce);\n  }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n  var result = -1;\n  for (var i = 0; i < stylesInDOM.length; i++) {\n    if (stylesInDOM[i].identifier === identifier) {\n      result = i;\n      break;\n    }\n  }\n  return result;\n}\nfunction modulesToDom(list, options) {\n  var idCountMap = {};\n  var identifiers = [];\n  for (var i = 0; i < list.length; i++) {\n    var item = list[i];\n    var id = options.base ? item[0] + options.base : item[0];\n    var count = idCountMap[id] || 0;\n    var identifier = \"\".concat(id, \" \").concat(count);\n    idCountMap[id] = count + 1;\n    var indexByIdentifier = getIndexByIdentifier(identifier);\n    var obj = {\n      css: item[1],\n      media: item[2],\n      sourceMap: item[3],\n      supports: item[4],\n      layer: item[5]\n    };\n    if (indexByIdentifier !== -1) {\n      stylesInDOM[indexByIdentifier].references++;\n      stylesInDOM[indexByIdentifier].updater(obj);\n    } else {\n      var updater = addElementStyle(obj, options);\n      options.byIndex = i;\n      stylesInDOM.splice(i, 0, {\n        identifier: identifier,\n        updater: updater,\n        references: 1\n      });\n    }\n    identifiers.push(identifier);\n  }\n  return identifiers;\n}\nfunction addElementStyle(obj, options) {\n  var api = options.domAPI(options);\n  api.update(obj);\n  var updater = function updater(newObj) {\n    if (newObj) {\n      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n        return;\n      }\n      api.update(obj = newObj);\n    } else {\n      api.remove();\n    }\n  };\n  return updater;\n}\nmodule.exports = function (list, options) {\n  options = options || {};\n  list = list || [];\n  var lastIdentifiers = modulesToDom(list, options);\n  return function update(newList) {\n    newList = newList || [];\n    for (var i = 0; i < lastIdentifiers.length; i++) {\n      var identifier = lastIdentifiers[i];\n      var index = getIndexByIdentifier(identifier);\n      stylesInDOM[index].references--;\n    }\n    var newLastIdentifiers = modulesToDom(newList, options);\n    for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n      var _identifier = lastIdentifiers[_i];\n      var _index = getIndexByIdentifier(_identifier);\n      if (stylesInDOM[_index].references === 0) {\n        stylesInDOM[_index].updater();\n        stylesInDOM.splice(_index, 1);\n      }\n    }\n    lastIdentifiers = newLastIdentifiers;\n  };\n};","//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks() {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback(callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return (\n            input instanceof Array ||\n            Object.prototype.toString.call(input) === '[object Array]'\n        );\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return (\n            input != null &&\n            Object.prototype.toString.call(input) === '[object Object]'\n        );\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return Object.getOwnPropertyNames(obj).length === 0;\n        } else {\n            var k;\n            for (k in obj) {\n                if (hasOwnProp(obj, k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return (\n            typeof input === 'number' ||\n            Object.prototype.toString.call(input) === '[object Number]'\n        );\n    }\n\n    function isDate(input) {\n        return (\n            input instanceof Date ||\n            Object.prototype.toString.call(input) === '[object Date]'\n        );\n    }\n\n    function map(arr, fn) {\n        var res = [],\n            i,\n            arrLen = arr.length;\n        for (i = 0; i < arrLen; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty: false,\n            unusedTokens: [],\n            unusedInput: [],\n            overflow: -2,\n            charsLeftOver: 0,\n            nullInput: false,\n            invalidEra: null,\n            invalidMonth: null,\n            invalidFormat: false,\n            userInvalidated: false,\n            iso: false,\n            parsedDateParts: [],\n            era: null,\n            meridiem: null,\n            rfc2822: false,\n            weekdayMismatch: false,\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this),\n                len = t.length >>> 0,\n                i;\n\n            for (i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid(m) {\n        var flags = null,\n            parsedParts = false,\n            isNowValid = m._d && !isNaN(m._d.getTime());\n        if (isNowValid) {\n            flags = getParsingFlags(m);\n            parsedParts = some.call(flags.parsedDateParts, function (i) {\n                return i != null;\n            });\n            isNowValid =\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidEra &&\n                !flags.invalidMonth &&\n                !flags.invalidWeekday &&\n                !flags.weekdayMismatch &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated &&\n                (!flags.meridiem || (flags.meridiem && parsedParts));\n            if (m._strict) {\n                isNowValid =\n                    isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n        }\n        if (Object.isFrozen == null || !Object.isFrozen(m)) {\n            m._isValid = isNowValid;\n        } else {\n            return isNowValid;\n        }\n        return m._isValid;\n    }\n\n    function createInvalid(flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        } else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = (hooks.momentProperties = []),\n        updateInProgress = false;\n\n    function copyConfig(to, from) {\n        var i,\n            prop,\n            val,\n            momentPropertiesLen = momentProperties.length;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentPropertiesLen > 0) {\n            for (i = 0; i < momentPropertiesLen; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment(obj) {\n        return (\n            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n        );\n    }\n\n    function warn(msg) {\n        if (\n            hooks.suppressDeprecationWarnings === false &&\n            typeof console !== 'undefined' &&\n            console.warn\n        ) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [],\n                    arg,\n                    i,\n                    key,\n                    argLen = arguments.length;\n                for (i = 0; i < argLen; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (key in arguments[0]) {\n                            if (hasOwnProp(arguments[0], key)) {\n                                arg += key + ': ' + arguments[0][key] + ', ';\n                            }\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(\n                    msg +\n                        '\\nArguments: ' +\n                        Array.prototype.slice.call(args).join('') +\n                        '\\n' +\n                        new Error().stack\n                );\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    function set(config) {\n        var prop, i;\n        for (i in config) {\n            if (hasOwnProp(config, i)) {\n                prop = config[i];\n                if (isFunction(prop)) {\n                    this[i] = prop;\n                } else {\n                    this['_' + i] = prop;\n                }\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' +\n                /\\d{1,2}/.source\n        );\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig),\n            prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (\n                hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])\n            ) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i,\n                res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay: '[Today at] LT',\n        nextDay: '[Tomorrow at] LT',\n        nextWeek: 'dddd [at] LT',\n        lastDay: '[Yesterday at] LT',\n        lastWeek: '[Last] dddd [at] LT',\n        sameElse: 'L',\n    };\n\n    function calendar(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (\n            (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n            absNumber\n        );\n    }\n\n    var formattingTokens =\n            /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n        localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n        formatFunctions = {},\n        formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken(token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(\n                    func.apply(this, arguments),\n                    token\n                );\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens),\n            i,\n            length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '',\n                i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i])\n                    ? array[i].call(mom, format)\n                    : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] =\n            formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(\n                localFormattingTokens,\n                replaceLongDateFormatTokens\n            );\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var defaultLongDateFormat = {\n        LTS: 'h:mm:ss A',\n        LT: 'h:mm A',\n        L: 'MM/DD/YYYY',\n        LL: 'MMMM D, YYYY',\n        LLL: 'MMMM D, YYYY h:mm A',\n        LLLL: 'dddd, MMMM D, YYYY h:mm A',\n    };\n\n    function longDateFormat(key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper\n            .match(formattingTokens)\n            .map(function (tok) {\n                if (\n                    tok === 'MMMM' ||\n                    tok === 'MM' ||\n                    tok === 'DD' ||\n                    tok === 'dddd'\n                ) {\n                    return tok.slice(1);\n                }\n                return tok;\n            })\n            .join('');\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate() {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d',\n        defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal(number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future: 'in %s',\n        past: '%s ago',\n        s: 'a few seconds',\n        ss: '%d seconds',\n        m: 'a minute',\n        mm: '%d minutes',\n        h: 'an hour',\n        hh: '%d hours',\n        d: 'a day',\n        dd: '%d days',\n        w: 'a week',\n        ww: '%d weeks',\n        M: 'a month',\n        MM: '%d months',\n        y: 'a year',\n        yy: '%d years',\n    };\n\n    function relativeTime(number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return isFunction(output)\n            ? output(number, withoutSuffix, string, isFuture)\n            : output.replace(/%d/i, number);\n    }\n\n    function pastFuture(diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {\n        D: 'date',\n        dates: 'date',\n        date: 'date',\n        d: 'day',\n        days: 'day',\n        day: 'day',\n        e: 'weekday',\n        weekdays: 'weekday',\n        weekday: 'weekday',\n        E: 'isoWeekday',\n        isoweekdays: 'isoWeekday',\n        isoweekday: 'isoWeekday',\n        DDD: 'dayOfYear',\n        dayofyears: 'dayOfYear',\n        dayofyear: 'dayOfYear',\n        h: 'hour',\n        hours: 'hour',\n        hour: 'hour',\n        ms: 'millisecond',\n        milliseconds: 'millisecond',\n        millisecond: 'millisecond',\n        m: 'minute',\n        minutes: 'minute',\n        minute: 'minute',\n        M: 'month',\n        months: 'month',\n        month: 'month',\n        Q: 'quarter',\n        quarters: 'quarter',\n        quarter: 'quarter',\n        s: 'second',\n        seconds: 'second',\n        second: 'second',\n        gg: 'weekYear',\n        weekyears: 'weekYear',\n        weekyear: 'weekYear',\n        GG: 'isoWeekYear',\n        isoweekyears: 'isoWeekYear',\n        isoweekyear: 'isoWeekYear',\n        w: 'week',\n        weeks: 'week',\n        week: 'week',\n        W: 'isoWeek',\n        isoweeks: 'isoWeek',\n        isoweek: 'isoWeek',\n        y: 'year',\n        years: 'year',\n        year: 'year',\n    };\n\n    function normalizeUnits(units) {\n        return typeof units === 'string'\n            ? aliases[units] || aliases[units.toLowerCase()]\n            : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {\n        date: 9,\n        day: 11,\n        weekday: 11,\n        isoWeekday: 11,\n        dayOfYear: 4,\n        hour: 13,\n        millisecond: 16,\n        minute: 14,\n        month: 8,\n        quarter: 7,\n        second: 15,\n        weekYear: 1,\n        isoWeekYear: 1,\n        week: 5,\n        isoWeek: 5,\n        year: 1,\n    };\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [],\n            u;\n        for (u in unitsObj) {\n            if (hasOwnProp(unitsObj, u)) {\n                units.push({ unit: u, priority: priorities[u] });\n            }\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    var match1 = /\\d/, //       0 - 9\n        match2 = /\\d\\d/, //      00 - 99\n        match3 = /\\d{3}/, //     000 - 999\n        match4 = /\\d{4}/, //    0000 - 9999\n        match6 = /[+-]?\\d{6}/, // -999999 - 999999\n        match1to2 = /\\d\\d?/, //       0 - 99\n        match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n        match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n        match1to3 = /\\d{1,3}/, //       0 - 999\n        match1to4 = /\\d{1,4}/, //       0 - 9999\n        match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n        matchUnsigned = /\\d+/, //       0 - inf\n        matchSigned = /[+-]?\\d+/, //    -inf - inf\n        matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n        matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n        matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n        // any word (or two) characters or numbers including two/three word month in arabic.\n        // includes scottish gaelic two word and hyphenated months\n        matchWord =\n            /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n        match1to2NoLeadingZero = /^[1-9]\\d?/, //         1-99\n        match1to2HasZero = /^([1-9]\\d|\\d)/, //           0-99\n        regexes;\n\n    regexes = {};\n\n    function addRegexToken(token, regex, strictRegex) {\n        regexes[token] = isFunction(regex)\n            ? regex\n            : function (isStrict, localeData) {\n                  return isStrict && strictRegex ? strictRegex : regex;\n              };\n    }\n\n    function getParseRegexForToken(token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(\n            s\n                .replace('\\\\', '')\n                .replace(\n                    /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n                    function (matched, p1, p2, p3, p4) {\n                        return p1 || p2 || p3 || p4;\n                    }\n                )\n        );\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    function absFloor(number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    var tokens = {};\n\n    function addParseToken(token, callback) {\n        var i,\n            func = callback,\n            tokenLen;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        tokenLen = token.length;\n        for (i = 0; i < tokenLen; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken(token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    var YEAR = 0,\n        MONTH = 1,\n        DATE = 2,\n        HOUR = 3,\n        MINUTE = 4,\n        SECOND = 5,\n        MILLISECOND = 6,\n        WEEK = 7,\n        WEEKDAY = 8;\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY', 4], 0, 'year');\n    addFormatToken(0, ['YYYYY', 5], 0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // PARSING\n\n    addRegexToken('Y', matchSigned);\n    addRegexToken('YY', match1to2, match2);\n    addRegexToken('YYYY', match1to4, match4);\n    addRegexToken('YYYYY', match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] =\n            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear() {\n        return isLeapYear(this.year());\n    }\n\n    function makeGetSet(unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get(this, unit);\n            }\n        };\n    }\n\n    function get(mom, unit) {\n        if (!mom.isValid()) {\n            return NaN;\n        }\n\n        var d = mom._d,\n            isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n            case 'Seconds':\n                return isUTC ? d.getUTCSeconds() : d.getSeconds();\n            case 'Minutes':\n                return isUTC ? d.getUTCMinutes() : d.getMinutes();\n            case 'Hours':\n                return isUTC ? d.getUTCHours() : d.getHours();\n            case 'Date':\n                return isUTC ? d.getUTCDate() : d.getDate();\n            case 'Day':\n                return isUTC ? d.getUTCDay() : d.getDay();\n            case 'Month':\n                return isUTC ? d.getUTCMonth() : d.getMonth();\n            case 'FullYear':\n                return isUTC ? d.getUTCFullYear() : d.getFullYear();\n            default:\n                return NaN; // Just in case\n        }\n    }\n\n    function set$1(mom, unit, value) {\n        var d, isUTC, year, month, date;\n\n        if (!mom.isValid() || isNaN(value)) {\n            return;\n        }\n\n        d = mom._d;\n        isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return void (isUTC\n                    ? d.setUTCMilliseconds(value)\n                    : d.setMilliseconds(value));\n            case 'Seconds':\n                return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n            case 'Minutes':\n                return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n            case 'Hours':\n                return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n            case 'Date':\n                return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n            // case 'Day': // Not real\n            //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n            // case 'Month': // Not used because we need to pass two variables\n            //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n            case 'FullYear':\n                break; // See below ...\n            default:\n                return; // Just in case\n        }\n\n        year = value;\n        month = mom.month();\n        date = mom.date();\n        date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n        void (isUTC\n            ? d.setUTCFullYear(year, month, date)\n            : d.setFullYear(year, month, date));\n    }\n\n    // MOMENTS\n\n    function stringGet(units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n    function stringSet(units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units),\n                i,\n                prioritizedLen = prioritized.length;\n            for (i = 0; i < prioritizedLen; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function mod(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1\n            ? isLeapYear(year)\n                ? 29\n                : 28\n            : 31 - ((modMonth % 7) % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // PARSING\n\n    addRegexToken('M', match1to2, match1to2NoLeadingZero);\n    addRegexToken('MM', match1to2, match2);\n    addRegexToken('MMM', function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths =\n            'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n                '_'\n            ),\n        defaultLocaleMonthsShort =\n            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n        defaultMonthsShortRegex = matchWord,\n        defaultMonthsRegex = matchWord;\n\n    function localeMonths(m, format) {\n        if (!m) {\n            return isArray(this._months)\n                ? this._months\n                : this._months['standalone'];\n        }\n        return isArray(this._months)\n            ? this._months[m.month()]\n            : this._months[\n                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                      ? 'format'\n                      : 'standalone'\n              ][m.month()];\n    }\n\n    function localeMonthsShort(m, format) {\n        if (!m) {\n            return isArray(this._monthsShort)\n                ? this._monthsShort\n                : this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort)\n            ? this._monthsShort[m.month()]\n            : this._monthsShort[\n                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n              ][m.month()];\n    }\n\n    function handleStrictParse(monthName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse(monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp(\n                    '^' + this.months(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n                this._shortMonthsParse[i] = new RegExp(\n                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex =\n                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'MMMM' &&\n                this._longMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'MMM' &&\n                this._shortMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth(mom, value) {\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        var month = value,\n            date = mom.date();\n\n        date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n        void (mom._isUTC\n            ? mom._d.setUTCMonth(month, date)\n            : mom._d.setMonth(month, date));\n        return mom;\n    }\n\n    function getSetMonth(value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth() {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function monthsShortRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict\n                ? this._monthsShortStrictRegex\n                : this._monthsShortRegex;\n        }\n    }\n\n    function monthsRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict\n                ? this._monthsStrictRegex\n                : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            shortP,\n            longP;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortP = regexEscape(this.monthsShort(mom, ''));\n            longP = regexEscape(this.months(mom, ''));\n            shortPieces.push(shortP);\n            longPieces.push(longP);\n            mixedPieces.push(longP);\n            mixedPieces.push(shortP);\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._monthsShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    function createDate(y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date;\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            date = new Date(y + 400, m, d, h, M, s, ms);\n            if (isFinite(date.getFullYear())) {\n                date.setFullYear(y);\n            }\n        } else {\n            date = new Date(y, m, d, h, M, s, ms);\n        }\n\n        return date;\n    }\n\n    function createUTCDate(y) {\n        var date, args;\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            args = Array.prototype.slice.call(arguments);\n            // preserve leap years using a full 400 year cycle, then reset\n            args[0] = y + 400;\n            date = new Date(Date.UTC.apply(null, args));\n            if (isFinite(date.getUTCFullYear())) {\n                date.setUTCFullYear(y);\n            }\n        } else {\n            date = new Date(Date.UTC.apply(null, arguments));\n        }\n\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear,\n            resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear,\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // PARSING\n\n    addRegexToken('w', match1to2, match1to2NoLeadingZero);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W', match1to2, match1to2NoLeadingZero);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(\n        ['w', 'ww', 'W', 'WW'],\n        function (input, week, config, token) {\n            week[token.substr(0, 1)] = toInt(input);\n        }\n    );\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek(mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 6th is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek() {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear() {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek(input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek(input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\n    addRegexToken('dd', function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd', function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd', function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n    function shiftWeekdays(ws, n) {\n        return ws.slice(n, 7).concat(ws.slice(0, n));\n    }\n\n    var defaultLocaleWeekdays =\n            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        defaultWeekdaysRegex = matchWord,\n        defaultWeekdaysShortRegex = matchWord,\n        defaultWeekdaysMinRegex = matchWord;\n\n    function localeWeekdays(m, format) {\n        var weekdays = isArray(this._weekdays)\n            ? this._weekdays\n            : this._weekdays[\n                  m && m !== true && this._weekdays.isFormat.test(format)\n                      ? 'format'\n                      : 'standalone'\n              ];\n        return m === true\n            ? shiftWeekdays(weekdays, this._week.dow)\n            : m\n              ? weekdays[m.day()]\n              : weekdays;\n    }\n\n    function localeWeekdaysShort(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n            : m\n              ? this._weekdaysShort[m.day()]\n              : this._weekdaysShort;\n    }\n\n    function localeWeekdaysMin(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n            : m\n              ? this._weekdaysMin[m.day()]\n              : this._weekdaysMin;\n    }\n\n    function handleStrictParse$1(weekdayName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse(weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse$1.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._shortWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._minWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n            }\n            if (!this._weekdaysParse[i]) {\n                regex =\n                    '^' +\n                    this.weekdays(mom, '') +\n                    '|^' +\n                    this.weekdaysShort(mom, '') +\n                    '|^' +\n                    this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'dddd' &&\n                this._fullWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'ddd' &&\n                this._shortWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'dd' &&\n                this._minWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        var day = get(this, 'Day');\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    function weekdaysRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict\n                ? this._weekdaysStrictRegex\n                : this._weekdaysRegex;\n        }\n    }\n\n    function weekdaysShortRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict\n                ? this._weekdaysShortStrictRegex\n                : this._weekdaysShortRegex;\n        }\n    }\n\n    function weekdaysMinRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict\n                ? this._weekdaysMinStrictRegex\n                : this._weekdaysMinRegex;\n        }\n    }\n\n    function computeWeekdaysParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [],\n            shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            minp,\n            shortp,\n            longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = regexEscape(this.weekdaysMin(mom, ''));\n            shortp = regexEscape(this.weekdaysShort(mom, ''));\n            longp = regexEscape(this.weekdays(mom, ''));\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysMinStrictRegex = new RegExp(\n            '^(' + minPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return (\n            '' +\n            hFormat.apply(this) +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return (\n            '' +\n            this.hours() +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    function meridiem(token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(\n                this.hours(),\n                this.minutes(),\n                lowercase\n            );\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // PARSING\n\n    function matchMeridiem(isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a', matchMeridiem);\n    addRegexToken('A', matchMeridiem);\n    addRegexToken('H', match1to2, match1to2HasZero);\n    addRegexToken('h', match1to2, match1to2NoLeadingZero);\n    addRegexToken('k', match1to2, match1to2NoLeadingZero);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM(input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return (input + '').toLowerCase().charAt(0) === 'p';\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n        // Setting the hour should keep the time, because the user explicitly\n        // specified which hour they want. So trying to maintain the same hour (in\n        // a new timezone) makes sense. Adding/subtracting hours does not follow\n        // this rule.\n        getSetHour = makeGetSet('Hours', true);\n\n    function localeMeridiem(hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse,\n    };\n\n    // internal storage for locale config files\n    var locales = {},\n        localeFamilies = {},\n        globalLocale;\n\n    function commonPrefix(arr1, arr2) {\n        var i,\n            minl = Math.min(arr1.length, arr2.length);\n        for (i = 0; i < minl; i += 1) {\n            if (arr1[i] !== arr2[i]) {\n                return i;\n            }\n        }\n        return minl;\n    }\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0,\n            j,\n            next,\n            locale,\n            split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (\n                    next &&\n                    next.length >= j &&\n                    commonPrefix(split, next) >= j - 1\n                ) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function isLocaleNameSane(name) {\n        // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n        // Ensure name is available and function returns boolean\n        return !!(name && name.match('^[^/\\\\\\\\]*$'));\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            locales[name] === undefined &&\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports &&\n            isLocaleNameSane(name)\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                aliasedRequire('./locale/' + name);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {\n                // mark as not found to avoid repeating expensive file require call causing high CPU\n                // when trying to find en-US, en_US, en-us for every format call\n                locales[name] = null; // null means not found\n            }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale(key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            } else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            } else {\n                if (typeof console !== 'undefined' && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn(\n                        'Locale ' + key + ' not found. Did you forget to load it?'\n                    );\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale(name, config) {\n        if (config !== null) {\n            var locale,\n                parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple(\n                    'defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n                );\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config,\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale,\n                tmpLocale,\n                parentConfig = baseConfig;\n\n            if (locales[name] != null && locales[name].parentLocale != null) {\n                // Update existing child locale in-place to avoid memory-leaks\n                locales[name].set(mergeConfigs(locales[name]._config, config));\n            } else {\n                // MERGE\n                tmpLocale = loadLocale(name);\n                if (tmpLocale != null) {\n                    parentConfig = tmpLocale._config;\n                }\n                config = mergeConfigs(parentConfig, config);\n                if (tmpLocale == null) {\n                    // updateLocale is called for creating a new locale\n                    // Set abbr so it will have a name (getters return\n                    // undefined otherwise).\n                    config.abbr = name;\n                }\n                locale = new Locale(config);\n                locale.parentLocale = locales[name];\n                locales[name] = locale;\n            }\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                    if (name === getSetGlobalLocale()) {\n                        getSetGlobalLocale(name);\n                    }\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale(key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow(m) {\n        var overflow,\n            a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH] < 0 || a[MONTH] > 11\n                    ? MONTH\n                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                      ? DATE\n                      : a[HOUR] < 0 ||\n                          a[HOUR] > 24 ||\n                          (a[HOUR] === 24 &&\n                              (a[MINUTE] !== 0 ||\n                                  a[SECOND] !== 0 ||\n                                  a[MILLISECOND] !== 0))\n                        ? HOUR\n                        : a[MINUTE] < 0 || a[MINUTE] > 59\n                          ? MINUTE\n                          : a[SECOND] < 0 || a[SECOND] > 59\n                            ? SECOND\n                            : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                              ? MILLISECOND\n                              : -1;\n\n            if (\n                getParsingFlags(m)._overflowDayOfYear &&\n                (overflow < YEAR || overflow > DATE)\n            ) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        basicIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n        isoDates = [\n            ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n            ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n            ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n            ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n            ['YYYY-DDD', /\\d{4}-\\d{3}/],\n            ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n            ['YYYYYYMMDD', /[+-]\\d{10}/],\n            ['YYYYMMDD', /\\d{8}/],\n            ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n            ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n            ['YYYYDDD', /\\d{7}/],\n            ['YYYYMM', /\\d{6}/, false],\n            ['YYYY', /\\d{4}/, false],\n        ],\n        // iso time formats and regexes\n        isoTimes = [\n            ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n            ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n            ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n            ['HH:mm', /\\d\\d:\\d\\d/],\n            ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n            ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n            ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n            ['HHmm', /\\d\\d\\d\\d/],\n            ['HH', /\\d\\d/],\n        ],\n        aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n        rfc2822 =\n            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n        obsOffsets = {\n            UT: 0,\n            GMT: 0,\n            EDT: -4 * 60,\n            EST: -5 * 60,\n            CDT: -5 * 60,\n            CST: -6 * 60,\n            MDT: -6 * 60,\n            MST: -7 * 60,\n            PDT: -7 * 60,\n            PST: -8 * 60,\n        };\n\n    // date from iso format\n    function configFromISO(config) {\n        var i,\n            l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime,\n            dateFormat,\n            timeFormat,\n            tzFormat,\n            isoDatesLen = isoDates.length,\n            isoTimesLen = isoTimes.length;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n            for (i = 0, l = isoDatesLen; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimesLen; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    function extractFromRFC2822Strings(\n        yearStr,\n        monthStr,\n        dayStr,\n        hourStr,\n        minuteStr,\n        secondStr\n    ) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10),\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s\n            .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n            .replace(/(\\s\\s+)/g, ' ')\n            .replace(/^\\s\\s*/, '')\n            .replace(/\\s\\s*$/, '');\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(\n                    parsedInput[0],\n                    parsedInput[1],\n                    parsedInput[2]\n                ).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10),\n                m = hm % 100,\n                h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i)),\n            parsedArray;\n        if (match) {\n            parsedArray = extractFromRFC2822Strings(\n                match[4],\n                match[3],\n                match[2],\n                match[5],\n                match[6],\n                match[7]\n            );\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        if (config._strict) {\n            config._isValid = false;\n        } else {\n            // Final attempt, use Input Fallback\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(hooks.now());\n        if (config._useUTC) {\n            return [\n                nowValue.getUTCFullYear(),\n                nowValue.getUTCMonth(),\n                nowValue.getUTCDate(),\n            ];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray(config) {\n        var i,\n            date,\n            input = [],\n            currentDate,\n            expectedWeekday,\n            yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (\n                config._dayOfYear > daysInYear(yearToUse) ||\n                config._dayOfYear === 0\n            ) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] =\n                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (\n            config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0\n        ) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(\n            null,\n            input\n        );\n        expectedWeekday = config._useUTC\n            ? config._d.getUTCDay()\n            : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (\n            config._w &&\n            typeof config._w.d !== 'undefined' &&\n            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(\n                w.GG,\n                config._a[YEAR],\n                weekOfYear(createLocal(), 1, 4).year\n            );\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            curWeek = weekOfYear(createLocal(), dow, doy);\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from beginning of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to beginning of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i,\n            parsedInput,\n            tokens,\n            token,\n            skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0,\n            era,\n            tokenLen;\n\n        tokens =\n            expandFormat(config._f, config._locale).match(formattingTokens) || [];\n        tokenLen = tokens.length;\n        for (i = 0; i < tokenLen; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n                [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(\n                    string.indexOf(parsedInput) + parsedInput.length\n                );\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                } else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            } else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver =\n            stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (\n            config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0\n        ) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(\n            config._locale,\n            config._a[HOUR],\n            config._meridiem\n        );\n\n        // handle era\n        era = getParsingFlags(config).era;\n        if (era !== null) {\n            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n        }\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n    function meridiemFixWrap(locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n            scoreToBeat,\n            i,\n            currentScore,\n            validFormatFound,\n            bestFormatIsValid = false,\n            configfLen = config._f.length;\n\n        if (configfLen === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < configfLen; i++) {\n            currentScore = 0;\n            validFormatFound = false;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid(tempConfig)) {\n                validFormatFound = true;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (!bestFormatIsValid) {\n                if (\n                    scoreToBeat == null ||\n                    currentScore < scoreToBeat ||\n                    validFormatFound\n                ) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                    if (validFormatFound) {\n                        bestFormatIsValid = true;\n                    }\n                }\n            } else {\n                if (currentScore < scoreToBeat) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                }\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i),\n            dayOrDate = i.day === undefined ? i.date : i.day;\n        config._a = map(\n            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n            function (obj) {\n                return obj && parseInt(obj, 10);\n            }\n        );\n\n        configFromArray(config);\n    }\n\n    function createFromConfig(config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig(config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid({ nullInput: true });\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else {\n            configFromInput(config);\n        }\n\n        if (!isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC(input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (format === true || format === false) {\n            strict = format;\n            format = undefined;\n        }\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if (\n            (isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)\n        ) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other < this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        ),\n        prototypeMax = deprecate(\n            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other > this ? this : other;\n                } else {\n                    return createInvalid();\n                }\n            }\n        );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +new Date();\n    };\n\n    var ordering = [\n        'year',\n        'quarter',\n        'month',\n        'week',\n        'day',\n        'hour',\n        'minute',\n        'second',\n        'millisecond',\n    ];\n\n    function isDurationValid(m) {\n        var key,\n            unitHasDecimal = false,\n            i,\n            orderLen = ordering.length;\n        for (key in m) {\n            if (\n                hasOwnProp(m, key) &&\n                !(\n                    indexOf.call(ordering, key) !== -1 &&\n                    (m[key] == null || !isNaN(m[key]))\n                )\n            ) {\n                return false;\n            }\n        }\n\n        for (i = 0; i < orderLen; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid$1() {\n        return createDuration(NaN);\n    }\n\n    function Duration(duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds =\n            +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days + weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months + quarters * 3 + years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration(obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound(number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if (\n                (dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n            ) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    // FORMATTING\n\n    function offset(token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset(),\n                sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return (\n                sign +\n                zeroFill(~~(offset / 60), 2) +\n                separator +\n                zeroFill(~~offset % 60, 2)\n            );\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z', matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher),\n            chunk,\n            parts,\n            minutes;\n\n        if (matches === null) {\n            return null;\n        }\n\n        chunk = matches[matches.length - 1] || [];\n        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff =\n                (isMoment(input) || isDate(input)\n                    ? input.valueOf()\n                    : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset(m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset());\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset(input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract(\n                        this,\n                        createDuration(input - offset, 'm'),\n                        1,\n                        false\n                    );\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone(input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC(keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal(keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset() {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            } else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset(input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime() {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted() {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {},\n            other;\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted =\n                this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal() {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset() {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc() {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n        // and further modified to allow for strings containing both week and day\n        isoRegex =\n            /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration(input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms: input._milliseconds,\n                d: input._days,\n                M: input._months,\n            };\n        } else if (isNumber(input) || !isNaN(+input)) {\n            duration = {};\n            if (key) {\n                duration[key] = +input;\n            } else {\n                duration.milliseconds = +input;\n            }\n        } else if ((match = aspNetRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: 0,\n                d: toInt(match[DATE]) * sign,\n                h: toInt(match[HOUR]) * sign,\n                m: toInt(match[MINUTE]) * sign,\n                s: toInt(match[SECOND]) * sign,\n                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n            };\n        } else if ((match = isoRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: parseIso(match[2], sign),\n                M: parseIso(match[3], sign),\n                w: parseIso(match[4], sign),\n                d: parseIso(match[5], sign),\n                h: parseIso(match[6], sign),\n                m: parseIso(match[7], sign),\n                s: parseIso(match[8], sign),\n            };\n        } else if (duration == null) {\n            // checks for null or undefined\n            duration = {};\n        } else if (\n            typeof duration === 'object' &&\n            ('from' in duration || 'to' in duration)\n        ) {\n            diffRes = momentsDifference(\n                createLocal(duration.from),\n                createLocal(duration.to)\n            );\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n            ret._isValid = input._isValid;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid$1;\n\n    function parseIso(inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {};\n\n        res.months =\n            other.month() - base.month() + (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return { milliseconds: 0, months: 0 };\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(\n                    name,\n                    'moment().' +\n                        name +\n                        '(period, number) is deprecated. Please use moment().' +\n                        name +\n                        '(number, period). ' +\n                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n                );\n                tmp = val;\n                val = period;\n                period = tmp;\n            }\n\n            dur = createDuration(val, period);\n            addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract(mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add = createAdder(1, 'add'),\n        subtract = createAdder(-1, 'subtract');\n\n    function isString(input) {\n        return typeof input === 'string' || input instanceof String;\n    }\n\n    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n    function isMomentInput(input) {\n        return (\n            isMoment(input) ||\n            isDate(input) ||\n            isString(input) ||\n            isNumber(input) ||\n            isNumberOrStringArray(input) ||\n            isMomentInputObject(input) ||\n            input === null ||\n            input === undefined\n        );\n    }\n\n    function isMomentInputObject(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'years',\n                'year',\n                'y',\n                'months',\n                'month',\n                'M',\n                'days',\n                'day',\n                'd',\n                'dates',\n                'date',\n                'D',\n                'hours',\n                'hour',\n                'h',\n                'minutes',\n                'minute',\n                'm',\n                'seconds',\n                'second',\n                's',\n                'milliseconds',\n                'millisecond',\n                'ms',\n            ],\n            i,\n            property,\n            propertyLen = properties.length;\n\n        for (i = 0; i < propertyLen; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function isNumberOrStringArray(input) {\n        var arrayTest = isArray(input),\n            dataTypeTest = false;\n        if (arrayTest) {\n            dataTypeTest =\n                input.filter(function (item) {\n                    return !isNumber(item) && isString(input);\n                }).length === 0;\n        }\n        return arrayTest && dataTypeTest;\n    }\n\n    function isCalendarSpec(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'sameDay',\n                'nextDay',\n                'lastDay',\n                'nextWeek',\n                'lastWeek',\n                'sameElse',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6\n            ? 'sameElse'\n            : diff < -1\n              ? 'lastWeek'\n              : diff < 0\n                ? 'lastDay'\n                : diff < 1\n                  ? 'sameDay'\n                  : diff < 2\n                    ? 'nextDay'\n                    : diff < 7\n                      ? 'nextWeek'\n                      : 'sameElse';\n    }\n\n    function calendar$1(time, formats) {\n        // Support for single parameter, formats only overload to the calendar function\n        if (arguments.length === 1) {\n            if (!arguments[0]) {\n                time = undefined;\n                formats = undefined;\n            } else if (isMomentInput(arguments[0])) {\n                time = arguments[0];\n                formats = undefined;\n            } else if (isCalendarSpec(arguments[0])) {\n                formats = arguments[0];\n                time = undefined;\n            }\n        }\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse',\n            output =\n                formats &&\n                (isFunction(formats[format])\n                    ? formats[format].call(this, now)\n                    : formats[format]);\n\n        return this.format(\n            output || this.localeData().calendar(format, this, createLocal(now))\n        );\n    }\n\n    function clone() {\n        return new Moment(this);\n    }\n\n    function isAfter(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween(from, to, units, inclusivity) {\n        var localFrom = isMoment(from) ? from : createLocal(from),\n            localTo = isMoment(to) ? to : createLocal(to);\n        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n            return false;\n        }\n        inclusivity = inclusivity || '()';\n        return (\n            (inclusivity[0] === '('\n                ? this.isAfter(localFrom, units)\n                : !this.isBefore(localFrom, units)) &&\n            (inclusivity[1] === ')'\n                ? this.isBefore(localTo, units)\n                : !this.isAfter(localTo, units))\n        );\n    }\n\n    function isSame(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return (\n                this.clone().startOf(units).valueOf() <= inputMs &&\n                inputMs <= this.clone().endOf(units).valueOf()\n            );\n        }\n    }\n\n    function isSameOrAfter(input, units) {\n        return this.isSame(input, units) || this.isAfter(input, units);\n    }\n\n    function isSameOrBefore(input, units) {\n        return this.isSame(input, units) || this.isBefore(input, units);\n    }\n\n    function diff(input, units, asFloat) {\n        var that, zoneDelta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year':\n                output = monthDiff(this, that) / 12;\n                break;\n            case 'month':\n                output = monthDiff(this, that);\n                break;\n            case 'quarter':\n                output = monthDiff(this, that) / 3;\n                break;\n            case 'second':\n                output = (this - that) / 1e3;\n                break; // 1000\n            case 'minute':\n                output = (this - that) / 6e4;\n                break; // 1000 * 60\n            case 'hour':\n                output = (this - that) / 36e5;\n                break; // 1000 * 60 * 60\n            case 'day':\n                output = (this - that - zoneDelta) / 864e5;\n                break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week':\n                output = (this - that - zoneDelta) / 6048e5;\n                break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default:\n                output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff(a, b) {\n        if (a.date() < b.date()) {\n            // end-of-month calculations work correct when the start month has more\n            // days than the end month.\n            return -monthDiff(b, a);\n        }\n        // difference in months\n        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2,\n            adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString() {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true,\n            m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(\n                m,\n                utc\n                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n            );\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                    .toISOString()\n                    .replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(\n            m,\n            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect() {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment',\n            zone = '',\n            prefix,\n            year,\n            datetime,\n            suffix;\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        prefix = '[' + func + '(\"]';\n        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n        datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format(inputString) {\n        if (!inputString) {\n            inputString = this.isUtc()\n                ? hooks.defaultFormatUtc\n                : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ to: this, from: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow(withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ from: this, to: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow(withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale(key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData() {\n        return this._locale;\n    }\n\n    var MS_PER_SECOND = 1000,\n        MS_PER_MINUTE = 60 * MS_PER_SECOND,\n        MS_PER_HOUR = 60 * MS_PER_MINUTE,\n        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n    // actual modulo - handles negative numbers (for dates before 1970):\n    function mod$1(dividend, divisor) {\n        return ((dividend % divisor) + divisor) % divisor;\n    }\n\n    function localStartOfDate(y, m, d) {\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return new Date(y, m, d).valueOf();\n        }\n    }\n\n    function utcStartOfDate(y, m, d) {\n        // Date.UTC remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return Date.UTC(y, m, d);\n        }\n    }\n\n    function startOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year(), 0, 1);\n                break;\n            case 'quarter':\n                time = startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3),\n                    1\n                );\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month(), 1);\n                break;\n            case 'week':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday()\n                );\n                break;\n            case 'isoWeek':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1)\n                );\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date());\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time -= mod$1(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                );\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod$1(time, MS_PER_SECOND);\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function endOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year() + 1, 0, 1) - 1;\n                break;\n            case 'quarter':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month() - (this.month() % 3) + 3,\n                        1\n                    ) - 1;\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n                break;\n            case 'week':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - this.weekday() + 7\n                    ) - 1;\n                break;\n            case 'isoWeek':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - (this.isoWeekday() - 1) + 7\n                    ) - 1;\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time +=\n                    MS_PER_HOUR -\n                    mod$1(\n                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                        MS_PER_HOUR\n                    ) -\n                    1;\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function valueOf() {\n        return this._d.valueOf() - (this._offset || 0) * 60000;\n    }\n\n    function unix() {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate() {\n        return new Date(this.valueOf());\n    }\n\n    function toArray() {\n        var m = this;\n        return [\n            m.year(),\n            m.month(),\n            m.date(),\n            m.hour(),\n            m.minute(),\n            m.second(),\n            m.millisecond(),\n        ];\n    }\n\n    function toObject() {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds(),\n        };\n    }\n\n    function toJSON() {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid$2() {\n        return isValid(this);\n    }\n\n    function parsingFlags() {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt() {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict,\n        };\n    }\n\n    addFormatToken('N', 0, 0, 'eraAbbr');\n    addFormatToken('NN', 0, 0, 'eraAbbr');\n    addFormatToken('NNN', 0, 0, 'eraAbbr');\n    addFormatToken('NNNN', 0, 0, 'eraName');\n    addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n    addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n    addFormatToken('y', ['yy', 2], 0, 'eraYear');\n    addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n    addRegexToken('N', matchEraAbbr);\n    addRegexToken('NN', matchEraAbbr);\n    addRegexToken('NNN', matchEraAbbr);\n    addRegexToken('NNNN', matchEraName);\n    addRegexToken('NNNNN', matchEraNarrow);\n\n    addParseToken(\n        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n        function (input, array, config, token) {\n            var era = config._locale.erasParse(input, token, config._strict);\n            if (era) {\n                getParsingFlags(config).era = era;\n            } else {\n                getParsingFlags(config).invalidEra = input;\n            }\n        }\n    );\n\n    addRegexToken('y', matchUnsigned);\n    addRegexToken('yy', matchUnsigned);\n    addRegexToken('yyy', matchUnsigned);\n    addRegexToken('yyyy', matchUnsigned);\n    addRegexToken('yo', matchEraYearOrdinal);\n\n    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n    addParseToken(['yo'], function (input, array, config, token) {\n        var match;\n        if (config._locale._eraYearOrdinalRegex) {\n            match = input.match(config._locale._eraYearOrdinalRegex);\n        }\n\n        if (config._locale.eraYearOrdinalParse) {\n            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n        } else {\n            array[YEAR] = parseInt(input, 10);\n        }\n    });\n\n    function localeEras(m, format) {\n        var i,\n            l,\n            date,\n            eras = this._eras || getLocale('en')._eras;\n        for (i = 0, l = eras.length; i < l; ++i) {\n            switch (typeof eras[i].since) {\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].since).startOf('day');\n                    eras[i].since = date.valueOf();\n                    break;\n            }\n\n            switch (typeof eras[i].until) {\n                case 'undefined':\n                    eras[i].until = +Infinity;\n                    break;\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].until).startOf('day').valueOf();\n                    eras[i].until = date.valueOf();\n                    break;\n            }\n        }\n        return eras;\n    }\n\n    function localeErasParse(eraName, format, strict) {\n        var i,\n            l,\n            eras = this.eras(),\n            name,\n            abbr,\n            narrow;\n        eraName = eraName.toUpperCase();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            name = eras[i].name.toUpperCase();\n            abbr = eras[i].abbr.toUpperCase();\n            narrow = eras[i].narrow.toUpperCase();\n\n            if (strict) {\n                switch (format) {\n                    case 'N':\n                    case 'NN':\n                    case 'NNN':\n                        if (abbr === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNN':\n                        if (name === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNNN':\n                        if (narrow === eraName) {\n                            return eras[i];\n                        }\n                        break;\n                }\n            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n                return eras[i];\n            }\n        }\n    }\n\n    function localeErasConvertYear(era, year) {\n        var dir = era.since <= era.until ? +1 : -1;\n        if (year === undefined) {\n            return hooks(era.since).year();\n        } else {\n            return hooks(era.since).year() + (year - era.offset) * dir;\n        }\n    }\n\n    function getEraName() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].name;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].name;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraNarrow() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].narrow;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].narrow;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraAbbr() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].abbr;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].abbr;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraYear() {\n        var i,\n            l,\n            dir,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (\n                (eras[i].since <= val && val <= eras[i].until) ||\n                (eras[i].until <= val && val <= eras[i].since)\n            ) {\n                return (\n                    (this.year() - hooks(eras[i].since).year()) * dir +\n                    eras[i].offset\n                );\n            }\n        }\n\n        return this.year();\n    }\n\n    function erasNameRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNameRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNameRegex : this._erasRegex;\n    }\n\n    function erasAbbrRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasAbbrRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasAbbrRegex : this._erasRegex;\n    }\n\n    function erasNarrowRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNarrowRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNarrowRegex : this._erasRegex;\n    }\n\n    function matchEraAbbr(isStrict, locale) {\n        return locale.erasAbbrRegex(isStrict);\n    }\n\n    function matchEraName(isStrict, locale) {\n        return locale.erasNameRegex(isStrict);\n    }\n\n    function matchEraNarrow(isStrict, locale) {\n        return locale.erasNarrowRegex(isStrict);\n    }\n\n    function matchEraYearOrdinal(isStrict, locale) {\n        return locale._eraYearOrdinalRegex || matchUnsigned;\n    }\n\n    function computeErasParse() {\n        var abbrPieces = [],\n            namePieces = [],\n            narrowPieces = [],\n            mixedPieces = [],\n            i,\n            l,\n            erasName,\n            erasAbbr,\n            erasNarrow,\n            eras = this.eras();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            erasName = regexEscape(eras[i].name);\n            erasAbbr = regexEscape(eras[i].abbr);\n            erasNarrow = regexEscape(eras[i].narrow);\n\n            namePieces.push(erasName);\n            abbrPieces.push(erasAbbr);\n            narrowPieces.push(erasNarrow);\n            mixedPieces.push(erasName);\n            mixedPieces.push(erasAbbr);\n            mixedPieces.push(erasNarrow);\n        }\n\n        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n        this._erasNarrowRegex = new RegExp(\n            '^(' + narrowPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken(token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg', 'weekYear');\n    addWeekYearFormatToken('ggggg', 'weekYear');\n    addWeekYearFormatToken('GGGG', 'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    // PARSING\n\n    addRegexToken('G', matchSigned);\n    addRegexToken('g', matchSigned);\n    addRegexToken('GG', match1to2, match2);\n    addRegexToken('gg', match1to2, match2);\n    addRegexToken('GGGG', match1to4, match4);\n    addRegexToken('gggg', match1to4, match4);\n    addRegexToken('GGGGG', match1to6, match6);\n    addRegexToken('ggggg', match1to6, match6);\n\n    addWeekParseToken(\n        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n        function (input, week, config, token) {\n            week[token.substr(0, 2)] = toInt(input);\n        }\n    );\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.week(),\n            this.weekday() + this.localeData()._week.dow,\n            this.localeData()._week.dow,\n            this.localeData()._week.doy\n        );\n    }\n\n    function getSetISOWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.isoWeek(),\n            this.isoWeekday(),\n            1,\n            4\n        );\n    }\n\n    function getISOWeeksInYear() {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getISOWeeksInISOWeekYear() {\n        return weeksInYear(this.isoWeekYear(), 1, 4);\n    }\n\n    function getWeeksInYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getWeeksInWeekYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter(input) {\n        return input == null\n            ? Math.ceil((this.month() + 1) / 3)\n            : this.month((input - 1) * 3 + (this.month() % 3));\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // PARSING\n\n    addRegexToken('D', match1to2, match1to2NoLeadingZero);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict\n            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n            : locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // PARSING\n\n    addRegexToken('DDD', match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear(input) {\n        var dayOfYear =\n            Math.round(\n                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n            ) + 1;\n        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // PARSING\n\n    addRegexToken('m', match1to2, match1to2HasZero);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // PARSING\n\n    addRegexToken('s', match1to2, match1to2HasZero);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n    // PARSING\n\n    addRegexToken('S', match1to3, match1);\n    addRegexToken('SS', match1to3, match2);\n    addRegexToken('SSS', match1to3, match3);\n\n    var token, getSetMillisecond;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n\n    getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z', 0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr() {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName() {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto = Moment.prototype;\n\n    proto.add = add;\n    proto.calendar = calendar$1;\n    proto.clone = clone;\n    proto.diff = diff;\n    proto.endOf = endOf;\n    proto.format = format;\n    proto.from = from;\n    proto.fromNow = fromNow;\n    proto.to = to;\n    proto.toNow = toNow;\n    proto.get = stringGet;\n    proto.invalidAt = invalidAt;\n    proto.isAfter = isAfter;\n    proto.isBefore = isBefore;\n    proto.isBetween = isBetween;\n    proto.isSame = isSame;\n    proto.isSameOrAfter = isSameOrAfter;\n    proto.isSameOrBefore = isSameOrBefore;\n    proto.isValid = isValid$2;\n    proto.lang = lang;\n    proto.locale = locale;\n    proto.localeData = localeData;\n    proto.max = prototypeMax;\n    proto.min = prototypeMin;\n    proto.parsingFlags = parsingFlags;\n    proto.set = stringSet;\n    proto.startOf = startOf;\n    proto.subtract = subtract;\n    proto.toArray = toArray;\n    proto.toObject = toObject;\n    proto.toDate = toDate;\n    proto.toISOString = toISOString;\n    proto.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto.toJSON = toJSON;\n    proto.toString = toString;\n    proto.unix = unix;\n    proto.valueOf = valueOf;\n    proto.creationData = creationData;\n    proto.eraName = getEraName;\n    proto.eraNarrow = getEraNarrow;\n    proto.eraAbbr = getEraAbbr;\n    proto.eraYear = getEraYear;\n    proto.year = getSetYear;\n    proto.isLeapYear = getIsLeapYear;\n    proto.weekYear = getSetWeekYear;\n    proto.isoWeekYear = getSetISOWeekYear;\n    proto.quarter = proto.quarters = getSetQuarter;\n    proto.month = getSetMonth;\n    proto.daysInMonth = getDaysInMonth;\n    proto.week = proto.weeks = getSetWeek;\n    proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n    proto.weeksInYear = getWeeksInYear;\n    proto.weeksInWeekYear = getWeeksInWeekYear;\n    proto.isoWeeksInYear = getISOWeeksInYear;\n    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto.date = getSetDayOfMonth;\n    proto.day = proto.days = getSetDayOfWeek;\n    proto.weekday = getSetLocaleDayOfWeek;\n    proto.isoWeekday = getSetISODayOfWeek;\n    proto.dayOfYear = getSetDayOfYear;\n    proto.hour = proto.hours = getSetHour;\n    proto.minute = proto.minutes = getSetMinute;\n    proto.second = proto.seconds = getSetSecond;\n    proto.millisecond = proto.milliseconds = getSetMillisecond;\n    proto.utcOffset = getSetOffset;\n    proto.utc = setOffsetToUTC;\n    proto.local = setOffsetToLocal;\n    proto.parseZone = setOffsetToParsedOffset;\n    proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto.isDST = isDaylightSavingTime;\n    proto.isLocal = isLocal;\n    proto.isUtcOffset = isUtcOffset;\n    proto.isUtc = isUtc;\n    proto.isUTC = isUtc;\n    proto.zoneAbbr = getZoneAbbr;\n    proto.zoneName = getZoneName;\n    proto.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto.isDSTShifted = deprecate(\n        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n        isDaylightSavingTimeShifted\n    );\n\n    function createUnix(input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone() {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat(string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar = calendar;\n    proto$1.longDateFormat = longDateFormat;\n    proto$1.invalidDate = invalidDate;\n    proto$1.ordinal = ordinal;\n    proto$1.preparse = preParsePostFormat;\n    proto$1.postformat = preParsePostFormat;\n    proto$1.relativeTime = relativeTime;\n    proto$1.pastFuture = pastFuture;\n    proto$1.set = set;\n    proto$1.eras = localeEras;\n    proto$1.erasParse = localeErasParse;\n    proto$1.erasConvertYear = localeErasConvertYear;\n    proto$1.erasAbbrRegex = erasAbbrRegex;\n    proto$1.erasNameRegex = erasNameRegex;\n    proto$1.erasNarrowRegex = erasNarrowRegex;\n\n    proto$1.months = localeMonths;\n    proto$1.monthsShort = localeMonthsShort;\n    proto$1.monthsParse = localeMonthsParse;\n    proto$1.monthsRegex = monthsRegex;\n    proto$1.monthsShortRegex = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays = localeWeekdays;\n    proto$1.weekdaysMin = localeWeekdaysMin;\n    proto$1.weekdaysShort = localeWeekdaysShort;\n    proto$1.weekdaysParse = localeWeekdaysParse;\n\n    proto$1.weekdaysRegex = weekdaysRegex;\n    proto$1.weekdaysShortRegex = weekdaysShortRegex;\n    proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1(format, index, field, setter) {\n        var locale = getLocale(),\n            utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl(format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i,\n            out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl(localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0,\n            i,\n            out = [];\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths(format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort(format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        eras: [\n            {\n                since: '0001-01-01',\n                until: +Infinity,\n                offset: 1,\n                name: 'Anno Domini',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: 'Before Christ',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    toInt((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate(\n        'moment.lang is deprecated. Use moment.locale instead.',\n        getSetGlobalLocale\n    );\n    hooks.langData = deprecate(\n        'moment.langData is deprecated. Use moment.localeData instead.',\n        getLocale\n    );\n\n    var mathAbs = Math.abs;\n\n    function abs() {\n        var data = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days = mathAbs(this._days);\n        this._months = mathAbs(this._months);\n\n        data.milliseconds = mathAbs(data.milliseconds);\n        data.seconds = mathAbs(data.seconds);\n        data.minutes = mathAbs(data.minutes);\n        data.hours = mathAbs(data.hours);\n        data.months = mathAbs(data.months);\n        data.years = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract$1(duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days += direction * other._days;\n        duration._months += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add$1(input, value) {\n        return addSubtract$1(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract$1(input, value) {\n        return addSubtract$1(this, input, value, -1);\n    }\n\n    function absCeil(number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble() {\n        var milliseconds = this._milliseconds,\n            days = this._days,\n            months = this._months,\n            data = this._data,\n            seconds,\n            minutes,\n            hours,\n            years,\n            monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (\n            !(\n                (milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0)\n            )\n        ) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds = absFloor(milliseconds / 1000);\n        data.seconds = seconds % 60;\n\n        minutes = absFloor(seconds / 60);\n        data.minutes = minutes % 60;\n\n        hours = absFloor(minutes / 60);\n        data.hours = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days = days;\n        data.months = months;\n        data.years = years;\n\n        return this;\n    }\n\n    function daysToMonths(days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return (days * 4800) / 146097;\n    }\n\n    function monthsToDays(months) {\n        // the reverse of daysToMonths\n        return (months * 146097) / 4800;\n    }\n\n    function as(units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days,\n            months,\n            milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'quarter' || units === 'year') {\n            days = this._days + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            switch (units) {\n                case 'month':\n                    return months;\n                case 'quarter':\n                    return months / 3;\n                case 'year':\n                    return months / 12;\n            }\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week':\n                    return days / 7 + milliseconds / 6048e5;\n                case 'day':\n                    return days + milliseconds / 864e5;\n                case 'hour':\n                    return days * 24 + milliseconds / 36e5;\n                case 'minute':\n                    return days * 1440 + milliseconds / 6e4;\n                case 'second':\n                    return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond':\n                    return Math.floor(days * 864e5) + milliseconds;\n                default:\n                    throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    function makeAs(alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms'),\n        asSeconds = makeAs('s'),\n        asMinutes = makeAs('m'),\n        asHours = makeAs('h'),\n        asDays = makeAs('d'),\n        asWeeks = makeAs('w'),\n        asMonths = makeAs('M'),\n        asQuarters = makeAs('Q'),\n        asYears = makeAs('y'),\n        valueOf$1 = asMilliseconds;\n\n    function clone$1() {\n        return createDuration(this);\n    }\n\n    function get$2(units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds'),\n        seconds = makeGetter('seconds'),\n        minutes = makeGetter('minutes'),\n        hours = makeGetter('hours'),\n        days = makeGetter('days'),\n        months = makeGetter('months'),\n        years = makeGetter('years');\n\n    function weeks() {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round,\n        thresholds = {\n            ss: 44, // a few seconds to seconds\n            s: 45, // seconds to minute\n            m: 45, // minutes to hour\n            h: 22, // hours to day\n            d: 26, // days to month/week\n            w: null, // weeks to month\n            M: 11, // months to year\n        };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n        var duration = createDuration(posNegDuration).abs(),\n            seconds = round(duration.as('s')),\n            minutes = round(duration.as('m')),\n            hours = round(duration.as('h')),\n            days = round(duration.as('d')),\n            months = round(duration.as('M')),\n            weeks = round(duration.as('w')),\n            years = round(duration.as('y')),\n            a =\n                (seconds <= thresholds.ss && ['s', seconds]) ||\n                (seconds < thresholds.s && ['ss', seconds]) ||\n                (minutes <= 1 && ['m']) ||\n                (minutes < thresholds.m && ['mm', minutes]) ||\n                (hours <= 1 && ['h']) ||\n                (hours < thresholds.h && ['hh', hours]) ||\n                (days <= 1 && ['d']) ||\n                (days < thresholds.d && ['dd', days]);\n\n        if (thresholds.w != null) {\n            a =\n                a ||\n                (weeks <= 1 && ['w']) ||\n                (weeks < thresholds.w && ['ww', weeks]);\n        }\n        a = a ||\n            (months <= 1 && ['M']) ||\n            (months < thresholds.M && ['MM', months]) ||\n            (years <= 1 && ['y']) || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding(roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof roundingFunction === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold(threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize(argWithSuffix, argThresholds) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var withSuffix = false,\n            th = thresholds,\n            locale,\n            output;\n\n        if (typeof argWithSuffix === 'object') {\n            argThresholds = argWithSuffix;\n            argWithSuffix = false;\n        }\n        if (typeof argWithSuffix === 'boolean') {\n            withSuffix = argWithSuffix;\n        }\n        if (typeof argThresholds === 'object') {\n            th = Object.assign({}, thresholds, argThresholds);\n            if (argThresholds.s != null && argThresholds.ss == null) {\n                th.ss = argThresholds.s - 1;\n            }\n        }\n\n        locale = this.localeData();\n        output = relativeTime$1(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs$1 = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString$1() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs$1(this._milliseconds) / 1000,\n            days = abs$1(this._days),\n            months = abs$1(this._months),\n            minutes,\n            hours,\n            years,\n            s,\n            total = this.asSeconds(),\n            totalSign,\n            ymSign,\n            daysSign,\n            hmsSign;\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes = absFloor(seconds / 60);\n        hours = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n        totalSign = total < 0 ? '-' : '';\n        ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return (\n            totalSign +\n            'P' +\n            (years ? ymSign + years + 'Y' : '') +\n            (months ? ymSign + months + 'M' : '') +\n            (days ? daysSign + days + 'D' : '') +\n            (hours || minutes || seconds ? 'T' : '') +\n            (hours ? hmsSign + hours + 'H' : '') +\n            (minutes ? hmsSign + minutes + 'M' : '') +\n            (seconds ? hmsSign + s + 'S' : '')\n        );\n    }\n\n    var proto$2 = Duration.prototype;\n\n    proto$2.isValid = isValid$1;\n    proto$2.abs = abs;\n    proto$2.add = add$1;\n    proto$2.subtract = subtract$1;\n    proto$2.as = as;\n    proto$2.asMilliseconds = asMilliseconds;\n    proto$2.asSeconds = asSeconds;\n    proto$2.asMinutes = asMinutes;\n    proto$2.asHours = asHours;\n    proto$2.asDays = asDays;\n    proto$2.asWeeks = asWeeks;\n    proto$2.asMonths = asMonths;\n    proto$2.asQuarters = asQuarters;\n    proto$2.asYears = asYears;\n    proto$2.valueOf = valueOf$1;\n    proto$2._bubble = bubble;\n    proto$2.clone = clone$1;\n    proto$2.get = get$2;\n    proto$2.milliseconds = milliseconds;\n    proto$2.seconds = seconds;\n    proto$2.minutes = minutes;\n    proto$2.hours = hours;\n    proto$2.days = days;\n    proto$2.weeks = weeks;\n    proto$2.months = months;\n    proto$2.years = years;\n    proto$2.humanize = humanize;\n    proto$2.toISOString = toISOString$1;\n    proto$2.toString = toISOString$1;\n    proto$2.toJSON = toISOString$1;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n\n    proto$2.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString$1\n    );\n    proto$2.lang = lang;\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    //! moment.js\n\n    hooks.version = '2.30.1';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto;\n    hooks.min = min;\n    hooks.max = max;\n    hooks.now = now;\n    hooks.utc = createUTC;\n    hooks.unix = createUnix;\n    hooks.months = listMonths;\n    hooks.isDate = isDate;\n    hooks.locale = getSetGlobalLocale;\n    hooks.invalid = createInvalid;\n    hooks.duration = createDuration;\n    hooks.isMoment = isMoment;\n    hooks.weekdays = listWeekdays;\n    hooks.parseZone = createInZone;\n    hooks.localeData = getLocale;\n    hooks.isDuration = isDuration;\n    hooks.monthsShort = listMonthsShort;\n    hooks.weekdaysMin = listWeekdaysMin;\n    hooks.defineLocale = defineLocale;\n    hooks.updateLocale = updateLocale;\n    hooks.locales = listLocales;\n    hooks.weekdaysShort = listWeekdaysShort;\n    hooks.normalizeUnits = normalizeUnits;\n    hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat = getCalendarFormat;\n    hooks.prototype = proto;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n        TIME: 'HH:mm', // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n        MONTH: 'YYYY-MM', // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: \"'inci\",\n        5: \"'inci\",\n        8: \"'inci\",\n        70: \"'inci\",\n        80: \"'inci\",\n        2: \"'nci\",\n        7: \"'nci\",\n        20: \"'nci\",\n        50: \"'nci\",\n        3: \"'üncü\",\n        4: \"'üncü\",\n        100: \"'üncü\",\n        6: \"'ncı\",\n        9: \"'uncu\",\n        10: \"'uncu\",\n        30: \"'uncu\",\n        60: \"'ıncı\",\n        90: \"'ıncı\",\n    };\n\n    var tr = moment.defineLocale('tr', {\n        months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n            '_'\n        ),\n        monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n        weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n            '_'\n        ),\n        weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n        weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'öö' : 'ÖÖ';\n            } else {\n                return isLower ? 'ös' : 'ÖS';\n            }\n        },\n        meridiemParse: /öö|ÖÖ|ös|ÖS/,\n        isPM: function (input) {\n            return input === 'ös' || input === 'ÖS';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[yarın saat] LT',\n            nextWeek: '[gelecek] dddd [saat] LT',\n            lastDay: '[dün] LT',\n            lastWeek: '[geçen] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s önce',\n            s: 'birkaç saniye',\n            ss: '%d saniye',\n            m: 'bir dakika',\n            mm: '%d dakika',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            w: 'bir hafta',\n            ww: '%d hafta',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir yıl',\n            yy: '%d yıl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'ıncı\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var af = moment.defineLocale('af', {\n        months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n        weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n            '_'\n        ),\n        weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n        weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n        meridiemParse: /vm|nm/i,\n        isPM: function (input) {\n            return /^nm$/i.test(input);\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'vm' : 'VM';\n            } else {\n                return isLower ? 'nm' : 'NM';\n            }\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Vandag om] LT',\n            nextDay: '[Môre om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[Gister om] LT',\n            lastWeek: '[Laas] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oor %s',\n            past: '%s gelede',\n            s: \"'n paar sekondes\",\n            ss: '%d sekondes',\n            m: \"'n minuut\",\n            mm: '%d minute',\n            h: \"'n uur\",\n            hh: '%d ure',\n            d: \"'n dag\",\n            dd: '%d dae',\n            M: \"'n maand\",\n            MM: '%d maande',\n            y: \"'n jaar\",\n            yy: '%d jaar',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            ); // Thanks to Joris Röling : https://github.com/jjupiter\n        },\n        week: {\n            dow: 1, // Maandag is die eerste dag van die week.\n            doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n        },\n    });\n\n    return af;\n\n})));\n","var map = {\n\t\"./af\": 5177,\n\t\"./af.js\": 5177,\n\t\"./ar\": 1509,\n\t\"./ar-dz\": 1488,\n\t\"./ar-dz.js\": 1488,\n\t\"./ar-kw\": 8676,\n\t\"./ar-kw.js\": 8676,\n\t\"./ar-ly\": 2353,\n\t\"./ar-ly.js\": 2353,\n\t\"./ar-ma\": 4496,\n\t\"./ar-ma.js\": 4496,\n\t\"./ar-ps\": 6947,\n\t\"./ar-ps.js\": 6947,\n\t\"./ar-sa\": 2682,\n\t\"./ar-sa.js\": 2682,\n\t\"./ar-tn\": 9756,\n\t\"./ar-tn.js\": 9756,\n\t\"./ar.js\": 1509,\n\t\"./az\": 5533,\n\t\"./az.js\": 5533,\n\t\"./be\": 8959,\n\t\"./be.js\": 8959,\n\t\"./bg\": 7777,\n\t\"./bg.js\": 7777,\n\t\"./bm\": 4903,\n\t\"./bm.js\": 4903,\n\t\"./bn\": 1290,\n\t\"./bn-bd\": 7357,\n\t\"./bn-bd.js\": 7357,\n\t\"./bn.js\": 1290,\n\t\"./bo\": 1545,\n\t\"./bo.js\": 1545,\n\t\"./br\": 1470,\n\t\"./br.js\": 1470,\n\t\"./bs\": 4429,\n\t\"./bs.js\": 4429,\n\t\"./ca\": 7306,\n\t\"./ca.js\": 7306,\n\t\"./cs\": 6464,\n\t\"./cs.js\": 6464,\n\t\"./cv\": 3635,\n\t\"./cv.js\": 3635,\n\t\"./cy\": 4226,\n\t\"./cy.js\": 4226,\n\t\"./da\": 3601,\n\t\"./da.js\": 3601,\n\t\"./de\": 7853,\n\t\"./de-at\": 6111,\n\t\"./de-at.js\": 6111,\n\t\"./de-ch\": 4697,\n\t\"./de-ch.js\": 4697,\n\t\"./de.js\": 7853,\n\t\"./dv\": 708,\n\t\"./dv.js\": 708,\n\t\"./el\": 4691,\n\t\"./el.js\": 4691,\n\t\"./en-au\": 3872,\n\t\"./en-au.js\": 3872,\n\t\"./en-ca\": 8298,\n\t\"./en-ca.js\": 8298,\n\t\"./en-gb\": 6195,\n\t\"./en-gb.js\": 6195,\n\t\"./en-ie\": 6584,\n\t\"./en-ie.js\": 6584,\n\t\"./en-il\": 5543,\n\t\"./en-il.js\": 5543,\n\t\"./en-in\": 9033,\n\t\"./en-in.js\": 9033,\n\t\"./en-nz\": 9402,\n\t\"./en-nz.js\": 9402,\n\t\"./en-sg\": 3004,\n\t\"./en-sg.js\": 3004,\n\t\"./eo\": 2934,\n\t\"./eo.js\": 2934,\n\t\"./es\": 7650,\n\t\"./es-do\": 838,\n\t\"./es-do.js\": 838,\n\t\"./es-mx\": 7730,\n\t\"./es-mx.js\": 7730,\n\t\"./es-us\": 6575,\n\t\"./es-us.js\": 6575,\n\t\"./es.js\": 7650,\n\t\"./et\": 3035,\n\t\"./et.js\": 3035,\n\t\"./eu\": 3508,\n\t\"./eu.js\": 3508,\n\t\"./fa\": 119,\n\t\"./fa.js\": 119,\n\t\"./fi\": 527,\n\t\"./fi.js\": 527,\n\t\"./fil\": 5995,\n\t\"./fil.js\": 5995,\n\t\"./fo\": 2477,\n\t\"./fo.js\": 2477,\n\t\"./fr\": 5498,\n\t\"./fr-ca\": 6435,\n\t\"./fr-ca.js\": 6435,\n\t\"./fr-ch\": 7892,\n\t\"./fr-ch.js\": 7892,\n\t\"./fr.js\": 5498,\n\t\"./fy\": 7071,\n\t\"./fy.js\": 7071,\n\t\"./ga\": 1734,\n\t\"./ga.js\": 1734,\n\t\"./gd\": 217,\n\t\"./gd.js\": 217,\n\t\"./gl\": 7329,\n\t\"./gl.js\": 7329,\n\t\"./gom-deva\": 2124,\n\t\"./gom-deva.js\": 2124,\n\t\"./gom-latn\": 3383,\n\t\"./gom-latn.js\": 3383,\n\t\"./gu\": 5050,\n\t\"./gu.js\": 5050,\n\t\"./he\": 1713,\n\t\"./he.js\": 1713,\n\t\"./hi\": 3861,\n\t\"./hi.js\": 3861,\n\t\"./hr\": 6308,\n\t\"./hr.js\": 6308,\n\t\"./hu\": 609,\n\t\"./hu.js\": 609,\n\t\"./hy-am\": 7160,\n\t\"./hy-am.js\": 7160,\n\t\"./id\": 4063,\n\t\"./id.js\": 4063,\n\t\"./is\": 9374,\n\t\"./is.js\": 9374,\n\t\"./it\": 8383,\n\t\"./it-ch\": 1827,\n\t\"./it-ch.js\": 1827,\n\t\"./it.js\": 8383,\n\t\"./ja\": 3827,\n\t\"./ja.js\": 3827,\n\t\"./jv\": 9722,\n\t\"./jv.js\": 9722,\n\t\"./ka\": 1794,\n\t\"./ka.js\": 1794,\n\t\"./kk\": 7088,\n\t\"./kk.js\": 7088,\n\t\"./km\": 6870,\n\t\"./km.js\": 6870,\n\t\"./kn\": 4451,\n\t\"./kn.js\": 4451,\n\t\"./ko\": 3164,\n\t\"./ko.js\": 3164,\n\t\"./ku\": 8174,\n\t\"./ku-kmr\": 6181,\n\t\"./ku-kmr.js\": 6181,\n\t\"./ku.js\": 8174,\n\t\"./ky\": 8474,\n\t\"./ky.js\": 8474,\n\t\"./lb\": 9680,\n\t\"./lb.js\": 9680,\n\t\"./lo\": 5867,\n\t\"./lo.js\": 5867,\n\t\"./lt\": 5766,\n\t\"./lt.js\": 5766,\n\t\"./lv\": 9532,\n\t\"./lv.js\": 9532,\n\t\"./me\": 8076,\n\t\"./me.js\": 8076,\n\t\"./mi\": 1848,\n\t\"./mi.js\": 1848,\n\t\"./mk\": 306,\n\t\"./mk.js\": 306,\n\t\"./ml\": 3739,\n\t\"./ml.js\": 3739,\n\t\"./mn\": 9053,\n\t\"./mn.js\": 9053,\n\t\"./mr\": 6169,\n\t\"./mr.js\": 6169,\n\t\"./ms\": 3386,\n\t\"./ms-my\": 2297,\n\t\"./ms-my.js\": 2297,\n\t\"./ms.js\": 3386,\n\t\"./mt\": 7075,\n\t\"./mt.js\": 7075,\n\t\"./my\": 2264,\n\t\"./my.js\": 2264,\n\t\"./nb\": 2274,\n\t\"./nb.js\": 2274,\n\t\"./ne\": 8235,\n\t\"./ne.js\": 8235,\n\t\"./nl\": 2572,\n\t\"./nl-be\": 3784,\n\t\"./nl-be.js\": 3784,\n\t\"./nl.js\": 2572,\n\t\"./nn\": 4566,\n\t\"./nn.js\": 4566,\n\t\"./oc-lnc\": 9330,\n\t\"./oc-lnc.js\": 9330,\n\t\"./pa-in\": 9849,\n\t\"./pa-in.js\": 9849,\n\t\"./pl\": 4418,\n\t\"./pl.js\": 4418,\n\t\"./pt\": 9834,\n\t\"./pt-br\": 8303,\n\t\"./pt-br.js\": 8303,\n\t\"./pt.js\": 9834,\n\t\"./ro\": 4457,\n\t\"./ro.js\": 4457,\n\t\"./ru\": 2271,\n\t\"./ru.js\": 2271,\n\t\"./sd\": 1221,\n\t\"./sd.js\": 1221,\n\t\"./se\": 3478,\n\t\"./se.js\": 3478,\n\t\"./si\": 7538,\n\t\"./si.js\": 7538,\n\t\"./sk\": 5784,\n\t\"./sk.js\": 5784,\n\t\"./sl\": 6637,\n\t\"./sl.js\": 6637,\n\t\"./sq\": 6794,\n\t\"./sq.js\": 6794,\n\t\"./sr\": 5719,\n\t\"./sr-cyrl\": 3322,\n\t\"./sr-cyrl.js\": 3322,\n\t\"./sr.js\": 5719,\n\t\"./ss\": 6000,\n\t\"./ss.js\": 6000,\n\t\"./sv\": 1011,\n\t\"./sv.js\": 1011,\n\t\"./sw\": 748,\n\t\"./sw.js\": 748,\n\t\"./ta\": 1025,\n\t\"./ta.js\": 1025,\n\t\"./te\": 1885,\n\t\"./te.js\": 1885,\n\t\"./tet\": 8861,\n\t\"./tet.js\": 8861,\n\t\"./tg\": 6571,\n\t\"./tg.js\": 6571,\n\t\"./th\": 5802,\n\t\"./th.js\": 5802,\n\t\"./tk\": 9527,\n\t\"./tk.js\": 9527,\n\t\"./tl-ph\": 9231,\n\t\"./tl-ph.js\": 9231,\n\t\"./tlh\": 1052,\n\t\"./tlh.js\": 1052,\n\t\"./tr\": 5096,\n\t\"./tr.js\": 5096,\n\t\"./tzl\": 9846,\n\t\"./tzl.js\": 9846,\n\t\"./tzm\": 1765,\n\t\"./tzm-latn\": 7711,\n\t\"./tzm-latn.js\": 7711,\n\t\"./tzm.js\": 1765,\n\t\"./ug-cn\": 8414,\n\t\"./ug-cn.js\": 8414,\n\t\"./uk\": 6618,\n\t\"./uk.js\": 6618,\n\t\"./ur\": 158,\n\t\"./ur.js\": 158,\n\t\"./uz\": 7609,\n\t\"./uz-latn\": 2475,\n\t\"./uz-latn.js\": 2475,\n\t\"./uz.js\": 7609,\n\t\"./vi\": 1135,\n\t\"./vi.js\": 1135,\n\t\"./x-pseudo\": 4051,\n\t\"./x-pseudo.js\": 4051,\n\t\"./yo\": 2218,\n\t\"./yo.js\": 2218,\n\t\"./zh-cn\": 2648,\n\t\"./zh-cn.js\": 2648,\n\t\"./zh-hk\": 1632,\n\t\"./zh-hk.js\": 1632,\n\t\"./zh-mo\": 1541,\n\t\"./zh-mo.js\": 1541,\n\t\"./zh-tw\": 304,\n\t\"./zh-tw.js\": 304\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5358;","/*!\n * Select2 4.1.0-rc.0\n * https://select2.github.io\n *\n * Released under the MIT license\n * https://github.com/select2/select2/blob/master/LICENSE.md\n */\n;(function (factory) {\n  if (typeof define === 'function' && define.amd) {\n    // AMD. Register as an anonymous module.\n    define(['jquery'], factory);\n  } else if (typeof module === 'object' && module.exports) {\n    // Node/CommonJS\n    module.exports = function (root, jQuery) {\n      if (jQuery === undefined) {\n        // require('jQuery') returns a factory that requires window to\n        // build a jQuery instance, we normalize how we use modules\n        // that require this pattern but the window provided is a noop\n        // if it's defined (how jquery works)\n        if (typeof window !== 'undefined') {\n          jQuery = require('jquery');\n        }\n        else {\n          jQuery = require('jquery')(root);\n        }\n      }\n      factory(jQuery);\n      return jQuery;\n    };\n  } else {\n    // Browser globals\n    factory(jQuery);\n  }\n} (function (jQuery) {\n  // This is needed so we can catch the AMD loader configuration and use it\n  // The inner file should be wrapped (by `banner.start.js`) in a function that\n  // returns the AMD loader references.\n  var S2 =(function () {\n  // Restore the Select2 AMD loader so it can be used\n  // Needed mostly in the language files, where the loader is not inserted\n  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\n    var S2 = jQuery.fn.select2.amd;\n  }\nvar S2;(function () { if (!S2 || !S2.requirejs) {\nif (!S2) { S2 = {}; } else { require = S2; }\n/**\n * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, http://github.com/requirejs/almond/LICENSE\n */\n//Going sloppy to avoid 'use strict' string cost, but strict practices should\n//be followed.\n/*global setTimeout: false */\n\nvar requirejs, require, define;\n(function (undef) {\n    var main, req, makeMap, handlers,\n        defined = {},\n        waiting = {},\n        config = {},\n        defining = {},\n        hasOwn = Object.prototype.hasOwnProperty,\n        aps = [].slice,\n        jsSuffixRegExp = /\\.js$/;\n\n    function hasProp(obj, prop) {\n        return hasOwn.call(obj, prop);\n    }\n\n    /**\n     * Given a relative module name, like ./something, normalize it to\n     * a real name that can be mapped to a path.\n     * @param {String} name the relative name\n     * @param {String} baseName a real name that the name arg is relative\n     * to.\n     * @returns {String} normalized name\n     */\n    function normalize(name, baseName) {\n        var nameParts, nameSegment, mapValue, foundMap, lastIndex,\n            foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,\n            baseParts = baseName && baseName.split(\"/\"),\n            map = config.map,\n            starMap = (map && map['*']) || {};\n\n        //Adjust any relative paths.\n        if (name) {\n            name = name.split('/');\n            lastIndex = name.length - 1;\n\n            // If wanting node ID compatibility, strip .js from end\n            // of IDs. Have to do this here, and not in nameToUrl\n            // because node allows either .js or non .js to map\n            // to same file.\n            if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n                name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n            }\n\n            // Starts with a '.' so need the baseName\n            if (name[0].charAt(0) === '.' && baseParts) {\n                //Convert baseName to array, and lop off the last part,\n                //so that . matches that 'directory' and not name of the baseName's\n                //module. For instance, baseName of 'one/two/three', maps to\n                //'one/two/three.js', but we want the directory, 'one/two' for\n                //this normalization.\n                normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n                name = normalizedBaseParts.concat(name);\n            }\n\n            //start trimDots\n            for (i = 0; i < name.length; i++) {\n                part = name[i];\n                if (part === '.') {\n                    name.splice(i, 1);\n                    i -= 1;\n                } else if (part === '..') {\n                    // If at the start, or previous value is still ..,\n                    // keep them so that when converted to a path it may\n                    // still work when converted to a path, even though\n                    // as an ID it is less than ideal. In larger point\n                    // releases, may be better to just kick out an error.\n                    if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {\n                        continue;\n                    } else if (i > 0) {\n                        name.splice(i - 1, 2);\n                        i -= 2;\n                    }\n                }\n            }\n            //end trimDots\n\n            name = name.join('/');\n        }\n\n        //Apply map config if available.\n        if ((baseParts || starMap) && map) {\n            nameParts = name.split('/');\n\n            for (i = nameParts.length; i > 0; i -= 1) {\n                nameSegment = nameParts.slice(0, i).join(\"/\");\n\n                if (baseParts) {\n                    //Find the longest baseName segment match in the config.\n                    //So, do joins on the biggest to smallest lengths of baseParts.\n                    for (j = baseParts.length; j > 0; j -= 1) {\n                        mapValue = map[baseParts.slice(0, j).join('/')];\n\n                        //baseName segment has  config, find if it has one for\n                        //this name.\n                        if (mapValue) {\n                            mapValue = mapValue[nameSegment];\n                            if (mapValue) {\n                                //Match, update name to the new value.\n                                foundMap = mapValue;\n                                foundI = i;\n                                break;\n                            }\n                        }\n                    }\n                }\n\n                if (foundMap) {\n                    break;\n                }\n\n                //Check for a star map match, but just hold on to it,\n                //if there is a shorter segment match later in a matching\n                //config, then favor over this star map.\n                if (!foundStarMap && starMap && starMap[nameSegment]) {\n                    foundStarMap = starMap[nameSegment];\n                    starI = i;\n                }\n            }\n\n            if (!foundMap && foundStarMap) {\n                foundMap = foundStarMap;\n                foundI = starI;\n            }\n\n            if (foundMap) {\n                nameParts.splice(0, foundI, foundMap);\n                name = nameParts.join('/');\n            }\n        }\n\n        return name;\n    }\n\n    function makeRequire(relName, forceSync) {\n        return function () {\n            //A version of a require function that passes a moduleName\n            //value for items that may need to\n            //look up paths relative to the moduleName\n            var args = aps.call(arguments, 0);\n\n            //If first arg is not require('string'), and there is only\n            //one arg, it is the array form without a callback. Insert\n            //a null so that the following concat is correct.\n            if (typeof args[0] !== 'string' && args.length === 1) {\n                args.push(null);\n            }\n            return req.apply(undef, args.concat([relName, forceSync]));\n        };\n    }\n\n    function makeNormalize(relName) {\n        return function (name) {\n            return normalize(name, relName);\n        };\n    }\n\n    function makeLoad(depName) {\n        return function (value) {\n            defined[depName] = value;\n        };\n    }\n\n    function callDep(name) {\n        if (hasProp(waiting, name)) {\n            var args = waiting[name];\n            delete waiting[name];\n            defining[name] = true;\n            main.apply(undef, args);\n        }\n\n        if (!hasProp(defined, name) && !hasProp(defining, name)) {\n            throw new Error('No ' + name);\n        }\n        return defined[name];\n    }\n\n    //Turns a plugin!resource to [plugin, resource]\n    //with the plugin being undefined if the name\n    //did not have a plugin prefix.\n    function splitPrefix(name) {\n        var prefix,\n            index = name ? name.indexOf('!') : -1;\n        if (index > -1) {\n            prefix = name.substring(0, index);\n            name = name.substring(index + 1, name.length);\n        }\n        return [prefix, name];\n    }\n\n    //Creates a parts array for a relName where first part is plugin ID,\n    //second part is resource ID. Assumes relName has already been normalized.\n    function makeRelParts(relName) {\n        return relName ? splitPrefix(relName) : [];\n    }\n\n    /**\n     * Makes a name map, normalizing the name, and using a plugin\n     * for normalization if necessary. Grabs a ref to plugin\n     * too, as an optimization.\n     */\n    makeMap = function (name, relParts) {\n        var plugin,\n            parts = splitPrefix(name),\n            prefix = parts[0],\n            relResourceName = relParts[1];\n\n        name = parts[1];\n\n        if (prefix) {\n            prefix = normalize(prefix, relResourceName);\n            plugin = callDep(prefix);\n        }\n\n        //Normalize according\n        if (prefix) {\n            if (plugin && plugin.normalize) {\n                name = plugin.normalize(name, makeNormalize(relResourceName));\n            } else {\n                name = normalize(name, relResourceName);\n            }\n        } else {\n            name = normalize(name, relResourceName);\n            parts = splitPrefix(name);\n            prefix = parts[0];\n            name = parts[1];\n            if (prefix) {\n                plugin = callDep(prefix);\n            }\n        }\n\n        //Using ridiculous property names for space reasons\n        return {\n            f: prefix ? prefix + '!' + name : name, //fullName\n            n: name,\n            pr: prefix,\n            p: plugin\n        };\n    };\n\n    function makeConfig(name) {\n        return function () {\n            return (config && config.config && config.config[name]) || {};\n        };\n    }\n\n    handlers = {\n        require: function (name) {\n            return makeRequire(name);\n        },\n        exports: function (name) {\n            var e = defined[name];\n            if (typeof e !== 'undefined') {\n                return e;\n            } else {\n                return (defined[name] = {});\n            }\n        },\n        module: function (name) {\n            return {\n                id: name,\n                uri: '',\n                exports: defined[name],\n                config: makeConfig(name)\n            };\n        }\n    };\n\n    main = function (name, deps, callback, relName) {\n        var cjsModule, depName, ret, map, i, relParts,\n            args = [],\n            callbackType = typeof callback,\n            usingExports;\n\n        //Use name if no relName\n        relName = relName || name;\n        relParts = makeRelParts(relName);\n\n        //Call the callback to define the module, if necessary.\n        if (callbackType === 'undefined' || callbackType === 'function') {\n            //Pull out the defined dependencies and pass the ordered\n            //values to the callback.\n            //Default to [require, exports, module] if no deps\n            deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\n            for (i = 0; i < deps.length; i += 1) {\n                map = makeMap(deps[i], relParts);\n                depName = map.f;\n\n                //Fast path CommonJS standard dependencies.\n                if (depName === \"require\") {\n                    args[i] = handlers.require(name);\n                } else if (depName === \"exports\") {\n                    //CommonJS module spec 1.1\n                    args[i] = handlers.exports(name);\n                    usingExports = true;\n                } else if (depName === \"module\") {\n                    //CommonJS module spec 1.1\n                    cjsModule = args[i] = handlers.module(name);\n                } else if (hasProp(defined, depName) ||\n                           hasProp(waiting, depName) ||\n                           hasProp(defining, depName)) {\n                    args[i] = callDep(depName);\n                } else if (map.p) {\n                    map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\n                    args[i] = defined[depName];\n                } else {\n                    throw new Error(name + ' missing ' + depName);\n                }\n            }\n\n            ret = callback ? callback.apply(defined[name], args) : undefined;\n\n            if (name) {\n                //If setting exports via \"module\" is in play,\n                //favor that over return value and exports. After that,\n                //favor a non-undefined return value over exports use.\n                if (cjsModule && cjsModule.exports !== undef &&\n                        cjsModule.exports !== defined[name]) {\n                    defined[name] = cjsModule.exports;\n                } else if (ret !== undef || !usingExports) {\n                    //Use the return value from the function.\n                    defined[name] = ret;\n                }\n            }\n        } else if (name) {\n            //May just be an object definition for the module. Only\n            //worry about defining if have a module name.\n            defined[name] = callback;\n        }\n    };\n\n    requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\n        if (typeof deps === \"string\") {\n            if (handlers[deps]) {\n                //callback in this case is really relName\n                return handlers[deps](callback);\n            }\n            //Just return the module wanted. In this scenario, the\n            //deps arg is the module name, and second arg (if passed)\n            //is just the relName.\n            //Normalize module name, if it contains . or ..\n            return callDep(makeMap(deps, makeRelParts(callback)).f);\n        } else if (!deps.splice) {\n            //deps is a config object, not an array.\n            config = deps;\n            if (config.deps) {\n                req(config.deps, config.callback);\n            }\n            if (!callback) {\n                return;\n            }\n\n            if (callback.splice) {\n                //callback is an array, which means it is a dependency list.\n                //Adjust args if there are dependencies\n                deps = callback;\n                callback = relName;\n                relName = null;\n            } else {\n                deps = undef;\n            }\n        }\n\n        //Support require(['a'])\n        callback = callback || function () {};\n\n        //If relName is a function, it is an errback handler,\n        //so remove it.\n        if (typeof relName === 'function') {\n            relName = forceSync;\n            forceSync = alt;\n        }\n\n        //Simulate async callback;\n        if (forceSync) {\n            main(undef, deps, callback, relName);\n        } else {\n            //Using a non-zero value because of concern for what old browsers\n            //do, and latest browsers \"upgrade\" to 4 if lower value is used:\n            //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\n            //If want a value immediately, use require('id') instead -- something\n            //that works in almond on the global level, but not guaranteed and\n            //unlikely to work in other AMD implementations.\n            setTimeout(function () {\n                main(undef, deps, callback, relName);\n            }, 4);\n        }\n\n        return req;\n    };\n\n    /**\n     * Just drops the config on the floor, but returns req in case\n     * the config return value is used.\n     */\n    req.config = function (cfg) {\n        return req(cfg);\n    };\n\n    /**\n     * Expose module registry for debugging and tooling\n     */\n    requirejs._defined = defined;\n\n    define = function (name, deps, callback) {\n        if (typeof name !== 'string') {\n            throw new Error('See almond README: incorrect module build, no module name');\n        }\n\n        //This module may not have dependencies\n        if (!deps.splice) {\n            //deps is not an array, so probably means\n            //an object literal or factory function for\n            //the value. Adjust args.\n            callback = deps;\n            deps = [];\n        }\n\n        if (!hasProp(defined, name) && !hasProp(waiting, name)) {\n            waiting[name] = [name, deps, callback];\n        }\n    };\n\n    define.amd = {\n        jQuery: true\n    };\n}());\n\nS2.requirejs = requirejs;S2.require = require;S2.define = define;\n}\n}());\nS2.define(\"almond\", function(){});\n\n/* global jQuery:false, $:false */\nS2.define('jquery',[],function () {\n  var _$ = jQuery || $;\n\n  if (_$ == null && console && console.error) {\n    console.error(\n      'Select2: An instance of jQuery or a jQuery-compatible library was not ' +\n      'found. Make sure that you are including jQuery before Select2 on your ' +\n      'web page.'\n    );\n  }\n\n  return _$;\n});\n\nS2.define('select2/utils',[\n  'jquery'\n], function ($) {\n  var Utils = {};\n\n  Utils.Extend = function (ChildClass, SuperClass) {\n    var __hasProp = {}.hasOwnProperty;\n\n    function BaseConstructor () {\n      this.constructor = ChildClass;\n    }\n\n    for (var key in SuperClass) {\n      if (__hasProp.call(SuperClass, key)) {\n        ChildClass[key] = SuperClass[key];\n      }\n    }\n\n    BaseConstructor.prototype = SuperClass.prototype;\n    ChildClass.prototype = new BaseConstructor();\n    ChildClass.__super__ = SuperClass.prototype;\n\n    return ChildClass;\n  };\n\n  function getMethods (theClass) {\n    var proto = theClass.prototype;\n\n    var methods = [];\n\n    for (var methodName in proto) {\n      var m = proto[methodName];\n\n      if (typeof m !== 'function') {\n        continue;\n      }\n\n      if (methodName === 'constructor') {\n        continue;\n      }\n\n      methods.push(methodName);\n    }\n\n    return methods;\n  }\n\n  Utils.Decorate = function (SuperClass, DecoratorClass) {\n    var decoratedMethods = getMethods(DecoratorClass);\n    var superMethods = getMethods(SuperClass);\n\n    function DecoratedClass () {\n      var unshift = Array.prototype.unshift;\n\n      var argCount = DecoratorClass.prototype.constructor.length;\n\n      var calledConstructor = SuperClass.prototype.constructor;\n\n      if (argCount > 0) {\n        unshift.call(arguments, SuperClass.prototype.constructor);\n\n        calledConstructor = DecoratorClass.prototype.constructor;\n      }\n\n      calledConstructor.apply(this, arguments);\n    }\n\n    DecoratorClass.displayName = SuperClass.displayName;\n\n    function ctr () {\n      this.constructor = DecoratedClass;\n    }\n\n    DecoratedClass.prototype = new ctr();\n\n    for (var m = 0; m < superMethods.length; m++) {\n      var superMethod = superMethods[m];\n\n      DecoratedClass.prototype[superMethod] =\n        SuperClass.prototype[superMethod];\n    }\n\n    var calledMethod = function (methodName) {\n      // Stub out the original method if it's not decorating an actual method\n      var originalMethod = function () {};\n\n      if (methodName in DecoratedClass.prototype) {\n        originalMethod = DecoratedClass.prototype[methodName];\n      }\n\n      var decoratedMethod = DecoratorClass.prototype[methodName];\n\n      return function () {\n        var unshift = Array.prototype.unshift;\n\n        unshift.call(arguments, originalMethod);\n\n        return decoratedMethod.apply(this, arguments);\n      };\n    };\n\n    for (var d = 0; d < decoratedMethods.length; d++) {\n      var decoratedMethod = decoratedMethods[d];\n\n      DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\n    }\n\n    return DecoratedClass;\n  };\n\n  var Observable = function () {\n    this.listeners = {};\n  };\n\n  Observable.prototype.on = function (event, callback) {\n    this.listeners = this.listeners || {};\n\n    if (event in this.listeners) {\n      this.listeners[event].push(callback);\n    } else {\n      this.listeners[event] = [callback];\n    }\n  };\n\n  Observable.prototype.trigger = function (event) {\n    var slice = Array.prototype.slice;\n    var params = slice.call(arguments, 1);\n\n    this.listeners = this.listeners || {};\n\n    // Params should always come in as an array\n    if (params == null) {\n      params = [];\n    }\n\n    // If there are no arguments to the event, use a temporary object\n    if (params.length === 0) {\n      params.push({});\n    }\n\n    // Set the `_type` of the first object to the event\n    params[0]._type = event;\n\n    if (event in this.listeners) {\n      this.invoke(this.listeners[event], slice.call(arguments, 1));\n    }\n\n    if ('*' in this.listeners) {\n      this.invoke(this.listeners['*'], arguments);\n    }\n  };\n\n  Observable.prototype.invoke = function (listeners, params) {\n    for (var i = 0, len = listeners.length; i < len; i++) {\n      listeners[i].apply(this, params);\n    }\n  };\n\n  Utils.Observable = Observable;\n\n  Utils.generateChars = function (length) {\n    var chars = '';\n\n    for (var i = 0; i < length; i++) {\n      var randomChar = Math.floor(Math.random() * 36);\n      chars += randomChar.toString(36);\n    }\n\n    return chars;\n  };\n\n  Utils.bind = function (func, context) {\n    return function () {\n      func.apply(context, arguments);\n    };\n  };\n\n  Utils._convertData = function (data) {\n    for (var originalKey in data) {\n      var keys = originalKey.split('-');\n\n      var dataLevel = data;\n\n      if (keys.length === 1) {\n        continue;\n      }\n\n      for (var k = 0; k < keys.length; k++) {\n        var key = keys[k];\n\n        // Lowercase the first letter\n        // By default, dash-separated becomes camelCase\n        key = key.substring(0, 1).toLowerCase() + key.substring(1);\n\n        if (!(key in dataLevel)) {\n          dataLevel[key] = {};\n        }\n\n        if (k == keys.length - 1) {\n          dataLevel[key] = data[originalKey];\n        }\n\n        dataLevel = dataLevel[key];\n      }\n\n      delete data[originalKey];\n    }\n\n    return data;\n  };\n\n  Utils.hasScroll = function (index, el) {\n    // Adapted from the function created by @ShadowScripter\n    // and adapted by @BillBarry on the Stack Exchange Code Review website.\n    // The original code can be found at\n    // http://codereview.stackexchange.com/q/13338\n    // and was designed to be used with the Sizzle selector engine.\n\n    var $el = $(el);\n    var overflowX = el.style.overflowX;\n    var overflowY = el.style.overflowY;\n\n    //Check both x and y declarations\n    if (overflowX === overflowY &&\n        (overflowY === 'hidden' || overflowY === 'visible')) {\n      return false;\n    }\n\n    if (overflowX === 'scroll' || overflowY === 'scroll') {\n      return true;\n    }\n\n    return ($el.innerHeight() < el.scrollHeight ||\n      $el.innerWidth() < el.scrollWidth);\n  };\n\n  Utils.escapeMarkup = function (markup) {\n    var replaceMap = {\n      '\\\\': '&#92;',\n      '&': '&amp;',\n      '<': '&lt;',\n      '>': '&gt;',\n      '\"': '&quot;',\n      '\\'': '&#39;',\n      '/': '&#47;'\n    };\n\n    // Do not try to escape the markup if it's not a string\n    if (typeof markup !== 'string') {\n      return markup;\n    }\n\n    return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\n      return replaceMap[match];\n    });\n  };\n\n  // Cache objects in Utils.__cache instead of $.data (see #4346)\n  Utils.__cache = {};\n\n  var id = 0;\n  Utils.GetUniqueElementId = function (element) {\n    // Get a unique element Id. If element has no id,\n    // creates a new unique number, stores it in the id\n    // attribute and returns the new id with a prefix.\n    // If an id already exists, it simply returns it with a prefix.\n\n    var select2Id = element.getAttribute('data-select2-id');\n\n    if (select2Id != null) {\n      return select2Id;\n    }\n\n    // If element has id, use it.\n    if (element.id) {\n      select2Id = 'select2-data-' + element.id;\n    } else {\n      select2Id = 'select2-data-' + (++id).toString() +\n        '-' + Utils.generateChars(4);\n    }\n\n    element.setAttribute('data-select2-id', select2Id);\n\n    return select2Id;\n  };\n\n  Utils.StoreData = function (element, name, value) {\n    // Stores an item in the cache for a specified element.\n    // name is the cache key.\n    var id = Utils.GetUniqueElementId(element);\n    if (!Utils.__cache[id]) {\n      Utils.__cache[id] = {};\n    }\n\n    Utils.__cache[id][name] = value;\n  };\n\n  Utils.GetData = function (element, name) {\n    // Retrieves a value from the cache by its key (name)\n    // name is optional. If no name specified, return\n    // all cache items for the specified element.\n    // and for a specified element.\n    var id = Utils.GetUniqueElementId(element);\n    if (name) {\n      if (Utils.__cache[id]) {\n        if (Utils.__cache[id][name] != null) {\n          return Utils.__cache[id][name];\n        }\n        return $(element).data(name); // Fallback to HTML5 data attribs.\n      }\n      return $(element).data(name); // Fallback to HTML5 data attribs.\n    } else {\n      return Utils.__cache[id];\n    }\n  };\n\n  Utils.RemoveData = function (element) {\n    // Removes all cached items for a specified element.\n    var id = Utils.GetUniqueElementId(element);\n    if (Utils.__cache[id] != null) {\n      delete Utils.__cache[id];\n    }\n\n    element.removeAttribute('data-select2-id');\n  };\n\n  Utils.copyNonInternalCssClasses = function (dest, src) {\n    var classes;\n\n    var destinationClasses = dest.getAttribute('class').trim().split(/\\s+/);\n\n    destinationClasses = destinationClasses.filter(function (clazz) {\n      // Save all Select2 classes\n      return clazz.indexOf('select2-') === 0;\n    });\n\n    var sourceClasses = src.getAttribute('class').trim().split(/\\s+/);\n\n    sourceClasses = sourceClasses.filter(function (clazz) {\n      // Only copy non-Select2 classes\n      return clazz.indexOf('select2-') !== 0;\n    });\n\n    var replacements = destinationClasses.concat(sourceClasses);\n\n    dest.setAttribute('class', replacements.join(' '));\n  };\n\n  return Utils;\n});\n\nS2.define('select2/results',[\n  'jquery',\n  './utils'\n], function ($, Utils) {\n  function Results ($element, options, dataAdapter) {\n    this.$element = $element;\n    this.data = dataAdapter;\n    this.options = options;\n\n    Results.__super__.constructor.call(this);\n  }\n\n  Utils.Extend(Results, Utils.Observable);\n\n  Results.prototype.render = function () {\n    var $results = $(\n      '<ul class=\"select2-results__options\" role=\"listbox\"></ul>'\n    );\n\n    if (this.options.get('multiple')) {\n      $results.attr('aria-multiselectable', 'true');\n    }\n\n    this.$results = $results;\n\n    return $results;\n  };\n\n  Results.prototype.clear = function () {\n    this.$results.empty();\n  };\n\n  Results.prototype.displayMessage = function (params) {\n    var escapeMarkup = this.options.get('escapeMarkup');\n\n    this.clear();\n    this.hideLoading();\n\n    var $message = $(\n      '<li role=\"alert\" aria-live=\"assertive\"' +\n      ' class=\"select2-results__option\"></li>'\n    );\n\n    var message = this.options.get('translations').get(params.message);\n\n    $message.append(\n      escapeMarkup(\n        message(params.args)\n      )\n    );\n\n    $message[0].className += ' select2-results__message';\n\n    this.$results.append($message);\n  };\n\n  Results.prototype.hideMessages = function () {\n    this.$results.find('.select2-results__message').remove();\n  };\n\n  Results.prototype.append = function (data) {\n    this.hideLoading();\n\n    var $options = [];\n\n    if (data.results == null || data.results.length === 0) {\n      if (this.$results.children().length === 0) {\n        this.trigger('results:message', {\n          message: 'noResults'\n        });\n      }\n\n      return;\n    }\n\n    data.results = this.sort(data.results);\n\n    for (var d = 0; d < data.results.length; d++) {\n      var item = data.results[d];\n\n      var $option = this.option(item);\n\n      $options.push($option);\n    }\n\n    this.$results.append($options);\n  };\n\n  Results.prototype.position = function ($results, $dropdown) {\n    var $resultsContainer = $dropdown.find('.select2-results');\n    $resultsContainer.append($results);\n  };\n\n  Results.prototype.sort = function (data) {\n    var sorter = this.options.get('sorter');\n\n    return sorter(data);\n  };\n\n  Results.prototype.highlightFirstItem = function () {\n    var $options = this.$results\n      .find('.select2-results__option--selectable');\n\n    var $selected = $options.filter('.select2-results__option--selected');\n\n    // Check if there are any selected options\n    if ($selected.length > 0) {\n      // If there are selected options, highlight the first\n      $selected.first().trigger('mouseenter');\n    } else {\n      // If there are no selected options, highlight the first option\n      // in the dropdown\n      $options.first().trigger('mouseenter');\n    }\n\n    this.ensureHighlightVisible();\n  };\n\n  Results.prototype.setClasses = function () {\n    var self = this;\n\n    this.data.current(function (selected) {\n      var selectedIds = selected.map(function (s) {\n        return s.id.toString();\n      });\n\n      var $options = self.$results\n        .find('.select2-results__option--selectable');\n\n      $options.each(function () {\n        var $option = $(this);\n\n        var item = Utils.GetData(this, 'data');\n\n        // id needs to be converted to a string when comparing\n        var id = '' + item.id;\n\n        if ((item.element != null && item.element.selected) ||\n            (item.element == null && selectedIds.indexOf(id) > -1)) {\n          this.classList.add('select2-results__option--selected');\n          $option.attr('aria-selected', 'true');\n        } else {\n          this.classList.remove('select2-results__option--selected');\n          $option.attr('aria-selected', 'false');\n        }\n      });\n\n    });\n  };\n\n  Results.prototype.showLoading = function (params) {\n    this.hideLoading();\n\n    var loadingMore = this.options.get('translations').get('searching');\n\n    var loading = {\n      disabled: true,\n      loading: true,\n      text: loadingMore(params)\n    };\n    var $loading = this.option(loading);\n    $loading.className += ' loading-results';\n\n    this.$results.prepend($loading);\n  };\n\n  Results.prototype.hideLoading = function () {\n    this.$results.find('.loading-results').remove();\n  };\n\n  Results.prototype.option = function (data) {\n    var option = document.createElement('li');\n    option.classList.add('select2-results__option');\n    option.classList.add('select2-results__option--selectable');\n\n    var attrs = {\n      'role': 'option'\n    };\n\n    var matches = window.Element.prototype.matches ||\n      window.Element.prototype.msMatchesSelector ||\n      window.Element.prototype.webkitMatchesSelector;\n\n    if ((data.element != null && matches.call(data.element, ':disabled')) ||\n        (data.element == null && data.disabled)) {\n      attrs['aria-disabled'] = 'true';\n\n      option.classList.remove('select2-results__option--selectable');\n      option.classList.add('select2-results__option--disabled');\n    }\n\n    if (data.id == null) {\n      option.classList.remove('select2-results__option--selectable');\n    }\n\n    if (data._resultId != null) {\n      option.id = data._resultId;\n    }\n\n    if (data.title) {\n      option.title = data.title;\n    }\n\n    if (data.children) {\n      attrs.role = 'group';\n      attrs['aria-label'] = data.text;\n\n      option.classList.remove('select2-results__option--selectable');\n      option.classList.add('select2-results__option--group');\n    }\n\n    for (var attr in attrs) {\n      var val = attrs[attr];\n\n      option.setAttribute(attr, val);\n    }\n\n    if (data.children) {\n      var $option = $(option);\n\n      var label = document.createElement('strong');\n      label.className = 'select2-results__group';\n\n      this.template(data, label);\n\n      var $children = [];\n\n      for (var c = 0; c < data.children.length; c++) {\n        var child = data.children[c];\n\n        var $child = this.option(child);\n\n        $children.push($child);\n      }\n\n      var $childrenContainer = $('<ul></ul>', {\n        'class': 'select2-results__options select2-results__options--nested',\n        'role': 'none'\n      });\n\n      $childrenContainer.append($children);\n\n      $option.append(label);\n      $option.append($childrenContainer);\n    } else {\n      this.template(data, option);\n    }\n\n    Utils.StoreData(option, 'data', data);\n\n    return option;\n  };\n\n  Results.prototype.bind = function (container, $container) {\n    var self = this;\n\n    var id = container.id + '-results';\n\n    this.$results.attr('id', id);\n\n    container.on('results:all', function (params) {\n      self.clear();\n      self.append(params.data);\n\n      if (container.isOpen()) {\n        self.setClasses();\n        self.highlightFirstItem();\n      }\n    });\n\n    container.on('results:append', function (params) {\n      self.append(params.data);\n\n      if (container.isOpen()) {\n        self.setClasses();\n      }\n    });\n\n    container.on('query', function (params) {\n      self.hideMessages();\n      self.showLoading(params);\n    });\n\n    container.on('select', function () {\n      if (!container.isOpen()) {\n        return;\n      }\n\n      self.setClasses();\n\n      if (self.options.get('scrollAfterSelect')) {\n        self.highlightFirstItem();\n      }\n    });\n\n    container.on('unselect', function () {\n      if (!container.isOpen()) {\n        return;\n      }\n\n      self.setClasses();\n\n      if (self.options.get('scrollAfterSelect')) {\n        self.highlightFirstItem();\n      }\n    });\n\n    container.on('open', function () {\n      // When the dropdown is open, aria-expended=\"true\"\n      self.$results.attr('aria-expanded', 'true');\n      self.$results.attr('aria-hidden', 'false');\n\n      self.setClasses();\n      self.ensureHighlightVisible();\n    });\n\n    container.on('close', function () {\n      // When the dropdown is closed, aria-expended=\"false\"\n      self.$results.attr('aria-expanded', 'false');\n      self.$results.attr('aria-hidden', 'true');\n      self.$results.removeAttr('aria-activedescendant');\n    });\n\n    container.on('results:toggle', function () {\n      var $highlighted = self.getHighlightedResults();\n\n      if ($highlighted.length === 0) {\n        return;\n      }\n\n      $highlighted.trigger('mouseup');\n    });\n\n    container.on('results:select', function () {\n      var $highlighted = self.getHighlightedResults();\n\n      if ($highlighted.length === 0) {\n        return;\n      }\n\n      var data = Utils.GetData($highlighted[0], 'data');\n\n      if ($highlighted.hasClass('select2-results__option--selected')) {\n        self.trigger('close', {});\n      } else {\n        self.trigger('select', {\n          data: data\n        });\n      }\n    });\n\n    container.on('results:previous', function () {\n      var $highlighted = self.getHighlightedResults();\n\n      var $options = self.$results.find('.select2-results__option--selectable');\n\n      var currentIndex = $options.index($highlighted);\n\n      // If we are already at the top, don't move further\n      // If no options, currentIndex will be -1\n      if (currentIndex <= 0) {\n        return;\n      }\n\n      var nextIndex = currentIndex - 1;\n\n      // If none are highlighted, highlight the first\n      if ($highlighted.length === 0) {\n        nextIndex = 0;\n      }\n\n      var $next = $options.eq(nextIndex);\n\n      $next.trigger('mouseenter');\n\n      var currentOffset = self.$results.offset().top;\n      var nextTop = $next.offset().top;\n      var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\n\n      if (nextIndex === 0) {\n        self.$results.scrollTop(0);\n      } else if (nextTop - currentOffset < 0) {\n        self.$results.scrollTop(nextOffset);\n      }\n    });\n\n    container.on('results:next', function () {\n      var $highlighted = self.getHighlightedResults();\n\n      var $options = self.$results.find('.select2-results__option--selectable');\n\n      var currentIndex = $options.index($highlighted);\n\n      var nextIndex = currentIndex + 1;\n\n      // If we are at the last option, stay there\n      if (nextIndex >= $options.length) {\n        return;\n      }\n\n      var $next = $options.eq(nextIndex);\n\n      $next.trigger('mouseenter');\n\n      var currentOffset = self.$results.offset().top +\n        self.$results.outerHeight(false);\n      var nextBottom = $next.offset().top + $next.outerHeight(false);\n      var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\n\n      if (nextIndex === 0) {\n        self.$results.scrollTop(0);\n      } else if (nextBottom > currentOffset) {\n        self.$results.scrollTop(nextOffset);\n      }\n    });\n\n    container.on('results:focus', function (params) {\n      params.element[0].classList.add('select2-results__option--highlighted');\n      params.element[0].setAttribute('aria-selected', 'true');\n    });\n\n    container.on('results:message', function (params) {\n      self.displayMessage(params);\n    });\n\n    if ($.fn.mousewheel) {\n      this.$results.on('mousewheel', function (e) {\n        var top = self.$results.scrollTop();\n\n        var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;\n\n        var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\n        var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\n\n        if (isAtTop) {\n          self.$results.scrollTop(0);\n\n          e.preventDefault();\n          e.stopPropagation();\n        } else if (isAtBottom) {\n          self.$results.scrollTop(\n            self.$results.get(0).scrollHeight - self.$results.height()\n          );\n\n          e.preventDefault();\n          e.stopPropagation();\n        }\n      });\n    }\n\n    this.$results.on('mouseup', '.select2-results__option--selectable',\n      function (evt) {\n      var $this = $(this);\n\n      var data = Utils.GetData(this, 'data');\n\n      if ($this.hasClass('select2-results__option--selected')) {\n        if (self.options.get('multiple')) {\n          self.trigger('unselect', {\n            originalEvent: evt,\n            data: data\n          });\n        } else {\n          self.trigger('close', {});\n        }\n\n        return;\n      }\n\n      self.trigger('select', {\n        originalEvent: evt,\n        data: data\n      });\n    });\n\n    this.$results.on('mouseenter', '.select2-results__option--selectable',\n      function (evt) {\n      var data = Utils.GetData(this, 'data');\n\n      self.getHighlightedResults()\n          .removeClass('select2-results__option--highlighted')\n          .attr('aria-selected', 'false');\n\n      self.trigger('results:focus', {\n        data: data,\n        element: $(this)\n      });\n    });\n  };\n\n  Results.prototype.getHighlightedResults = function () {\n    var $highlighted = this.$results\n    .find('.select2-results__option--highlighted');\n\n    return $highlighted;\n  };\n\n  Results.prototype.destroy = function () {\n    this.$results.remove();\n  };\n\n  Results.prototype.ensureHighlightVisible = function () {\n    var $highlighted = this.getHighlightedResults();\n\n    if ($highlighted.length === 0) {\n      return;\n    }\n\n    var $options = this.$results.find('.select2-results__option--selectable');\n\n    var currentIndex = $options.index($highlighted);\n\n    var currentOffset = this.$results.offset().top;\n    var nextTop = $highlighted.offset().top;\n    var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\n\n    var offsetDelta = nextTop - currentOffset;\n    nextOffset -= $highlighted.outerHeight(false) * 2;\n\n    if (currentIndex <= 2) {\n      this.$results.scrollTop(0);\n    } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\n      this.$results.scrollTop(nextOffset);\n    }\n  };\n\n  Results.prototype.template = function (result, container) {\n    var template = this.options.get('templateResult');\n    var escapeMarkup = this.options.get('escapeMarkup');\n\n    var content = template(result, container);\n\n    if (content == null) {\n      container.style.display = 'none';\n    } else if (typeof content === 'string') {\n      container.innerHTML = escapeMarkup(content);\n    } else {\n      $(container).append(content);\n    }\n  };\n\n  return Results;\n});\n\nS2.define('select2/keys',[\n\n], function () {\n  var KEYS = {\n    BACKSPACE: 8,\n    TAB: 9,\n    ENTER: 13,\n    SHIFT: 16,\n    CTRL: 17,\n    ALT: 18,\n    ESC: 27,\n    SPACE: 32,\n    PAGE_UP: 33,\n    PAGE_DOWN: 34,\n    END: 35,\n    HOME: 36,\n    LEFT: 37,\n    UP: 38,\n    RIGHT: 39,\n    DOWN: 40,\n    DELETE: 46\n  };\n\n  return KEYS;\n});\n\nS2.define('select2/selection/base',[\n  'jquery',\n  '../utils',\n  '../keys'\n], function ($, Utils, KEYS) {\n  function BaseSelection ($element, options) {\n    this.$element = $element;\n    this.options = options;\n\n    BaseSelection.__super__.constructor.call(this);\n  }\n\n  Utils.Extend(BaseSelection, Utils.Observable);\n\n  BaseSelection.prototype.render = function () {\n    var $selection = $(\n      '<span class=\"select2-selection\" role=\"combobox\" ' +\n      ' aria-haspopup=\"true\" aria-expanded=\"false\">' +\n      '</span>'\n    );\n\n    this._tabindex = 0;\n\n    if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {\n      this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');\n    } else if (this.$element.attr('tabindex') != null) {\n      this._tabindex = this.$element.attr('tabindex');\n    }\n\n    $selection.attr('title', this.$element.attr('title'));\n    $selection.attr('tabindex', this._tabindex);\n    $selection.attr('aria-disabled', 'false');\n\n    this.$selection = $selection;\n\n    return $selection;\n  };\n\n  BaseSelection.prototype.bind = function (container, $container) {\n    var self = this;\n\n    var resultsId = container.id + '-results';\n\n    this.container = container;\n\n    this.$selection.on('focus', function (evt) {\n      self.trigger('focus', evt);\n    });\n\n    this.$selection.on('blur', function (evt) {\n      self._handleBlur(evt);\n    });\n\n    this.$selection.on('keydown', function (evt) {\n      self.trigger('keypress', evt);\n\n      if (evt.which === KEYS.SPACE) {\n        evt.preventDefault();\n      }\n    });\n\n    container.on('results:focus', function (params) {\n      self.$selection.attr('aria-activedescendant', params.data._resultId);\n    });\n\n    container.on('selection:update', function (params) {\n      self.update(params.data);\n    });\n\n    container.on('open', function () {\n      // When the dropdown is open, aria-expanded=\"true\"\n      self.$selection.attr('aria-expanded', 'true');\n      self.$selection.attr('aria-owns', resultsId);\n\n      self._attachCloseHandler(container);\n    });\n\n    container.on('close', function () {\n      // When the dropdown is closed, aria-expanded=\"false\"\n      self.$selection.attr('aria-expanded', 'false');\n      self.$selection.removeAttr('aria-activedescendant');\n      self.$selection.removeAttr('aria-owns');\n\n      self.$selection.trigger('focus');\n\n      self._detachCloseHandler(container);\n    });\n\n    container.on('enable', function () {\n      self.$selection.attr('tabindex', self._tabindex);\n      self.$selection.attr('aria-disabled', 'false');\n    });\n\n    container.on('disable', function () {\n      self.$selection.attr('tabindex', '-1');\n      self.$selection.attr('aria-disabled', 'true');\n    });\n  };\n\n  BaseSelection.prototype._handleBlur = function (evt) {\n    var self = this;\n\n    // This needs to be delayed as the active element is the body when the tab\n    // key is pressed, possibly along with others.\n    window.setTimeout(function () {\n      // Don't trigger `blur` if the focus is still in the selection\n      if (\n        (document.activeElement == self.$selection[0]) ||\n        ($.contains(self.$selection[0], document.activeElement))\n      ) {\n        return;\n      }\n\n      self.trigger('blur', evt);\n    }, 1);\n  };\n\n  BaseSelection.prototype._attachCloseHandler = function (container) {\n\n    $(document.body).on('mousedown.select2.' + container.id, function (e) {\n      var $target = $(e.target);\n\n      var $select = $target.closest('.select2');\n\n      var $all = $('.select2.select2-container--open');\n\n      $all.each(function () {\n        if (this == $select[0]) {\n          return;\n        }\n\n        var $element = Utils.GetData(this, 'element');\n\n        $element.select2('close');\n      });\n    });\n  };\n\n  BaseSelection.prototype._detachCloseHandler = function (container) {\n    $(document.body).off('mousedown.select2.' + container.id);\n  };\n\n  BaseSelection.prototype.position = function ($selection, $container) {\n    var $selectionContainer = $container.find('.selection');\n    $selectionContainer.append($selection);\n  };\n\n  BaseSelection.prototype.destroy = function () {\n    this._detachCloseHandler(this.container);\n  };\n\n  BaseSelection.prototype.update = function (data) {\n    throw new Error('The `update` method must be defined in child classes.');\n  };\n\n  /**\n   * Helper method to abstract the \"enabled\" (not \"disabled\") state of this\n   * object.\n   *\n   * @return {true} if the instance is not disabled.\n   * @return {false} if the instance is disabled.\n   */\n  BaseSelection.prototype.isEnabled = function () {\n    return !this.isDisabled();\n  };\n\n  /**\n   * Helper method to abstract the \"disabled\" state of this object.\n   *\n   * @return {true} if the disabled option is true.\n   * @return {false} if the disabled option is false.\n   */\n  BaseSelection.prototype.isDisabled = function () {\n    return this.options.get('disabled');\n  };\n\n  return BaseSelection;\n});\n\nS2.define('select2/selection/single',[\n  'jquery',\n  './base',\n  '../utils',\n  '../keys'\n], function ($, BaseSelection, Utils, KEYS) {\n  function SingleSelection () {\n    SingleSelection.__super__.constructor.apply(this, arguments);\n  }\n\n  Utils.Extend(SingleSelection, BaseSelection);\n\n  SingleSelection.prototype.render = function () {\n    var $selection = SingleSelection.__super__.render.call(this);\n\n    $selection[0].classList.add('select2-selection--single');\n\n    $selection.html(\n      '<span class=\"select2-selection__rendered\"></span>' +\n      '<span class=\"select2-selection__arrow\" role=\"presentation\">' +\n        '<b role=\"presentation\"></b>' +\n      '</span>'\n    );\n\n    return $selection;\n  };\n\n  SingleSelection.prototype.bind = function (container, $container) {\n    var self = this;\n\n    SingleSelection.__super__.bind.apply(this, arguments);\n\n    var id = container.id + '-container';\n\n    this.$selection.find('.select2-selection__rendered')\n      .attr('id', id)\n      .attr('role', 'textbox')\n      .attr('aria-readonly', 'true');\n    this.$selection.attr('aria-labelledby', id);\n    this.$selection.attr('aria-controls', id);\n\n    this.$selection.on('mousedown', function (evt) {\n      // Only respond to left clicks\n      if (evt.which !== 1) {\n        return;\n      }\n\n      self.trigger('toggle', {\n        originalEvent: evt\n      });\n    });\n\n    this.$selection.on('focus', function (evt) {\n      // User focuses on the container\n    });\n\n    this.$selection.on('blur', function (evt) {\n      // User exits the container\n    });\n\n    container.on('focus', function (evt) {\n      if (!container.isOpen()) {\n        self.$selection.trigger('focus');\n      }\n    });\n  };\n\n  SingleSelection.prototype.clear = function () {\n    var $rendered = this.$selection.find('.select2-selection__rendered');\n    $rendered.empty();\n    $rendered.removeAttr('title'); // clear tooltip on empty\n  };\n\n  SingleSelection.prototype.display = function (data, container) {\n    var template = this.options.get('templateSelection');\n    var escapeMarkup = this.options.get('escapeMarkup');\n\n    return escapeMarkup(template(data, container));\n  };\n\n  SingleSelection.prototype.selectionContainer = function () {\n    return $('<span></span>');\n  };\n\n  SingleSelection.prototype.update = function (data) {\n    if (data.length === 0) {\n      this.clear();\n      return;\n    }\n\n    var selection = data[0];\n\n    var $rendered = this.$selection.find('.select2-selection__rendered');\n    var formatted = this.display(selection, $rendered);\n\n    $rendered.empty().append(formatted);\n\n    var title = selection.title || selection.text;\n\n    if (title) {\n      $rendered.attr('title', title);\n    } else {\n      $rendered.removeAttr('title');\n    }\n  };\n\n  return SingleSelection;\n});\n\nS2.define('select2/selection/multiple',[\n  'jquery',\n  './base',\n  '../utils'\n], function ($, BaseSelection, Utils) {\n  function MultipleSelection ($element, options) {\n    MultipleSelection.__super__.constructor.apply(this, arguments);\n  }\n\n  Utils.Extend(MultipleSelection, BaseSelection);\n\n  MultipleSelection.prototype.render = function () {\n    var $selection = MultipleSelection.__super__.render.call(this);\n\n    $selection[0].classList.add('select2-selection--multiple');\n\n    $selection.html(\n      '<ul class=\"select2-selection__rendered\"></ul>'\n    );\n\n    return $selection;\n  };\n\n  MultipleSelection.prototype.bind = function (container, $container) {\n    var self = this;\n\n    MultipleSelection.__super__.bind.apply(this, arguments);\n\n    var id = container.id + '-container';\n    this.$selection.find('.select2-selection__rendered').attr('id', id);\n\n    this.$selection.on('click', function (evt) {\n      self.trigger('toggle', {\n        originalEvent: evt\n      });\n    });\n\n    this.$selection.on(\n      'click',\n      '.select2-selection__choice__remove',\n      function (evt) {\n        // Ignore the event if it is disabled\n        if (self.isDisabled()) {\n          return;\n        }\n\n        var $remove = $(this);\n        var $selection = $remove.parent();\n\n        var data = Utils.GetData($selection[0], 'data');\n\n        self.trigger('unselect', {\n          originalEvent: evt,\n          data: data\n        });\n      }\n    );\n\n    this.$selection.on(\n      'keydown',\n      '.select2-selection__choice__remove',\n      function (evt) {\n        // Ignore the event if it is disabled\n        if (self.isDisabled()) {\n          return;\n        }\n\n        evt.stopPropagation();\n      }\n    );\n  };\n\n  MultipleSelection.prototype.clear = function () {\n    var $rendered = this.$selection.find('.select2-selection__rendered');\n    $rendered.empty();\n    $rendered.removeAttr('title');\n  };\n\n  MultipleSelection.prototype.display = function (data, container) {\n    var template = this.options.get('templateSelection');\n    var escapeMarkup = this.options.get('escapeMarkup');\n\n    return escapeMarkup(template(data, container));\n  };\n\n  MultipleSelection.prototype.selectionContainer = function () {\n    var $container = $(\n      '<li class=\"select2-selection__choice\">' +\n        '<button type=\"button\" class=\"select2-selection__choice__remove\" ' +\n        'tabindex=\"-1\">' +\n          '<span aria-hidden=\"true\">&times;</span>' +\n        '</button>' +\n        '<span class=\"select2-selection__choice__display\"></span>' +\n      '</li>'\n    );\n\n    return $container;\n  };\n\n  MultipleSelection.prototype.update = function (data) {\n    this.clear();\n\n    if (data.length === 0) {\n      return;\n    }\n\n    var $selections = [];\n\n    var selectionIdPrefix = this.$selection.find('.select2-selection__rendered')\n      .attr('id') + '-choice-';\n\n    for (var d = 0; d < data.length; d++) {\n      var selection = data[d];\n\n      var $selection = this.selectionContainer();\n      var formatted = this.display(selection, $selection);\n\n      var selectionId = selectionIdPrefix + Utils.generateChars(4) + '-';\n\n      if (selection.id) {\n        selectionId += selection.id;\n      } else {\n        selectionId += Utils.generateChars(4);\n      }\n\n      $selection.find('.select2-selection__choice__display')\n        .append(formatted)\n        .attr('id', selectionId);\n\n      var title = selection.title || selection.text;\n\n      if (title) {\n        $selection.attr('title', title);\n      }\n\n      var removeItem = this.options.get('translations').get('removeItem');\n\n      var $remove = $selection.find('.select2-selection__choice__remove');\n\n      $remove.attr('title', removeItem());\n      $remove.attr('aria-label', removeItem());\n      $remove.attr('aria-describedby', selectionId);\n\n      Utils.StoreData($selection[0], 'data', selection);\n\n      $selections.push($selection);\n    }\n\n    var $rendered = this.$selection.find('.select2-selection__rendered');\n\n    $rendered.append($selections);\n  };\n\n  return MultipleSelection;\n});\n\nS2.define('select2/selection/placeholder',[\n\n], function () {\n  function Placeholder (decorated, $element, options) {\n    this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n    decorated.call(this, $element, options);\n  }\n\n  Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\n    if (typeof placeholder === 'string') {\n      placeholder = {\n        id: '',\n        text: placeholder\n      };\n    }\n\n    return placeholder;\n  };\n\n  Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\n    var $placeholder = this.selectionContainer();\n\n    $placeholder.html(this.display(placeholder));\n    $placeholder[0].classList.add('select2-selection__placeholder');\n    $placeholder[0].classList.remove('select2-selection__choice');\n\n    var placeholderTitle = placeholder.title ||\n      placeholder.text ||\n      $placeholder.text();\n\n    this.$selection.find('.select2-selection__rendered').attr(\n      'title',\n      placeholderTitle\n    );\n\n    return $placeholder;\n  };\n\n  Placeholder.prototype.update = function (decorated, data) {\n    var singlePlaceholder = (\n      data.length == 1 && data[0].id != this.placeholder.id\n    );\n    var multipleSelections = data.length > 1;\n\n    if (multipleSelections || singlePlaceholder) {\n      return decorated.call(this, data);\n    }\n\n    this.clear();\n\n    var $placeholder = this.createPlaceholder(this.placeholder);\n\n    this.$selection.find('.select2-selection__rendered').append($placeholder);\n  };\n\n  return Placeholder;\n});\n\nS2.define('select2/selection/allowClear',[\n  'jquery',\n  '../keys',\n  '../utils'\n], function ($, KEYS, Utils) {\n  function AllowClear () { }\n\n  AllowClear.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    decorated.call(this, container, $container);\n\n    if (this.placeholder == null) {\n      if (this.options.get('debug') && window.console && console.error) {\n        console.error(\n          'Select2: The `allowClear` option should be used in combination ' +\n          'with the `placeholder` option.'\n        );\n      }\n    }\n\n    this.$selection.on('mousedown', '.select2-selection__clear',\n      function (evt) {\n        self._handleClear(evt);\n    });\n\n    container.on('keypress', function (evt) {\n      self._handleKeyboardClear(evt, container);\n    });\n  };\n\n  AllowClear.prototype._handleClear = function (_, evt) {\n    // Ignore the event if it is disabled\n    if (this.isDisabled()) {\n      return;\n    }\n\n    var $clear = this.$selection.find('.select2-selection__clear');\n\n    // Ignore the event if nothing has been selected\n    if ($clear.length === 0) {\n      return;\n    }\n\n    evt.stopPropagation();\n\n    var data = Utils.GetData($clear[0], 'data');\n\n    var previousVal = this.$element.val();\n    this.$element.val(this.placeholder.id);\n\n    var unselectData = {\n      data: data\n    };\n    this.trigger('clear', unselectData);\n    if (unselectData.prevented) {\n      this.$element.val(previousVal);\n      return;\n    }\n\n    for (var d = 0; d < data.length; d++) {\n      unselectData = {\n        data: data[d]\n      };\n\n      // Trigger the `unselect` event, so people can prevent it from being\n      // cleared.\n      this.trigger('unselect', unselectData);\n\n      // If the event was prevented, don't clear it out.\n      if (unselectData.prevented) {\n        this.$element.val(previousVal);\n        return;\n      }\n    }\n\n    this.$element.trigger('input').trigger('change');\n\n    this.trigger('toggle', {});\n  };\n\n  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\n    if (container.isOpen()) {\n      return;\n    }\n\n    if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\n      this._handleClear(evt);\n    }\n  };\n\n  AllowClear.prototype.update = function (decorated, data) {\n    decorated.call(this, data);\n\n    this.$selection.find('.select2-selection__clear').remove();\n    this.$selection[0].classList.remove('select2-selection--clearable');\n\n    if (this.$selection.find('.select2-selection__placeholder').length > 0 ||\n        data.length === 0) {\n      return;\n    }\n\n    var selectionId = this.$selection.find('.select2-selection__rendered')\n      .attr('id');\n\n    var removeAll = this.options.get('translations').get('removeAllItems');\n\n    var $remove = $(\n      '<button type=\"button\" class=\"select2-selection__clear\" tabindex=\"-1\">' +\n        '<span aria-hidden=\"true\">&times;</span>' +\n      '</button>'\n    );\n    $remove.attr('title', removeAll());\n    $remove.attr('aria-label', removeAll());\n    $remove.attr('aria-describedby', selectionId);\n    Utils.StoreData($remove[0], 'data', data);\n\n    this.$selection.prepend($remove);\n    this.$selection[0].classList.add('select2-selection--clearable');\n  };\n\n  return AllowClear;\n});\n\nS2.define('select2/selection/search',[\n  'jquery',\n  '../utils',\n  '../keys'\n], function ($, Utils, KEYS) {\n  function Search (decorated, $element, options) {\n    decorated.call(this, $element, options);\n  }\n\n  Search.prototype.render = function (decorated) {\n    var searchLabel = this.options.get('translations').get('search');\n    var $search = $(\n      '<span class=\"select2-search select2-search--inline\">' +\n        '<textarea class=\"select2-search__field\"'+\n        ' type=\"search\" tabindex=\"-1\"' +\n        ' autocorrect=\"off\" autocapitalize=\"none\"' +\n        ' spellcheck=\"false\" role=\"searchbox\" aria-autocomplete=\"list\" >' +\n        '</textarea>' +\n      '</span>'\n    );\n\n    this.$searchContainer = $search;\n    this.$search = $search.find('textarea');\n\n    this.$search.prop('autocomplete', this.options.get('autocomplete'));\n    this.$search.attr('aria-label', searchLabel());\n\n    var $rendered = decorated.call(this);\n\n    this._transferTabIndex();\n    $rendered.append(this.$searchContainer);\n\n    return $rendered;\n  };\n\n  Search.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    var resultsId = container.id + '-results';\n    var selectionId = container.id + '-container';\n\n    decorated.call(this, container, $container);\n\n    self.$search.attr('aria-describedby', selectionId);\n\n    container.on('open', function () {\n      self.$search.attr('aria-controls', resultsId);\n      self.$search.trigger('focus');\n    });\n\n    container.on('close', function () {\n      self.$search.val('');\n      self.resizeSearch();\n      self.$search.removeAttr('aria-controls');\n      self.$search.removeAttr('aria-activedescendant');\n      self.$search.trigger('focus');\n    });\n\n    container.on('enable', function () {\n      self.$search.prop('disabled', false);\n\n      self._transferTabIndex();\n    });\n\n    container.on('disable', function () {\n      self.$search.prop('disabled', true);\n    });\n\n    container.on('focus', function (evt) {\n      self.$search.trigger('focus');\n    });\n\n    container.on('results:focus', function (params) {\n      if (params.data._resultId) {\n        self.$search.attr('aria-activedescendant', params.data._resultId);\n      } else {\n        self.$search.removeAttr('aria-activedescendant');\n      }\n    });\n\n    this.$selection.on('focusin', '.select2-search--inline', function (evt) {\n      self.trigger('focus', evt);\n    });\n\n    this.$selection.on('focusout', '.select2-search--inline', function (evt) {\n      self._handleBlur(evt);\n    });\n\n    this.$selection.on('keydown', '.select2-search--inline', function (evt) {\n      evt.stopPropagation();\n\n      self.trigger('keypress', evt);\n\n      self._keyUpPrevented = evt.isDefaultPrevented();\n\n      var key = evt.which;\n\n      if (key === KEYS.BACKSPACE && self.$search.val() === '') {\n        var $previousChoice = self.$selection\n          .find('.select2-selection__choice').last();\n\n        if ($previousChoice.length > 0) {\n          var item = Utils.GetData($previousChoice[0], 'data');\n\n          self.searchRemoveChoice(item);\n\n          evt.preventDefault();\n        }\n      }\n    });\n\n    this.$selection.on('click', '.select2-search--inline', function (evt) {\n      if (self.$search.val()) {\n        evt.stopPropagation();\n      }\n    });\n\n    // Try to detect the IE version should the `documentMode` property that\n    // is stored on the document. This is only implemented in IE and is\n    // slightly cleaner than doing a user agent check.\n    // This property is not available in Edge, but Edge also doesn't have\n    // this bug.\n    var msie = document.documentMode;\n    var disableInputEvents = msie && msie <= 11;\n\n    // Workaround for browsers which do not support the `input` event\n    // This will prevent double-triggering of events for browsers which support\n    // both the `keyup` and `input` events.\n    this.$selection.on(\n      'input.searchcheck',\n      '.select2-search--inline',\n      function (evt) {\n        // IE will trigger the `input` event when a placeholder is used on a\n        // search box. To get around this issue, we are forced to ignore all\n        // `input` events in IE and keep using `keyup`.\n        if (disableInputEvents) {\n          self.$selection.off('input.search input.searchcheck');\n          return;\n        }\n\n        // Unbind the duplicated `keyup` event\n        self.$selection.off('keyup.search');\n      }\n    );\n\n    this.$selection.on(\n      'keyup.search input.search',\n      '.select2-search--inline',\n      function (evt) {\n        // IE will trigger the `input` event when a placeholder is used on a\n        // search box. To get around this issue, we are forced to ignore all\n        // `input` events in IE and keep using `keyup`.\n        if (disableInputEvents && evt.type === 'input') {\n          self.$selection.off('input.search input.searchcheck');\n          return;\n        }\n\n        var key = evt.which;\n\n        // We can freely ignore events from modifier keys\n        if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\n          return;\n        }\n\n        // Tabbing will be handled during the `keydown` phase\n        if (key == KEYS.TAB) {\n          return;\n        }\n\n        self.handleSearch(evt);\n      }\n    );\n  };\n\n  /**\n   * This method will transfer the tabindex attribute from the rendered\n   * selection to the search box. This allows for the search box to be used as\n   * the primary focus instead of the selection container.\n   *\n   * @private\n   */\n  Search.prototype._transferTabIndex = function (decorated) {\n    this.$search.attr('tabindex', this.$selection.attr('tabindex'));\n    this.$selection.attr('tabindex', '-1');\n  };\n\n  Search.prototype.createPlaceholder = function (decorated, placeholder) {\n    this.$search.attr('placeholder', placeholder.text);\n  };\n\n  Search.prototype.update = function (decorated, data) {\n    var searchHadFocus = this.$search[0] == document.activeElement;\n\n    this.$search.attr('placeholder', '');\n\n    decorated.call(this, data);\n\n    this.resizeSearch();\n    if (searchHadFocus) {\n      this.$search.trigger('focus');\n    }\n  };\n\n  Search.prototype.handleSearch = function () {\n    this.resizeSearch();\n\n    if (!this._keyUpPrevented) {\n      var input = this.$search.val();\n\n      this.trigger('query', {\n        term: input\n      });\n    }\n\n    this._keyUpPrevented = false;\n  };\n\n  Search.prototype.searchRemoveChoice = function (decorated, item) {\n    this.trigger('unselect', {\n      data: item\n    });\n\n    this.$search.val(item.text);\n    this.handleSearch();\n  };\n\n  Search.prototype.resizeSearch = function () {\n    this.$search.css('width', '25px');\n\n    var width = '100%';\n\n    if (this.$search.attr('placeholder') === '') {\n      var minimumWidth = this.$search.val().length + 1;\n\n      width = (minimumWidth * 0.75) + 'em';\n    }\n\n    this.$search.css('width', width);\n  };\n\n  return Search;\n});\n\nS2.define('select2/selection/selectionCss',[\n  '../utils'\n], function (Utils) {\n  function SelectionCSS () { }\n\n  SelectionCSS.prototype.render = function (decorated) {\n    var $selection = decorated.call(this);\n\n    var selectionCssClass = this.options.get('selectionCssClass') || '';\n\n    if (selectionCssClass.indexOf(':all:') !== -1) {\n      selectionCssClass = selectionCssClass.replace(':all:', '');\n\n      Utils.copyNonInternalCssClasses($selection[0], this.$element[0]);\n    }\n\n    $selection.addClass(selectionCssClass);\n\n    return $selection;\n  };\n\n  return SelectionCSS;\n});\n\nS2.define('select2/selection/eventRelay',[\n  'jquery'\n], function ($) {\n  function EventRelay () { }\n\n  EventRelay.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n    var relayEvents = [\n      'open', 'opening',\n      'close', 'closing',\n      'select', 'selecting',\n      'unselect', 'unselecting',\n      'clear', 'clearing'\n    ];\n\n    var preventableEvents = [\n      'opening', 'closing', 'selecting', 'unselecting', 'clearing'\n    ];\n\n    decorated.call(this, container, $container);\n\n    container.on('*', function (name, params) {\n      // Ignore events that should not be relayed\n      if (relayEvents.indexOf(name) === -1) {\n        return;\n      }\n\n      // The parameters should always be an object\n      params = params || {};\n\n      // Generate the jQuery event for the Select2 event\n      var evt = $.Event('select2:' + name, {\n        params: params\n      });\n\n      self.$element.trigger(evt);\n\n      // Only handle preventable events if it was one\n      if (preventableEvents.indexOf(name) === -1) {\n        return;\n      }\n\n      params.prevented = evt.isDefaultPrevented();\n    });\n  };\n\n  return EventRelay;\n});\n\nS2.define('select2/translation',[\n  'jquery',\n  'require'\n], function ($, require) {\n  function Translation (dict) {\n    this.dict = dict || {};\n  }\n\n  Translation.prototype.all = function () {\n    return this.dict;\n  };\n\n  Translation.prototype.get = function (key) {\n    return this.dict[key];\n  };\n\n  Translation.prototype.extend = function (translation) {\n    this.dict = $.extend({}, translation.all(), this.dict);\n  };\n\n  // Static functions\n\n  Translation._cache = {};\n\n  Translation.loadPath = function (path) {\n    if (!(path in Translation._cache)) {\n      var translations = require(path);\n\n      Translation._cache[path] = translations;\n    }\n\n    return new Translation(Translation._cache[path]);\n  };\n\n  return Translation;\n});\n\nS2.define('select2/diacritics',[\n\n], function () {\n  var diacritics = {\n    '\\u24B6': 'A',\n    '\\uFF21': 'A',\n    '\\u00C0': 'A',\n    '\\u00C1': 'A',\n    '\\u00C2': 'A',\n    '\\u1EA6': 'A',\n    '\\u1EA4': 'A',\n    '\\u1EAA': 'A',\n    '\\u1EA8': 'A',\n    '\\u00C3': 'A',\n    '\\u0100': 'A',\n    '\\u0102': 'A',\n    '\\u1EB0': 'A',\n    '\\u1EAE': 'A',\n    '\\u1EB4': 'A',\n    '\\u1EB2': 'A',\n    '\\u0226': 'A',\n    '\\u01E0': 'A',\n    '\\u00C4': 'A',\n    '\\u01DE': 'A',\n    '\\u1EA2': 'A',\n    '\\u00C5': 'A',\n    '\\u01FA': 'A',\n    '\\u01CD': 'A',\n    '\\u0200': 'A',\n    '\\u0202': 'A',\n    '\\u1EA0': 'A',\n    '\\u1EAC': 'A',\n    '\\u1EB6': 'A',\n    '\\u1E00': 'A',\n    '\\u0104': 'A',\n    '\\u023A': 'A',\n    '\\u2C6F': 'A',\n    '\\uA732': 'AA',\n    '\\u00C6': 'AE',\n    '\\u01FC': 'AE',\n    '\\u01E2': 'AE',\n    '\\uA734': 'AO',\n    '\\uA736': 'AU',\n    '\\uA738': 'AV',\n    '\\uA73A': 'AV',\n    '\\uA73C': 'AY',\n    '\\u24B7': 'B',\n    '\\uFF22': 'B',\n    '\\u1E02': 'B',\n    '\\u1E04': 'B',\n    '\\u1E06': 'B',\n    '\\u0243': 'B',\n    '\\u0182': 'B',\n    '\\u0181': 'B',\n    '\\u24B8': 'C',\n    '\\uFF23': 'C',\n    '\\u0106': 'C',\n    '\\u0108': 'C',\n    '\\u010A': 'C',\n    '\\u010C': 'C',\n    '\\u00C7': 'C',\n    '\\u1E08': 'C',\n    '\\u0187': 'C',\n    '\\u023B': 'C',\n    '\\uA73E': 'C',\n    '\\u24B9': 'D',\n    '\\uFF24': 'D',\n    '\\u1E0A': 'D',\n    '\\u010E': 'D',\n    '\\u1E0C': 'D',\n    '\\u1E10': 'D',\n    '\\u1E12': 'D',\n    '\\u1E0E': 'D',\n    '\\u0110': 'D',\n    '\\u018B': 'D',\n    '\\u018A': 'D',\n    '\\u0189': 'D',\n    '\\uA779': 'D',\n    '\\u01F1': 'DZ',\n    '\\u01C4': 'DZ',\n    '\\u01F2': 'Dz',\n    '\\u01C5': 'Dz',\n    '\\u24BA': 'E',\n    '\\uFF25': 'E',\n    '\\u00C8': 'E',\n    '\\u00C9': 'E',\n    '\\u00CA': 'E',\n    '\\u1EC0': 'E',\n    '\\u1EBE': 'E',\n    '\\u1EC4': 'E',\n    '\\u1EC2': 'E',\n    '\\u1EBC': 'E',\n    '\\u0112': 'E',\n    '\\u1E14': 'E',\n    '\\u1E16': 'E',\n    '\\u0114': 'E',\n    '\\u0116': 'E',\n    '\\u00CB': 'E',\n    '\\u1EBA': 'E',\n    '\\u011A': 'E',\n    '\\u0204': 'E',\n    '\\u0206': 'E',\n    '\\u1EB8': 'E',\n    '\\u1EC6': 'E',\n    '\\u0228': 'E',\n    '\\u1E1C': 'E',\n    '\\u0118': 'E',\n    '\\u1E18': 'E',\n    '\\u1E1A': 'E',\n    '\\u0190': 'E',\n    '\\u018E': 'E',\n    '\\u24BB': 'F',\n    '\\uFF26': 'F',\n    '\\u1E1E': 'F',\n    '\\u0191': 'F',\n    '\\uA77B': 'F',\n    '\\u24BC': 'G',\n    '\\uFF27': 'G',\n    '\\u01F4': 'G',\n    '\\u011C': 'G',\n    '\\u1E20': 'G',\n    '\\u011E': 'G',\n    '\\u0120': 'G',\n    '\\u01E6': 'G',\n    '\\u0122': 'G',\n    '\\u01E4': 'G',\n    '\\u0193': 'G',\n    '\\uA7A0': 'G',\n    '\\uA77D': 'G',\n    '\\uA77E': 'G',\n    '\\u24BD': 'H',\n    '\\uFF28': 'H',\n    '\\u0124': 'H',\n    '\\u1E22': 'H',\n    '\\u1E26': 'H',\n    '\\u021E': 'H',\n    '\\u1E24': 'H',\n    '\\u1E28': 'H',\n    '\\u1E2A': 'H',\n    '\\u0126': 'H',\n    '\\u2C67': 'H',\n    '\\u2C75': 'H',\n    '\\uA78D': 'H',\n    '\\u24BE': 'I',\n    '\\uFF29': 'I',\n    '\\u00CC': 'I',\n    '\\u00CD': 'I',\n    '\\u00CE': 'I',\n    '\\u0128': 'I',\n    '\\u012A': 'I',\n    '\\u012C': 'I',\n    '\\u0130': 'I',\n    '\\u00CF': 'I',\n    '\\u1E2E': 'I',\n    '\\u1EC8': 'I',\n    '\\u01CF': 'I',\n    '\\u0208': 'I',\n    '\\u020A': 'I',\n    '\\u1ECA': 'I',\n    '\\u012E': 'I',\n    '\\u1E2C': 'I',\n    '\\u0197': 'I',\n    '\\u24BF': 'J',\n    '\\uFF2A': 'J',\n    '\\u0134': 'J',\n    '\\u0248': 'J',\n    '\\u24C0': 'K',\n    '\\uFF2B': 'K',\n    '\\u1E30': 'K',\n    '\\u01E8': 'K',\n    '\\u1E32': 'K',\n    '\\u0136': 'K',\n    '\\u1E34': 'K',\n    '\\u0198': 'K',\n    '\\u2C69': 'K',\n    '\\uA740': 'K',\n    '\\uA742': 'K',\n    '\\uA744': 'K',\n    '\\uA7A2': 'K',\n    '\\u24C1': 'L',\n    '\\uFF2C': 'L',\n    '\\u013F': 'L',\n    '\\u0139': 'L',\n    '\\u013D': 'L',\n    '\\u1E36': 'L',\n    '\\u1E38': 'L',\n    '\\u013B': 'L',\n    '\\u1E3C': 'L',\n    '\\u1E3A': 'L',\n    '\\u0141': 'L',\n    '\\u023D': 'L',\n    '\\u2C62': 'L',\n    '\\u2C60': 'L',\n    '\\uA748': 'L',\n    '\\uA746': 'L',\n    '\\uA780': 'L',\n    '\\u01C7': 'LJ',\n    '\\u01C8': 'Lj',\n    '\\u24C2': 'M',\n    '\\uFF2D': 'M',\n    '\\u1E3E': 'M',\n    '\\u1E40': 'M',\n    '\\u1E42': 'M',\n    '\\u2C6E': 'M',\n    '\\u019C': 'M',\n    '\\u24C3': 'N',\n    '\\uFF2E': 'N',\n    '\\u01F8': 'N',\n    '\\u0143': 'N',\n    '\\u00D1': 'N',\n    '\\u1E44': 'N',\n    '\\u0147': 'N',\n    '\\u1E46': 'N',\n    '\\u0145': 'N',\n    '\\u1E4A': 'N',\n    '\\u1E48': 'N',\n    '\\u0220': 'N',\n    '\\u019D': 'N',\n    '\\uA790': 'N',\n    '\\uA7A4': 'N',\n    '\\u01CA': 'NJ',\n    '\\u01CB': 'Nj',\n    '\\u24C4': 'O',\n    '\\uFF2F': 'O',\n    '\\u00D2': 'O',\n    '\\u00D3': 'O',\n    '\\u00D4': 'O',\n    '\\u1ED2': 'O',\n    '\\u1ED0': 'O',\n    '\\u1ED6': 'O',\n    '\\u1ED4': 'O',\n    '\\u00D5': 'O',\n    '\\u1E4C': 'O',\n    '\\u022C': 'O',\n    '\\u1E4E': 'O',\n    '\\u014C': 'O',\n    '\\u1E50': 'O',\n    '\\u1E52': 'O',\n    '\\u014E': 'O',\n    '\\u022E': 'O',\n    '\\u0230': 'O',\n    '\\u00D6': 'O',\n    '\\u022A': 'O',\n    '\\u1ECE': 'O',\n    '\\u0150': 'O',\n    '\\u01D1': 'O',\n    '\\u020C': 'O',\n    '\\u020E': 'O',\n    '\\u01A0': 'O',\n    '\\u1EDC': 'O',\n    '\\u1EDA': 'O',\n    '\\u1EE0': 'O',\n    '\\u1EDE': 'O',\n    '\\u1EE2': 'O',\n    '\\u1ECC': 'O',\n    '\\u1ED8': 'O',\n    '\\u01EA': 'O',\n    '\\u01EC': 'O',\n    '\\u00D8': 'O',\n    '\\u01FE': 'O',\n    '\\u0186': 'O',\n    '\\u019F': 'O',\n    '\\uA74A': 'O',\n    '\\uA74C': 'O',\n    '\\u0152': 'OE',\n    '\\u01A2': 'OI',\n    '\\uA74E': 'OO',\n    '\\u0222': 'OU',\n    '\\u24C5': 'P',\n    '\\uFF30': 'P',\n    '\\u1E54': 'P',\n    '\\u1E56': 'P',\n    '\\u01A4': 'P',\n    '\\u2C63': 'P',\n    '\\uA750': 'P',\n    '\\uA752': 'P',\n    '\\uA754': 'P',\n    '\\u24C6': 'Q',\n    '\\uFF31': 'Q',\n    '\\uA756': 'Q',\n    '\\uA758': 'Q',\n    '\\u024A': 'Q',\n    '\\u24C7': 'R',\n    '\\uFF32': 'R',\n    '\\u0154': 'R',\n    '\\u1E58': 'R',\n    '\\u0158': 'R',\n    '\\u0210': 'R',\n    '\\u0212': 'R',\n    '\\u1E5A': 'R',\n    '\\u1E5C': 'R',\n    '\\u0156': 'R',\n    '\\u1E5E': 'R',\n    '\\u024C': 'R',\n    '\\u2C64': 'R',\n    '\\uA75A': 'R',\n    '\\uA7A6': 'R',\n    '\\uA782': 'R',\n    '\\u24C8': 'S',\n    '\\uFF33': 'S',\n    '\\u1E9E': 'S',\n    '\\u015A': 'S',\n    '\\u1E64': 'S',\n    '\\u015C': 'S',\n    '\\u1E60': 'S',\n    '\\u0160': 'S',\n    '\\u1E66': 'S',\n    '\\u1E62': 'S',\n    '\\u1E68': 'S',\n    '\\u0218': 'S',\n    '\\u015E': 'S',\n    '\\u2C7E': 'S',\n    '\\uA7A8': 'S',\n    '\\uA784': 'S',\n    '\\u24C9': 'T',\n    '\\uFF34': 'T',\n    '\\u1E6A': 'T',\n    '\\u0164': 'T',\n    '\\u1E6C': 'T',\n    '\\u021A': 'T',\n    '\\u0162': 'T',\n    '\\u1E70': 'T',\n    '\\u1E6E': 'T',\n    '\\u0166': 'T',\n    '\\u01AC': 'T',\n    '\\u01AE': 'T',\n    '\\u023E': 'T',\n    '\\uA786': 'T',\n    '\\uA728': 'TZ',\n    '\\u24CA': 'U',\n    '\\uFF35': 'U',\n    '\\u00D9': 'U',\n    '\\u00DA': 'U',\n    '\\u00DB': 'U',\n    '\\u0168': 'U',\n    '\\u1E78': 'U',\n    '\\u016A': 'U',\n    '\\u1E7A': 'U',\n    '\\u016C': 'U',\n    '\\u00DC': 'U',\n    '\\u01DB': 'U',\n    '\\u01D7': 'U',\n    '\\u01D5': 'U',\n    '\\u01D9': 'U',\n    '\\u1EE6': 'U',\n    '\\u016E': 'U',\n    '\\u0170': 'U',\n    '\\u01D3': 'U',\n    '\\u0214': 'U',\n    '\\u0216': 'U',\n    '\\u01AF': 'U',\n    '\\u1EEA': 'U',\n    '\\u1EE8': 'U',\n    '\\u1EEE': 'U',\n    '\\u1EEC': 'U',\n    '\\u1EF0': 'U',\n    '\\u1EE4': 'U',\n    '\\u1E72': 'U',\n    '\\u0172': 'U',\n    '\\u1E76': 'U',\n    '\\u1E74': 'U',\n    '\\u0244': 'U',\n    '\\u24CB': 'V',\n    '\\uFF36': 'V',\n    '\\u1E7C': 'V',\n    '\\u1E7E': 'V',\n    '\\u01B2': 'V',\n    '\\uA75E': 'V',\n    '\\u0245': 'V',\n    '\\uA760': 'VY',\n    '\\u24CC': 'W',\n    '\\uFF37': 'W',\n    '\\u1E80': 'W',\n    '\\u1E82': 'W',\n    '\\u0174': 'W',\n    '\\u1E86': 'W',\n    '\\u1E84': 'W',\n    '\\u1E88': 'W',\n    '\\u2C72': 'W',\n    '\\u24CD': 'X',\n    '\\uFF38': 'X',\n    '\\u1E8A': 'X',\n    '\\u1E8C': 'X',\n    '\\u24CE': 'Y',\n    '\\uFF39': 'Y',\n    '\\u1EF2': 'Y',\n    '\\u00DD': 'Y',\n    '\\u0176': 'Y',\n    '\\u1EF8': 'Y',\n    '\\u0232': 'Y',\n    '\\u1E8E': 'Y',\n    '\\u0178': 'Y',\n    '\\u1EF6': 'Y',\n    '\\u1EF4': 'Y',\n    '\\u01B3': 'Y',\n    '\\u024E': 'Y',\n    '\\u1EFE': 'Y',\n    '\\u24CF': 'Z',\n    '\\uFF3A': 'Z',\n    '\\u0179': 'Z',\n    '\\u1E90': 'Z',\n    '\\u017B': 'Z',\n    '\\u017D': 'Z',\n    '\\u1E92': 'Z',\n    '\\u1E94': 'Z',\n    '\\u01B5': 'Z',\n    '\\u0224': 'Z',\n    '\\u2C7F': 'Z',\n    '\\u2C6B': 'Z',\n    '\\uA762': 'Z',\n    '\\u24D0': 'a',\n    '\\uFF41': 'a',\n    '\\u1E9A': 'a',\n    '\\u00E0': 'a',\n    '\\u00E1': 'a',\n    '\\u00E2': 'a',\n    '\\u1EA7': 'a',\n    '\\u1EA5': 'a',\n    '\\u1EAB': 'a',\n    '\\u1EA9': 'a',\n    '\\u00E3': 'a',\n    '\\u0101': 'a',\n    '\\u0103': 'a',\n    '\\u1EB1': 'a',\n    '\\u1EAF': 'a',\n    '\\u1EB5': 'a',\n    '\\u1EB3': 'a',\n    '\\u0227': 'a',\n    '\\u01E1': 'a',\n    '\\u00E4': 'a',\n    '\\u01DF': 'a',\n    '\\u1EA3': 'a',\n    '\\u00E5': 'a',\n    '\\u01FB': 'a',\n    '\\u01CE': 'a',\n    '\\u0201': 'a',\n    '\\u0203': 'a',\n    '\\u1EA1': 'a',\n    '\\u1EAD': 'a',\n    '\\u1EB7': 'a',\n    '\\u1E01': 'a',\n    '\\u0105': 'a',\n    '\\u2C65': 'a',\n    '\\u0250': 'a',\n    '\\uA733': 'aa',\n    '\\u00E6': 'ae',\n    '\\u01FD': 'ae',\n    '\\u01E3': 'ae',\n    '\\uA735': 'ao',\n    '\\uA737': 'au',\n    '\\uA739': 'av',\n    '\\uA73B': 'av',\n    '\\uA73D': 'ay',\n    '\\u24D1': 'b',\n    '\\uFF42': 'b',\n    '\\u1E03': 'b',\n    '\\u1E05': 'b',\n    '\\u1E07': 'b',\n    '\\u0180': 'b',\n    '\\u0183': 'b',\n    '\\u0253': 'b',\n    '\\u24D2': 'c',\n    '\\uFF43': 'c',\n    '\\u0107': 'c',\n    '\\u0109': 'c',\n    '\\u010B': 'c',\n    '\\u010D': 'c',\n    '\\u00E7': 'c',\n    '\\u1E09': 'c',\n    '\\u0188': 'c',\n    '\\u023C': 'c',\n    '\\uA73F': 'c',\n    '\\u2184': 'c',\n    '\\u24D3': 'd',\n    '\\uFF44': 'd',\n    '\\u1E0B': 'd',\n    '\\u010F': 'd',\n    '\\u1E0D': 'd',\n    '\\u1E11': 'd',\n    '\\u1E13': 'd',\n    '\\u1E0F': 'd',\n    '\\u0111': 'd',\n    '\\u018C': 'd',\n    '\\u0256': 'd',\n    '\\u0257': 'd',\n    '\\uA77A': 'd',\n    '\\u01F3': 'dz',\n    '\\u01C6': 'dz',\n    '\\u24D4': 'e',\n    '\\uFF45': 'e',\n    '\\u00E8': 'e',\n    '\\u00E9': 'e',\n    '\\u00EA': 'e',\n    '\\u1EC1': 'e',\n    '\\u1EBF': 'e',\n    '\\u1EC5': 'e',\n    '\\u1EC3': 'e',\n    '\\u1EBD': 'e',\n    '\\u0113': 'e',\n    '\\u1E15': 'e',\n    '\\u1E17': 'e',\n    '\\u0115': 'e',\n    '\\u0117': 'e',\n    '\\u00EB': 'e',\n    '\\u1EBB': 'e',\n    '\\u011B': 'e',\n    '\\u0205': 'e',\n    '\\u0207': 'e',\n    '\\u1EB9': 'e',\n    '\\u1EC7': 'e',\n    '\\u0229': 'e',\n    '\\u1E1D': 'e',\n    '\\u0119': 'e',\n    '\\u1E19': 'e',\n    '\\u1E1B': 'e',\n    '\\u0247': 'e',\n    '\\u025B': 'e',\n    '\\u01DD': 'e',\n    '\\u24D5': 'f',\n    '\\uFF46': 'f',\n    '\\u1E1F': 'f',\n    '\\u0192': 'f',\n    '\\uA77C': 'f',\n    '\\u24D6': 'g',\n    '\\uFF47': 'g',\n    '\\u01F5': 'g',\n    '\\u011D': 'g',\n    '\\u1E21': 'g',\n    '\\u011F': 'g',\n    '\\u0121': 'g',\n    '\\u01E7': 'g',\n    '\\u0123': 'g',\n    '\\u01E5': 'g',\n    '\\u0260': 'g',\n    '\\uA7A1': 'g',\n    '\\u1D79': 'g',\n    '\\uA77F': 'g',\n    '\\u24D7': 'h',\n    '\\uFF48': 'h',\n    '\\u0125': 'h',\n    '\\u1E23': 'h',\n    '\\u1E27': 'h',\n    '\\u021F': 'h',\n    '\\u1E25': 'h',\n    '\\u1E29': 'h',\n    '\\u1E2B': 'h',\n    '\\u1E96': 'h',\n    '\\u0127': 'h',\n    '\\u2C68': 'h',\n    '\\u2C76': 'h',\n    '\\u0265': 'h',\n    '\\u0195': 'hv',\n    '\\u24D8': 'i',\n    '\\uFF49': 'i',\n    '\\u00EC': 'i',\n    '\\u00ED': 'i',\n    '\\u00EE': 'i',\n    '\\u0129': 'i',\n    '\\u012B': 'i',\n    '\\u012D': 'i',\n    '\\u00EF': 'i',\n    '\\u1E2F': 'i',\n    '\\u1EC9': 'i',\n    '\\u01D0': 'i',\n    '\\u0209': 'i',\n    '\\u020B': 'i',\n    '\\u1ECB': 'i',\n    '\\u012F': 'i',\n    '\\u1E2D': 'i',\n    '\\u0268': 'i',\n    '\\u0131': 'i',\n    '\\u24D9': 'j',\n    '\\uFF4A': 'j',\n    '\\u0135': 'j',\n    '\\u01F0': 'j',\n    '\\u0249': 'j',\n    '\\u24DA': 'k',\n    '\\uFF4B': 'k',\n    '\\u1E31': 'k',\n    '\\u01E9': 'k',\n    '\\u1E33': 'k',\n    '\\u0137': 'k',\n    '\\u1E35': 'k',\n    '\\u0199': 'k',\n    '\\u2C6A': 'k',\n    '\\uA741': 'k',\n    '\\uA743': 'k',\n    '\\uA745': 'k',\n    '\\uA7A3': 'k',\n    '\\u24DB': 'l',\n    '\\uFF4C': 'l',\n    '\\u0140': 'l',\n    '\\u013A': 'l',\n    '\\u013E': 'l',\n    '\\u1E37': 'l',\n    '\\u1E39': 'l',\n    '\\u013C': 'l',\n    '\\u1E3D': 'l',\n    '\\u1E3B': 'l',\n    '\\u017F': 'l',\n    '\\u0142': 'l',\n    '\\u019A': 'l',\n    '\\u026B': 'l',\n    '\\u2C61': 'l',\n    '\\uA749': 'l',\n    '\\uA781': 'l',\n    '\\uA747': 'l',\n    '\\u01C9': 'lj',\n    '\\u24DC': 'm',\n    '\\uFF4D': 'm',\n    '\\u1E3F': 'm',\n    '\\u1E41': 'm',\n    '\\u1E43': 'm',\n    '\\u0271': 'm',\n    '\\u026F': 'm',\n    '\\u24DD': 'n',\n    '\\uFF4E': 'n',\n    '\\u01F9': 'n',\n    '\\u0144': 'n',\n    '\\u00F1': 'n',\n    '\\u1E45': 'n',\n    '\\u0148': 'n',\n    '\\u1E47': 'n',\n    '\\u0146': 'n',\n    '\\u1E4B': 'n',\n    '\\u1E49': 'n',\n    '\\u019E': 'n',\n    '\\u0272': 'n',\n    '\\u0149': 'n',\n    '\\uA791': 'n',\n    '\\uA7A5': 'n',\n    '\\u01CC': 'nj',\n    '\\u24DE': 'o',\n    '\\uFF4F': 'o',\n    '\\u00F2': 'o',\n    '\\u00F3': 'o',\n    '\\u00F4': 'o',\n    '\\u1ED3': 'o',\n    '\\u1ED1': 'o',\n    '\\u1ED7': 'o',\n    '\\u1ED5': 'o',\n    '\\u00F5': 'o',\n    '\\u1E4D': 'o',\n    '\\u022D': 'o',\n    '\\u1E4F': 'o',\n    '\\u014D': 'o',\n    '\\u1E51': 'o',\n    '\\u1E53': 'o',\n    '\\u014F': 'o',\n    '\\u022F': 'o',\n    '\\u0231': 'o',\n    '\\u00F6': 'o',\n    '\\u022B': 'o',\n    '\\u1ECF': 'o',\n    '\\u0151': 'o',\n    '\\u01D2': 'o',\n    '\\u020D': 'o',\n    '\\u020F': 'o',\n    '\\u01A1': 'o',\n    '\\u1EDD': 'o',\n    '\\u1EDB': 'o',\n    '\\u1EE1': 'o',\n    '\\u1EDF': 'o',\n    '\\u1EE3': 'o',\n    '\\u1ECD': 'o',\n    '\\u1ED9': 'o',\n    '\\u01EB': 'o',\n    '\\u01ED': 'o',\n    '\\u00F8': 'o',\n    '\\u01FF': 'o',\n    '\\u0254': 'o',\n    '\\uA74B': 'o',\n    '\\uA74D': 'o',\n    '\\u0275': 'o',\n    '\\u0153': 'oe',\n    '\\u01A3': 'oi',\n    '\\u0223': 'ou',\n    '\\uA74F': 'oo',\n    '\\u24DF': 'p',\n    '\\uFF50': 'p',\n    '\\u1E55': 'p',\n    '\\u1E57': 'p',\n    '\\u01A5': 'p',\n    '\\u1D7D': 'p',\n    '\\uA751': 'p',\n    '\\uA753': 'p',\n    '\\uA755': 'p',\n    '\\u24E0': 'q',\n    '\\uFF51': 'q',\n    '\\u024B': 'q',\n    '\\uA757': 'q',\n    '\\uA759': 'q',\n    '\\u24E1': 'r',\n    '\\uFF52': 'r',\n    '\\u0155': 'r',\n    '\\u1E59': 'r',\n    '\\u0159': 'r',\n    '\\u0211': 'r',\n    '\\u0213': 'r',\n    '\\u1E5B': 'r',\n    '\\u1E5D': 'r',\n    '\\u0157': 'r',\n    '\\u1E5F': 'r',\n    '\\u024D': 'r',\n    '\\u027D': 'r',\n    '\\uA75B': 'r',\n    '\\uA7A7': 'r',\n    '\\uA783': 'r',\n    '\\u24E2': 's',\n    '\\uFF53': 's',\n    '\\u00DF': 's',\n    '\\u015B': 's',\n    '\\u1E65': 's',\n    '\\u015D': 's',\n    '\\u1E61': 's',\n    '\\u0161': 's',\n    '\\u1E67': 's',\n    '\\u1E63': 's',\n    '\\u1E69': 's',\n    '\\u0219': 's',\n    '\\u015F': 's',\n    '\\u023F': 's',\n    '\\uA7A9': 's',\n    '\\uA785': 's',\n    '\\u1E9B': 's',\n    '\\u24E3': 't',\n    '\\uFF54': 't',\n    '\\u1E6B': 't',\n    '\\u1E97': 't',\n    '\\u0165': 't',\n    '\\u1E6D': 't',\n    '\\u021B': 't',\n    '\\u0163': 't',\n    '\\u1E71': 't',\n    '\\u1E6F': 't',\n    '\\u0167': 't',\n    '\\u01AD': 't',\n    '\\u0288': 't',\n    '\\u2C66': 't',\n    '\\uA787': 't',\n    '\\uA729': 'tz',\n    '\\u24E4': 'u',\n    '\\uFF55': 'u',\n    '\\u00F9': 'u',\n    '\\u00FA': 'u',\n    '\\u00FB': 'u',\n    '\\u0169': 'u',\n    '\\u1E79': 'u',\n    '\\u016B': 'u',\n    '\\u1E7B': 'u',\n    '\\u016D': 'u',\n    '\\u00FC': 'u',\n    '\\u01DC': 'u',\n    '\\u01D8': 'u',\n    '\\u01D6': 'u',\n    '\\u01DA': 'u',\n    '\\u1EE7': 'u',\n    '\\u016F': 'u',\n    '\\u0171': 'u',\n    '\\u01D4': 'u',\n    '\\u0215': 'u',\n    '\\u0217': 'u',\n    '\\u01B0': 'u',\n    '\\u1EEB': 'u',\n    '\\u1EE9': 'u',\n    '\\u1EEF': 'u',\n    '\\u1EED': 'u',\n    '\\u1EF1': 'u',\n    '\\u1EE5': 'u',\n    '\\u1E73': 'u',\n    '\\u0173': 'u',\n    '\\u1E77': 'u',\n    '\\u1E75': 'u',\n    '\\u0289': 'u',\n    '\\u24E5': 'v',\n    '\\uFF56': 'v',\n    '\\u1E7D': 'v',\n    '\\u1E7F': 'v',\n    '\\u028B': 'v',\n    '\\uA75F': 'v',\n    '\\u028C': 'v',\n    '\\uA761': 'vy',\n    '\\u24E6': 'w',\n    '\\uFF57': 'w',\n    '\\u1E81': 'w',\n    '\\u1E83': 'w',\n    '\\u0175': 'w',\n    '\\u1E87': 'w',\n    '\\u1E85': 'w',\n    '\\u1E98': 'w',\n    '\\u1E89': 'w',\n    '\\u2C73': 'w',\n    '\\u24E7': 'x',\n    '\\uFF58': 'x',\n    '\\u1E8B': 'x',\n    '\\u1E8D': 'x',\n    '\\u24E8': 'y',\n    '\\uFF59': 'y',\n    '\\u1EF3': 'y',\n    '\\u00FD': 'y',\n    '\\u0177': 'y',\n    '\\u1EF9': 'y',\n    '\\u0233': 'y',\n    '\\u1E8F': 'y',\n    '\\u00FF': 'y',\n    '\\u1EF7': 'y',\n    '\\u1E99': 'y',\n    '\\u1EF5': 'y',\n    '\\u01B4': 'y',\n    '\\u024F': 'y',\n    '\\u1EFF': 'y',\n    '\\u24E9': 'z',\n    '\\uFF5A': 'z',\n    '\\u017A': 'z',\n    '\\u1E91': 'z',\n    '\\u017C': 'z',\n    '\\u017E': 'z',\n    '\\u1E93': 'z',\n    '\\u1E95': 'z',\n    '\\u01B6': 'z',\n    '\\u0225': 'z',\n    '\\u0240': 'z',\n    '\\u2C6C': 'z',\n    '\\uA763': 'z',\n    '\\u0386': '\\u0391',\n    '\\u0388': '\\u0395',\n    '\\u0389': '\\u0397',\n    '\\u038A': '\\u0399',\n    '\\u03AA': '\\u0399',\n    '\\u038C': '\\u039F',\n    '\\u038E': '\\u03A5',\n    '\\u03AB': '\\u03A5',\n    '\\u038F': '\\u03A9',\n    '\\u03AC': '\\u03B1',\n    '\\u03AD': '\\u03B5',\n    '\\u03AE': '\\u03B7',\n    '\\u03AF': '\\u03B9',\n    '\\u03CA': '\\u03B9',\n    '\\u0390': '\\u03B9',\n    '\\u03CC': '\\u03BF',\n    '\\u03CD': '\\u03C5',\n    '\\u03CB': '\\u03C5',\n    '\\u03B0': '\\u03C5',\n    '\\u03CE': '\\u03C9',\n    '\\u03C2': '\\u03C3',\n    '\\u2019': '\\''\n  };\n\n  return diacritics;\n});\n\nS2.define('select2/data/base',[\n  '../utils'\n], function (Utils) {\n  function BaseAdapter ($element, options) {\n    BaseAdapter.__super__.constructor.call(this);\n  }\n\n  Utils.Extend(BaseAdapter, Utils.Observable);\n\n  BaseAdapter.prototype.current = function (callback) {\n    throw new Error('The `current` method must be defined in child classes.');\n  };\n\n  BaseAdapter.prototype.query = function (params, callback) {\n    throw new Error('The `query` method must be defined in child classes.');\n  };\n\n  BaseAdapter.prototype.bind = function (container, $container) {\n    // Can be implemented in subclasses\n  };\n\n  BaseAdapter.prototype.destroy = function () {\n    // Can be implemented in subclasses\n  };\n\n  BaseAdapter.prototype.generateResultId = function (container, data) {\n    var id = container.id + '-result-';\n\n    id += Utils.generateChars(4);\n\n    if (data.id != null) {\n      id += '-' + data.id.toString();\n    } else {\n      id += '-' + Utils.generateChars(4);\n    }\n    return id;\n  };\n\n  return BaseAdapter;\n});\n\nS2.define('select2/data/select',[\n  './base',\n  '../utils',\n  'jquery'\n], function (BaseAdapter, Utils, $) {\n  function SelectAdapter ($element, options) {\n    this.$element = $element;\n    this.options = options;\n\n    SelectAdapter.__super__.constructor.call(this);\n  }\n\n  Utils.Extend(SelectAdapter, BaseAdapter);\n\n  SelectAdapter.prototype.current = function (callback) {\n    var self = this;\n\n    var data = Array.prototype.map.call(\n      this.$element[0].querySelectorAll(':checked'),\n      function (selectedElement) {\n        return self.item($(selectedElement));\n      }\n    );\n\n    callback(data);\n  };\n\n  SelectAdapter.prototype.select = function (data) {\n    var self = this;\n\n    data.selected = true;\n\n    // If data.element is a DOM node, use it instead\n    if (\n      data.element != null && data.element.tagName.toLowerCase() === 'option'\n    ) {\n      data.element.selected = true;\n\n      this.$element.trigger('input').trigger('change');\n\n      return;\n    }\n\n    if (this.$element.prop('multiple')) {\n      this.current(function (currentData) {\n        var val = [];\n\n        data = [data];\n        data.push.apply(data, currentData);\n\n        for (var d = 0; d < data.length; d++) {\n          var id = data[d].id;\n\n          if (val.indexOf(id) === -1) {\n            val.push(id);\n          }\n        }\n\n        self.$element.val(val);\n        self.$element.trigger('input').trigger('change');\n      });\n    } else {\n      var val = data.id;\n\n      this.$element.val(val);\n      this.$element.trigger('input').trigger('change');\n    }\n  };\n\n  SelectAdapter.prototype.unselect = function (data) {\n    var self = this;\n\n    if (!this.$element.prop('multiple')) {\n      return;\n    }\n\n    data.selected = false;\n\n    if (\n      data.element != null &&\n      data.element.tagName.toLowerCase() === 'option'\n    ) {\n      data.element.selected = false;\n\n      this.$element.trigger('input').trigger('change');\n\n      return;\n    }\n\n    this.current(function (currentData) {\n      var val = [];\n\n      for (var d = 0; d < currentData.length; d++) {\n        var id = currentData[d].id;\n\n        if (id !== data.id && val.indexOf(id) === -1) {\n          val.push(id);\n        }\n      }\n\n      self.$element.val(val);\n\n      self.$element.trigger('input').trigger('change');\n    });\n  };\n\n  SelectAdapter.prototype.bind = function (container, $container) {\n    var self = this;\n\n    this.container = container;\n\n    container.on('select', function (params) {\n      self.select(params.data);\n    });\n\n    container.on('unselect', function (params) {\n      self.unselect(params.data);\n    });\n  };\n\n  SelectAdapter.prototype.destroy = function () {\n    // Remove anything added to child elements\n    this.$element.find('*').each(function () {\n      // Remove any custom data set by Select2\n      Utils.RemoveData(this);\n    });\n  };\n\n  SelectAdapter.prototype.query = function (params, callback) {\n    var data = [];\n    var self = this;\n\n    var $options = this.$element.children();\n\n    $options.each(function () {\n      if (\n        this.tagName.toLowerCase() !== 'option' &&\n        this.tagName.toLowerCase() !== 'optgroup'\n      ) {\n        return;\n      }\n\n      var $option = $(this);\n\n      var option = self.item($option);\n\n      var matches = self.matches(params, option);\n\n      if (matches !== null) {\n        data.push(matches);\n      }\n    });\n\n    callback({\n      results: data\n    });\n  };\n\n  SelectAdapter.prototype.addOptions = function ($options) {\n    this.$element.append($options);\n  };\n\n  SelectAdapter.prototype.option = function (data) {\n    var option;\n\n    if (data.children) {\n      option = document.createElement('optgroup');\n      option.label = data.text;\n    } else {\n      option = document.createElement('option');\n\n      if (option.textContent !== undefined) {\n        option.textContent = data.text;\n      } else {\n        option.innerText = data.text;\n      }\n    }\n\n    if (data.id !== undefined) {\n      option.value = data.id;\n    }\n\n    if (data.disabled) {\n      option.disabled = true;\n    }\n\n    if (data.selected) {\n      option.selected = true;\n    }\n\n    if (data.title) {\n      option.title = data.title;\n    }\n\n    var normalizedData = this._normalizeItem(data);\n    normalizedData.element = option;\n\n    // Override the option's data with the combined data\n    Utils.StoreData(option, 'data', normalizedData);\n\n    return $(option);\n  };\n\n  SelectAdapter.prototype.item = function ($option) {\n    var data = {};\n\n    data = Utils.GetData($option[0], 'data');\n\n    if (data != null) {\n      return data;\n    }\n\n    var option = $option[0];\n\n    if (option.tagName.toLowerCase() === 'option') {\n      data = {\n        id: $option.val(),\n        text: $option.text(),\n        disabled: $option.prop('disabled'),\n        selected: $option.prop('selected'),\n        title: $option.prop('title')\n      };\n    } else if (option.tagName.toLowerCase() === 'optgroup') {\n      data = {\n        text: $option.prop('label'),\n        children: [],\n        title: $option.prop('title')\n      };\n\n      var $children = $option.children('option');\n      var children = [];\n\n      for (var c = 0; c < $children.length; c++) {\n        var $child = $($children[c]);\n\n        var child = this.item($child);\n\n        children.push(child);\n      }\n\n      data.children = children;\n    }\n\n    data = this._normalizeItem(data);\n    data.element = $option[0];\n\n    Utils.StoreData($option[0], 'data', data);\n\n    return data;\n  };\n\n  SelectAdapter.prototype._normalizeItem = function (item) {\n    if (item !== Object(item)) {\n      item = {\n        id: item,\n        text: item\n      };\n    }\n\n    item = $.extend({}, {\n      text: ''\n    }, item);\n\n    var defaults = {\n      selected: false,\n      disabled: false\n    };\n\n    if (item.id != null) {\n      item.id = item.id.toString();\n    }\n\n    if (item.text != null) {\n      item.text = item.text.toString();\n    }\n\n    if (item._resultId == null && item.id && this.container != null) {\n      item._resultId = this.generateResultId(this.container, item);\n    }\n\n    return $.extend({}, defaults, item);\n  };\n\n  SelectAdapter.prototype.matches = function (params, data) {\n    var matcher = this.options.get('matcher');\n\n    return matcher(params, data);\n  };\n\n  return SelectAdapter;\n});\n\nS2.define('select2/data/array',[\n  './select',\n  '../utils',\n  'jquery'\n], function (SelectAdapter, Utils, $) {\n  function ArrayAdapter ($element, options) {\n    this._dataToConvert = options.get('data') || [];\n\n    ArrayAdapter.__super__.constructor.call(this, $element, options);\n  }\n\n  Utils.Extend(ArrayAdapter, SelectAdapter);\n\n  ArrayAdapter.prototype.bind = function (container, $container) {\n    ArrayAdapter.__super__.bind.call(this, container, $container);\n\n    this.addOptions(this.convertToOptions(this._dataToConvert));\n  };\n\n  ArrayAdapter.prototype.select = function (data) {\n    var $option = this.$element.find('option').filter(function (i, elm) {\n      return elm.value == data.id.toString();\n    });\n\n    if ($option.length === 0) {\n      $option = this.option(data);\n\n      this.addOptions($option);\n    }\n\n    ArrayAdapter.__super__.select.call(this, data);\n  };\n\n  ArrayAdapter.prototype.convertToOptions = function (data) {\n    var self = this;\n\n    var $existing = this.$element.find('option');\n    var existingIds = $existing.map(function () {\n      return self.item($(this)).id;\n    }).get();\n\n    var $options = [];\n\n    // Filter out all items except for the one passed in the argument\n    function onlyItem (item) {\n      return function () {\n        return $(this).val() == item.id;\n      };\n    }\n\n    for (var d = 0; d < data.length; d++) {\n      var item = this._normalizeItem(data[d]);\n\n      // Skip items which were pre-loaded, only merge the data\n      if (existingIds.indexOf(item.id) >= 0) {\n        var $existingOption = $existing.filter(onlyItem(item));\n\n        var existingData = this.item($existingOption);\n        var newData = $.extend(true, {}, item, existingData);\n\n        var $newOption = this.option(newData);\n\n        $existingOption.replaceWith($newOption);\n\n        continue;\n      }\n\n      var $option = this.option(item);\n\n      if (item.children) {\n        var $children = this.convertToOptions(item.children);\n\n        $option.append($children);\n      }\n\n      $options.push($option);\n    }\n\n    return $options;\n  };\n\n  return ArrayAdapter;\n});\n\nS2.define('select2/data/ajax',[\n  './array',\n  '../utils',\n  'jquery'\n], function (ArrayAdapter, Utils, $) {\n  function AjaxAdapter ($element, options) {\n    this.ajaxOptions = this._applyDefaults(options.get('ajax'));\n\n    if (this.ajaxOptions.processResults != null) {\n      this.processResults = this.ajaxOptions.processResults;\n    }\n\n    AjaxAdapter.__super__.constructor.call(this, $element, options);\n  }\n\n  Utils.Extend(AjaxAdapter, ArrayAdapter);\n\n  AjaxAdapter.prototype._applyDefaults = function (options) {\n    var defaults = {\n      data: function (params) {\n        return $.extend({}, params, {\n          q: params.term\n        });\n      },\n      transport: function (params, success, failure) {\n        var $request = $.ajax(params);\n\n        $request.then(success);\n        $request.fail(failure);\n\n        return $request;\n      }\n    };\n\n    return $.extend({}, defaults, options, true);\n  };\n\n  AjaxAdapter.prototype.processResults = function (results) {\n    return results;\n  };\n\n  AjaxAdapter.prototype.query = function (params, callback) {\n    var matches = [];\n    var self = this;\n\n    if (this._request != null) {\n      // JSONP requests cannot always be aborted\n      if (typeof this._request.abort === 'function') {\n        this._request.abort();\n      }\n\n      this._request = null;\n    }\n\n    var options = $.extend({\n      type: 'GET'\n    }, this.ajaxOptions);\n\n    if (typeof options.url === 'function') {\n      options.url = options.url.call(this.$element, params);\n    }\n\n    if (typeof options.data === 'function') {\n      options.data = options.data.call(this.$element, params);\n    }\n\n    function request () {\n      var $request = options.transport(options, function (data) {\n        var results = self.processResults(data, params);\n\n        if (self.options.get('debug') && window.console && console.error) {\n          // Check to make sure that the response included a `results` key.\n          if (!results || !results.results || !Array.isArray(results.results)) {\n            console.error(\n              'Select2: The AJAX results did not return an array in the ' +\n              '`results` key of the response.'\n            );\n          }\n        }\n\n        callback(results);\n      }, function () {\n        // Attempt to detect if a request was aborted\n        // Only works if the transport exposes a status property\n        if ('status' in $request &&\n            ($request.status === 0 || $request.status === '0')) {\n          return;\n        }\n\n        self.trigger('results:message', {\n          message: 'errorLoading'\n        });\n      });\n\n      self._request = $request;\n    }\n\n    if (this.ajaxOptions.delay && params.term != null) {\n      if (this._queryTimeout) {\n        window.clearTimeout(this._queryTimeout);\n      }\n\n      this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\n    } else {\n      request();\n    }\n  };\n\n  return AjaxAdapter;\n});\n\nS2.define('select2/data/tags',[\n  'jquery'\n], function ($) {\n  function Tags (decorated, $element, options) {\n    var tags = options.get('tags');\n\n    var createTag = options.get('createTag');\n\n    if (createTag !== undefined) {\n      this.createTag = createTag;\n    }\n\n    var insertTag = options.get('insertTag');\n\n    if (insertTag !== undefined) {\n        this.insertTag = insertTag;\n    }\n\n    decorated.call(this, $element, options);\n\n    if (Array.isArray(tags)) {\n      for (var t = 0; t < tags.length; t++) {\n        var tag = tags[t];\n        var item = this._normalizeItem(tag);\n\n        var $option = this.option(item);\n\n        this.$element.append($option);\n      }\n    }\n  }\n\n  Tags.prototype.query = function (decorated, params, callback) {\n    var self = this;\n\n    this._removeOldTags();\n\n    if (params.term == null || params.page != null) {\n      decorated.call(this, params, callback);\n      return;\n    }\n\n    function wrapper (obj, child) {\n      var data = obj.results;\n\n      for (var i = 0; i < data.length; i++) {\n        var option = data[i];\n\n        var checkChildren = (\n          option.children != null &&\n          !wrapper({\n            results: option.children\n          }, true)\n        );\n\n        var optionText = (option.text || '').toUpperCase();\n        var paramsTerm = (params.term || '').toUpperCase();\n\n        var checkText = optionText === paramsTerm;\n\n        if (checkText || checkChildren) {\n          if (child) {\n            return false;\n          }\n\n          obj.data = data;\n          callback(obj);\n\n          return;\n        }\n      }\n\n      if (child) {\n        return true;\n      }\n\n      var tag = self.createTag(params);\n\n      if (tag != null) {\n        var $option = self.option(tag);\n        $option.attr('data-select2-tag', 'true');\n\n        self.addOptions([$option]);\n\n        self.insertTag(data, tag);\n      }\n\n      obj.results = data;\n\n      callback(obj);\n    }\n\n    decorated.call(this, params, wrapper);\n  };\n\n  Tags.prototype.createTag = function (decorated, params) {\n    if (params.term == null) {\n      return null;\n    }\n\n    var term = params.term.trim();\n\n    if (term === '') {\n      return null;\n    }\n\n    return {\n      id: term,\n      text: term\n    };\n  };\n\n  Tags.prototype.insertTag = function (_, data, tag) {\n    data.unshift(tag);\n  };\n\n  Tags.prototype._removeOldTags = function (_) {\n    var $options = this.$element.find('option[data-select2-tag]');\n\n    $options.each(function () {\n      if (this.selected) {\n        return;\n      }\n\n      $(this).remove();\n    });\n  };\n\n  return Tags;\n});\n\nS2.define('select2/data/tokenizer',[\n  'jquery'\n], function ($) {\n  function Tokenizer (decorated, $element, options) {\n    var tokenizer = options.get('tokenizer');\n\n    if (tokenizer !== undefined) {\n      this.tokenizer = tokenizer;\n    }\n\n    decorated.call(this, $element, options);\n  }\n\n  Tokenizer.prototype.bind = function (decorated, container, $container) {\n    decorated.call(this, container, $container);\n\n    this.$search =  container.dropdown.$search || container.selection.$search ||\n      $container.find('.select2-search__field');\n  };\n\n  Tokenizer.prototype.query = function (decorated, params, callback) {\n    var self = this;\n\n    function createAndSelect (data) {\n      // Normalize the data object so we can use it for checks\n      var item = self._normalizeItem(data);\n\n      // Check if the data object already exists as a tag\n      // Select it if it doesn't\n      var $existingOptions = self.$element.find('option').filter(function () {\n        return $(this).val() === item.id;\n      });\n\n      // If an existing option wasn't found for it, create the option\n      if (!$existingOptions.length) {\n        var $option = self.option(item);\n        $option.attr('data-select2-tag', true);\n\n        self._removeOldTags();\n        self.addOptions([$option]);\n      }\n\n      // Select the item, now that we know there is an option for it\n      select(item);\n    }\n\n    function select (data) {\n      self.trigger('select', {\n        data: data\n      });\n    }\n\n    params.term = params.term || '';\n\n    var tokenData = this.tokenizer(params, this.options, createAndSelect);\n\n    if (tokenData.term !== params.term) {\n      // Replace the search term if we have the search box\n      if (this.$search.length) {\n        this.$search.val(tokenData.term);\n        this.$search.trigger('focus');\n      }\n\n      params.term = tokenData.term;\n    }\n\n    decorated.call(this, params, callback);\n  };\n\n  Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\n    var separators = options.get('tokenSeparators') || [];\n    var term = params.term;\n    var i = 0;\n\n    var createTag = this.createTag || function (params) {\n      return {\n        id: params.term,\n        text: params.term\n      };\n    };\n\n    while (i < term.length) {\n      var termChar = term[i];\n\n      if (separators.indexOf(termChar) === -1) {\n        i++;\n\n        continue;\n      }\n\n      var part = term.substr(0, i);\n      var partParams = $.extend({}, params, {\n        term: part\n      });\n\n      var data = createTag(partParams);\n\n      if (data == null) {\n        i++;\n        continue;\n      }\n\n      callback(data);\n\n      // Reset the term to not include the tokenized portion\n      term = term.substr(i + 1) || '';\n      i = 0;\n    }\n\n    return {\n      term: term\n    };\n  };\n\n  return Tokenizer;\n});\n\nS2.define('select2/data/minimumInputLength',[\n\n], function () {\n  function MinimumInputLength (decorated, $e, options) {\n    this.minimumInputLength = options.get('minimumInputLength');\n\n    decorated.call(this, $e, options);\n  }\n\n  MinimumInputLength.prototype.query = function (decorated, params, callback) {\n    params.term = params.term || '';\n\n    if (params.term.length < this.minimumInputLength) {\n      this.trigger('results:message', {\n        message: 'inputTooShort',\n        args: {\n          minimum: this.minimumInputLength,\n          input: params.term,\n          params: params\n        }\n      });\n\n      return;\n    }\n\n    decorated.call(this, params, callback);\n  };\n\n  return MinimumInputLength;\n});\n\nS2.define('select2/data/maximumInputLength',[\n\n], function () {\n  function MaximumInputLength (decorated, $e, options) {\n    this.maximumInputLength = options.get('maximumInputLength');\n\n    decorated.call(this, $e, options);\n  }\n\n  MaximumInputLength.prototype.query = function (decorated, params, callback) {\n    params.term = params.term || '';\n\n    if (this.maximumInputLength > 0 &&\n        params.term.length > this.maximumInputLength) {\n      this.trigger('results:message', {\n        message: 'inputTooLong',\n        args: {\n          maximum: this.maximumInputLength,\n          input: params.term,\n          params: params\n        }\n      });\n\n      return;\n    }\n\n    decorated.call(this, params, callback);\n  };\n\n  return MaximumInputLength;\n});\n\nS2.define('select2/data/maximumSelectionLength',[\n\n], function (){\n  function MaximumSelectionLength (decorated, $e, options) {\n    this.maximumSelectionLength = options.get('maximumSelectionLength');\n\n    decorated.call(this, $e, options);\n  }\n\n  MaximumSelectionLength.prototype.bind =\n    function (decorated, container, $container) {\n      var self = this;\n\n      decorated.call(this, container, $container);\n\n      container.on('select', function () {\n        self._checkIfMaximumSelected();\n      });\n  };\n\n  MaximumSelectionLength.prototype.query =\n    function (decorated, params, callback) {\n      var self = this;\n\n      this._checkIfMaximumSelected(function () {\n        decorated.call(self, params, callback);\n      });\n  };\n\n  MaximumSelectionLength.prototype._checkIfMaximumSelected =\n    function (_, successCallback) {\n      var self = this;\n\n      this.current(function (currentData) {\n        var count = currentData != null ? currentData.length : 0;\n        if (self.maximumSelectionLength > 0 &&\n          count >= self.maximumSelectionLength) {\n          self.trigger('results:message', {\n            message: 'maximumSelected',\n            args: {\n              maximum: self.maximumSelectionLength\n            }\n          });\n          return;\n        }\n\n        if (successCallback) {\n          successCallback();\n        }\n      });\n  };\n\n  return MaximumSelectionLength;\n});\n\nS2.define('select2/dropdown',[\n  'jquery',\n  './utils'\n], function ($, Utils) {\n  function Dropdown ($element, options) {\n    this.$element = $element;\n    this.options = options;\n\n    Dropdown.__super__.constructor.call(this);\n  }\n\n  Utils.Extend(Dropdown, Utils.Observable);\n\n  Dropdown.prototype.render = function () {\n    var $dropdown = $(\n      '<span class=\"select2-dropdown\">' +\n        '<span class=\"select2-results\"></span>' +\n      '</span>'\n    );\n\n    $dropdown.attr('dir', this.options.get('dir'));\n\n    this.$dropdown = $dropdown;\n\n    return $dropdown;\n  };\n\n  Dropdown.prototype.bind = function () {\n    // Should be implemented in subclasses\n  };\n\n  Dropdown.prototype.position = function ($dropdown, $container) {\n    // Should be implemented in subclasses\n  };\n\n  Dropdown.prototype.destroy = function () {\n    // Remove the dropdown from the DOM\n    this.$dropdown.remove();\n  };\n\n  return Dropdown;\n});\n\nS2.define('select2/dropdown/search',[\n  'jquery'\n], function ($) {\n  function Search () { }\n\n  Search.prototype.render = function (decorated) {\n    var $rendered = decorated.call(this);\n    var searchLabel = this.options.get('translations').get('search');\n\n    var $search = $(\n      '<span class=\"select2-search select2-search--dropdown\">' +\n        '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\n        ' autocorrect=\"off\" autocapitalize=\"none\"' +\n        ' spellcheck=\"false\" role=\"searchbox\" aria-autocomplete=\"list\" />' +\n      '</span>'\n    );\n\n    this.$searchContainer = $search;\n    this.$search = $search.find('input');\n\n    this.$search.prop('autocomplete', this.options.get('autocomplete'));\n    this.$search.attr('aria-label', searchLabel());\n\n    $rendered.prepend($search);\n\n    return $rendered;\n  };\n\n  Search.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    var resultsId = container.id + '-results';\n\n    decorated.call(this, container, $container);\n\n    this.$search.on('keydown', function (evt) {\n      self.trigger('keypress', evt);\n\n      self._keyUpPrevented = evt.isDefaultPrevented();\n    });\n\n    // Workaround for browsers which do not support the `input` event\n    // This will prevent double-triggering of events for browsers which support\n    // both the `keyup` and `input` events.\n    this.$search.on('input', function (evt) {\n      // Unbind the duplicated `keyup` event\n      $(this).off('keyup');\n    });\n\n    this.$search.on('keyup input', function (evt) {\n      self.handleSearch(evt);\n    });\n\n    container.on('open', function () {\n      self.$search.attr('tabindex', 0);\n      self.$search.attr('aria-controls', resultsId);\n\n      self.$search.trigger('focus');\n\n      window.setTimeout(function () {\n        self.$search.trigger('focus');\n      }, 0);\n    });\n\n    container.on('close', function () {\n      self.$search.attr('tabindex', -1);\n      self.$search.removeAttr('aria-controls');\n      self.$search.removeAttr('aria-activedescendant');\n\n      self.$search.val('');\n      self.$search.trigger('blur');\n    });\n\n    container.on('focus', function () {\n      if (!container.isOpen()) {\n        self.$search.trigger('focus');\n      }\n    });\n\n    container.on('results:all', function (params) {\n      if (params.query.term == null || params.query.term === '') {\n        var showSearch = self.showSearch(params);\n\n        if (showSearch) {\n          self.$searchContainer[0].classList.remove('select2-search--hide');\n        } else {\n          self.$searchContainer[0].classList.add('select2-search--hide');\n        }\n      }\n    });\n\n    container.on('results:focus', function (params) {\n      if (params.data._resultId) {\n        self.$search.attr('aria-activedescendant', params.data._resultId);\n      } else {\n        self.$search.removeAttr('aria-activedescendant');\n      }\n    });\n  };\n\n  Search.prototype.handleSearch = function (evt) {\n    if (!this._keyUpPrevented) {\n      var input = this.$search.val();\n\n      this.trigger('query', {\n        term: input\n      });\n    }\n\n    this._keyUpPrevented = false;\n  };\n\n  Search.prototype.showSearch = function (_, params) {\n    return true;\n  };\n\n  return Search;\n});\n\nS2.define('select2/dropdown/hidePlaceholder',[\n\n], function () {\n  function HidePlaceholder (decorated, $element, options, dataAdapter) {\n    this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n    decorated.call(this, $element, options, dataAdapter);\n  }\n\n  HidePlaceholder.prototype.append = function (decorated, data) {\n    data.results = this.removePlaceholder(data.results);\n\n    decorated.call(this, data);\n  };\n\n  HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\n    if (typeof placeholder === 'string') {\n      placeholder = {\n        id: '',\n        text: placeholder\n      };\n    }\n\n    return placeholder;\n  };\n\n  HidePlaceholder.prototype.removePlaceholder = function (_, data) {\n    var modifiedData = data.slice(0);\n\n    for (var d = data.length - 1; d >= 0; d--) {\n      var item = data[d];\n\n      if (this.placeholder.id === item.id) {\n        modifiedData.splice(d, 1);\n      }\n    }\n\n    return modifiedData;\n  };\n\n  return HidePlaceholder;\n});\n\nS2.define('select2/dropdown/infiniteScroll',[\n  'jquery'\n], function ($) {\n  function InfiniteScroll (decorated, $element, options, dataAdapter) {\n    this.lastParams = {};\n\n    decorated.call(this, $element, options, dataAdapter);\n\n    this.$loadingMore = this.createLoadingMore();\n    this.loading = false;\n  }\n\n  InfiniteScroll.prototype.append = function (decorated, data) {\n    this.$loadingMore.remove();\n    this.loading = false;\n\n    decorated.call(this, data);\n\n    if (this.showLoadingMore(data)) {\n      this.$results.append(this.$loadingMore);\n      this.loadMoreIfNeeded();\n    }\n  };\n\n  InfiniteScroll.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    decorated.call(this, container, $container);\n\n    container.on('query', function (params) {\n      self.lastParams = params;\n      self.loading = true;\n    });\n\n    container.on('query:append', function (params) {\n      self.lastParams = params;\n      self.loading = true;\n    });\n\n    this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));\n  };\n\n  InfiniteScroll.prototype.loadMoreIfNeeded = function () {\n    var isLoadMoreVisible = $.contains(\n      document.documentElement,\n      this.$loadingMore[0]\n    );\n\n    if (this.loading || !isLoadMoreVisible) {\n      return;\n    }\n\n    var currentOffset = this.$results.offset().top +\n      this.$results.outerHeight(false);\n    var loadingMoreOffset = this.$loadingMore.offset().top +\n      this.$loadingMore.outerHeight(false);\n\n    if (currentOffset + 50 >= loadingMoreOffset) {\n      this.loadMore();\n    }\n  };\n\n  InfiniteScroll.prototype.loadMore = function () {\n    this.loading = true;\n\n    var params = $.extend({}, {page: 1}, this.lastParams);\n\n    params.page++;\n\n    this.trigger('query:append', params);\n  };\n\n  InfiniteScroll.prototype.showLoadingMore = function (_, data) {\n    return data.pagination && data.pagination.more;\n  };\n\n  InfiniteScroll.prototype.createLoadingMore = function () {\n    var $option = $(\n      '<li ' +\n      'class=\"select2-results__option select2-results__option--load-more\"' +\n      'role=\"option\" aria-disabled=\"true\"></li>'\n    );\n\n    var message = this.options.get('translations').get('loadingMore');\n\n    $option.html(message(this.lastParams));\n\n    return $option;\n  };\n\n  return InfiniteScroll;\n});\n\nS2.define('select2/dropdown/attachBody',[\n  'jquery',\n  '../utils'\n], function ($, Utils) {\n  function AttachBody (decorated, $element, options) {\n    this.$dropdownParent = $(options.get('dropdownParent') || document.body);\n\n    decorated.call(this, $element, options);\n  }\n\n  AttachBody.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    decorated.call(this, container, $container);\n\n    container.on('open', function () {\n      self._showDropdown();\n      self._attachPositioningHandler(container);\n\n      // Must bind after the results handlers to ensure correct sizing\n      self._bindContainerResultHandlers(container);\n    });\n\n    container.on('close', function () {\n      self._hideDropdown();\n      self._detachPositioningHandler(container);\n    });\n\n    this.$dropdownContainer.on('mousedown', function (evt) {\n      evt.stopPropagation();\n    });\n  };\n\n  AttachBody.prototype.destroy = function (decorated) {\n    decorated.call(this);\n\n    this.$dropdownContainer.remove();\n  };\n\n  AttachBody.prototype.position = function (decorated, $dropdown, $container) {\n    // Clone all of the container classes\n    $dropdown.attr('class', $container.attr('class'));\n\n    $dropdown[0].classList.remove('select2');\n    $dropdown[0].classList.add('select2-container--open');\n\n    $dropdown.css({\n      position: 'absolute',\n      top: -999999\n    });\n\n    this.$container = $container;\n  };\n\n  AttachBody.prototype.render = function (decorated) {\n    var $container = $('<span></span>');\n\n    var $dropdown = decorated.call(this);\n    $container.append($dropdown);\n\n    this.$dropdownContainer = $container;\n\n    return $container;\n  };\n\n  AttachBody.prototype._hideDropdown = function (decorated) {\n    this.$dropdownContainer.detach();\n  };\n\n  AttachBody.prototype._bindContainerResultHandlers =\n      function (decorated, container) {\n\n    // These should only be bound once\n    if (this._containerResultsHandlersBound) {\n      return;\n    }\n\n    var self = this;\n\n    container.on('results:all', function () {\n      self._positionDropdown();\n      self._resizeDropdown();\n    });\n\n    container.on('results:append', function () {\n      self._positionDropdown();\n      self._resizeDropdown();\n    });\n\n    container.on('results:message', function () {\n      self._positionDropdown();\n      self._resizeDropdown();\n    });\n\n    container.on('select', function () {\n      self._positionDropdown();\n      self._resizeDropdown();\n    });\n\n    container.on('unselect', function () {\n      self._positionDropdown();\n      self._resizeDropdown();\n    });\n\n    this._containerResultsHandlersBound = true;\n  };\n\n  AttachBody.prototype._attachPositioningHandler =\n      function (decorated, container) {\n    var self = this;\n\n    var scrollEvent = 'scroll.select2.' + container.id;\n    var resizeEvent = 'resize.select2.' + container.id;\n    var orientationEvent = 'orientationchange.select2.' + container.id;\n\n    var $watchers = this.$container.parents().filter(Utils.hasScroll);\n    $watchers.each(function () {\n      Utils.StoreData(this, 'select2-scroll-position', {\n        x: $(this).scrollLeft(),\n        y: $(this).scrollTop()\n      });\n    });\n\n    $watchers.on(scrollEvent, function (ev) {\n      var position = Utils.GetData(this, 'select2-scroll-position');\n      $(this).scrollTop(position.y);\n    });\n\n    $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,\n      function (e) {\n      self._positionDropdown();\n      self._resizeDropdown();\n    });\n  };\n\n  AttachBody.prototype._detachPositioningHandler =\n      function (decorated, container) {\n    var scrollEvent = 'scroll.select2.' + container.id;\n    var resizeEvent = 'resize.select2.' + container.id;\n    var orientationEvent = 'orientationchange.select2.' + container.id;\n\n    var $watchers = this.$container.parents().filter(Utils.hasScroll);\n    $watchers.off(scrollEvent);\n\n    $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\n  };\n\n  AttachBody.prototype._positionDropdown = function () {\n    var $window = $(window);\n\n    var isCurrentlyAbove = this.$dropdown[0].classList\n      .contains('select2-dropdown--above');\n    var isCurrentlyBelow = this.$dropdown[0].classList\n      .contains('select2-dropdown--below');\n\n    var newDirection = null;\n\n    var offset = this.$container.offset();\n\n    offset.bottom = offset.top + this.$container.outerHeight(false);\n\n    var container = {\n      height: this.$container.outerHeight(false)\n    };\n\n    container.top = offset.top;\n    container.bottom = offset.top + container.height;\n\n    var dropdown = {\n      height: this.$dropdown.outerHeight(false)\n    };\n\n    var viewport = {\n      top: $window.scrollTop(),\n      bottom: $window.scrollTop() + $window.height()\n    };\n\n    var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);\n    var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);\n\n    var css = {\n      left: offset.left,\n      top: container.bottom\n    };\n\n    // Determine what the parent element is to use for calculating the offset\n    var $offsetParent = this.$dropdownParent;\n\n    // For statically positioned elements, we need to get the element\n    // that is determining the offset\n    if ($offsetParent.css('position') === 'static') {\n      $offsetParent = $offsetParent.offsetParent();\n    }\n\n    var parentOffset = {\n      top: 0,\n      left: 0\n    };\n\n    if (\n      $.contains(document.body, $offsetParent[0]) ||\n      $offsetParent[0].isConnected\n      ) {\n      parentOffset = $offsetParent.offset();\n    }\n\n    css.top -= parentOffset.top;\n    css.left -= parentOffset.left;\n\n    if (!isCurrentlyAbove && !isCurrentlyBelow) {\n      newDirection = 'below';\n    }\n\n    if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\n      newDirection = 'above';\n    } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\n      newDirection = 'below';\n    }\n\n    if (newDirection == 'above' ||\n      (isCurrentlyAbove && newDirection !== 'below')) {\n      css.top = container.top - parentOffset.top - dropdown.height;\n    }\n\n    if (newDirection != null) {\n      this.$dropdown[0].classList.remove('select2-dropdown--below');\n      this.$dropdown[0].classList.remove('select2-dropdown--above');\n      this.$dropdown[0].classList.add('select2-dropdown--' + newDirection);\n\n      this.$container[0].classList.remove('select2-container--below');\n      this.$container[0].classList.remove('select2-container--above');\n      this.$container[0].classList.add('select2-container--' + newDirection);\n    }\n\n    this.$dropdownContainer.css(css);\n  };\n\n  AttachBody.prototype._resizeDropdown = function () {\n    var css = {\n      width: this.$container.outerWidth(false) + 'px'\n    };\n\n    if (this.options.get('dropdownAutoWidth')) {\n      css.minWidth = css.width;\n      css.position = 'relative';\n      css.width = 'auto';\n    }\n\n    this.$dropdown.css(css);\n  };\n\n  AttachBody.prototype._showDropdown = function (decorated) {\n    this.$dropdownContainer.appendTo(this.$dropdownParent);\n\n    this._positionDropdown();\n    this._resizeDropdown();\n  };\n\n  return AttachBody;\n});\n\nS2.define('select2/dropdown/minimumResultsForSearch',[\n\n], function () {\n  function countResults (data) {\n    var count = 0;\n\n    for (var d = 0; d < data.length; d++) {\n      var item = data[d];\n\n      if (item.children) {\n        count += countResults(item.children);\n      } else {\n        count++;\n      }\n    }\n\n    return count;\n  }\n\n  function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {\n    this.minimumResultsForSearch = options.get('minimumResultsForSearch');\n\n    if (this.minimumResultsForSearch < 0) {\n      this.minimumResultsForSearch = Infinity;\n    }\n\n    decorated.call(this, $element, options, dataAdapter);\n  }\n\n  MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\n    if (countResults(params.data.results) < this.minimumResultsForSearch) {\n      return false;\n    }\n\n    return decorated.call(this, params);\n  };\n\n  return MinimumResultsForSearch;\n});\n\nS2.define('select2/dropdown/selectOnClose',[\n  '../utils'\n], function (Utils) {\n  function SelectOnClose () { }\n\n  SelectOnClose.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    decorated.call(this, container, $container);\n\n    container.on('close', function (params) {\n      self._handleSelectOnClose(params);\n    });\n  };\n\n  SelectOnClose.prototype._handleSelectOnClose = function (_, params) {\n    if (params && params.originalSelect2Event != null) {\n      var event = params.originalSelect2Event;\n\n      // Don't select an item if the close event was triggered from a select or\n      // unselect event\n      if (event._type === 'select' || event._type === 'unselect') {\n        return;\n      }\n    }\n\n    var $highlightedResults = this.getHighlightedResults();\n\n    // Only select highlighted results\n    if ($highlightedResults.length < 1) {\n      return;\n    }\n\n    var data = Utils.GetData($highlightedResults[0], 'data');\n\n    // Don't re-select already selected resulte\n    if (\n      (data.element != null && data.element.selected) ||\n      (data.element == null && data.selected)\n    ) {\n      return;\n    }\n\n    this.trigger('select', {\n        data: data\n    });\n  };\n\n  return SelectOnClose;\n});\n\nS2.define('select2/dropdown/closeOnSelect',[\n\n], function () {\n  function CloseOnSelect () { }\n\n  CloseOnSelect.prototype.bind = function (decorated, container, $container) {\n    var self = this;\n\n    decorated.call(this, container, $container);\n\n    container.on('select', function (evt) {\n      self._selectTriggered(evt);\n    });\n\n    container.on('unselect', function (evt) {\n      self._selectTriggered(evt);\n    });\n  };\n\n  CloseOnSelect.prototype._selectTriggered = function (_, evt) {\n    var originalEvent = evt.originalEvent;\n\n    // Don't close if the control key is being held\n    if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {\n      return;\n    }\n\n    this.trigger('close', {\n      originalEvent: originalEvent,\n      originalSelect2Event: evt\n    });\n  };\n\n  return CloseOnSelect;\n});\n\nS2.define('select2/dropdown/dropdownCss',[\n  '../utils'\n], function (Utils) {\n  function DropdownCSS () { }\n\n  DropdownCSS.prototype.render = function (decorated) {\n    var $dropdown = decorated.call(this);\n\n    var dropdownCssClass = this.options.get('dropdownCssClass') || '';\n\n    if (dropdownCssClass.indexOf(':all:') !== -1) {\n      dropdownCssClass = dropdownCssClass.replace(':all:', '');\n\n      Utils.copyNonInternalCssClasses($dropdown[0], this.$element[0]);\n    }\n\n    $dropdown.addClass(dropdownCssClass);\n\n    return $dropdown;\n  };\n\n  return DropdownCSS;\n});\n\nS2.define('select2/dropdown/tagsSearchHighlight',[\n  '../utils'\n], function (Utils) {\n  function TagsSearchHighlight () { }\n\n  TagsSearchHighlight.prototype.highlightFirstItem = function (decorated) {\n    var $options = this.$results\n    .find(\n      '.select2-results__option--selectable' +\n      ':not(.select2-results__option--selected)'\n    );\n\n    if ($options.length > 0) {\n      var $firstOption = $options.first();\n      var data = Utils.GetData($firstOption[0], 'data');\n      var firstElement = data.element;\n\n      if (firstElement && firstElement.getAttribute) {\n        if (firstElement.getAttribute('data-select2-tag') === 'true') {\n          $firstOption.trigger('mouseenter');\n\n          return;\n        }\n      }\n    }\n\n    decorated.call(this);\n  };\n\n  return TagsSearchHighlight;\n});\n\nS2.define('select2/i18n/en',[],function () {\n  // English\n  return {\n    errorLoading: function () {\n      return 'The results could not be loaded.';\n    },\n    inputTooLong: function (args) {\n      var overChars = args.input.length - args.maximum;\n\n      var message = 'Please delete ' + overChars + ' character';\n\n      if (overChars != 1) {\n        message += 's';\n      }\n\n      return message;\n    },\n    inputTooShort: function (args) {\n      var remainingChars = args.minimum - args.input.length;\n\n      var message = 'Please enter ' + remainingChars + ' or more characters';\n\n      return message;\n    },\n    loadingMore: function () {\n      return 'Loading more results…';\n    },\n    maximumSelected: function (args) {\n      var message = 'You can only select ' + args.maximum + ' item';\n\n      if (args.maximum != 1) {\n        message += 's';\n      }\n\n      return message;\n    },\n    noResults: function () {\n      return 'No results found';\n    },\n    searching: function () {\n      return 'Searching…';\n    },\n    removeAllItems: function () {\n      return 'Remove all items';\n    },\n    removeItem: function () {\n      return 'Remove item';\n    },\n    search: function() {\n      return 'Search';\n    }\n  };\n});\n\nS2.define('select2/defaults',[\n  'jquery',\n\n  './results',\n\n  './selection/single',\n  './selection/multiple',\n  './selection/placeholder',\n  './selection/allowClear',\n  './selection/search',\n  './selection/selectionCss',\n  './selection/eventRelay',\n\n  './utils',\n  './translation',\n  './diacritics',\n\n  './data/select',\n  './data/array',\n  './data/ajax',\n  './data/tags',\n  './data/tokenizer',\n  './data/minimumInputLength',\n  './data/maximumInputLength',\n  './data/maximumSelectionLength',\n\n  './dropdown',\n  './dropdown/search',\n  './dropdown/hidePlaceholder',\n  './dropdown/infiniteScroll',\n  './dropdown/attachBody',\n  './dropdown/minimumResultsForSearch',\n  './dropdown/selectOnClose',\n  './dropdown/closeOnSelect',\n  './dropdown/dropdownCss',\n  './dropdown/tagsSearchHighlight',\n\n  './i18n/en'\n], function ($,\n\n             ResultsList,\n\n             SingleSelection, MultipleSelection, Placeholder, AllowClear,\n             SelectionSearch, SelectionCSS, EventRelay,\n\n             Utils, Translation, DIACRITICS,\n\n             SelectData, ArrayData, AjaxData, Tags, Tokenizer,\n             MinimumInputLength, MaximumInputLength, MaximumSelectionLength,\n\n             Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,\n             AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,\n             DropdownCSS, TagsSearchHighlight,\n\n             EnglishTranslation) {\n  function Defaults () {\n    this.reset();\n  }\n\n  Defaults.prototype.apply = function (options) {\n    options = $.extend(true, {}, this.defaults, options);\n\n    if (options.dataAdapter == null) {\n      if (options.ajax != null) {\n        options.dataAdapter = AjaxData;\n      } else if (options.data != null) {\n        options.dataAdapter = ArrayData;\n      } else {\n        options.dataAdapter = SelectData;\n      }\n\n      if (options.minimumInputLength > 0) {\n        options.dataAdapter = Utils.Decorate(\n          options.dataAdapter,\n          MinimumInputLength\n        );\n      }\n\n      if (options.maximumInputLength > 0) {\n        options.dataAdapter = Utils.Decorate(\n          options.dataAdapter,\n          MaximumInputLength\n        );\n      }\n\n      if (options.maximumSelectionLength > 0) {\n        options.dataAdapter = Utils.Decorate(\n          options.dataAdapter,\n          MaximumSelectionLength\n        );\n      }\n\n      if (options.tags) {\n        options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\n      }\n\n      if (options.tokenSeparators != null || options.tokenizer != null) {\n        options.dataAdapter = Utils.Decorate(\n          options.dataAdapter,\n          Tokenizer\n        );\n      }\n    }\n\n    if (options.resultsAdapter == null) {\n      options.resultsAdapter = ResultsList;\n\n      if (options.ajax != null) {\n        options.resultsAdapter = Utils.Decorate(\n          options.resultsAdapter,\n          InfiniteScroll\n        );\n      }\n\n      if (options.placeholder != null) {\n        options.resultsAdapter = Utils.Decorate(\n          options.resultsAdapter,\n          HidePlaceholder\n        );\n      }\n\n      if (options.selectOnClose) {\n        options.resultsAdapter = Utils.Decorate(\n          options.resultsAdapter,\n          SelectOnClose\n        );\n      }\n\n      if (options.tags) {\n        options.resultsAdapter = Utils.Decorate(\n          options.resultsAdapter,\n          TagsSearchHighlight\n        );\n      }\n    }\n\n    if (options.dropdownAdapter == null) {\n      if (options.multiple) {\n        options.dropdownAdapter = Dropdown;\n      } else {\n        var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\n\n        options.dropdownAdapter = SearchableDropdown;\n      }\n\n      if (options.minimumResultsForSearch !== 0) {\n        options.dropdownAdapter = Utils.Decorate(\n          options.dropdownAdapter,\n          MinimumResultsForSearch\n        );\n      }\n\n      if (options.closeOnSelect) {\n        options.dropdownAdapter = Utils.Decorate(\n          options.dropdownAdapter,\n          CloseOnSelect\n        );\n      }\n\n      if (options.dropdownCssClass != null) {\n        options.dropdownAdapter = Utils.Decorate(\n          options.dropdownAdapter,\n          DropdownCSS\n        );\n      }\n\n      options.dropdownAdapter = Utils.Decorate(\n        options.dropdownAdapter,\n        AttachBody\n      );\n    }\n\n    if (options.selectionAdapter == null) {\n      if (options.multiple) {\n        options.selectionAdapter = MultipleSelection;\n      } else {\n        options.selectionAdapter = SingleSelection;\n      }\n\n      // Add the placeholder mixin if a placeholder was specified\n      if (options.placeholder != null) {\n        options.selectionAdapter = Utils.Decorate(\n          options.selectionAdapter,\n          Placeholder\n        );\n      }\n\n      if (options.allowClear) {\n        options.selectionAdapter = Utils.Decorate(\n          options.selectionAdapter,\n          AllowClear\n        );\n      }\n\n      if (options.multiple) {\n        options.selectionAdapter = Utils.Decorate(\n          options.selectionAdapter,\n          SelectionSearch\n        );\n      }\n\n      if (options.selectionCssClass != null) {\n        options.selectionAdapter = Utils.Decorate(\n          options.selectionAdapter,\n          SelectionCSS\n        );\n      }\n\n      options.selectionAdapter = Utils.Decorate(\n        options.selectionAdapter,\n        EventRelay\n      );\n    }\n\n    // If the defaults were not previously applied from an element, it is\n    // possible for the language option to have not been resolved\n    options.language = this._resolveLanguage(options.language);\n\n    // Always fall back to English since it will always be complete\n    options.language.push('en');\n\n    var uniqueLanguages = [];\n\n    for (var l = 0; l < options.language.length; l++) {\n      var language = options.language[l];\n\n      if (uniqueLanguages.indexOf(language) === -1) {\n        uniqueLanguages.push(language);\n      }\n    }\n\n    options.language = uniqueLanguages;\n\n    options.translations = this._processTranslations(\n      options.language,\n      options.debug\n    );\n\n    return options;\n  };\n\n  Defaults.prototype.reset = function () {\n    function stripDiacritics (text) {\n      // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n      function match(a) {\n        return DIACRITICS[a] || a;\n      }\n\n      return text.replace(/[^\\u0000-\\u007E]/g, match);\n    }\n\n    function matcher (params, data) {\n      // Always return the object if there is nothing to compare\n      if (params.term == null || params.term.trim() === '') {\n        return data;\n      }\n\n      // Do a recursive check for options with children\n      if (data.children && data.children.length > 0) {\n        // Clone the data object if there are children\n        // This is required as we modify the object to remove any non-matches\n        var match = $.extend(true, {}, data);\n\n        // Check each child of the option\n        for (var c = data.children.length - 1; c >= 0; c--) {\n          var child = data.children[c];\n\n          var matches = matcher(params, child);\n\n          // If there wasn't a match, remove the object in the array\n          if (matches == null) {\n            match.children.splice(c, 1);\n          }\n        }\n\n        // If any children matched, return the new object\n        if (match.children.length > 0) {\n          return match;\n        }\n\n        // If there were no matching children, check just the plain object\n        return matcher(params, match);\n      }\n\n      var original = stripDiacritics(data.text).toUpperCase();\n      var term = stripDiacritics(params.term).toUpperCase();\n\n      // Check if the text contains the term\n      if (original.indexOf(term) > -1) {\n        return data;\n      }\n\n      // If it doesn't contain the term, don't return anything\n      return null;\n    }\n\n    this.defaults = {\n      amdLanguageBase: './i18n/',\n      autocomplete: 'off',\n      closeOnSelect: true,\n      debug: false,\n      dropdownAutoWidth: false,\n      escapeMarkup: Utils.escapeMarkup,\n      language: {},\n      matcher: matcher,\n      minimumInputLength: 0,\n      maximumInputLength: 0,\n      maximumSelectionLength: 0,\n      minimumResultsForSearch: 0,\n      selectOnClose: false,\n      scrollAfterSelect: false,\n      sorter: function (data) {\n        return data;\n      },\n      templateResult: function (result) {\n        return result.text;\n      },\n      templateSelection: function (selection) {\n        return selection.text;\n      },\n      theme: 'default',\n      width: 'resolve'\n    };\n  };\n\n  Defaults.prototype.applyFromElement = function (options, $element) {\n    var optionLanguage = options.language;\n    var defaultLanguage = this.defaults.language;\n    var elementLanguage = $element.prop('lang');\n    var parentLanguage = $element.closest('[lang]').prop('lang');\n\n    var languages = Array.prototype.concat.call(\n      this._resolveLanguage(elementLanguage),\n      this._resolveLanguage(optionLanguage),\n      this._resolveLanguage(defaultLanguage),\n      this._resolveLanguage(parentLanguage)\n    );\n\n    options.language = languages;\n\n    return options;\n  };\n\n  Defaults.prototype._resolveLanguage = function (language) {\n    if (!language) {\n      return [];\n    }\n\n    if ($.isEmptyObject(language)) {\n      return [];\n    }\n\n    if ($.isPlainObject(language)) {\n      return [language];\n    }\n\n    var languages;\n\n    if (!Array.isArray(language)) {\n      languages = [language];\n    } else {\n      languages = language;\n    }\n\n    var resolvedLanguages = [];\n\n    for (var l = 0; l < languages.length; l++) {\n      resolvedLanguages.push(languages[l]);\n\n      if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {\n        // Extract the region information if it is included\n        var languageParts = languages[l].split('-');\n        var baseLanguage = languageParts[0];\n\n        resolvedLanguages.push(baseLanguage);\n      }\n    }\n\n    return resolvedLanguages;\n  };\n\n  Defaults.prototype._processTranslations = function (languages, debug) {\n    var translations = new Translation();\n\n    for (var l = 0; l < languages.length; l++) {\n      var languageData = new Translation();\n\n      var language = languages[l];\n\n      if (typeof language === 'string') {\n        try {\n          // Try to load it with the original name\n          languageData = Translation.loadPath(language);\n        } catch (e) {\n          try {\n            // If we couldn't load it, check if it wasn't the full path\n            language = this.defaults.amdLanguageBase + language;\n            languageData = Translation.loadPath(language);\n          } catch (ex) {\n            // The translation could not be loaded at all. Sometimes this is\n            // because of a configuration problem, other times this can be\n            // because of how Select2 helps load all possible translation files\n            if (debug && window.console && console.warn) {\n              console.warn(\n                'Select2: The language file for \"' + language + '\" could ' +\n                'not be automatically loaded. A fallback will be used instead.'\n              );\n            }\n          }\n        }\n      } else if ($.isPlainObject(language)) {\n        languageData = new Translation(language);\n      } else {\n        languageData = language;\n      }\n\n      translations.extend(languageData);\n    }\n\n    return translations;\n  };\n\n  Defaults.prototype.set = function (key, value) {\n    var camelKey = $.camelCase(key);\n\n    var data = {};\n    data[camelKey] = value;\n\n    var convertedData = Utils._convertData(data);\n\n    $.extend(true, this.defaults, convertedData);\n  };\n\n  var defaults = new Defaults();\n\n  return defaults;\n});\n\nS2.define('select2/options',[\n  'jquery',\n  './defaults',\n  './utils'\n], function ($, Defaults, Utils) {\n  function Options (options, $element) {\n    this.options = options;\n\n    if ($element != null) {\n      this.fromElement($element);\n    }\n\n    if ($element != null) {\n      this.options = Defaults.applyFromElement(this.options, $element);\n    }\n\n    this.options = Defaults.apply(this.options);\n  }\n\n  Options.prototype.fromElement = function ($e) {\n    var excludedData = ['select2'];\n\n    if (this.options.multiple == null) {\n      this.options.multiple = $e.prop('multiple');\n    }\n\n    if (this.options.disabled == null) {\n      this.options.disabled = $e.prop('disabled');\n    }\n\n    if (this.options.autocomplete == null && $e.prop('autocomplete')) {\n      this.options.autocomplete = $e.prop('autocomplete');\n    }\n\n    if (this.options.dir == null) {\n      if ($e.prop('dir')) {\n        this.options.dir = $e.prop('dir');\n      } else if ($e.closest('[dir]').prop('dir')) {\n        this.options.dir = $e.closest('[dir]').prop('dir');\n      } else {\n        this.options.dir = 'ltr';\n      }\n    }\n\n    $e.prop('disabled', this.options.disabled);\n    $e.prop('multiple', this.options.multiple);\n\n    if (Utils.GetData($e[0], 'select2Tags')) {\n      if (this.options.debug && window.console && console.warn) {\n        console.warn(\n          'Select2: The `data-select2-tags` attribute has been changed to ' +\n          'use the `data-data` and `data-tags=\"true\"` attributes and will be ' +\n          'removed in future versions of Select2.'\n        );\n      }\n\n      Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));\n      Utils.StoreData($e[0], 'tags', true);\n    }\n\n    if (Utils.GetData($e[0], 'ajaxUrl')) {\n      if (this.options.debug && window.console && console.warn) {\n        console.warn(\n          'Select2: The `data-ajax-url` attribute has been changed to ' +\n          '`data-ajax--url` and support for the old attribute will be removed' +\n          ' in future versions of Select2.'\n        );\n      }\n\n      $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));\n      Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));\n    }\n\n    var dataset = {};\n\n    function upperCaseLetter(_, letter) {\n      return letter.toUpperCase();\n    }\n\n    // Pre-load all of the attributes which are prefixed with `data-`\n    for (var attr = 0; attr < $e[0].attributes.length; attr++) {\n      var attributeName = $e[0].attributes[attr].name;\n      var prefix = 'data-';\n\n      if (attributeName.substr(0, prefix.length) == prefix) {\n        // Get the contents of the attribute after `data-`\n        var dataName = attributeName.substring(prefix.length);\n\n        // Get the data contents from the consistent source\n        // This is more than likely the jQuery data helper\n        var dataValue = Utils.GetData($e[0], dataName);\n\n        // camelCase the attribute name to match the spec\n        var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);\n\n        // Store the data attribute contents into the dataset since\n        dataset[camelDataName] = dataValue;\n      }\n    }\n\n    // Prefer the element's `dataset` attribute if it exists\n    // jQuery 1.x does not correctly handle data attributes with multiple dashes\n    if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\n      dataset = $.extend(true, {}, $e[0].dataset, dataset);\n    }\n\n    // Prefer our internal data cache if it exists\n    var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);\n\n    data = Utils._convertData(data);\n\n    for (var key in data) {\n      if (excludedData.indexOf(key) > -1) {\n        continue;\n      }\n\n      if ($.isPlainObject(this.options[key])) {\n        $.extend(this.options[key], data[key]);\n      } else {\n        this.options[key] = data[key];\n      }\n    }\n\n    return this;\n  };\n\n  Options.prototype.get = function (key) {\n    return this.options[key];\n  };\n\n  Options.prototype.set = function (key, val) {\n    this.options[key] = val;\n  };\n\n  return Options;\n});\n\nS2.define('select2/core',[\n  'jquery',\n  './options',\n  './utils',\n  './keys'\n], function ($, Options, Utils, KEYS) {\n  var Select2 = function ($element, options) {\n    if (Utils.GetData($element[0], 'select2') != null) {\n      Utils.GetData($element[0], 'select2').destroy();\n    }\n\n    this.$element = $element;\n\n    this.id = this._generateId($element);\n\n    options = options || {};\n\n    this.options = new Options(options, $element);\n\n    Select2.__super__.constructor.call(this);\n\n    // Set up the tabindex\n\n    var tabindex = $element.attr('tabindex') || 0;\n    Utils.StoreData($element[0], 'old-tabindex', tabindex);\n    $element.attr('tabindex', '-1');\n\n    // Set up containers and adapters\n\n    var DataAdapter = this.options.get('dataAdapter');\n    this.dataAdapter = new DataAdapter($element, this.options);\n\n    var $container = this.render();\n\n    this._placeContainer($container);\n\n    var SelectionAdapter = this.options.get('selectionAdapter');\n    this.selection = new SelectionAdapter($element, this.options);\n    this.$selection = this.selection.render();\n\n    this.selection.position(this.$selection, $container);\n\n    var DropdownAdapter = this.options.get('dropdownAdapter');\n    this.dropdown = new DropdownAdapter($element, this.options);\n    this.$dropdown = this.dropdown.render();\n\n    this.dropdown.position(this.$dropdown, $container);\n\n    var ResultsAdapter = this.options.get('resultsAdapter');\n    this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\n    this.$results = this.results.render();\n\n    this.results.position(this.$results, this.$dropdown);\n\n    // Bind events\n\n    var self = this;\n\n    // Bind the container to all of the adapters\n    this._bindAdapters();\n\n    // Register any DOM event handlers\n    this._registerDomEvents();\n\n    // Register any internal event handlers\n    this._registerDataEvents();\n    this._registerSelectionEvents();\n    this._registerDropdownEvents();\n    this._registerResultsEvents();\n    this._registerEvents();\n\n    // Set the initial state\n    this.dataAdapter.current(function (initialData) {\n      self.trigger('selection:update', {\n        data: initialData\n      });\n    });\n\n    // Hide the original select\n    $element[0].classList.add('select2-hidden-accessible');\n    $element.attr('aria-hidden', 'true');\n\n    // Synchronize any monitored attributes\n    this._syncAttributes();\n\n    Utils.StoreData($element[0], 'select2', this);\n\n    // Ensure backwards compatibility with $element.data('select2').\n    $element.data('select2', this);\n  };\n\n  Utils.Extend(Select2, Utils.Observable);\n\n  Select2.prototype._generateId = function ($element) {\n    var id = '';\n\n    if ($element.attr('id') != null) {\n      id = $element.attr('id');\n    } else if ($element.attr('name') != null) {\n      id = $element.attr('name') + '-' + Utils.generateChars(2);\n    } else {\n      id = Utils.generateChars(4);\n    }\n\n    id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n    id = 'select2-' + id;\n\n    return id;\n  };\n\n  Select2.prototype._placeContainer = function ($container) {\n    $container.insertAfter(this.$element);\n\n    var width = this._resolveWidth(this.$element, this.options.get('width'));\n\n    if (width != null) {\n      $container.css('width', width);\n    }\n  };\n\n  Select2.prototype._resolveWidth = function ($element, method) {\n    var WIDTH = /^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\n\n    if (method == 'resolve') {\n      var styleWidth = this._resolveWidth($element, 'style');\n\n      if (styleWidth != null) {\n        return styleWidth;\n      }\n\n      return this._resolveWidth($element, 'element');\n    }\n\n    if (method == 'element') {\n      var elementWidth = $element.outerWidth(false);\n\n      if (elementWidth <= 0) {\n        return 'auto';\n      }\n\n      return elementWidth + 'px';\n    }\n\n    if (method == 'style') {\n      var style = $element.attr('style');\n\n      if (typeof(style) !== 'string') {\n        return null;\n      }\n\n      var attrs = style.split(';');\n\n      for (var i = 0, l = attrs.length; i < l; i = i + 1) {\n        var attr = attrs[i].replace(/\\s/g, '');\n        var matches = attr.match(WIDTH);\n\n        if (matches !== null && matches.length >= 1) {\n          return matches[1];\n        }\n      }\n\n      return null;\n    }\n\n    if (method == 'computedstyle') {\n      var computedStyle = window.getComputedStyle($element[0]);\n\n      return computedStyle.width;\n    }\n\n    return method;\n  };\n\n  Select2.prototype._bindAdapters = function () {\n    this.dataAdapter.bind(this, this.$container);\n    this.selection.bind(this, this.$container);\n\n    this.dropdown.bind(this, this.$container);\n    this.results.bind(this, this.$container);\n  };\n\n  Select2.prototype._registerDomEvents = function () {\n    var self = this;\n\n    this.$element.on('change.select2', function () {\n      self.dataAdapter.current(function (data) {\n        self.trigger('selection:update', {\n          data: data\n        });\n      });\n    });\n\n    this.$element.on('focus.select2', function (evt) {\n      self.trigger('focus', evt);\n    });\n\n    this._syncA = Utils.bind(this._syncAttributes, this);\n    this._syncS = Utils.bind(this._syncSubtree, this);\n\n    this._observer = new window.MutationObserver(function (mutations) {\n      self._syncA();\n      self._syncS(mutations);\n    });\n    this._observer.observe(this.$element[0], {\n      attributes: true,\n      childList: true,\n      subtree: false\n    });\n  };\n\n  Select2.prototype._registerDataEvents = function () {\n    var self = this;\n\n    this.dataAdapter.on('*', function (name, params) {\n      self.trigger(name, params);\n    });\n  };\n\n  Select2.prototype._registerSelectionEvents = function () {\n    var self = this;\n    var nonRelayEvents = ['toggle', 'focus'];\n\n    this.selection.on('toggle', function () {\n      self.toggleDropdown();\n    });\n\n    this.selection.on('focus', function (params) {\n      self.focus(params);\n    });\n\n    this.selection.on('*', function (name, params) {\n      if (nonRelayEvents.indexOf(name) !== -1) {\n        return;\n      }\n\n      self.trigger(name, params);\n    });\n  };\n\n  Select2.prototype._registerDropdownEvents = function () {\n    var self = this;\n\n    this.dropdown.on('*', function (name, params) {\n      self.trigger(name, params);\n    });\n  };\n\n  Select2.prototype._registerResultsEvents = function () {\n    var self = this;\n\n    this.results.on('*', function (name, params) {\n      self.trigger(name, params);\n    });\n  };\n\n  Select2.prototype._registerEvents = function () {\n    var self = this;\n\n    this.on('open', function () {\n      self.$container[0].classList.add('select2-container--open');\n    });\n\n    this.on('close', function () {\n      self.$container[0].classList.remove('select2-container--open');\n    });\n\n    this.on('enable', function () {\n      self.$container[0].classList.remove('select2-container--disabled');\n    });\n\n    this.on('disable', function () {\n      self.$container[0].classList.add('select2-container--disabled');\n    });\n\n    this.on('blur', function () {\n      self.$container[0].classList.remove('select2-container--focus');\n    });\n\n    this.on('query', function (params) {\n      if (!self.isOpen()) {\n        self.trigger('open', {});\n      }\n\n      this.dataAdapter.query(params, function (data) {\n        self.trigger('results:all', {\n          data: data,\n          query: params\n        });\n      });\n    });\n\n    this.on('query:append', function (params) {\n      this.dataAdapter.query(params, function (data) {\n        self.trigger('results:append', {\n          data: data,\n          query: params\n        });\n      });\n    });\n\n    this.on('keypress', function (evt) {\n      var key = evt.which;\n\n      if (self.isOpen()) {\n        if (key === KEYS.ESC || (key === KEYS.UP && evt.altKey)) {\n          self.close(evt);\n\n          evt.preventDefault();\n        } else if (key === KEYS.ENTER || key === KEYS.TAB) {\n          self.trigger('results:select', {});\n\n          evt.preventDefault();\n        } else if ((key === KEYS.SPACE && evt.ctrlKey)) {\n          self.trigger('results:toggle', {});\n\n          evt.preventDefault();\n        } else if (key === KEYS.UP) {\n          self.trigger('results:previous', {});\n\n          evt.preventDefault();\n        } else if (key === KEYS.DOWN) {\n          self.trigger('results:next', {});\n\n          evt.preventDefault();\n        }\n      } else {\n        if (key === KEYS.ENTER || key === KEYS.SPACE ||\n            (key === KEYS.DOWN && evt.altKey)) {\n          self.open();\n\n          evt.preventDefault();\n        }\n      }\n    });\n  };\n\n  Select2.prototype._syncAttributes = function () {\n    this.options.set('disabled', this.$element.prop('disabled'));\n\n    if (this.isDisabled()) {\n      if (this.isOpen()) {\n        this.close();\n      }\n\n      this.trigger('disable', {});\n    } else {\n      this.trigger('enable', {});\n    }\n  };\n\n  Select2.prototype._isChangeMutation = function (mutations) {\n    var self = this;\n\n    if (mutations.addedNodes && mutations.addedNodes.length > 0) {\n      for (var n = 0; n < mutations.addedNodes.length; n++) {\n        var node = mutations.addedNodes[n];\n\n        if (node.selected) {\n          return true;\n        }\n      }\n    } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {\n      return true;\n    } else if (Array.isArray(mutations)) {\n      return mutations.some(function (mutation) {\n        return self._isChangeMutation(mutation);\n      });\n    }\n\n    return false;\n  };\n\n  Select2.prototype._syncSubtree = function (mutations) {\n    var changed = this._isChangeMutation(mutations);\n    var self = this;\n\n    // Only re-pull the data if we think there is a change\n    if (changed) {\n      this.dataAdapter.current(function (currentData) {\n        self.trigger('selection:update', {\n          data: currentData\n        });\n      });\n    }\n  };\n\n  /**\n   * Override the trigger method to automatically trigger pre-events when\n   * there are events that can be prevented.\n   */\n  Select2.prototype.trigger = function (name, args) {\n    var actualTrigger = Select2.__super__.trigger;\n    var preTriggerMap = {\n      'open': 'opening',\n      'close': 'closing',\n      'select': 'selecting',\n      'unselect': 'unselecting',\n      'clear': 'clearing'\n    };\n\n    if (args === undefined) {\n      args = {};\n    }\n\n    if (name in preTriggerMap) {\n      var preTriggerName = preTriggerMap[name];\n      var preTriggerArgs = {\n        prevented: false,\n        name: name,\n        args: args\n      };\n\n      actualTrigger.call(this, preTriggerName, preTriggerArgs);\n\n      if (preTriggerArgs.prevented) {\n        args.prevented = true;\n\n        return;\n      }\n    }\n\n    actualTrigger.call(this, name, args);\n  };\n\n  Select2.prototype.toggleDropdown = function () {\n    if (this.isDisabled()) {\n      return;\n    }\n\n    if (this.isOpen()) {\n      this.close();\n    } else {\n      this.open();\n    }\n  };\n\n  Select2.prototype.open = function () {\n    if (this.isOpen()) {\n      return;\n    }\n\n    if (this.isDisabled()) {\n      return;\n    }\n\n    this.trigger('query', {});\n  };\n\n  Select2.prototype.close = function (evt) {\n    if (!this.isOpen()) {\n      return;\n    }\n\n    this.trigger('close', { originalEvent : evt });\n  };\n\n  /**\n   * Helper method to abstract the \"enabled\" (not \"disabled\") state of this\n   * object.\n   *\n   * @return {true} if the instance is not disabled.\n   * @return {false} if the instance is disabled.\n   */\n  Select2.prototype.isEnabled = function () {\n    return !this.isDisabled();\n  };\n\n  /**\n   * Helper method to abstract the \"disabled\" state of this object.\n   *\n   * @return {true} if the disabled option is true.\n   * @return {false} if the disabled option is false.\n   */\n  Select2.prototype.isDisabled = function () {\n    return this.options.get('disabled');\n  };\n\n  Select2.prototype.isOpen = function () {\n    return this.$container[0].classList.contains('select2-container--open');\n  };\n\n  Select2.prototype.hasFocus = function () {\n    return this.$container[0].classList.contains('select2-container--focus');\n  };\n\n  Select2.prototype.focus = function (data) {\n    // No need to re-trigger focus events if we are already focused\n    if (this.hasFocus()) {\n      return;\n    }\n\n    this.$container[0].classList.add('select2-container--focus');\n    this.trigger('focus', {});\n  };\n\n  Select2.prototype.enable = function (args) {\n    if (this.options.get('debug') && window.console && console.warn) {\n      console.warn(\n        'Select2: The `select2(\"enable\")` method has been deprecated and will' +\n        ' be removed in later Select2 versions. Use $element.prop(\"disabled\")' +\n        ' instead.'\n      );\n    }\n\n    if (args == null || args.length === 0) {\n      args = [true];\n    }\n\n    var disabled = !args[0];\n\n    this.$element.prop('disabled', disabled);\n  };\n\n  Select2.prototype.data = function () {\n    if (this.options.get('debug') &&\n        arguments.length > 0 && window.console && console.warn) {\n      console.warn(\n        'Select2: Data can no longer be set using `select2(\"data\")`. You ' +\n        'should consider setting the value instead using `$element.val()`.'\n      );\n    }\n\n    var data = [];\n\n    this.dataAdapter.current(function (currentData) {\n      data = currentData;\n    });\n\n    return data;\n  };\n\n  Select2.prototype.val = function (args) {\n    if (this.options.get('debug') && window.console && console.warn) {\n      console.warn(\n        'Select2: The `select2(\"val\")` method has been deprecated and will be' +\n        ' removed in later Select2 versions. Use $element.val() instead.'\n      );\n    }\n\n    if (args == null || args.length === 0) {\n      return this.$element.val();\n    }\n\n    var newVal = args[0];\n\n    if (Array.isArray(newVal)) {\n      newVal = newVal.map(function (obj) {\n        return obj.toString();\n      });\n    }\n\n    this.$element.val(newVal).trigger('input').trigger('change');\n  };\n\n  Select2.prototype.destroy = function () {\n    Utils.RemoveData(this.$container[0]);\n    this.$container.remove();\n\n    this._observer.disconnect();\n    this._observer = null;\n\n    this._syncA = null;\n    this._syncS = null;\n\n    this.$element.off('.select2');\n    this.$element.attr('tabindex',\n    Utils.GetData(this.$element[0], 'old-tabindex'));\n\n    this.$element[0].classList.remove('select2-hidden-accessible');\n    this.$element.attr('aria-hidden', 'false');\n    Utils.RemoveData(this.$element[0]);\n    this.$element.removeData('select2');\n\n    this.dataAdapter.destroy();\n    this.selection.destroy();\n    this.dropdown.destroy();\n    this.results.destroy();\n\n    this.dataAdapter = null;\n    this.selection = null;\n    this.dropdown = null;\n    this.results = null;\n  };\n\n  Select2.prototype.render = function () {\n    var $container = $(\n      '<span class=\"select2 select2-container\">' +\n        '<span class=\"selection\"></span>' +\n        '<span class=\"dropdown-wrapper\" aria-hidden=\"true\"></span>' +\n      '</span>'\n    );\n\n    $container.attr('dir', this.options.get('dir'));\n\n    this.$container = $container;\n\n    this.$container[0].classList\n      .add('select2-container--' + this.options.get('theme'));\n\n    Utils.StoreData($container[0], 'element', this.$element);\n\n    return $container;\n  };\n\n  return Select2;\n});\n\nS2.define('jquery-mousewheel',[\n  'jquery'\n], function ($) {\n  // Used to shim jQuery.mousewheel for non-full builds.\n  return $;\n});\n\nS2.define('jquery.select2',[\n  'jquery',\n  'jquery-mousewheel',\n\n  './select2/core',\n  './select2/defaults',\n  './select2/utils'\n], function ($, _, Select2, Defaults, Utils) {\n  if ($.fn.select2 == null) {\n    // All methods that should return the element\n    var thisMethods = ['open', 'close', 'destroy'];\n\n    $.fn.select2 = function (options) {\n      options = options || {};\n\n      if (typeof options === 'object') {\n        this.each(function () {\n          var instanceOptions = $.extend(true, {}, options);\n\n          var instance = new Select2($(this), instanceOptions);\n        });\n\n        return this;\n      } else if (typeof options === 'string') {\n        var ret;\n        var args = Array.prototype.slice.call(arguments, 1);\n\n        this.each(function () {\n          var instance = Utils.GetData(this, 'select2');\n\n          if (instance == null && window.console && console.error) {\n            console.error(\n              'The select2(\\'' + options + '\\') method was called on an ' +\n              'element that is not using Select2.'\n            );\n          }\n\n          ret = instance[options].apply(instance, args);\n        });\n\n        // Check if we should be returning `this`\n        if (thisMethods.indexOf(options) > -1) {\n          return this;\n        }\n\n        return ret;\n      } else {\n        throw new Error('Invalid arguments for Select2: ' + options);\n      }\n    };\n  }\n\n  if ($.fn.select2.defaults == null) {\n    $.fn.select2.defaults = Defaults;\n  }\n\n  return Select2;\n});\n\n  // Return the AMD loader configuration so it can be used outside of this file\n  return {\n    define: S2.define,\n    require: S2.require\n  };\n}());\n\n  // Autoload the jQuery bindings\n  // We know that all of the modules exist above this, so we're safe\n  var select2 = S2.require('jquery.select2');\n\n  // Hold the AMD module references on the jQuery function that was just loaded\n  // This allows Select2 to use the internal loader outside of this file, such\n  // as in the language files.\n  jQuery.fn.select2.amd = S2;\n\n  // Return the Select2 instance for anyone who is importing it.\n  return select2;\n}));\n","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsStrictRegex =\n            /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsShortStrictRegex =\n            /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n        monthsRegex =\n            /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n        monthsParse = [\n            /^janv/i,\n            /^févr/i,\n            /^mars/i,\n            /^avr/i,\n            /^mai/i,\n            /^juin/i,\n            /^juil/i,\n            /^août/i,\n            /^sept/i,\n            /^oct/i,\n            /^nov/i,\n            /^déc/i,\n        ];\n\n    var fr = moment.defineLocale('fr', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: monthsStrictRegex,\n        monthsShortStrictRegex: monthsShortStrictRegex,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            w: 'une semaine',\n            ww: '%d semaines',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // TODO: Return 'e' when day of month > 1. Move this case inside\n                // block for masculine words below.\n                // See https://github.com/moment/moment/issues/3375\n                case 'D':\n                    return number + (number === 1 ? 'er' : '');\n\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: '-inci',\n        5: '-inci',\n        8: '-inci',\n        70: '-inci',\n        80: '-inci',\n        2: '-nci',\n        7: '-nci',\n        20: '-nci',\n        50: '-nci',\n        3: '-üncü',\n        4: '-üncü',\n        100: '-üncü',\n        6: '-ncı',\n        9: '-uncu',\n        10: '-uncu',\n        30: '-uncu',\n        60: '-ıncı',\n        90: '-ıncı',\n    };\n\n    var az = moment.defineLocale('az', {\n        months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n        weekdays:\n            'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n                '_'\n            ),\n        weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n        weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün saat] LT',\n            nextDay: '[sabah saat] LT',\n            nextWeek: '[gələn həftə] dddd [saat] LT',\n            lastDay: '[dünən] LT',\n            lastWeek: '[keçən həftə] dddd [saat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s sonra',\n            past: '%s əvvəl',\n            s: 'bir neçə saniyə',\n            ss: '%d saniyə',\n            m: 'bir dəqiqə',\n            mm: '%d dəqiqə',\n            h: 'bir saat',\n            hh: '%d saat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir ay',\n            MM: '%d ay',\n            y: 'bir il',\n            yy: '%d il',\n        },\n        meridiemParse: /gecə|səhər|gündüz|axşam/,\n        isPM: function (input) {\n            return /^(gündüz|axşam)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'gecə';\n            } else if (hour < 12) {\n                return 'səhər';\n            } else if (hour < 17) {\n                return 'gündüz';\n            } else {\n                return 'axşam';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n        ordinal: function (number) {\n            if (number === 0) {\n                // special case for zero\n                return number + '-ıncı';\n            }\n            var a = number % 10,\n                b = (number % 100) - a,\n                c = number >= 100 ? 100 : null;\n            return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return az;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIl = moment.defineLocale('en-il', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n    });\n\n    return enIl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekunda', 'sekunde', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            d: ['jedan dan', 'jednog dana'],\n            dd: ['dan', 'dana', 'dana'],\n            M: ['jedan mesec', 'jednog meseca'],\n            MM: ['mesec', 'meseca', 'meseci'],\n            y: ['jednu godinu', 'jedne godine'],\n            yy: ['godinu', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            if (\n                number % 10 >= 1 &&\n                number % 10 <= 4 &&\n                (number % 100 < 10 || number % 100 >= 20)\n            ) {\n                return number % 10 === 1 ? wordKey[0] : wordKey[1];\n            }\n            return wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key, isFuture) {\n            var wordKey = translator.words[key],\n                word;\n\n            if (key.length === 1) {\n                // Nominativ\n                if (key === 'y' && withoutSuffix) return 'jedna godina';\n                return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n            }\n\n            word = translator.correctGrammaticalCase(number, wordKey);\n            // Nominativ\n            if (key === 'yy' && withoutSuffix && word === 'godinu') {\n                return number + ' godina';\n            }\n\n            return number + ' ' + word;\n        },\n    };\n\n    var sr = moment.defineLocale('sr', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D. M. YYYY.',\n            LL: 'D. MMMM YYYY.',\n            LLL: 'D. MMMM YYYY. H:mm',\n            LLLL: 'dddd, D. MMMM YYYY. H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedelju] [u] LT';\n                    case 3:\n                        return '[u] [sredu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedelje] [u] LT',\n                    '[prošlog] [ponedeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pre %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: translator.translate,\n            dd: translator.translate,\n            M: translator.translate,\n            MM: translator.translate,\n            y: translator.translate,\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sr;\n\n})));\n","var conventions = require(\"./conventions\");\nvar dom = require('./dom')\nvar entities = require('./entities');\nvar sax = require('./sax');\n\nvar DOMImplementation = dom.DOMImplementation;\n\nvar NAMESPACE = conventions.NAMESPACE;\n\nvar ParseError = sax.ParseError;\nvar XMLReader = sax.XMLReader;\n\n/**\n * Normalizes line ending according to https://www.w3.org/TR/xml11/#sec-line-ends:\n *\n * > XML parsed entities are often stored in computer files which,\n * > for editing convenience, are organized into lines.\n * > These lines are typically separated by some combination\n * > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).\n * >\n * > To simplify the tasks of applications, the XML processor must behave\n * > as if it normalized all line breaks in external parsed entities (including the document entity)\n * > on input, before parsing, by translating all of the following to a single #xA character:\n * >\n * > 1. the two-character sequence #xD #xA\n * > 2. the two-character sequence #xD #x85\n * > 3. the single character #x85\n * > 4. the single character #x2028\n * > 5. any #xD character that is not immediately followed by #xA or #x85.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizeLineEndings(input) {\n\treturn input\n\t\t.replace(/\\r[\\n\\u0085]/g, '\\n')\n\t\t.replace(/[\\r\\u0085\\u2028]/g, '\\n')\n}\n\n/**\n * @typedef Locator\n * @property {number} [columnNumber]\n * @property {number} [lineNumber]\n */\n\n/**\n * @typedef DOMParserOptions\n * @property {DOMHandler} [domBuilder]\n * @property {Function} [errorHandler]\n * @property {(string) => string} [normalizeLineEndings] used to replace line endings before parsing\n * \t\t\t\t\t\tdefaults to `normalizeLineEndings`\n * @property {Locator} [locator]\n * @property {Record<string, string>} [xmlns]\n *\n * @see normalizeLineEndings\n */\n\n/**\n * The DOMParser interface provides the ability to parse XML or HTML source code\n * from a string into a DOM `Document`.\n *\n * _xmldom is different from the spec in that it allows an `options` parameter,\n * to override the default behavior._\n *\n * @param {DOMParserOptions} [options]\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization\n */\nfunction DOMParser(options){\n\tthis.options = options ||{locator:{}};\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax =  new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n  \tvar entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES;\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap[''] = NAMESPACE.HTML;\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;\n\tvar normalize = options.normalizeLineEndings || normalizeLineEndings;\n\tif (source && typeof source === 'string') {\n\t\tsax.parse(\n\t\t\tnormalize(source),\n\t\t\tdefaultNSMap,\n\t\t\tentityMap\n\t\t)\n\t} else {\n\t\tsax.errorHandler.error('invalid doc source')\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler\n *\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n    this.cdata = false;\n}\nfunction position(locator,node){\n\tnode.lineNumber = locator.lineNumber;\n\tnode.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */\nDOMHandler.prototype = {\n\tstartDocument : function() {\n    \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n    \tif (this.locator) {\n        \tthis.doc.documentURI = this.locator.systemId;\n    \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t    var el = doc.createElementNS(namespaceURI, qName||localName);\n\t    var len = attrs.length;\n\t    appendElement(this, el);\n\t    this.currentElement = el;\n\n\t\tthis.locator && position(this.locator,el)\n\t    for (var i = 0 ; i < len; i++) {\n\t        var namespaceURI = attrs.getURI(i);\n\t        var value = attrs.getValue(i);\n\t        var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t    }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t    var ins = this.doc.createProcessingInstruction(target, data);\n\t    this.locator && position(this.locator,ins)\n\t    appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t    if(this.locator = locator){// && !('lineNumber' in locator)){\n\t    \tlocator.lineNumber = 0;\n\t    }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t    var comm = this.doc.createComment(chars);\n\t    this.locator && position(this.locator,comm)\n\t    appendElement(this, comm);\n\t},\n\n\tstartCDATA:function() {\n\t    //used in characters() methods\n\t    this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t    this.cdata = false;\n\t},\n\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t    if (impl && impl.createDocumentType) {\n\t        var dt = impl.createDocumentType(name, publicId, systemId);\n\t        this.locator && position(this.locator,dt)\n\t        appendElement(this, dt);\n\t\t\t\t\tthis.doc.doctype = dt;\n\t    }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tthrow new ParseError(error, this.locator);\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n *  #comment(chars, start, length)\n *  #startCDATA()\n *  #endCDATA()\n *  #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n *  #endDTD()\n *  #startEntity(name)\n *  #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n *  #elementDecl(name, model)\n *  #externalEntityDecl(name, publicId, systemId)\n *  #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n *  #resolveEntity(String name,String publicId,String baseURI,String systemId)\n *  #resolveEntity(publicId, systemId)\n *  #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n *  #notationDecl(name, publicId, systemId) {};\n *  #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(key){\n\tDOMHandler.prototype[key] = function(){return null}\n})\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement (hander,node) {\n    if (!hander.currentElement) {\n        hander.doc.appendChild(node);\n    } else {\n        hander.currentElement.appendChild(node);\n    }\n}//appendChild and setAttributeNS are preformance key\n\nexports.__DOMHandler = DOMHandler;\nexports.normalizeLineEndings = normalizeLineEndings;\nexports.DOMParser = DOMParser;\n","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var units = {\n        ss: 'sekundė_sekundžių_sekundes',\n        m: 'minutė_minutės_minutę',\n        mm: 'minutės_minučių_minutes',\n        h: 'valanda_valandos_valandą',\n        hh: 'valandos_valandų_valandas',\n        d: 'diena_dienos_dieną',\n        dd: 'dienos_dienų_dienas',\n        M: 'mėnuo_mėnesio_mėnesį',\n        MM: 'mėnesiai_mėnesių_mėnesius',\n        y: 'metai_metų_metus',\n        yy: 'metai_metų_metus',\n    };\n    function translateSeconds(number, withoutSuffix, key, isFuture) {\n        if (withoutSuffix) {\n            return 'kelios sekundės';\n        } else {\n            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n        }\n    }\n    function translateSingular(number, withoutSuffix, key, isFuture) {\n        return withoutSuffix\n            ? forms(key)[0]\n            : isFuture\n              ? forms(key)[1]\n              : forms(key)[2];\n    }\n    function special(number) {\n        return number % 10 === 0 || (number > 10 && number < 20);\n    }\n    function forms(key) {\n        return units[key].split('_');\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        if (number === 1) {\n            return (\n                result + translateSingular(number, withoutSuffix, key[0], isFuture)\n            );\n        } else if (withoutSuffix) {\n            return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n        } else {\n            if (isFuture) {\n                return result + forms(key)[1];\n            } else {\n                return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n            }\n        }\n    }\n    var lt = moment.defineLocale('lt', {\n        months: {\n            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n                '_'\n            ),\n            standalone:\n                'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n                    '_'\n                ),\n            isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n        },\n        monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n        weekdays: {\n            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n                '_'\n            ),\n            standalone:\n                'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n                    '_'\n                ),\n            isFormat: /dddd HH:mm/,\n        },\n        weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n        weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY [m.] MMMM D [d.]',\n            LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n            l: 'YYYY-MM-DD',\n            ll: 'YYYY [m.] MMMM D [d.]',\n            lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n        },\n        calendar: {\n            sameDay: '[Šiandien] LT',\n            nextDay: '[Rytoj] LT',\n            nextWeek: 'dddd LT',\n            lastDay: '[Vakar] LT',\n            lastWeek: '[Praėjusį] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'po %s',\n            past: 'prieš %s',\n            s: translateSeconds,\n            ss: translate,\n            m: translateSingular,\n            mm: translate,\n            h: translateSingular,\n            hh: translate,\n            d: translateSingular,\n            dd: translate,\n            M: translateSingular,\n            MM: translate,\n            y: translateSingular,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n        ordinal: function (number) {\n            return number + '-oji';\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months =\n            'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n                '_'\n            ),\n        monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n    function plural(n) {\n        return n > 1 && n < 5;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekúnd');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minúty' : 'minút');\n                } else {\n                    return result + 'minútami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodín');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'deň' : 'dňom';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dni' : 'dní');\n                } else {\n                    return result + 'dňami';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'mesiace' : 'mesiacov');\n                } else {\n                    return result + 'mesiacmi';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokom';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'rokov');\n                } else {\n                    return result + 'rokmi';\n                }\n        }\n    }\n\n    var sk = moment.defineLocale('sk', {\n        months: months,\n        monthsShort: monthsShort,\n        weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n        weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n        weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[dnes o] LT',\n            nextDay: '[zajtra o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [o] LT';\n                    case 3:\n                        return '[v stredu o] LT';\n                    case 4:\n                        return '[vo štvrtok o] LT';\n                    case 5:\n                        return '[v piatok o] LT';\n                    case 6:\n                        return '[v sobotu o] LT';\n                }\n            },\n            lastDay: '[včera o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulú nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[minulý] dddd [o] LT';\n                    case 3:\n                        return '[minulú stredu o] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [o] LT';\n                    case 6:\n                        return '[minulú sobotu o] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'pred %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var th = moment.defineLocale('th', {\n        months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n            '_'\n        ),\n        monthsShort:\n            'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n        weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n        weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY เวลา H:mm',\n            LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n        },\n        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n        isPM: function (input) {\n            return input === 'หลังเที่ยง';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ก่อนเที่ยง';\n            } else {\n                return 'หลังเที่ยง';\n            }\n        },\n        calendar: {\n            sameDay: '[วันนี้ เวลา] LT',\n            nextDay: '[พรุ่งนี้ เวลา] LT',\n            nextWeek: 'dddd[หน้า เวลา] LT',\n            lastDay: '[เมื่อวานนี้ เวลา] LT',\n            lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'อีก %s',\n            past: '%sที่แล้ว',\n            s: 'ไม่กี่วินาที',\n            ss: '%d วินาที',\n            m: '1 นาที',\n            mm: '%d นาที',\n            h: '1 ชั่วโมง',\n            hh: '%d ชั่วโมง',\n            d: '1 วัน',\n            dd: '%d วัน',\n            w: '1 สัปดาห์',\n            ww: '%d สัปดาห์',\n            M: '1 เดือน',\n            MM: '%d เดือน',\n            y: '1 ปี',\n            yy: '%d ปี',\n        },\n    });\n\n    return th;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var lo = moment.defineLocale('lo', {\n        months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n                '_'\n            ),\n        weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n        isPM: function (input) {\n            return input === 'ຕອນແລງ';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ຕອນເຊົ້າ';\n            } else {\n                return 'ຕອນແລງ';\n            }\n        },\n        calendar: {\n            sameDay: '[ມື້ນີ້ເວລາ] LT',\n            nextDay: '[ມື້ອື່ນເວລາ] LT',\n            nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n            lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n            lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'ອີກ %s',\n            past: '%sຜ່ານມາ',\n            s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n            ss: '%d ວິນາທີ',\n            m: '1 ນາທີ',\n            mm: '%d ນາທີ',\n            h: '1 ຊົ່ວໂມງ',\n            hh: '%d ຊົ່ວໂມງ',\n            d: '1 ມື້',\n            dd: '%d ມື້',\n            M: '1 ເດືອນ',\n            MM: '%d ເດືອນ',\n            y: '1 ປີ',\n            yy: '%d ປີ',\n        },\n        dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n        ordinal: function (number) {\n            return 'ທີ່' + number;\n        },\n    });\n\n    return lo;\n\n})));\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n  \"\": true,\n  \"up\": true\n};\n\nfunction findScrollSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var scroll = scrollSetting[value.toLowerCase()];\n  return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n  return typeof value === \"number\" && (value >= 0 && value <= 100);\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n  var _width = 100;\n  var _lines = 3;\n  var _regionAnchorX = 0;\n  var _regionAnchorY = 100;\n  var _viewportAnchorX = 0;\n  var _viewportAnchorY = 100;\n  var _scroll = \"\";\n\n  Object.defineProperties(this, {\n    \"width\": {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"Width must be between 0 and 100.\");\n        }\n        _width = value;\n      }\n    },\n    \"lines\": {\n      enumerable: true,\n      get: function() {\n        return _lines;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"Lines must be set to a number.\");\n        }\n        _lines = value;\n      }\n    },\n    \"regionAnchorY\": {\n      enumerable: true,\n      get: function() {\n        return _regionAnchorY;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n        }\n        _regionAnchorY = value;\n      }\n    },\n    \"regionAnchorX\": {\n      enumerable: true,\n      get: function() {\n        return _regionAnchorX;\n      },\n      set: function(value) {\n        if(!isValidPercentValue(value)) {\n          throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n        }\n        _regionAnchorX = value;\n      }\n    },\n    \"viewportAnchorY\": {\n      enumerable: true,\n      get: function() {\n        return _viewportAnchorY;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n        }\n        _viewportAnchorY = value;\n      }\n    },\n    \"viewportAnchorX\": {\n      enumerable: true,\n      get: function() {\n        return _viewportAnchorX;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n        }\n        _viewportAnchorX = value;\n      }\n    },\n    \"scroll\": {\n      enumerable: true,\n      get: function() {\n        return _scroll;\n      },\n      set: function(value) {\n        var setting = findScrollSetting(value);\n        // Have to check for false as an empty string is a legal value.\n        if (setting === false) {\n          console.warn(\"Scroll: an invalid or illegal string was specified.\");\n        } else {\n          _scroll = setting;\n        }\n      }\n    }\n  });\n}\n\nmodule.exports = VTTRegion;\n","//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var fil = moment.defineLocale('fil', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fil;\n\n})));\n","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ss = moment.defineLocale('ss', {\n        months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n            '_'\n        ),\n        monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n        weekdays:\n            'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n                '_'\n            ),\n        weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n        weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Namuhla nga] LT',\n            nextDay: '[Kusasa nga] LT',\n            nextWeek: 'dddd [nga] LT',\n            lastDay: '[Itolo nga] LT',\n            lastWeek: 'dddd [leliphelile] [nga] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'nga %s',\n            past: 'wenteka nga %s',\n            s: 'emizuzwana lomcane',\n            ss: '%d mzuzwana',\n            m: 'umzuzu',\n            mm: '%d emizuzu',\n            h: 'lihora',\n            hh: '%d emahora',\n            d: 'lilanga',\n            dd: '%d emalanga',\n            M: 'inyanga',\n            MM: '%d tinyanga',\n            y: 'umnyaka',\n            yy: '%d iminyaka',\n        },\n        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'ekuseni';\n            } else if (hours < 15) {\n                return 'emini';\n            } else if (hours < 19) {\n                return 'entsambama';\n            } else {\n                return 'ebusuku';\n            }\n        },\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ekuseni') {\n                return hour;\n            } else if (meridiem === 'emini') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n                if (hour === 0) {\n                    return 0;\n                }\n                return hour + 12;\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: '%d',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ss;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var deAt = moment.defineLocale('de-at', {\n        months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return deAt;\n\n})));\n","\"use strict\";\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nvar InterceptorsStorage = /*#__PURE__*/function () {\n  function InterceptorsStorage() {\n    this.typeToInterceptorsMap_ = new Map();\n    this.enabled_ = false;\n  }\n\n  var _proto = InterceptorsStorage.prototype;\n\n  _proto.getIsEnabled = function getIsEnabled() {\n    return this.enabled_;\n  };\n\n  _proto.enable = function enable() {\n    this.enabled_ = true;\n  };\n\n  _proto.disable = function disable() {\n    this.enabled_ = false;\n  };\n\n  _proto.reset = function reset() {\n    this.typeToInterceptorsMap_ = new Map();\n    this.enabled_ = false;\n  };\n\n  _proto.addInterceptor = function addInterceptor(type, interceptor) {\n    if (!this.typeToInterceptorsMap_.has(type)) {\n      this.typeToInterceptorsMap_.set(type, new Set());\n    }\n\n    var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n\n    if (interceptorsSet.has(interceptor)) {\n      // already have this interceptor\n      return false;\n    }\n\n    interceptorsSet.add(interceptor);\n    return true;\n  };\n\n  _proto.removeInterceptor = function removeInterceptor(type, interceptor) {\n    var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n\n    if (interceptorsSet && interceptorsSet.has(interceptor)) {\n      interceptorsSet.delete(interceptor);\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.clearInterceptorsByType = function clearInterceptorsByType(type) {\n    var interceptorsSet = this.typeToInterceptorsMap_.get(type);\n\n    if (!interceptorsSet) {\n      return false;\n    }\n\n    this.typeToInterceptorsMap_.delete(type);\n    this.typeToInterceptorsMap_.set(type, new Set());\n    return true;\n  };\n\n  _proto.clear = function clear() {\n    if (!this.typeToInterceptorsMap_.size) {\n      return false;\n    }\n\n    this.typeToInterceptorsMap_ = new Map();\n    return true;\n  };\n\n  _proto.getForType = function getForType(type) {\n    return this.typeToInterceptorsMap_.get(type) || new Set();\n  };\n\n  _proto.execute = function execute(type, payload) {\n    var interceptors = this.getForType(type);\n\n    for (var _iterator = _createForOfIteratorHelperLoose(interceptors), _step; !(_step = _iterator()).done;) {\n      var interceptor = _step.value;\n\n      try {\n        payload = interceptor(payload);\n      } catch (e) {//ignore\n      }\n    }\n\n    return payload;\n  };\n\n  return InterceptorsStorage;\n}();\n\nmodule.exports = InterceptorsStorage;","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        };\n\n    function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n        var output = '';\n        if (withoutSuffix) {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंद';\n                    break;\n                case 'ss':\n                    output = '%d सेकंद';\n                    break;\n                case 'm':\n                    output = 'एक मिनिट';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटे';\n                    break;\n                case 'h':\n                    output = 'एक तास';\n                    break;\n                case 'hh':\n                    output = '%d तास';\n                    break;\n                case 'd':\n                    output = 'एक दिवस';\n                    break;\n                case 'dd':\n                    output = '%d दिवस';\n                    break;\n                case 'M':\n                    output = 'एक महिना';\n                    break;\n                case 'MM':\n                    output = '%d महिने';\n                    break;\n                case 'y':\n                    output = 'एक वर्ष';\n                    break;\n                case 'yy':\n                    output = '%d वर्षे';\n                    break;\n            }\n        } else {\n            switch (string) {\n                case 's':\n                    output = 'काही सेकंदां';\n                    break;\n                case 'ss':\n                    output = '%d सेकंदां';\n                    break;\n                case 'm':\n                    output = 'एका मिनिटा';\n                    break;\n                case 'mm':\n                    output = '%d मिनिटां';\n                    break;\n                case 'h':\n                    output = 'एका तासा';\n                    break;\n                case 'hh':\n                    output = '%d तासां';\n                    break;\n                case 'd':\n                    output = 'एका दिवसा';\n                    break;\n                case 'dd':\n                    output = '%d दिवसां';\n                    break;\n                case 'M':\n                    output = 'एका महिन्या';\n                    break;\n                case 'MM':\n                    output = '%d महिन्यां';\n                    break;\n                case 'y':\n                    output = 'एका वर्षा';\n                    break;\n                case 'yy':\n                    output = '%d वर्षां';\n                    break;\n            }\n        }\n        return output.replace(/%d/i, number);\n    }\n\n    var mr = moment.defineLocale('mr', {\n        months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n            '_'\n        ),\n        monthsShort:\n            'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm वाजता',\n            LTS: 'A h:mm:ss वाजता',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm वाजता',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n        },\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[उद्या] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[काल] LT',\n            lastWeek: '[मागील] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sमध्ये',\n            past: '%sपूर्वी',\n            s: relativeTimeMr,\n            ss: relativeTimeMr,\n            m: relativeTimeMr,\n            mm: relativeTimeMr,\n            h: relativeTimeMr,\n            hh: relativeTimeMr,\n            d: relativeTimeMr,\n            dd: relativeTimeMr,\n            M: relativeTimeMr,\n            MM: relativeTimeMr,\n            y: relativeTimeMr,\n            yy: relativeTimeMr,\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n                return hour;\n            } else if (\n                meridiem === 'दुपारी' ||\n                meridiem === 'सायंकाळी' ||\n                meridiem === 'रात्री'\n            ) {\n                return hour >= 12 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour >= 0 && hour < 6) {\n                return 'पहाटे';\n            } else if (hour < 12) {\n                return 'सकाळी';\n            } else if (hour < 17) {\n                return 'दुपारी';\n            } else if (hour < 20) {\n                return 'सायंकाळी';\n            } else {\n                return 'रात्री';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return mr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Kurdish [ku-kmr]\n//! authors : Mazlum Özdogan : https://github.com/mergehez\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(num, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['çend sanîye', 'çend sanîyeyan'],\n            ss: [num + ' sanîye', num + ' sanîyeyan'],\n            m: ['deqîqeyek', 'deqîqeyekê'],\n            mm: [num + ' deqîqe', num + ' deqîqeyan'],\n            h: ['saetek', 'saetekê'],\n            hh: [num + ' saet', num + ' saetan'],\n            d: ['rojek', 'rojekê'],\n            dd: [num + ' roj', num + ' rojan'],\n            w: ['hefteyek', 'hefteyekê'],\n            ww: [num + ' hefte', num + ' hefteyan'],\n            M: ['mehek', 'mehekê'],\n            MM: [num + ' meh', num + ' mehan'],\n            y: ['salek', 'salekê'],\n            yy: [num + ' sal', num + ' salan'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    // function obliqueNumSuffix(num) {\n    //     if(num.includes(':'))\n    //         num = parseInt(num.split(':')[0]);\n    //     else\n    //         num = parseInt(num);\n    //     return num == 0 || num % 10 == 1 ? 'ê'\n    //                         : (num > 10 && num % 10 == 0 ? 'î' : 'an');\n    // }\n    function ezafeNumSuffix(num) {\n        num = '' + num;\n        var l = num.substring(num.length - 1),\n            ll = num.length > 1 ? num.substring(num.length - 2) : '';\n        if (\n            !(ll == 12 || ll == 13) &&\n            (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')\n        )\n            return 'yê';\n        return 'ê';\n    }\n\n    var kuKmr = moment.defineLocale('ku-kmr', {\n        // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)\n        // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'\n        // But the names below are more well known and handy\n        months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(\n            '_'\n        ),\n        monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),\n        weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),\n        weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'bn' : 'BN';\n            } else {\n                return isLower ? 'pn' : 'PN';\n            }\n        },\n        meridiemParse: /bn|BN|pn|PN/,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM[a] YYYY[an]',\n            LLL: 'Do MMMM[a] YYYY[an] HH:mm',\n            LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',\n            ll: 'Do MMM[.] YYYY[an]',\n            lll: 'Do MMM[.] YYYY[an] HH:mm',\n            llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Îro di saet] LT [de]',\n            nextDay: '[Sibê di saet] LT [de]',\n            nextWeek: 'dddd [di saet] LT [de]',\n            lastDay: '[Duh di saet] LT [de]',\n            lastWeek: 'dddd[a borî di saet] LT [de]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'di %s de',\n            past: 'berî %s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(?:yê|ê|\\.)/,\n        ordinal: function (num, period) {\n            var p = period.toLowerCase();\n            if (p.includes('w') || p.includes('m')) return num + '.';\n\n            return num + ezafeNumSuffix(num);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return kuKmr;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enGb = moment.defineLocale('en-gb', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enGb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'ss':\n                if (number === 1) {\n                    result += 'sekunda';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sekunde';\n                } else {\n                    result += 'sekundi';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var hr = moment.defineLocale('hr', {\n        months: {\n            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n                '_'\n            ),\n            standalone:\n                'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'Do MMMM YYYY',\n            LLL: 'Do MMMM YYYY H:mm',\n            LLLL: 'dddd, Do MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[jučer u] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prošlu] [nedjelju] [u] LT';\n                    case 3:\n                        return '[prošlu] [srijedu] [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'par sekundi',\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: 'dan',\n            dd: translate,\n            M: 'mjesec',\n            MM: translate,\n            y: 'godinu',\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hr;\n\n})));\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = require('global/document');\n\nvar _objCreate = Object.create || (function() {\n  function F() {}\n  return function(o) {\n    if (arguments.length !== 1) {\n      throw new Error('Object.create shim only accepts one parameter.');\n    }\n    F.prototype = o;\n    return new F();\n  };\n})();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n  this.name = \"ParsingError\";\n  this.code = errorData.code;\n  this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n  BadSignature: {\n    code: 0,\n    message: \"Malformed WebVTT signature.\"\n  },\n  BadTimeStamp: {\n    code: 1,\n    message: \"Malformed time stamp.\"\n  }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n\n  function computeSeconds(h, m, s, f) {\n    return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n  }\n\n  var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n  if (!m) {\n    return null;\n  }\n\n  if (m[3]) {\n    // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n    return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n  } else if (m[1] > 59) {\n    // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n    // First position is hours as it's over 59.\n    return computeSeconds(m[1], m[2], 0,  m[4]);\n  } else {\n    // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n    return computeSeconds(0, m[1], m[2], m[4]);\n  }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n  this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n  // Only accept the first assignment to any key.\n  set: function(k, v) {\n    if (!this.get(k) && v !== \"\") {\n      this.values[k] = v;\n    }\n  },\n  // Return the value for a key, or a default value.\n  // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n  // a number of possible default values as properties where 'defaultKey' is\n  // the key of the property that will be chosen; otherwise it's assumed to be\n  // a single value.\n  get: function(k, dflt, defaultKey) {\n    if (defaultKey) {\n      return this.has(k) ? this.values[k] : dflt[defaultKey];\n    }\n    return this.has(k) ? this.values[k] : dflt;\n  },\n  // Check whether we have a value for a key.\n  has: function(k) {\n    return k in this.values;\n  },\n  // Accept a setting if its one of the given alternatives.\n  alt: function(k, v, a) {\n    for (var n = 0; n < a.length; ++n) {\n      if (v === a[n]) {\n        this.set(k, v);\n        break;\n      }\n    }\n  },\n  // Accept a setting if its a valid (signed) integer.\n  integer: function(k, v) {\n    if (/^-?\\d+$/.test(v)) { // integer\n      this.set(k, parseInt(v, 10));\n    }\n  },\n  // Accept a setting if its a valid percentage.\n  percent: function(k, v) {\n    var m;\n    if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n      v = parseFloat(v);\n      if (v >= 0 && v <= 100) {\n        this.set(k, v);\n        return true;\n      }\n    }\n    return false;\n  }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n  var groups = groupDelim ? input.split(groupDelim) : [input];\n  for (var i in groups) {\n    if (typeof groups[i] !== \"string\") {\n      continue;\n    }\n    var kv = groups[i].split(keyValueDelim);\n    if (kv.length !== 2) {\n      continue;\n    }\n    var k = kv[0].trim();\n    var v = kv[1].trim();\n    callback(k, v);\n  }\n}\n\nfunction parseCue(input, cue, regionList) {\n  // Remember the original input if we need to throw an error.\n  var oInput = input;\n  // 4.1 WebVTT timestamp\n  function consumeTimeStamp() {\n    var ts = parseTimeStamp(input);\n    if (ts === null) {\n      throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                            \"Malformed timestamp: \" + oInput);\n    }\n    // Remove time stamp from input.\n    input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n    return ts;\n  }\n\n  // 4.4.2 WebVTT cue settings\n  function consumeCueSettings(input, cue) {\n    var settings = new Settings();\n\n    parseOptions(input, function (k, v) {\n      switch (k) {\n      case \"region\":\n        // Find the last region we parsed with the same region id.\n        for (var i = regionList.length - 1; i >= 0; i--) {\n          if (regionList[i].id === v) {\n            settings.set(k, regionList[i].region);\n            break;\n          }\n        }\n        break;\n      case \"vertical\":\n        settings.alt(k, v, [\"rl\", \"lr\"]);\n        break;\n      case \"line\":\n        var vals = v.split(\",\"),\n            vals0 = vals[0];\n        settings.integer(k, vals0);\n        settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n        settings.alt(k, vals0, [\"auto\"]);\n        if (vals.length === 2) {\n          settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n        }\n        break;\n      case \"position\":\n        vals = v.split(\",\");\n        settings.percent(k, vals[0]);\n        if (vals.length === 2) {\n          settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n        }\n        break;\n      case \"size\":\n        settings.percent(k, v);\n        break;\n      case \"align\":\n        settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n        break;\n      }\n    }, /:/, /\\s/);\n\n    // Apply default values for any missing fields.\n    cue.region = settings.get(\"region\", null);\n    cue.vertical = settings.get(\"vertical\", \"\");\n    try {\n      cue.line = settings.get(\"line\", \"auto\");\n    } catch (e) {}\n    cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n    cue.snapToLines = settings.get(\"snapToLines\", true);\n    cue.size = settings.get(\"size\", 100);\n    // Safari still uses the old middle value and won't accept center\n    try {\n      cue.align = settings.get(\"align\", \"center\");\n    } catch (e) {\n      cue.align = settings.get(\"align\", \"middle\");\n    }\n    try {\n      cue.position = settings.get(\"position\", \"auto\");\n    } catch (e) {\n      cue.position = settings.get(\"position\", {\n        start: 0,\n        left: 0,\n        center: 50,\n        middle: 50,\n        end: 100,\n        right: 100\n      }, cue.align);\n    }\n\n\n    cue.positionAlign = settings.get(\"positionAlign\", {\n      start: \"start\",\n      left: \"start\",\n      center: \"center\",\n      middle: \"center\",\n      end: \"end\",\n      right: \"end\"\n    }, cue.align);\n  }\n\n  function skipWhitespace() {\n    input = input.replace(/^\\s+/, \"\");\n  }\n\n  // 4.1 WebVTT cue timings.\n  skipWhitespace();\n  cue.startTime = consumeTimeStamp();   // (1) collect cue start time\n  skipWhitespace();\n  if (input.substr(0, 3) !== \"-->\") {     // (3) next characters must match \"-->\"\n    throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                           \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n                           oInput);\n  }\n  input = input.substr(3);\n  skipWhitespace();\n  cue.endTime = consumeTimeStamp();     // (5) collect cue end time\n\n  // 4.1 WebVTT cue settings list.\n  skipWhitespace();\n  consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\n\nvar TAG_NAME = {\n  c: \"span\",\n  i: \"i\",\n  b: \"b\",\n  u: \"u\",\n  ruby: \"ruby\",\n  rt: \"rt\",\n  v: \"span\",\n  lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n  white: 'rgba(255,255,255,1)',\n  lime: 'rgba(0,255,0,1)',\n  cyan: 'rgba(0,255,255,1)',\n  red: 'rgba(255,0,0,1)',\n  yellow: 'rgba(255,255,0,1)',\n  magenta: 'rgba(255,0,255,1)',\n  blue: 'rgba(0,0,255,1)',\n  black: 'rgba(0,0,0,1)'\n};\n\nvar TAG_ANNOTATION = {\n  v: \"title\",\n  lang: \"lang\"\n};\n\nvar NEEDS_PARENT = {\n  rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n  function nextToken() {\n    // Check for end-of-string.\n    if (!input) {\n      return null;\n    }\n\n    // Consume 'n' characters from the input.\n    function consume(result) {\n      input = input.substr(result.length);\n      return result;\n    }\n\n    var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n    // If there is some text before the next tag, return it, otherwise return\n    // the tag.\n    return consume(m[1] ? m[1] : m[2]);\n  }\n\n  function unescape(s) {\n    TEXTAREA_ELEMENT.innerHTML = s;\n    s = TEXTAREA_ELEMENT.textContent;\n    TEXTAREA_ELEMENT.textContent = \"\";\n    return s;\n  }\n\n  function shouldAdd(current, element) {\n    return !NEEDS_PARENT[element.localName] ||\n           NEEDS_PARENT[element.localName] === current.localName;\n  }\n\n  // Create an element for this tag.\n  function createElement(type, annotation) {\n    var tagName = TAG_NAME[type];\n    if (!tagName) {\n      return null;\n    }\n    var element = window.document.createElement(tagName);\n    var name = TAG_ANNOTATION[type];\n    if (name && annotation) {\n      element[name] = annotation.trim();\n    }\n    return element;\n  }\n\n  var rootDiv = window.document.createElement(\"div\"),\n      current = rootDiv,\n      t,\n      tagStack = [];\n\n  while ((t = nextToken()) !== null) {\n    if (t[0] === '<') {\n      if (t[1] === \"/\") {\n        // If the closing tag matches, move back up to the parent node.\n        if (tagStack.length &&\n            tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n          tagStack.pop();\n          current = current.parentNode;\n        }\n        // Otherwise just ignore the end tag.\n        continue;\n      }\n      var ts = parseTimeStamp(t.substr(1, t.length - 2));\n      var node;\n      if (ts) {\n        // Timestamps are lead nodes as well.\n        node = window.document.createProcessingInstruction(\"timestamp\", ts);\n        current.appendChild(node);\n        continue;\n      }\n      var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n      // If we can't parse the tag, skip to the next tag.\n      if (!m) {\n        continue;\n      }\n      // Try to construct an element, and ignore the tag if we couldn't.\n      node = createElement(m[1], m[3]);\n      if (!node) {\n        continue;\n      }\n      // Determine if the tag should be added based on the context of where it\n      // is placed in the cuetext.\n      if (!shouldAdd(current, node)) {\n        continue;\n      }\n      // Set the class list (as a list of classes, separated by space).\n      if (m[2]) {\n        var classes = m[2].split('.');\n\n        classes.forEach(function(cl) {\n          var bgColor = /^bg_/.test(cl);\n          // slice out `bg_` if it's a background color\n          var colorName = bgColor ? cl.slice(3) : cl;\n\n          if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n            var propName = bgColor ? 'background-color' : 'color';\n            var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n            node.style[propName] = propValue;\n          }\n        });\n\n        node.className = classes.join(' ');\n      }\n      // Append the node to the current node, and enter the scope of the new\n      // node.\n      tagStack.push(m[1]);\n      current.appendChild(node);\n      current = node;\n      continue;\n    }\n\n    // Text nodes are leaf nodes.\n    current.appendChild(window.document.createTextNode(unescape(t)));\n  }\n\n  return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n  for (var i = 0; i < strongRTLRanges.length; i++) {\n    var currentRange = strongRTLRanges[i];\n    if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction determineBidi(cueDiv) {\n  var nodeStack = [],\n      text = \"\",\n      charCode;\n\n  if (!cueDiv || !cueDiv.childNodes) {\n    return \"ltr\";\n  }\n\n  function pushNodes(nodeStack, node) {\n    for (var i = node.childNodes.length - 1; i >= 0; i--) {\n      nodeStack.push(node.childNodes[i]);\n    }\n  }\n\n  function nextTextNode(nodeStack) {\n    if (!nodeStack || !nodeStack.length) {\n      return null;\n    }\n\n    var node = nodeStack.pop(),\n        text = node.textContent || node.innerText;\n    if (text) {\n      // TODO: This should match all unicode type B characters (paragraph\n      // separator characters). See issue #115.\n      var m = text.match(/^.*(\\n|\\r)/);\n      if (m) {\n        nodeStack.length = 0;\n        return m[0];\n      }\n      return text;\n    }\n    if (node.tagName === \"ruby\") {\n      return nextTextNode(nodeStack);\n    }\n    if (node.childNodes) {\n      pushNodes(nodeStack, node);\n      return nextTextNode(nodeStack);\n    }\n  }\n\n  pushNodes(nodeStack, cueDiv);\n  while ((text = nextTextNode(nodeStack))) {\n    for (var i = 0; i < text.length; i++) {\n      charCode = text.charCodeAt(i);\n      if (isStrongRTLChar(charCode)) {\n        return \"rtl\";\n      }\n    }\n  }\n  return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n  if (typeof cue.line === \"number\" &&\n      (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n    return cue.line;\n  }\n  if (!cue.track || !cue.track.textTrackList ||\n      !cue.track.textTrackList.mediaElement) {\n    return -1;\n  }\n  var track = cue.track,\n      trackList = track.textTrackList,\n      count = 0;\n  for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n    if (trackList[i].mode === \"showing\") {\n      count++;\n    }\n  }\n  return ++count * -1;\n}\n\nfunction StyleBox() {\n}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function(styles, div) {\n  div = div || this.div;\n  for (var prop in styles) {\n    if (styles.hasOwnProperty(prop)) {\n      div.style[prop] = styles[prop];\n    }\n  }\n};\n\nStyleBox.prototype.formatStyle = function(val, unit) {\n  return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n  StyleBox.call(this);\n  this.cue = cue;\n\n  // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n  // have inline positioning and will function as the cue background box.\n  this.cueDiv = parseContent(window, cue.text);\n  var styles = {\n    color: \"rgba(255, 255, 255, 1)\",\n    backgroundColor:  \"rgba(0, 0, 0, 0.8)\",\n    position: \"relative\",\n    left: 0,\n    right: 0,\n    top: 0,\n    bottom: 0,\n    display: \"inline\",\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\"\n  };\n\n  this.applyStyles(styles, this.cueDiv);\n\n  // Create an absolutely positioned div that will be used to position the cue\n  // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n  // mirrors of them except middle instead of center on Safari.\n  this.div = window.document.createElement(\"div\");\n  styles = {\n    direction: determineBidi(this.cueDiv),\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\",\n    textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n    font: styleOptions.font,\n    whiteSpace: \"pre-line\",\n    position: \"absolute\"\n  };\n\n  this.applyStyles(styles);\n  this.div.appendChild(this.cueDiv);\n\n  // Calculate the distance from the reference edge of the viewport to the text\n  // position of the cue box. The reference edge will be resolved later when\n  // the box orientation styles are applied.\n  var textPos = 0;\n  switch (cue.positionAlign) {\n  case \"start\":\n  case \"line-left\":\n    textPos = cue.position;\n    break;\n  case \"center\":\n    textPos = cue.position - (cue.size / 2);\n    break;\n  case \"end\":\n  case \"line-right\":\n    textPos = cue.position - cue.size;\n    break;\n  }\n\n  // Horizontal box orientation; textPos is the distance from the left edge of the\n  // area to the left edge of the box and cue.size is the distance extending to\n  // the right from there.\n  if (cue.vertical === \"\") {\n    this.applyStyles({\n      left:  this.formatStyle(textPos, \"%\"),\n      width: this.formatStyle(cue.size, \"%\")\n    });\n  // Vertical box orientation; textPos is the distance from the top edge of the\n  // area to the top edge of the box and cue.size is the height extending\n  // downwards from there.\n  } else {\n    this.applyStyles({\n      top: this.formatStyle(textPos, \"%\"),\n      height: this.formatStyle(cue.size, \"%\")\n    });\n  }\n\n  this.move = function(box) {\n    this.applyStyles({\n      top: this.formatStyle(box.top, \"px\"),\n      bottom: this.formatStyle(box.bottom, \"px\"),\n      left: this.formatStyle(box.left, \"px\"),\n      right: this.formatStyle(box.right, \"px\"),\n      height: this.formatStyle(box.height, \"px\"),\n      width: this.formatStyle(box.width, \"px\")\n    });\n  };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n  // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n  // was passed in and we need to copy the results of 'getBoundingClientRect'\n  // as the object returned is readonly. All co-ordinate values are in reference\n  // to the viewport origin (top left).\n  var lh, height, width, top;\n  if (obj.div) {\n    height = obj.div.offsetHeight;\n    width = obj.div.offsetWidth;\n    top = obj.div.offsetTop;\n\n    var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n                rects.getClientRects && rects.getClientRects();\n    obj = obj.div.getBoundingClientRect();\n    // In certain cases the outter div will be slightly larger then the sum of\n    // the inner div's lines. This could be due to bold text, etc, on some platforms.\n    // In this case we should get the average line height and use that. This will\n    // result in the desired behaviour.\n    lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n               : 0;\n\n  }\n  this.left = obj.left;\n  this.right = obj.right;\n  this.top = obj.top || top;\n  this.height = obj.height || height;\n  this.bottom = obj.bottom || (top + (obj.height || height));\n  this.width = obj.width || width;\n  this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function(axis, toMove) {\n  toMove = toMove !== undefined ? toMove : this.lineHeight;\n  switch (axis) {\n  case \"+x\":\n    this.left += toMove;\n    this.right += toMove;\n    break;\n  case \"-x\":\n    this.left -= toMove;\n    this.right -= toMove;\n    break;\n  case \"+y\":\n    this.top += toMove;\n    this.bottom += toMove;\n    break;\n  case \"-y\":\n    this.top -= toMove;\n    this.bottom -= toMove;\n    break;\n  }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function(b2) {\n  return this.left < b2.right &&\n         this.right > b2.left &&\n         this.top < b2.bottom &&\n         this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function(boxes) {\n  for (var i = 0; i < boxes.length; i++) {\n    if (this.overlaps(boxes[i])) {\n      return true;\n    }\n  }\n  return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function(container) {\n  return this.top >= container.top &&\n         this.bottom <= container.bottom &&\n         this.left >= container.left &&\n         this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n  switch (axis) {\n  case \"+x\":\n    return this.left < container.left;\n  case \"-x\":\n    return this.right > container.right;\n  case \"+y\":\n    return this.top < container.top;\n  case \"-y\":\n    return this.bottom > container.bottom;\n  }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function(b2) {\n  var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n      y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n      intersectArea = x * y;\n  return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\n  return {\n    top: this.top - reference.top,\n    bottom: reference.bottom - this.bottom,\n    left: this.left - reference.left,\n    right: reference.right - this.right,\n    height: this.height,\n    width: this.width\n  };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function(obj) {\n  var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n  var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n  var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n  obj = obj.div ? obj.div.getBoundingClientRect() :\n                obj.tagName ? obj.getBoundingClientRect() : obj;\n  var ret = {\n    left: obj.left,\n    right: obj.right,\n    top: obj.top || top,\n    height: obj.height || height,\n    bottom: obj.bottom || (top + (obj.height || height)),\n    width: obj.width || width\n  };\n  return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n  // Find the best position for a cue box, b, on the video. The axis parameter\n  // is a list of axis, the order of which, it will move the box along. For example:\n  // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n  // direction. If it doesn't find a good position for it there it will then move\n  // it along the x axis in the negative direction.\n  function findBestPosition(b, axis) {\n    var bestPosition,\n        specifiedPosition = new BoxPosition(b),\n        percentage = 1; // Highest possible so the first thing we get is better.\n\n    for (var i = 0; i < axis.length; i++) {\n      while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n             (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n        b.move(axis[i]);\n      }\n      // We found a spot where we aren't overlapping anything. This is our\n      // best position.\n      if (b.within(containerBox)) {\n        return b;\n      }\n      var p = b.intersectPercentage(containerBox);\n      // If we're outside the container box less then we were on our last try\n      // then remember this position as the best position.\n      if (percentage > p) {\n        bestPosition = new BoxPosition(b);\n        percentage = p;\n      }\n      // Reset the box position to the specified position.\n      b = new BoxPosition(specifiedPosition);\n    }\n    return bestPosition || specifiedPosition;\n  }\n\n  var boxPosition = new BoxPosition(styleBox),\n      cue = styleBox.cue,\n      linePos = computeLinePos(cue),\n      axis = [];\n\n  // If we have a line number to align the cue to.\n  if (cue.snapToLines) {\n    var size;\n    switch (cue.vertical) {\n    case \"\":\n      axis = [ \"+y\", \"-y\" ];\n      size = \"height\";\n      break;\n    case \"rl\":\n      axis = [ \"+x\", \"-x\" ];\n      size = \"width\";\n      break;\n    case \"lr\":\n      axis = [ \"-x\", \"+x\" ];\n      size = \"width\";\n      break;\n    }\n\n    var step = boxPosition.lineHeight,\n        position = step * Math.round(linePos),\n        maxPosition = containerBox[size] + step,\n        initialAxis = axis[0];\n\n    // If the specified intial position is greater then the max position then\n    // clamp the box to the amount of steps it would take for the box to\n    // reach the max position.\n    if (Math.abs(position) > maxPosition) {\n      position = position < 0 ? -1 : 1;\n      position *= Math.ceil(maxPosition / step) * step;\n    }\n\n    // If computed line position returns negative then line numbers are\n    // relative to the bottom of the video instead of the top. Therefore, we\n    // need to increase our initial position by the length or width of the\n    // video, depending on the writing direction, and reverse our axis directions.\n    if (linePos < 0) {\n      position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n      axis = axis.reverse();\n    }\n\n    // Move the box to the specified position. This may not be its best\n    // position.\n    boxPosition.move(initialAxis, position);\n\n  } else {\n    // If we have a percentage line value for the cue.\n    var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n    switch (cue.lineAlign) {\n    case \"center\":\n      linePos -= (calculatedPercentage / 2);\n      break;\n    case \"end\":\n      linePos -= calculatedPercentage;\n      break;\n    }\n\n    // Apply initial line position to the cue box.\n    switch (cue.vertical) {\n    case \"\":\n      styleBox.applyStyles({\n        top: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    case \"rl\":\n      styleBox.applyStyles({\n        left: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    case \"lr\":\n      styleBox.applyStyles({\n        right: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    }\n\n    axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n    // Get the box position again after we've applied the specified positioning\n    // to it.\n    boxPosition = new BoxPosition(styleBox);\n  }\n\n  var bestPosition = findBestPosition(boxPosition, axis);\n  styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {\n  // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function() {\n  return {\n    decode: function(data) {\n      if (!data) {\n        return \"\";\n      }\n      if (typeof data !== \"string\") {\n        throw new Error(\"Error - expected string data.\");\n      }\n      return decodeURIComponent(encodeURIComponent(data));\n    }\n  };\n};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n  if (!window || !cuetext) {\n    return null;\n  }\n  return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n//                and regions will be placed into.\nWebVTT.processCues = function(window, cues, overlay) {\n  if (!window || !cues || !overlay) {\n    return null;\n  }\n\n  // Remove all previous children.\n  while (overlay.firstChild) {\n    overlay.removeChild(overlay.firstChild);\n  }\n\n  var paddedOverlay = window.document.createElement(\"div\");\n  paddedOverlay.style.position = \"absolute\";\n  paddedOverlay.style.left = \"0\";\n  paddedOverlay.style.right = \"0\";\n  paddedOverlay.style.top = \"0\";\n  paddedOverlay.style.bottom = \"0\";\n  paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n  overlay.appendChild(paddedOverlay);\n\n  // Determine if we need to compute the display states of the cues. This could\n  // be the case if a cue's state has been changed since the last computation or\n  // if it has not been computed yet.\n  function shouldCompute(cues) {\n    for (var i = 0; i < cues.length; i++) {\n      if (cues[i].hasBeenReset || !cues[i].displayState) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  // We don't need to recompute the cues' display states. Just reuse them.\n  if (!shouldCompute(cues)) {\n    for (var i = 0; i < cues.length; i++) {\n      paddedOverlay.appendChild(cues[i].displayState);\n    }\n    return;\n  }\n\n  var boxPositions = [],\n      containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n      fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n  var styleOptions = {\n    font: fontSize + \"px \" + FONT_STYLE\n  };\n\n  (function() {\n    var styleBox, cue;\n\n    for (var i = 0; i < cues.length; i++) {\n      cue = cues[i];\n\n      // Compute the intial position and styles of the cue div.\n      styleBox = new CueStyleBox(window, cue, styleOptions);\n      paddedOverlay.appendChild(styleBox.div);\n\n      // Move the cue div to it's correct line position.\n      moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n      // Remember the computed div so that we don't have to recompute it later\n      // if we don't have too.\n      cue.displayState = styleBox.div;\n\n      boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n    }\n  })();\n};\n\nWebVTT.Parser = function(window, vttjs, decoder) {\n  if (!decoder) {\n    decoder = vttjs;\n    vttjs = {};\n  }\n  if (!vttjs) {\n    vttjs = {};\n  }\n\n  this.window = window;\n  this.vttjs = vttjs;\n  this.state = \"INITIAL\";\n  this.buffer = \"\";\n  this.decoder = decoder || new TextDecoder(\"utf8\");\n  this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n  // If the error is a ParsingError then report it to the consumer if\n  // possible. If it's not a ParsingError then throw it like normal.\n  reportOrThrowError: function(e) {\n    if (e instanceof ParsingError) {\n      this.onparsingerror && this.onparsingerror(e);\n    } else {\n      throw e;\n    }\n  },\n  parse: function (data) {\n    var self = this;\n\n    // If there is no data then we won't decode it, but will just try to parse\n    // whatever is in buffer already. This may occur in circumstances, for\n    // example when flush() is called.\n    if (data) {\n      // Try to decode the data that we received.\n      self.buffer += self.decoder.decode(data, {stream: true});\n    }\n\n    function collectNextLine() {\n      var buffer = self.buffer;\n      var pos = 0;\n      while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n        ++pos;\n      }\n      var line = buffer.substr(0, pos);\n      // Advance the buffer early in case we fail below.\n      if (buffer[pos] === '\\r') {\n        ++pos;\n      }\n      if (buffer[pos] === '\\n') {\n        ++pos;\n      }\n      self.buffer = buffer.substr(pos);\n      return line;\n    }\n\n    // 3.4 WebVTT region and WebVTT region settings syntax\n    function parseRegion(input) {\n      var settings = new Settings();\n\n      parseOptions(input, function (k, v) {\n        switch (k) {\n        case \"id\":\n          settings.set(k, v);\n          break;\n        case \"width\":\n          settings.percent(k, v);\n          break;\n        case \"lines\":\n          settings.integer(k, v);\n          break;\n        case \"regionanchor\":\n        case \"viewportanchor\":\n          var xy = v.split(',');\n          if (xy.length !== 2) {\n            break;\n          }\n          // We have to make sure both x and y parse, so use a temporary\n          // settings object here.\n          var anchor = new Settings();\n          anchor.percent(\"x\", xy[0]);\n          anchor.percent(\"y\", xy[1]);\n          if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n            break;\n          }\n          settings.set(k + \"X\", anchor.get(\"x\"));\n          settings.set(k + \"Y\", anchor.get(\"y\"));\n          break;\n        case \"scroll\":\n          settings.alt(k, v, [\"up\"]);\n          break;\n        }\n      }, /=/, /\\s/);\n\n      // Create the region, using default values for any values that were not\n      // specified.\n      if (settings.has(\"id\")) {\n        var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n        region.width = settings.get(\"width\", 100);\n        region.lines = settings.get(\"lines\", 3);\n        region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n        region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n        region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n        region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n        region.scroll = settings.get(\"scroll\", \"\");\n        // Register the region.\n        self.onregion && self.onregion(region);\n        // Remember the VTTRegion for later in case we parse any VTTCues that\n        // reference it.\n        self.regionList.push({\n          id: settings.get(\"id\"),\n          region: region\n        });\n      }\n    }\n\n    // draft-pantos-http-live-streaming-20\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n    // 3.5 WebVTT\n    function parseTimestampMap(input) {\n      var settings = new Settings();\n\n      parseOptions(input, function(k, v) {\n        switch(k) {\n        case \"MPEGT\":\n          settings.integer(k + 'S', v);\n          break;\n        case \"LOCA\":\n          settings.set(k + 'L', parseTimeStamp(v));\n          break;\n        }\n      }, /[^\\d]:/, /,/);\n\n      self.ontimestampmap && self.ontimestampmap({\n        \"MPEGTS\": settings.get(\"MPEGTS\"),\n        \"LOCAL\": settings.get(\"LOCAL\")\n      });\n    }\n\n    // 3.2 WebVTT metadata header syntax\n    function parseHeader(input) {\n      if (input.match(/X-TIMESTAMP-MAP/)) {\n        // This line contains HLS X-TIMESTAMP-MAP metadata\n        parseOptions(input, function(k, v) {\n          switch(k) {\n          case \"X-TIMESTAMP-MAP\":\n            parseTimestampMap(v);\n            break;\n          }\n        }, /=/);\n      } else {\n        parseOptions(input, function (k, v) {\n          switch (k) {\n          case \"Region\":\n            // 3.3 WebVTT region metadata header syntax\n            parseRegion(v);\n            break;\n          }\n        }, /:/);\n      }\n\n    }\n\n    // 5.1 WebVTT file parsing.\n    try {\n      var line;\n      if (self.state === \"INITIAL\") {\n        // We can't start parsing until we have the first line.\n        if (!/\\r\\n|\\n/.test(self.buffer)) {\n          return this;\n        }\n\n        line = collectNextLine();\n\n        var m = line.match(/^WEBVTT([ \\t].*)?$/);\n        if (!m || !m[0]) {\n          throw new ParsingError(ParsingError.Errors.BadSignature);\n        }\n\n        self.state = \"HEADER\";\n      }\n\n      var alreadyCollectedLine = false;\n      while (self.buffer) {\n        // We can't parse a line until we have the full line.\n        if (!/\\r\\n|\\n/.test(self.buffer)) {\n          return this;\n        }\n\n        if (!alreadyCollectedLine) {\n          line = collectNextLine();\n        } else {\n          alreadyCollectedLine = false;\n        }\n\n        switch (self.state) {\n        case \"HEADER\":\n          // 13-18 - Allow a header (metadata) under the WEBVTT line.\n          if (/:/.test(line)) {\n            parseHeader(line);\n          } else if (!line) {\n            // An empty line terminates the header and starts the body (cues).\n            self.state = \"ID\";\n          }\n          continue;\n        case \"NOTE\":\n          // Ignore NOTE blocks.\n          if (!line) {\n            self.state = \"ID\";\n          }\n          continue;\n        case \"ID\":\n          // Check for the start of NOTE blocks.\n          if (/^NOTE($|[ \\t])/.test(line)) {\n            self.state = \"NOTE\";\n            break;\n          }\n          // 19-29 - Allow any number of line terminators, then initialize new cue values.\n          if (!line) {\n            continue;\n          }\n          self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n          // Safari still uses the old middle value and won't accept center\n          try {\n            self.cue.align = \"center\";\n          } catch (e) {\n            self.cue.align = \"middle\";\n          }\n          self.state = \"CUE\";\n          // 30-39 - Check if self line contains an optional identifier or timing data.\n          if (line.indexOf(\"-->\") === -1) {\n            self.cue.id = line;\n            continue;\n          }\n          // Process line as start of a cue.\n          /*falls through*/\n        case \"CUE\":\n          // 40 - Collect cue timings and settings.\n          try {\n            parseCue(line, self.cue, self.regionList);\n          } catch (e) {\n            self.reportOrThrowError(e);\n            // In case of an error ignore rest of the cue.\n            self.cue = null;\n            self.state = \"BADCUE\";\n            continue;\n          }\n          self.state = \"CUETEXT\";\n          continue;\n        case \"CUETEXT\":\n          var hasSubstring = line.indexOf(\"-->\") !== -1;\n          // 34 - If we have an empty line then report the cue.\n          // 35 - If we have the special substring '-->' then report the cue,\n          // but do not collect the line as we need to process the current\n          // one as a new cue.\n          if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n            // We are done parsing self cue.\n            self.oncue && self.oncue(self.cue);\n            self.cue = null;\n            self.state = \"ID\";\n            continue;\n          }\n          if (self.cue.text) {\n            self.cue.text += \"\\n\";\n          }\n          self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n          continue;\n        case \"BADCUE\": // BADCUE\n          // 54-62 - Collect and discard the remaining cue.\n          if (!line) {\n            self.state = \"ID\";\n          }\n          continue;\n        }\n      }\n    } catch (e) {\n      self.reportOrThrowError(e);\n\n      // If we are currently parsing a cue, report what we have.\n      if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n        self.oncue(self.cue);\n      }\n      self.cue = null;\n      // Enter BADWEBVTT state if header was not parsed correctly otherwise\n      // another exception occurred so enter BADCUE state.\n      self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n    }\n    return this;\n  },\n  flush: function () {\n    var self = this;\n    try {\n      // Finish decoding the stream.\n      self.buffer += self.decoder.decode();\n      // Synthesize the end of the current cue or region.\n      if (self.cue || self.state === \"HEADER\") {\n        self.buffer += \"\\n\\n\";\n        self.parse();\n      }\n      // If we've flushed, parsed, and we're still on the INITIAL state then\n      // that means we don't have enough of the stream to parse the first\n      // line.\n      if (self.state === \"INITIAL\") {\n        throw new ParsingError(ParsingError.Errors.BadSignature);\n      }\n    } catch(e) {\n      self.reportOrThrowError(e);\n    }\n    self.onflush && self.onflush();\n    return this;\n  }\n};\n\nmodule.exports = WebVTT;\n","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var frCa = moment.defineLocale('fr-ca', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n    });\n\n    return frCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var months = {\n            standalone:\n                'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n                    '_'\n                ),\n            format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n                '_'\n            ),\n            isFormat: /DD?[o.]?(\\[[^\\[\\]]*\\]|\\s)+MMMM/,\n        },\n        monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n        monthsParse = [\n            /^led/i,\n            /^úno/i,\n            /^bře/i,\n            /^dub/i,\n            /^kvě/i,\n            /^(čvn|červen$|června)/i,\n            /^(čvc|červenec|července)/i,\n            /^srp/i,\n            /^zář/i,\n            /^říj/i,\n            /^lis/i,\n            /^pro/i,\n        ],\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsRegex =\n            /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n    function plural(n) {\n        return n > 1 && n < 5 && ~~(n / 10) !== 1;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's': // a few seconds / in a few seconds / a few seconds ago\n                return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n            case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'sekundy' : 'sekund');\n                } else {\n                    return result + 'sekundami';\n                }\n            case 'm': // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minuty' : 'minut');\n                } else {\n                    return result + 'minutami';\n                }\n            case 'h': // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodin');\n                } else {\n                    return result + 'hodinami';\n                }\n            case 'd': // a day / in a day / a day ago\n                return withoutSuffix || isFuture ? 'den' : 'dnem';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dny' : 'dní');\n                } else {\n                    return result + 'dny';\n                }\n            case 'M': // a month / in a month / a month ago\n                return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'měsíce' : 'měsíců');\n                } else {\n                    return result + 'měsíci';\n                }\n            case 'y': // a year / in a year / a year ago\n                return withoutSuffix || isFuture ? 'rok' : 'rokem';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'let');\n                } else {\n                    return result + 'lety';\n                }\n        }\n    }\n\n    var cs = moment.defineLocale('cs', {\n        months: months,\n        monthsShort: monthsShort,\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n        // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n        monthsStrictRegex:\n            /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n        monthsShortStrictRegex:\n            /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n        weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n        weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd D. MMMM YYYY H:mm',\n            l: 'D. M. YYYY',\n        },\n        calendar: {\n            sameDay: '[dnes v] LT',\n            nextDay: '[zítra v] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [v] LT';\n                    case 3:\n                        return '[ve středu v] LT';\n                    case 4:\n                        return '[ve čtvrtek v] LT';\n                    case 5:\n                        return '[v pátek v] LT';\n                    case 6:\n                        return '[v sobotu v] LT';\n                }\n            },\n            lastDay: '[včera v] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulou neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[minulé] dddd [v] LT';\n                    case 3:\n                        return '[minulou středu v] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [v] LT';\n                    case 6:\n                        return '[minulou sobotu v] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'před %s',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return cs;\n\n})));\n","'use strict';\n\nvar freeze = require('./conventions').freeze;\n\n/**\n * The entities that are predefined in every XML document.\n *\n * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1\n * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia\n */\nexports.XML_ENTITIES = freeze({\n\tamp: '&',\n\tapos: \"'\",\n\tgt: '>',\n\tlt: '<',\n\tquot: '\"',\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n","//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-ум',\n        1: '-ум',\n        2: '-юм',\n        3: '-юм',\n        4: '-ум',\n        5: '-ум',\n        6: '-ум',\n        7: '-ум',\n        8: '-ум',\n        9: '-ум',\n        10: '-ум',\n        12: '-ум',\n        13: '-ум',\n        20: '-ум',\n        30: '-юм',\n        40: '-ум',\n        50: '-ум',\n        60: '-ум',\n        70: '-ум',\n        80: '-ум',\n        90: '-ум',\n        100: '-ум',\n    };\n\n    var tg = moment.defineLocale('tg', {\n        months: {\n            format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n                '_'\n            ),\n            standalone:\n                'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n            '_'\n        ),\n        weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n        weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Имрӯз соати] LT',\n            nextDay: '[Фардо соати] LT',\n            lastDay: '[Дирӯз соати] LT',\n            nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n            lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'баъди %s',\n            past: '%s пеш',\n            s: 'якчанд сония',\n            m: 'як дақиқа',\n            mm: '%d дақиқа',\n            h: 'як соат',\n            hh: '%d соат',\n            d: 'як рӯз',\n            dd: '%d рӯз',\n            M: 'як моҳ',\n            MM: '%d моҳ',\n            y: 'як сол',\n            yy: '%d сол',\n        },\n        meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'шаб') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'субҳ') {\n                return hour;\n            } else if (meridiem === 'рӯз') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'бегоҳ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'шаб';\n            } else if (hour < 11) {\n                return 'субҳ';\n            } else if (hour < 16) {\n                return 'рӯз';\n            } else if (hour < 19) {\n                return 'бегоҳ';\n            } else {\n                return 'шаб';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1th is the first week of the year.\n        },\n    });\n\n    return tg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esUs = moment.defineLocale('es-us', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'MM/DD/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return esUs;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIe = moment.defineLocale('en-ie', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enIe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n              ? forms[1]\n              : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n            mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n            hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n            dd: 'день_дні_днів',\n            MM: 'місяць_місяці_місяців',\n            yy: 'рік_роки_років',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвилина' : 'хвилину';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'година' : 'годину';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    function weekdaysCaseReplace(m, format) {\n        var weekdays = {\n                nominative:\n                    'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n                        '_'\n                    ),\n                accusative:\n                    'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n                        '_'\n                    ),\n                genitive:\n                    'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n                        '_'\n                    ),\n            },\n            nounCase;\n\n        if (m === true) {\n            return weekdays['nominative']\n                .slice(1, 7)\n                .concat(weekdays['nominative'].slice(0, 1));\n        }\n        if (!m) {\n            return weekdays['nominative'];\n        }\n\n        nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n            ? 'accusative'\n            : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n              ? 'genitive'\n              : 'nominative';\n        return weekdays[nounCase][m.day()];\n    }\n    function processHoursFunction(str) {\n        return function () {\n            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n        };\n    }\n\n    var uk = moment.defineLocale('uk', {\n        months: {\n            format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n                '_'\n            ),\n            standalone:\n                'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n            '_'\n        ),\n        weekdays: weekdaysCaseReplace,\n        weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY р.',\n            LLL: 'D MMMM YYYY р., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n        },\n        calendar: {\n            sameDay: processHoursFunction('[Сьогодні '),\n            nextDay: processHoursFunction('[Завтра '),\n            lastDay: processHoursFunction('[Вчора '),\n            nextWeek: processHoursFunction('[У] dddd ['),\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return processHoursFunction('[Минулої] dddd [').call(this);\n                    case 1:\n                    case 2:\n                    case 4:\n                        return processHoursFunction('[Минулого] dddd [').call(this);\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'за %s',\n            past: '%s тому',\n            s: 'декілька секунд',\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: 'годину',\n            hh: relativeTimeWithPlural,\n            d: 'день',\n            dd: relativeTimeWithPlural,\n            M: 'місяць',\n            MM: relativeTimeWithPlural,\n            y: 'рік',\n            yy: relativeTimeWithPlural,\n        },\n        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n        meridiemParse: /ночі|ранку|дня|вечора/,\n        isPM: function (input) {\n            return /^(дня|вечора)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночі';\n            } else if (hour < 12) {\n                return 'ранку';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечора';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return uk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nekaj sekund'\n                    : 'nekaj sekundami';\n            case 'ss':\n                if (number === 1) {\n                    result += withoutSuffix ? 'sekundo' : 'sekundi';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n                } else {\n                    result += 'sekund';\n                }\n                return result;\n            case 'm':\n                return withoutSuffix ? 'ena minuta' : 'eno minuto';\n            case 'mm':\n                if (number === 1) {\n                    result += withoutSuffix ? 'minuta' : 'minuto';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'ena ura' : 'eno uro';\n            case 'hh':\n                if (number === 1) {\n                    result += withoutSuffix ? 'ura' : 'uro';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'uri' : 'urama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'ure' : 'urami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'ur' : 'urami';\n                }\n                return result;\n            case 'd':\n                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n            case 'dd':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n                } else {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n                }\n                return result;\n            case 'M':\n                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n            case 'MM':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n                } else {\n                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n                }\n                return result;\n            case 'y':\n                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n            case 'yy':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'leto' : 'letom';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'leta' : 'leti';\n                } else {\n                    result += withoutSuffix || isFuture ? 'let' : 'leti';\n                }\n                return result;\n        }\n    }\n\n    var sl = moment.defineLocale('sl', {\n        months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n        weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n        weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD. MM. YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danes ob] LT',\n            nextDay: '[jutri ob] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[v] [sredo] [ob] LT';\n                    case 6:\n                        return '[v] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[v] dddd [ob] LT';\n                }\n            },\n            lastDay: '[včeraj ob] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prejšnjo] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[prejšnjo] [sredo] [ob] LT';\n                    case 6:\n                        return '[prejšnjo] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prejšnji] dddd [ob] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'čez %s',\n            past: 'pred %s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return sl;\n\n})));\n","/* The MIT License (MIT)\n\nCopyright (c) 2014-2015 Benoit Tremblay <trembl.ben@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE. */\n/*global define, YT*/\n(function (root, factory) {\n  if(typeof exports==='object' && typeof module!=='undefined') {\n    var videojs = require('video.js');\n    module.exports = factory(videojs.default || videojs);\n  } else if(typeof define === 'function' && define.amd) {\n    define(['videojs'], function(videojs){\n      return (root.Youtube = factory(videojs));\n    });\n  } else {\n    root.Youtube = factory(root.videojs);\n  }\n}(this, function(videojs) {\n  'use strict';\n\n  var _isOnMobile = videojs.browser.IS_IOS || videojs.browser.IS_NATIVE_ANDROID;\n  var Tech = videojs.getTech('Tech');\n\n  class Youtube extends Tech {\n\n    constructor(options, ready) {\n      super(options, ready);\n\n      this.setPoster(options.poster);\n      this.setSrc(this.options_.source, true);\n\n      // Set the vjs-youtube class to the player\n      // Parent is not set yet so we have to wait a tick\n      this.setTimeout(function() {\n        if (this.el_) {\n          this.el_.parentNode.className += ' vjs-youtube';\n\n          if (_isOnMobile) {\n            this.el_.parentNode.className += ' vjs-youtube-mobile';\n          }\n\n          if (Youtube.isApiReady) {\n            this.initYTPlayer();\n          } else {\n            Youtube.apiReadyQueue.push(this);\n          }\n        }\n      }.bind(this));\n    }\n\n    dispose() {\n      if (this.ytPlayer) {\n        //Dispose of the YouTube Player\n        if (this.ytPlayer.stopVideo) {\n          this.ytPlayer.stopVideo();\n        }\n        if (this.ytPlayer.destroy) {\n          this.ytPlayer.destroy();\n        }\n      } else {\n        //YouTube API hasn't finished loading or the player is already disposed\n        var index = Youtube.apiReadyQueue.indexOf(this);\n        if (index !== -1) {\n          Youtube.apiReadyQueue.splice(index, 1);\n        }\n      }\n      this.ytPlayer = null;\n\n      this.el_.parentNode.className = this.el_.parentNode.className\n          .replace(' vjs-youtube', '')\n          .replace(' vjs-youtube-mobile', '');\n      this.el_.parentNode.removeChild(this.el_);\n\n      //Needs to be called after the YouTube player is destroyed, otherwise there will be a null reference exception\n      Tech.prototype.dispose.call(this);\n    }\n\n    createEl() {\n      var div = document.createElement('div');\n      div.setAttribute('id', this.options_.techId);\n      div.setAttribute('style', 'width:100%;height:100%;top:0;left:0;position:absolute');\n      div.setAttribute('class', 'vjs-tech');\n\n      var divWrapper = document.createElement('div');\n      divWrapper.appendChild(div);\n\n      if (!_isOnMobile && !this.options_.ytControls) {\n        var divBlocker = document.createElement('div');\n        divBlocker.setAttribute('class', 'vjs-iframe-blocker');\n        divBlocker.setAttribute('style', 'position:absolute;top:0;left:0;width:100%;height:100%');\n\n        // In case the blocker is still there and we want to pause\n        divBlocker.onclick = function() {\n          this.pause();\n        }.bind(this);\n\n        divWrapper.appendChild(divBlocker);\n      }\n\n      return divWrapper;\n    }\n\n    initYTPlayer() {\n      var playerVars = {\n        controls: 0,\n        modestbranding: 1,\n        rel: 0,\n        showinfo: 0,\n        loop: this.options_.loop ? 1 : 0\n      };\n\n      // Let the user set any YouTube parameter\n      // https://developers.google.com/youtube/player_parameters?playerVersion=HTML5#Parameters\n      // To use YouTube controls, you must use ytControls instead\n      // To use the loop or autoplay, use the video.js settings\n\n      if (typeof this.options_.autohide !== 'undefined') {\n        playerVars.autohide = this.options_.autohide;\n      }\n\n      if (typeof this.options_['cc_load_policy'] !== 'undefined') {\n        playerVars['cc_load_policy'] = this.options_['cc_load_policy'];\n      }\n\n      if (typeof this.options_.ytControls !== 'undefined') {\n        playerVars.controls = this.options_.ytControls;\n      }\n\n      if (typeof this.options_.disablekb !== 'undefined') {\n        playerVars.disablekb = this.options_.disablekb;\n      }\n\n      if (typeof this.options_.color !== 'undefined') {\n        playerVars.color = this.options_.color;\n      }\n\n      if (!playerVars.controls) {\n        // Let video.js handle the fullscreen unless it is the YouTube native controls\n        playerVars.fs = 0;\n      } else if (typeof this.options_.fs !== 'undefined') {\n        playerVars.fs = this.options_.fs;\n      }\n\n      if (this.options_.source.src.indexOf('end=') !== -1) {\n        var srcEndTime = this.options_.source.src.match(/end=([0-9]*)/);\n        this.options_.end = parseInt(srcEndTime[1]);\n      }\n\n      if (typeof this.options_.end !== 'undefined') {\n        playerVars.end = this.options_.end;\n      }\n\n      if (typeof this.options_.hl !== 'undefined') {\n        playerVars.hl = this.options_.hl;\n      } else if (typeof this.options_.language !== 'undefined') {\n        // Set the YouTube player on the same language than video.js\n        playerVars.hl = this.options_.language.substr(0, 2);\n      }\n\n      if (typeof this.options_['iv_load_policy'] !== 'undefined') {\n        playerVars['iv_load_policy'] = this.options_['iv_load_policy'];\n      }\n\n      if (typeof this.options_.list !== 'undefined') {\n        playerVars.list = this.options_.list;\n      } else if (this.url && typeof this.url.listId !== 'undefined') {\n        playerVars.list = this.url.listId;\n      }\n\n      if (typeof this.options_.listType !== 'undefined') {\n        playerVars.listType = this.options_.listType;\n      }\n\n      if (typeof this.options_.modestbranding !== 'undefined') {\n        playerVars.modestbranding = this.options_.modestbranding;\n      }\n\n      if (typeof this.options_.playlist !== 'undefined') {\n        playerVars.playlist = this.options_.playlist;\n      }\n\n      if (typeof this.options_.playsinline !== 'undefined') {\n        playerVars.playsinline = this.options_.playsinline;\n      }\n\n      if (typeof this.options_.rel !== 'undefined') {\n        playerVars.rel = this.options_.rel;\n      }\n\n      if (typeof this.options_.showinfo !== 'undefined') {\n        playerVars.showinfo = this.options_.showinfo;\n      }\n\n      if (this.options_.source.src.indexOf('start=') !== -1) {\n        var srcStartTime = this.options_.source.src.match(/start=([0-9]*)/);\n        this.options_.start = parseInt(srcStartTime[1]);\n      }\n\n      if (typeof this.options_.start !== 'undefined') {\n        playerVars.start = this.options_.start;\n      }\n\n      if (typeof this.options_.theme !== 'undefined') {\n        playerVars.theme = this.options_.theme;\n      }\n\n      // Allow undocumented options to be passed along via customVars\n      if (typeof this.options_.customVars !== 'undefined') {\n        var customVars = this.options_.customVars;\n        Object.keys(customVars).forEach(function(key) {\n          playerVars[key] = customVars[key];\n        });\n      }\n\n      this.activeVideoId = this.url ? this.url.videoId : null;\n      this.activeList = playerVars.list;\n\n      var playerConfig = {\n        videoId: this.activeVideoId,\n        playerVars: playerVars,\n        events: {\n          onReady: this.onPlayerReady.bind(this),\n          onPlaybackQualityChange: this.onPlayerPlaybackQualityChange.bind(this),\n          onPlaybackRateChange: this.onPlayerPlaybackRateChange.bind(this),\n          onStateChange: this.onPlayerStateChange.bind(this),\n          onVolumeChange: this.onPlayerVolumeChange.bind(this),\n          onError: this.onPlayerError.bind(this)\n        }\n      };\n\n      if (typeof this.options_.enablePrivacyEnhancedMode !== 'undefined' && this.options_.enablePrivacyEnhancedMode) {\n        playerConfig.host = 'https://www.youtube-nocookie.com';\n      }\n\n      this.ytPlayer = new YT.Player(this.options_.techId, playerConfig);\n    }\n\n    onPlayerReady() {\n      if (this.options_.muted) {\n        this.ytPlayer.mute();\n      }\n\n      var playbackRates = this.ytPlayer.getAvailablePlaybackRates();\n      if (playbackRates.length > 1) {\n        this.featuresPlaybackRate = true;\n      }\n\n      this.playerReady_ = true;\n      this.triggerReady();\n\n      if (this.playOnReady) {\n        this.play();\n      } else if (this.cueOnReady) {\n        this.cueVideoById_(this.url.videoId);\n        this.activeVideoId = this.url.videoId;\n      }\n    }\n\n    onPlayerPlaybackQualityChange() {\n\n    }\n\n    onPlayerPlaybackRateChange() {\n      this.trigger('ratechange');\n    }\n\n    onPlayerStateChange(e) {\n      var state = e.data;\n\n      if (state === this.lastState || this.errorNumber) {\n        return;\n      }\n\n      this.lastState = state;\n\n      switch (state) {\n        case -1:\n          this.trigger('loadstart');\n          this.trigger('loadedmetadata');\n          this.trigger('durationchange');\n          this.trigger('ratechange');\n          break;\n\n        case YT.PlayerState.ENDED:\n          this.trigger('ended');\n          break;\n\n        case YT.PlayerState.PLAYING:\n          this.trigger('timeupdate');\n          this.trigger('durationchange');\n          this.trigger('playing');\n          this.trigger('play');\n\n          if (this.isSeeking) {\n            this.onSeeked();\n          }\n          break;\n\n        case YT.PlayerState.PAUSED:\n          this.trigger('canplay');\n          if (this.isSeeking) {\n            this.onSeeked();\n          } else {\n            this.trigger('pause');\n          }\n          break;\n\n        case YT.PlayerState.BUFFERING:\n          this.player_.trigger('timeupdate');\n          this.player_.trigger('waiting');\n          break;\n      }\n    }\n\n    onPlayerVolumeChange() {\n      this.trigger('volumechange');\n    }\n\n    onPlayerError(e) {\n      this.errorNumber = e.data;\n      this.trigger('pause');\n      this.trigger('error');\n    }\n\n    error() {\n      var code = 1000 + this.errorNumber; // as smaller codes are reserved\n      switch (this.errorNumber) {\n        case 5:\n          return { code: code, message: 'Error while trying to play the video' };\n\n        case 2:\n        case 100:\n          return { code: code, message: 'Unable to find the video' };\n\n        case 101:\n        case 150:\n          return {\n            code: code,\n            message: 'Playback on other Websites has been disabled by the video owner.'\n          };\n      }\n\n      return { code: code, message: 'YouTube unknown error (' + this.errorNumber + ')' };\n    }\n\n    loadVideoById_(id) {\n      var options = {\n        videoId: id\n      };\n      if (this.options_.start) {\n        options.startSeconds = this.options_.start;\n      }\n      if (this.options_.end) {\n        options.endSeconds = this.options_.end;\n      }\n      this.ytPlayer.loadVideoById(options);\n    }\n\n    cueVideoById_(id) {\n      var options = {\n        videoId: id\n      };\n      if (this.options_.start) {\n        options.startSeconds = this.options_.start;\n      }\n      if (this.options_.end) {\n        options.endSeconds = this.options_.end;\n      }\n      this.ytPlayer.cueVideoById(options);\n    }\n\n    src(src) {\n      if (src) {\n        this.setSrc({ src: src });\n      }\n\n      return this.source;\n    }\n\n    poster() {\n      // You can't start programmaticlly a video with a mobile\n      // through the iframe so we hide the poster and the play button (with CSS)\n      if (_isOnMobile) {\n        return null;\n      }\n\n      return this.poster_;\n    }\n\n    setPoster(poster) {\n      this.poster_ = poster;\n    }\n\n    setSrc(source) {\n      if (!source || !source.src) {\n        return;\n      }\n\n      delete this.errorNumber;\n      this.source = source;\n      this.url = Youtube.parseUrl(source.src);\n\n      if (!this.options_.poster) {\n        if (this.url.videoId) {\n          // Set the low resolution first\n          this.poster_ = 'https://img.youtube.com/vi/' + this.url.videoId + '/0.jpg';\n          this.trigger('posterchange');\n\n          // Check if their is a high res\n          this.checkHighResPoster();\n        }\n      }\n\n      if (this.options_.autoplay && !_isOnMobile) {\n        if (this.isReady_) {\n          this.play();\n        } else {\n          this.playOnReady = true;\n        }\n      } else if (this.activeVideoId !== this.url.videoId) {\n        if (this.isReady_) {\n          this.cueVideoById_(this.url.videoId);\n          this.activeVideoId = this.url.videoId;\n        } else {\n          this.cueOnReady = true;\n        }\n      }\n    }\n\n    autoplay() {\n      return this.options_.autoplay;\n    }\n\n    setAutoplay(val) {\n      this.options_.autoplay = val;\n    }\n\n    loop() {\n      return this.options_.loop;\n    }\n\n    setLoop(val) {\n      this.options_.loop = val;\n    }\n\n    play() {\n      if (!this.url || !this.url.videoId) {\n        return;\n      }\n\n      this.wasPausedBeforeSeek = false;\n\n      if (this.isReady_) {\n        if (this.url.listId) {\n          if (this.activeList === this.url.listId) {\n            this.ytPlayer.playVideo();\n          } else {\n            this.ytPlayer.loadPlaylist(this.url.listId);\n            this.activeList = this.url.listId;\n          }\n        }\n\n        if (this.activeVideoId === this.url.videoId) {\n          this.ytPlayer.playVideo();\n        } else {\n          this.loadVideoById_(this.url.videoId);\n          this.activeVideoId = this.url.videoId;\n        }\n      } else {\n        this.trigger('waiting');\n        this.playOnReady = true;\n      }\n    }\n\n    pause() {\n      if (this.ytPlayer) {\n        this.ytPlayer.pauseVideo();\n      }\n    }\n\n    paused() {\n      return (this.ytPlayer) ?\n          (this.lastState !== YT.PlayerState.PLAYING && this.lastState !== YT.PlayerState.BUFFERING)\n          : true;\n    }\n\n    currentTime() {\n      return this.ytPlayer ? this.ytPlayer.getCurrentTime() : 0;\n    }\n\n    setCurrentTime(seconds) {\n      if (this.lastState === YT.PlayerState.PAUSED) {\n        this.timeBeforeSeek = this.currentTime();\n      }\n\n      if (!this.isSeeking) {\n        this.wasPausedBeforeSeek = this.paused();\n      }\n\n      this.ytPlayer.seekTo(seconds, true);\n      this.trigger('timeupdate');\n      this.trigger('seeking');\n      this.isSeeking = true;\n\n      // A seek event during pause does not return an event to trigger a seeked event,\n      // so run an interval timer to look for the currentTime to change\n      if (this.lastState === YT.PlayerState.PAUSED && this.timeBeforeSeek !== seconds) {\n        clearInterval(this.checkSeekedInPauseInterval);\n        this.checkSeekedInPauseInterval = setInterval(function() {\n          if (this.lastState !== YT.PlayerState.PAUSED || !this.isSeeking) {\n            // If something changed while we were waiting for the currentTime to change,\n            //  clear the interval timer\n            clearInterval(this.checkSeekedInPauseInterval);\n          } else if (this.currentTime() !== this.timeBeforeSeek) {\n            this.trigger('timeupdate');\n            this.onSeeked();\n          }\n        }.bind(this), 250);\n      }\n    }\n\n    seeking() {\n      return this.isSeeking;\n    }\n\n    seekable() {\n      if(!this.ytPlayer) {\n        return videojs.createTimeRange();\n      }\n\n      return videojs.createTimeRange(0, this.ytPlayer.getDuration());\n    }\n\n    onSeeked() {\n      clearInterval(this.checkSeekedInPauseInterval);\n      this.isSeeking = false;\n\n      if (this.wasPausedBeforeSeek) {\n        this.pause();\n      }\n\n      this.trigger('seeked');\n    }\n\n    playbackRate() {\n      return this.ytPlayer ? this.ytPlayer.getPlaybackRate() : 1;\n    }\n\n    setPlaybackRate(suggestedRate) {\n      if (!this.ytPlayer) {\n        return;\n      }\n\n      this.ytPlayer.setPlaybackRate(suggestedRate);\n    }\n\n    duration() {\n      return this.ytPlayer ? this.ytPlayer.getDuration() : 0;\n    }\n\n    currentSrc() {\n      return this.source && this.source.src;\n    }\n\n    ended() {\n      return this.ytPlayer ? (this.lastState === YT.PlayerState.ENDED) : false;\n    }\n\n    volume() {\n      return this.ytPlayer ? this.ytPlayer.getVolume() / 100.0 : 1;\n    }\n\n    setVolume(percentAsDecimal) {\n      if (!this.ytPlayer) {\n        return;\n      }\n\n      this.ytPlayer.setVolume(percentAsDecimal * 100.0);\n    }\n\n    muted() {\n      return this.ytPlayer ? this.ytPlayer.isMuted() : false;\n    }\n\n    setMuted(mute) {\n      if (!this.ytPlayer) {\n        return;\n      }\n      else{\n        this.muted(true);\n      }\n\n      if (mute) {\n        this.ytPlayer.mute();\n      } else {\n        this.ytPlayer.unMute();\n      }\n      this.setTimeout( function(){\n        this.trigger('volumechange');\n      }, 50);\n    }\n\n    buffered() {\n      if(!this.ytPlayer || !this.ytPlayer.getVideoLoadedFraction) {\n        return videojs.createTimeRange();\n      }\n\n      var bufferedEnd = this.ytPlayer.getVideoLoadedFraction() * this.ytPlayer.getDuration();\n\n      return videojs.createTimeRange(0, bufferedEnd);\n    }\n\n    // TODO: Can we really do something with this on YouTUbe?\n    preload() {}\n    load() {}\n    reset() {}\n    networkState() {\n      if (!this.ytPlayer) {\n        return 0; //NETWORK_EMPTY\n      }\n      switch (this.ytPlayer.getPlayerState()) {\n        case -1: //unstarted\n          return 0; //NETWORK_EMPTY\n        case 3: //buffering\n          return 2; //NETWORK_LOADING\n        default:\n          return 1; //NETWORK_IDLE\n      }\n    }\n    readyState() {\n      if (!this.ytPlayer) {\n        return 0; //HAVE_NOTHING\n      }\n      switch (this.ytPlayer.getPlayerState()) {\n        case -1: //unstarted\n          return 0; //HAVE_NOTHING\n        case 5: //video cued\n          return 1; //HAVE_METADATA\n        case 3: //buffering\n          return 2; //HAVE_CURRENT_DATA\n        default:\n          return 4; //HAVE_ENOUGH_DATA\n      }\n    }\n\n    supportsFullScreen() {\n      return document.fullscreenEnabled ||\n          document.webkitFullscreenEnabled ||\n          document.mozFullScreenEnabled ||\n          document.msFullscreenEnabled;\n    }\n\n    // Tries to get the highest resolution thumbnail available for the video\n    checkHighResPoster(){\n      var uri = 'https://img.youtube.com/vi/' + this.url.videoId + '/maxresdefault.jpg';\n\n      try {\n        var image = new Image();\n        image.onload = function(){\n          // Onload may still be called if YouTube returns the 120x90 error thumbnail\n          if('naturalHeight' in image){\n            if (image.naturalHeight <= 90 || image.naturalWidth <= 120) {\n              return;\n            }\n          } else if(image.height <= 90 || image.width <= 120) {\n            return;\n          }\n\n          this.poster_ = uri;\n          this.trigger('posterchange');\n        }.bind(this);\n        image.onerror = function(){};\n        image.src = uri;\n      }\n      catch(e){}\n    }\n  }\n\n  Youtube.isSupported = function() {\n    return true;\n  };\n\n  Youtube.canPlaySource = function(e) {\n    return Youtube.canPlayType(e.type);\n  };\n\n  Youtube.canPlayType = function(e) {\n    return (e === 'video/youtube');\n  };\n\n  Youtube.parseUrl = function(url) {\n    var result = {\n      videoId: null\n    };\n\n    var regex = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/;\n    var match = url.match(regex);\n\n    if (match && match[2].length === 11) {\n      result.videoId = match[2];\n    }\n\n    var regPlaylist = /[?&]list=([^#\\&\\?]+)/;\n    match = url.match(regPlaylist);\n\n    if(match && match[1]) {\n      result.listId = match[1];\n    }\n\n    return result;\n  };\n\n  function apiLoaded() {\n    YT.ready(function() {\n      Youtube.isApiReady = true;\n\n      for (var i = 0; i < Youtube.apiReadyQueue.length; ++i) {\n        Youtube.apiReadyQueue[i].initYTPlayer();\n      }\n    });\n  }\n\n  function loadScript(src, callback) {\n    var loaded = false;\n    var tag = document.createElement('script');\n    var firstScriptTag = document.getElementsByTagName('script')[0];\n    if (!firstScriptTag) {\n      // when loaded in jest without jsdom setup it doesn't get any element.\n      // In jest it doesn't really make sense to do anything, because no one is watching youtube in jest\n      return;\n    }\n    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n    tag.onload = function () {\n      if (!loaded) {\n        loaded = true;\n        callback();\n      }\n    };\n    tag.onreadystatechange = function () {\n      if (!loaded && (this.readyState === 'complete' || this.readyState === 'loaded')) {\n        loaded = true;\n        callback();\n      }\n    };\n    tag.src = src;\n  }\n\n  function injectCss() {\n    var css = // iframe blocker to catch mouse events\n        '.vjs-youtube .vjs-iframe-blocker { display: none; }' +\n        '.vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }' +\n        '.vjs-youtube .vjs-poster { background-size: cover; }' +\n        '.vjs-youtube-mobile .vjs-big-play-button { display: none; }';\n\n    var head = document.head || document.getElementsByTagName('head')[0];\n\n    var style = document.createElement('style');\n    style.type = 'text/css';\n\n    if (style.styleSheet){\n      style.styleSheet.cssText = css;\n    } else {\n      style.appendChild(document.createTextNode(css));\n    }\n\n    head.appendChild(style);\n  }\n\n  Youtube.apiReadyQueue = [];\n\n  if (typeof document !== 'undefined'){\n    loadScript('https://www.youtube.com/iframe_api', apiLoaded);\n    injectCss();\n  }\n\n  // Older versions of VJS5 doesn't have the registerTech function\n  if (typeof videojs.registerTech !== 'undefined') {\n    videojs.registerTech('Youtube', Youtube);\n  } else {\n    videojs.registerComponent('Youtube', Youtube);\n  }\n}));\n","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var sq = moment.defineLocale('sq', {\n        months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n        weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n            '_'\n        ),\n        weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n        weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n        weekdaysParseExact: true,\n        meridiemParse: /PD|MD/,\n        isPM: function (input) {\n            return input.charAt(0) === 'M';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            return hours < 12 ? 'PD' : 'MD';\n        },\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Sot në] LT',\n            nextDay: '[Nesër në] LT',\n            nextWeek: 'dddd [në] LT',\n            lastDay: '[Dje në] LT',\n            lastWeek: 'dddd [e kaluar në] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'në %s',\n            past: '%s më parë',\n            s: 'disa sekonda',\n            ss: '%d sekonda',\n            m: 'një minutë',\n            mm: '%d minuta',\n            h: 'një orë',\n            hh: '%d orë',\n            d: 'një ditë',\n            dd: '%d ditë',\n            M: 'një muaj',\n            MM: '%d muaj',\n            y: 'një vit',\n            yy: '%d vite',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return sq;\n\n})));\n","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '១',\n            2: '២',\n            3: '៣',\n            4: '៤',\n            5: '៥',\n            6: '៦',\n            7: '៧',\n            8: '៨',\n            9: '៩',\n            0: '០',\n        },\n        numberMap = {\n            '១': '1',\n            '២': '2',\n            '៣': '3',\n            '៤': '4',\n            '៥': '5',\n            '៦': '6',\n            '៧': '7',\n            '៨': '8',\n            '៩': '9',\n            '០': '0',\n        };\n\n    var km = moment.defineLocale('km', {\n        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n            '_'\n        ),\n        monthsShort:\n            'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n                '_'\n            ),\n        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n        weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n        weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ព្រឹក|ល្ងាច/,\n        isPM: function (input) {\n            return input === 'ល្ងាច';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ព្រឹក';\n            } else {\n                return 'ល្ងាច';\n            }\n        },\n        calendar: {\n            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n            nextDay: '[ស្អែក ម៉ោង] LT',\n            nextWeek: 'dddd [ម៉ោង] LT',\n            lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sទៀត',\n            past: '%sមុន',\n            s: 'ប៉ុន្មានវិនាទី',\n            ss: '%d វិនាទី',\n            m: 'មួយនាទី',\n            mm: '%d នាទី',\n            h: 'មួយម៉ោង',\n            hh: '%d ម៉ោង',\n            d: 'មួយថ្ងៃ',\n            dd: '%d ថ្ងៃ',\n            M: 'មួយខែ',\n            MM: '%d ខែ',\n            y: 'មួយឆ្នាំ',\n            yy: '%d ឆ្នាំ',\n        },\n        dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n        ordinal: 'ទី%d',\n        preparse: function (string) {\n            return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return km;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Palestine) [ar-ps]\n//! author : Majd Al-Shihabi : https://github.com/majdal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        };\n\n    var arPs = moment.defineLocale('ar-ps', {\n        months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(\n            '_'\n        ),\n        monthsShort:\n            'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .split('') // reversed since negative lookbehind not supported everywhere\n                .reverse()\n                .join('')\n                .replace(/[١٢](?![\\u062a\\u0643])/g, function (match) {\n                    return numberMap[match];\n                })\n                .split('')\n                .reverse()\n                .join('')\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return arPs;\n\n})));\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n  if (!fn) {\n    return false\n  }\n  var string = toString.call(fn)\n  return string === '[object Function]' ||\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\n    (typeof window !== 'undefined' &&\n     // IE8 and below\n     (fn === window.setTimeout ||\n      fn === window.alert ||\n      fn === window.confirm ||\n      fn === window.prompt))\n};\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortWithDots =\n            'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n        monthsShortWithoutDots =\n            'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n    var fy = moment.defineLocale('fy', {\n        months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortWithDots;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n        monthsParseExact: true,\n        weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n            '_'\n        ),\n        weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n        weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD-MM-YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[hjoed om] LT',\n            nextDay: '[moarn om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[juster om] LT',\n            lastWeek: '[ôfrûne] dddd [om] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'oer %s',\n            past: '%s lyn',\n            s: 'in pear sekonden',\n            ss: '%d sekonden',\n            m: 'ien minút',\n            mm: '%d minuten',\n            h: 'ien oere',\n            hh: '%d oeren',\n            d: 'ien dei',\n            dd: '%d dagen',\n            M: 'ien moanne',\n            MM: '%d moannen',\n            y: 'ien jier',\n            yy: '%d jierren',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n        ordinal: function (number) {\n            return (\n                number +\n                (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n            );\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return fy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var mt = moment.defineLocale('mt', {\n        months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n        weekdays:\n            'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n                '_'\n            ),\n        weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n        weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Illum fil-]LT',\n            nextDay: '[Għada fil-]LT',\n            nextWeek: 'dddd [fil-]LT',\n            lastDay: '[Il-bieraħ fil-]LT',\n            lastWeek: 'dddd [li għadda] [fil-]LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'f’ %s',\n            past: '%s ilu',\n            s: 'ftit sekondi',\n            ss: '%d sekondi',\n            m: 'minuta',\n            mm: '%d minuti',\n            h: 'siegħa',\n            hh: '%d siegħat',\n            d: 'ġurnata',\n            dd: '%d ġranet',\n            M: 'xahar',\n            MM: '%d xhur',\n            y: 'sena',\n            yy: '%d sni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return mt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-ші',\n        1: '-ші',\n        2: '-ші',\n        3: '-ші',\n        4: '-ші',\n        5: '-ші',\n        6: '-шы',\n        7: '-ші',\n        8: '-ші',\n        9: '-шы',\n        10: '-шы',\n        20: '-шы',\n        30: '-шы',\n        40: '-шы',\n        50: '-ші',\n        60: '-шы',\n        70: '-ші',\n        80: '-ші',\n        90: '-шы',\n        100: '-ші',\n    };\n\n    var kk = moment.defineLocale('kk', {\n        months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n            '_'\n        ),\n        monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n        weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n            '_'\n        ),\n        weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n        weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бүгін сағат] LT',\n            nextDay: '[Ертең сағат] LT',\n            nextWeek: 'dddd [сағат] LT',\n            lastDay: '[Кеше сағат] LT',\n            lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ішінде',\n            past: '%s бұрын',\n            s: 'бірнеше секунд',\n            ss: '%d секунд',\n            m: 'бір минут',\n            mm: '%d минут',\n            h: 'бір сағат',\n            hh: '%d сағат',\n            d: 'бір күн',\n            dd: '%d күн',\n            M: 'бір ай',\n            MM: '%d ай',\n            y: 'бір жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return kk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var hyAm = moment.defineLocale('hy-am', {\n        months: {\n            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n                '_'\n            ),\n            standalone:\n                'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n                    '_'\n                ),\n        },\n        monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n        weekdays:\n            'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n                '_'\n            ),\n        weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY թ.',\n            LLL: 'D MMMM YYYY թ., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n        },\n        calendar: {\n            sameDay: '[այսօր] LT',\n            nextDay: '[վաղը] LT',\n            lastDay: '[երեկ] LT',\n            nextWeek: function () {\n                return 'dddd [օրը ժամը] LT';\n            },\n            lastWeek: function () {\n                return '[անցած] dddd [օրը ժամը] LT';\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s հետո',\n            past: '%s առաջ',\n            s: 'մի քանի վայրկյան',\n            ss: '%d վայրկյան',\n            m: 'րոպե',\n            mm: '%d րոպե',\n            h: 'ժամ',\n            hh: '%d ժամ',\n            d: 'օր',\n            dd: '%d օր',\n            M: 'ամիս',\n            MM: '%d ամիս',\n            y: 'տարի',\n            yy: '%d տարի',\n        },\n        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n        isPM: function (input) {\n            return /^(ցերեկվա|երեկոյան)$/.test(input);\n        },\n        meridiem: function (hour) {\n            if (hour < 4) {\n                return 'գիշերվա';\n            } else if (hour < 12) {\n                return 'առավոտվա';\n            } else if (hour < 17) {\n                return 'ցերեկվա';\n            } else {\n                return 'երեկոյան';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'DDD':\n                case 'w':\n                case 'W':\n                case 'DDDo':\n                    if (number === 1) {\n                        return number + '-ին';\n                    }\n                    return number + '-րդ';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return hyAm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ca = moment.defineLocale('ca', {\n        months: {\n            standalone:\n                'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n                    '_'\n                ),\n            format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort:\n            'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n                '_'\n            ),\n        weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a les] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextDay: function () {\n                return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastDay: function () {\n                return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [passat a ' +\n                    (this.hours() !== 1 ? 'les' : 'la') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'uns segons',\n            ss: '%d segons',\n            m: 'un minut',\n            mm: '%d minuts',\n            h: 'una hora',\n            hh: '%d hores',\n            d: 'un dia',\n            dd: '%d dies',\n            M: 'un mes',\n            MM: '%d mesos',\n            y: 'un any',\n            yy: '%d anys',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                      ? 'n'\n                      : number === 3\n                        ? 'r'\n                        : number === 4\n                          ? 't'\n                          : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return ca;\n\n})));\n","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var gl = moment.defineLocale('gl', {\n        months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n            '_'\n        ),\n        monthsShort:\n            'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n            },\n            lastDay: function () {\n                return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: function (str) {\n                if (str.indexOf('un') === 0) {\n                    return 'n' + str;\n                }\n                return 'en ' + str;\n            },\n            past: 'hai %s',\n            s: 'uns segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'unha hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return gl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '১',\n            2: '২',\n            3: '৩',\n            4: '৪',\n            5: '৫',\n            6: '৬',\n            7: '৭',\n            8: '৮',\n            9: '৯',\n            0: '০',\n        },\n        numberMap = {\n            '১': '1',\n            '২': '2',\n            '৩': '3',\n            '৪': '4',\n            '৫': '5',\n            '৬': '6',\n            '৭': '7',\n            '৮': '8',\n            '৯': '9',\n            '০': '0',\n        };\n\n    var bnBd = moment.defineLocale('bn-bd', {\n        months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n            '_'\n        ),\n        monthsShort:\n            'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n                '_'\n            ),\n        weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n            '_'\n        ),\n        weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm সময়',\n            LTS: 'A h:mm:ss সময়',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm সময়',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n        },\n        calendar: {\n            sameDay: '[আজ] LT',\n            nextDay: '[আগামীকাল] LT',\n            nextWeek: 'dddd, LT',\n            lastDay: '[গতকাল] LT',\n            lastWeek: '[গত] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s পরে',\n            past: '%s আগে',\n            s: 'কয়েক সেকেন্ড',\n            ss: '%d সেকেন্ড',\n            m: 'এক মিনিট',\n            mm: '%d মিনিট',\n            h: 'এক ঘন্টা',\n            hh: '%d ঘন্টা',\n            d: 'এক দিন',\n            dd: '%d দিন',\n            M: 'এক মাস',\n            MM: '%d মাস',\n            y: 'এক বছর',\n            yy: '%d বছর',\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n\n        meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'রাত') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ভোর') {\n                return hour;\n            } else if (meridiem === 'সকাল') {\n                return hour;\n            } else if (meridiem === 'দুপুর') {\n                return hour >= 3 ? hour : hour + 12;\n            } else if (meridiem === 'বিকাল') {\n                return hour + 12;\n            } else if (meridiem === 'সন্ধ্যা') {\n                return hour + 12;\n            }\n        },\n\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 6) {\n                return 'ভোর';\n            } else if (hour < 12) {\n                return 'সকাল';\n            } else if (hour < 15) {\n                return 'দুপুর';\n            } else if (hour < 18) {\n                return 'বিকাল';\n            } else if (hour < 20) {\n                return 'সন্ধ্যা';\n            } else {\n                return 'রাত';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return bnBd;\n\n})));\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!./knockout-latest.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ko\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ko\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n  if (decodeResponseBody === void 0) {\n    decodeResponseBody = false;\n  }\n\n  return function (err, response, responseBody) {\n    // if the XHR failed, return that error\n    if (err) {\n      callback(err);\n      return;\n    } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n    if (response.statusCode >= 400 && response.statusCode <= 599) {\n      var cause = responseBody;\n\n      if (decodeResponseBody) {\n        if (window.TextDecoder) {\n          var charset = getCharset(response.headers && response.headers['content-type']);\n\n          try {\n            cause = new TextDecoder(charset).decode(responseBody);\n          } catch (e) {}\n        } else {\n          cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n        }\n      }\n\n      callback({\n        cause: cause\n      });\n      return;\n    } // otherwise, request succeeded\n\n\n    callback(null, responseBody);\n  };\n};\n\nfunction getCharset(contentTypeHeader) {\n  if (contentTypeHeader === void 0) {\n    contentTypeHeader = '';\n  }\n\n  return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n    var _contentType$split = contentType.split('='),\n        type = _contentType$split[0],\n        value = _contentType$split[1];\n\n    if (type.trim() === 'charset') {\n      return value.trim();\n    }\n\n    return charset;\n  }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    /*jshint -W100*/\n    var si = moment.defineLocale('si', {\n        months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n            '_'\n        ),\n        monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n            '_'\n        ),\n        weekdays:\n            'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n                '_'\n            ),\n        weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n        weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'a h:mm',\n            LTS: 'a h:mm:ss',\n            L: 'YYYY/MM/DD',\n            LL: 'YYYY MMMM D',\n            LLL: 'YYYY MMMM D, a h:mm',\n            LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n        },\n        calendar: {\n            sameDay: '[අද] LT[ට]',\n            nextDay: '[හෙට] LT[ට]',\n            nextWeek: 'dddd LT[ට]',\n            lastDay: '[ඊයේ] LT[ට]',\n            lastWeek: '[පසුගිය] dddd LT[ට]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sකින්',\n            past: '%sකට පෙර',\n            s: 'තත්පර කිහිපය',\n            ss: 'තත්පර %d',\n            m: 'මිනිත්තුව',\n            mm: 'මිනිත්තු %d',\n            h: 'පැය',\n            hh: 'පැය %d',\n            d: 'දිනය',\n            dd: 'දින %d',\n            M: 'මාසය',\n            MM: 'මාස %d',\n            y: 'වසර',\n            yy: 'වසර %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n        ordinal: function (number) {\n            return number + ' වැනි';\n        },\n        meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n        isPM: function (input) {\n            return input === 'ප.ව.' || input === 'පස් වරු';\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'ප.ව.' : 'පස් වරු';\n            } else {\n                return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n            }\n        },\n    });\n\n    return si;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var uz = moment.defineLocale('uz', {\n        months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n        weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n        weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'D MMMM YYYY, dddd HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бугун соат] LT [да]',\n            nextDay: '[Эртага] LT [да]',\n            nextWeek: 'dddd [куни соат] LT [да]',\n            lastDay: '[Кеча соат] LT [да]',\n            lastWeek: '[Утган] dddd [куни соат] LT [да]',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'Якин %s ичида',\n            past: 'Бир неча %s олдин',\n            s: 'фурсат',\n            ss: '%d фурсат',\n            m: 'бир дакика',\n            mm: '%d дакика',\n            h: 'бир соат',\n            hh: '%d соат',\n            d: 'бир кун',\n            dd: '%d кун',\n            M: 'бир ой',\n            MM: '%d ой',\n            y: 'бир йил',\n            yy: '%d йил',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return uz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var es = moment.defineLocale('es', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return es;\n\n})));\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next  */\nfunction getTarget(target) {\n  if (typeof memo[target] === \"undefined\") {\n    var styleTarget = document.querySelector(target);\n\n    // Special case to return head of iframe instead of iframe itself\n    if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n      try {\n        // This will throw an exception if access to iframe is blocked\n        // due to cross-origin restrictions\n        styleTarget = styleTarget.contentDocument.head;\n      } catch (e) {\n        // istanbul ignore next\n        styleTarget = null;\n      }\n    }\n    memo[target] = styleTarget;\n  }\n  return memo[target];\n}\n\n/* istanbul ignore next  */\nfunction insertBySelector(insert, style) {\n  var target = getTarget(insert);\n  if (!target) {\n    throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n  }\n  target.appendChild(style);\n}\nmodule.exports = insertBySelector;","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tzmLatn = moment.defineLocale('tzm-latn', {\n        months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n            '_'\n        ),\n        monthsShort:\n            'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n                '_'\n            ),\n        weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[asdkh g] LT',\n            nextDay: '[aska g] LT',\n            nextWeek: 'dddd [g] LT',\n            lastDay: '[assant g] LT',\n            lastWeek: 'dddd [g] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dadkh s yan %s',\n            past: 'yan %s',\n            s: 'imik',\n            ss: '%d imik',\n            m: 'minuḍ',\n            mm: '%d minuḍ',\n            h: 'saɛa',\n            hh: '%d tassaɛin',\n            d: 'ass',\n            dd: '%d ossan',\n            M: 'ayowr',\n            MM: '%d iyyirn',\n            y: 'asgas',\n            yy: '%d isgasn',\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return tzmLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var monthsShortDot =\n            'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n                '_'\n            ),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n        monthsParse = [\n            /^ene/i,\n            /^feb/i,\n            /^mar/i,\n            /^abr/i,\n            /^may/i,\n            /^jun/i,\n            /^jul/i,\n            /^ago/i,\n            /^sep/i,\n            /^oct/i,\n            /^nov/i,\n            /^dic/i,\n        ],\n        monthsRegex =\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n    var esMx = moment.defineLocale('es-mx', {\n        months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n            '_'\n        ),\n        monthsShort: function (m, format) {\n            if (!m) {\n                return monthsShortDot;\n            } else if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex:\n            /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n        monthsShortStrictRegex:\n            /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n        monthsParse: monthsParse,\n        longMonthsParse: monthsParse,\n        shortMonthsParse: monthsParse,\n        weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY H:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextDay: function () {\n                return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            nextWeek: function () {\n                return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastDay: function () {\n                return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n            },\n            lastWeek: function () {\n                return (\n                    '[el] dddd [pasado a la' +\n                    (this.hours() !== 1 ? 's' : '') +\n                    '] LT'\n                );\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'en %s',\n            past: 'hace %s',\n            s: 'unos segundos',\n            ss: '%d segundos',\n            m: 'un minuto',\n            mm: '%d minutos',\n            h: 'una hora',\n            hh: '%d horas',\n            d: 'un día',\n            dd: '%d días',\n            w: 'una semana',\n            ww: '%d semanas',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un año',\n            yy: '%d años',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n        invalidDate: 'Fecha inválida',\n    });\n\n    return esMx;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var bg = moment.defineLocale('bg', {\n        months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n            '_'\n        ),\n        monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n            '_'\n        ),\n        weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n        weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'D.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY H:mm',\n            LLLL: 'dddd, D MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[Днес в] LT',\n            nextDay: '[Утре в] LT',\n            nextWeek: 'dddd [в] LT',\n            lastDay: '[Вчера в] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Миналата] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Миналия] dddd [в] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'след %s',\n            past: 'преди %s',\n            s: 'няколко секунди',\n            ss: '%d секунди',\n            m: 'минута',\n            mm: '%d минути',\n            h: 'час',\n            hh: '%d часа',\n            d: 'ден',\n            dd: '%d дена',\n            w: 'седмица',\n            ww: '%d седмици',\n            M: 'месец',\n            MM: '%d месеца',\n            y: 'година',\n            yy: '%d години',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal: function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return bg;\n\n})));\n","\"use strict\";\n\n/* istanbul ignore next  */\nfunction apply(styleElement, options, obj) {\n  var css = \"\";\n  if (obj.supports) {\n    css += \"@supports (\".concat(obj.supports, \") {\");\n  }\n  if (obj.media) {\n    css += \"@media \".concat(obj.media, \" {\");\n  }\n  var needLayer = typeof obj.layer !== \"undefined\";\n  if (needLayer) {\n    css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n  }\n  css += obj.css;\n  if (needLayer) {\n    css += \"}\";\n  }\n  if (obj.media) {\n    css += \"}\";\n  }\n  if (obj.supports) {\n    css += \"}\";\n  }\n  var sourceMap = obj.sourceMap;\n  if (sourceMap && typeof btoa !== \"undefined\") {\n    css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n  }\n\n  // For old IE\n  /* istanbul ignore if  */\n  options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n  // istanbul ignore if\n  if (styleElement.parentNode === null) {\n    return false;\n  }\n  styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next  */\nfunction domAPI(options) {\n  if (typeof document === \"undefined\") {\n    return {\n      update: function update() {},\n      remove: function remove() {}\n    };\n  }\n  var styleElement = options.insertStyleElement(options);\n  return {\n    update: function update(obj) {\n      apply(styleElement, options, obj);\n    },\n    remove: function remove() {\n      removeStyleElement(styleElement);\n    }\n  };\n}\nmodule.exports = domAPI;","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eine Minute', 'einer Minute'],\n            h: ['eine Stunde', 'einer Stunde'],\n            d: ['ein Tag', 'einem Tag'],\n            dd: [number + ' Tage', number + ' Tagen'],\n            w: ['eine Woche', 'einer Woche'],\n            M: ['ein Monat', 'einem Monat'],\n            MM: [number + ' Monate', number + ' Monaten'],\n            y: ['ein Jahr', 'einem Jahr'],\n            yy: [number + ' Jahre', number + ' Jahren'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var de = moment.defineLocale('de', {\n        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact: true,\n        weekdays:\n            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY HH:mm',\n            LLLL: 'dddd, D. MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: 'vor %s',\n            s: 'ein paar Sekunden',\n            ss: '%d Sekunden',\n            m: processRelativeTime,\n            mm: '%d Minuten',\n            h: processRelativeTime,\n            hh: '%d Stunden',\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            w: processRelativeTime,\n            ww: '%d Wochen',\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return de;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var frCh = moment.defineLocale('fr-ch', {\n        months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n            '_'\n        ),\n        monthsShort:\n            'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Aujourd’hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'dans %s',\n            past: 'il y a %s',\n            s: 'quelques secondes',\n            ss: '%d secondes',\n            m: 'une minute',\n            mm: '%d minutes',\n            h: 'une heure',\n            hh: '%d heures',\n            d: 'un jour',\n            dd: '%d jours',\n            M: 'un mois',\n            MM: '%d mois',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                // Words with masculine grammatical gender: mois, trimestre, jour\n                default:\n                case 'M':\n                case 'Q':\n                case 'D':\n                case 'DDD':\n                case 'd':\n                    return number + (number === 1 ? 'er' : 'e');\n\n                // Words with feminine grammatical gender: semaine\n                case 'w':\n                case 'W':\n                    return number + (number === 1 ? 're' : 'e');\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return frCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var translator = {\n        words: {\n            //Different grammatical cases\n            ss: ['sekund', 'sekunda', 'sekundi'],\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mjesec', 'mjeseca', 'mjeseci'],\n            yy: ['godina', 'godine', 'godina'],\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1\n                ? wordKey[0]\n                : number >= 2 && number <= 4\n                  ? wordKey[1]\n                  : wordKey[2];\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return (\n                    number +\n                    ' ' +\n                    translator.correctGrammaticalCase(number, wordKey)\n                );\n            }\n        },\n    };\n\n    var me = moment.defineLocale('me', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n            '_'\n        ),\n        monthsShort:\n            'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n            '_'\n        ),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm',\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sjutra u] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay: '[juče u] LT',\n            lastWeek: function () {\n                var lastWeekDays = [\n                    '[prošle] [nedjelje] [u] LT',\n                    '[prošlog] [ponedjeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srijede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT',\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'za %s',\n            past: 'prije %s',\n            s: 'nekoliko sekundi',\n            ss: translator.translate,\n            m: translator.translate,\n            mm: translator.translate,\n            h: translator.translate,\n            hh: translator.translate,\n            d: 'dan',\n            dd: translator.translate,\n            M: 'mjesec',\n            MM: translator.translate,\n            y: 'godinu',\n            yy: translator.translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return me;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        months = [\n            'کانونی دووەم',\n            'شوبات',\n            'ئازار',\n            'نیسان',\n            'ئایار',\n            'حوزەیران',\n            'تەمموز',\n            'ئاب',\n            'ئەیلوول',\n            'تشرینی یەكەم',\n            'تشرینی دووەم',\n            'كانونی یەکەم',\n        ];\n\n    var ku = moment.defineLocale('ku', {\n        months: months,\n        monthsShort: months,\n        weekdays:\n            'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n                '_'\n            ),\n        weekdaysShort:\n            'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n        weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ئێواره‌|به‌یانی/,\n        isPM: function (input) {\n            return /ئێواره‌/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'به‌یانی';\n            } else {\n                return 'ئێواره‌';\n            }\n        },\n        calendar: {\n            sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n            nextDay: '[به‌یانی كاتژمێر] LT',\n            nextWeek: 'dddd [كاتژمێر] LT',\n            lastDay: '[دوێنێ كاتژمێر] LT',\n            lastWeek: 'dddd [كاتژمێر] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'له‌ %s',\n            past: '%s',\n            s: 'چه‌ند چركه‌یه‌ك',\n            ss: 'چركه‌ %d',\n            m: 'یه‌ك خوله‌ك',\n            mm: '%d خوله‌ك',\n            h: 'یه‌ك كاتژمێر',\n            hh: '%d كاتژمێر',\n            d: 'یه‌ك ڕۆژ',\n            dd: '%d ڕۆژ',\n            M: 'یه‌ك مانگ',\n            MM: '%d مانگ',\n            y: 'یه‌ك ساڵ',\n            yy: '%d ساڵ',\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ku;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '१',\n            2: '२',\n            3: '३',\n            4: '४',\n            5: '५',\n            6: '६',\n            7: '७',\n            8: '८',\n            9: '९',\n            0: '०',\n        },\n        numberMap = {\n            '१': '1',\n            '२': '2',\n            '३': '3',\n            '४': '4',\n            '५': '5',\n            '६': '6',\n            '७': '7',\n            '८': '8',\n            '९': '9',\n            '०': '0',\n        };\n\n    var ne = moment.defineLocale('ne', {\n        months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n            '_'\n        ),\n        monthsShort:\n            'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n            '_'\n        ),\n        weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n        weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'Aको h:mm बजे',\n            LTS: 'Aको h:mm:ss बजे',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, Aको h:mm बजे',\n            LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राति') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'बिहान') {\n                return hour;\n            } else if (meridiem === 'दिउँसो') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'साँझ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 3) {\n                return 'राति';\n            } else if (hour < 12) {\n                return 'बिहान';\n            } else if (hour < 16) {\n                return 'दिउँसो';\n            } else if (hour < 20) {\n                return 'साँझ';\n            } else {\n                return 'राति';\n            }\n        },\n        calendar: {\n            sameDay: '[आज] LT',\n            nextDay: '[भोलि] LT',\n            nextWeek: '[आउँदो] dddd[,] LT',\n            lastDay: '[हिजो] LT',\n            lastWeek: '[गएको] dddd[,] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%sमा',\n            past: '%s अगाडि',\n            s: 'केही क्षण',\n            ss: '%d सेकेण्ड',\n            m: 'एक मिनेट',\n            mm: '%d मिनेट',\n            h: 'एक घण्टा',\n            hh: '%d घण्टा',\n            d: 'एक दिन',\n            dd: '%d दिन',\n            M: 'एक महिना',\n            MM: '%d महिना',\n            y: 'एक बर्ष',\n            yy: '%d बर्ष',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return ne;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enCa = moment.defineLocale('en-ca', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'YYYY-MM-DD',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY h:mm A',\n            LLLL: 'dddd, MMMM D, YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n    });\n\n    return enCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ptBr = moment.defineLocale('pt-br', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays:\n            'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n                '_'\n            ),\n        weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n        weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'poucos segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        invalidDate: 'Data inválida',\n    });\n\n    return ptBr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var it = moment.defineLocale('it', {\n        months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n            '_'\n        ),\n        monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n            '_'\n        ),\n        weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n        weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: function () {\n                return (\n                    '[Oggi a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextDay: function () {\n                return (\n                    '[Domani a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            nextWeek: function () {\n                return (\n                    'dddd [a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastDay: function () {\n                return (\n                    '[Ieri a' +\n                    (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n                    ']LT'\n                );\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return (\n                            '[La scorsa] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                  ? ' '\n                                  : \"ll'\") +\n                            ']LT'\n                        );\n                    default:\n                        return (\n                            '[Lo scorso] dddd [a' +\n                            (this.hours() > 1\n                                ? 'lle '\n                                : this.hours() === 0\n                                  ? ' '\n                                  : \"ll'\") +\n                            ']LT'\n                        );\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'tra %s',\n            past: '%s fa',\n            s: 'alcuni secondi',\n            ss: '%d secondi',\n            m: 'un minuto',\n            mm: '%d minuti',\n            h: \"un'ora\",\n            hh: '%d ore',\n            d: 'un giorno',\n            dd: '%d giorni',\n            w: 'una settimana',\n            ww: '%d settimane',\n            M: 'un mese',\n            MM: '%d mesi',\n            y: 'un anno',\n            yy: '%d anni',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return it;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ugCn = moment.defineLocale('ug-cn', {\n        months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n                '_'\n            ),\n        weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n            '_'\n        ),\n        weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n            LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n            LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n        },\n        meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (\n                meridiem === 'يېرىم كېچە' ||\n                meridiem === 'سەھەر' ||\n                meridiem === 'چۈشتىن بۇرۇن'\n            ) {\n                return hour;\n            } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n                return hour + 12;\n            } else {\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return 'يېرىم كېچە';\n            } else if (hm < 900) {\n                return 'سەھەر';\n            } else if (hm < 1130) {\n                return 'چۈشتىن بۇرۇن';\n            } else if (hm < 1230) {\n                return 'چۈش';\n            } else if (hm < 1800) {\n                return 'چۈشتىن كېيىن';\n            } else {\n                return 'كەچ';\n            }\n        },\n        calendar: {\n            sameDay: '[بۈگۈن سائەت] LT',\n            nextDay: '[ئەتە سائەت] LT',\n            nextWeek: '[كېلەركى] dddd [سائەت] LT',\n            lastDay: '[تۆنۈگۈن] LT',\n            lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s كېيىن',\n            past: '%s بۇرۇن',\n            s: 'نەچچە سېكونت',\n            ss: '%d سېكونت',\n            m: 'بىر مىنۇت',\n            mm: '%d مىنۇت',\n            h: 'بىر سائەت',\n            hh: '%d سائەت',\n            d: 'بىر كۈن',\n            dd: '%d كۈن',\n            M: 'بىر ئاي',\n            MM: '%d ئاي',\n            y: 'بىر يىل',\n            yy: '%d يىل',\n        },\n\n        dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '-كۈنى';\n                case 'w':\n                case 'W':\n                    return number + '-ھەپتە';\n                default:\n                    return number;\n            }\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week: {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return ugCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        0: '-чү',\n        1: '-чи',\n        2: '-чи',\n        3: '-чү',\n        4: '-чү',\n        5: '-чи',\n        6: '-чы',\n        7: '-чи',\n        8: '-чи',\n        9: '-чу',\n        10: '-чу',\n        20: '-чы',\n        30: '-чу',\n        40: '-чы',\n        50: '-чү',\n        60: '-чы',\n        70: '-чи',\n        80: '-чи',\n        90: '-чу',\n        100: '-чү',\n    };\n\n    var ky = moment.defineLocale('ky', {\n        months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n            '_'\n        ),\n        monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n            '_'\n        ),\n        weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n            '_'\n        ),\n        weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n        weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Бүгүн саат] LT',\n            nextDay: '[Эртең саат] LT',\n            nextWeek: 'dddd [саат] LT',\n            lastDay: '[Кечээ саат] LT',\n            lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ичинде',\n            past: '%s мурун',\n            s: 'бирнече секунд',\n            ss: '%d секунд',\n            m: 'бир мүнөт',\n            mm: '%d мүнөт',\n            h: 'бир саат',\n            hh: '%d саат',\n            d: 'бир күн',\n            dd: '%d күн',\n            M: 'бир ай',\n            MM: '%d ай',\n            y: 'бир жыл',\n            yy: '%d жыл',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n        ordinal: function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return ky;\n\n})));\n","\"use strict\";\n\nvar RetryManager = /*#__PURE__*/function () {\n  function RetryManager() {\n    this.maxAttempts_ = 1;\n    this.delayFactor_ = 0.1;\n    this.fuzzFactor_ = 0.1;\n    this.initialDelay_ = 1000;\n    this.enabled_ = false;\n  }\n\n  var _proto = RetryManager.prototype;\n\n  _proto.getIsEnabled = function getIsEnabled() {\n    return this.enabled_;\n  };\n\n  _proto.enable = function enable() {\n    this.enabled_ = true;\n  };\n\n  _proto.disable = function disable() {\n    this.enabled_ = false;\n  };\n\n  _proto.reset = function reset() {\n    this.maxAttempts_ = 1;\n    this.delayFactor_ = 0.1;\n    this.fuzzFactor_ = 0.1;\n    this.initialDelay_ = 1000;\n    this.enabled_ = false;\n  };\n\n  _proto.getMaxAttempts = function getMaxAttempts() {\n    return this.maxAttempts_;\n  };\n\n  _proto.setMaxAttempts = function setMaxAttempts(maxAttempts) {\n    this.maxAttempts_ = maxAttempts;\n  };\n\n  _proto.getDelayFactor = function getDelayFactor() {\n    return this.delayFactor_;\n  };\n\n  _proto.setDelayFactor = function setDelayFactor(delayFactor) {\n    this.delayFactor_ = delayFactor;\n  };\n\n  _proto.getFuzzFactor = function getFuzzFactor() {\n    return this.fuzzFactor_;\n  };\n\n  _proto.setFuzzFactor = function setFuzzFactor(fuzzFactor) {\n    this.fuzzFactor_ = fuzzFactor;\n  };\n\n  _proto.getInitialDelay = function getInitialDelay() {\n    return this.initialDelay_;\n  };\n\n  _proto.setInitialDelay = function setInitialDelay(initialDelay) {\n    this.initialDelay_ = initialDelay;\n  };\n\n  _proto.createRetry = function createRetry(_temp) {\n    var _ref = _temp === void 0 ? {} : _temp,\n        maxAttempts = _ref.maxAttempts,\n        delayFactor = _ref.delayFactor,\n        fuzzFactor = _ref.fuzzFactor,\n        initialDelay = _ref.initialDelay;\n\n    return new Retry({\n      maxAttempts: maxAttempts || this.maxAttempts_,\n      delayFactor: delayFactor || this.delayFactor_,\n      fuzzFactor: fuzzFactor || this.fuzzFactor_,\n      initialDelay: initialDelay || this.initialDelay_\n    });\n  };\n\n  return RetryManager;\n}();\n\nvar Retry = /*#__PURE__*/function () {\n  function Retry(options) {\n    this.maxAttempts_ = options.maxAttempts;\n    this.delayFactor_ = options.delayFactor;\n    this.fuzzFactor_ = options.fuzzFactor;\n    this.currentDelay_ = options.initialDelay;\n    this.currentAttempt_ = 1;\n  }\n\n  var _proto2 = Retry.prototype;\n\n  _proto2.moveToNextAttempt = function moveToNextAttempt() {\n    this.currentAttempt_++;\n    var delayDelta = this.currentDelay_ * this.delayFactor_;\n    this.currentDelay_ = this.currentDelay_ + delayDelta;\n  };\n\n  _proto2.shouldRetry = function shouldRetry() {\n    return this.currentAttempt_ < this.maxAttempts_;\n  };\n\n  _proto2.getCurrentDelay = function getCurrentDelay() {\n    return this.currentDelay_;\n  };\n\n  _proto2.getCurrentMinPossibleDelay = function getCurrentMinPossibleDelay() {\n    return (1 - this.fuzzFactor_) * this.currentDelay_;\n  };\n\n  _proto2.getCurrentMaxPossibleDelay = function getCurrentMaxPossibleDelay() {\n    return (1 + this.fuzzFactor_) * this.currentDelay_;\n  }\n  /**\n   * For example fuzzFactor is 0.1\n   * This means ±10% deviation\n   * So if we have delay as 1000\n   * This function can generate any value from 900 to 1100\n   */\n  ;\n\n  _proto2.getCurrentFuzzedDelay = function getCurrentFuzzedDelay() {\n    var lowValue = this.getCurrentMinPossibleDelay();\n    var highValue = this.getCurrentMaxPossibleDelay();\n    return lowValue + Math.random() * (highValue - lowValue);\n  };\n\n  return Retry;\n}();\n\nmodule.exports = RetryManager;","//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arKw = moment.defineLocale('ar-kw', {\n        months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return arKw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tet = moment.defineLocale('tet', {\n        months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n        weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n        weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n        weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Ohin iha] LT',\n            nextDay: '[Aban iha] LT',\n            nextWeek: 'dddd [iha] LT',\n            lastDay: '[Horiseik iha] LT',\n            lastWeek: 'dddd [semana kotuk] [iha] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'iha %s',\n            past: '%s liuba',\n            s: 'segundu balun',\n            ss: 'segundu %d',\n            m: 'minutu ida',\n            mm: 'minutu %d',\n            h: 'oras ida',\n            hh: 'oras %d',\n            d: 'loron ida',\n            dd: 'loron %d',\n            M: 'fulan ida',\n            MM: 'fulan %d',\n            y: 'tinan ida',\n            yy: 'tinan %d',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tet;\n\n})));\n","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11\n            ? forms[0]\n            : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n              ? forms[1]\n              : forms[2];\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n            mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n            hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n            dd: 'дзень_дні_дзён',\n            MM: 'месяц_месяцы_месяцаў',\n            yy: 'год_гады_гадоў',\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвіліна' : 'хвіліну';\n        } else if (key === 'h') {\n            return withoutSuffix ? 'гадзіна' : 'гадзіну';\n        } else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n\n    var be = moment.defineLocale('be', {\n        months: {\n            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n                '_'\n            ),\n            standalone:\n                'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n                    '_'\n                ),\n        },\n        monthsShort:\n            'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n        weekdays: {\n            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n                '_'\n            ),\n            standalone:\n                'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n                    '_'\n                ),\n            isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n        },\n        weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY г.',\n            LLL: 'D MMMM YYYY г., HH:mm',\n            LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n        },\n        calendar: {\n            sameDay: '[Сёння ў] LT',\n            nextDay: '[Заўтра ў] LT',\n            lastDay: '[Учора ў] LT',\n            nextWeek: function () {\n                return '[У] dddd [ў] LT';\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[У мінулую] dddd [ў] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[У мінулы] dddd [ў] LT';\n                }\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'праз %s',\n            past: '%s таму',\n            s: 'некалькі секунд',\n            m: relativeTimeWithPlural,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithPlural,\n            hh: relativeTimeWithPlural,\n            d: 'дзень',\n            dd: relativeTimeWithPlural,\n            M: 'месяц',\n            MM: relativeTimeWithPlural,\n            y: 'год',\n            yy: relativeTimeWithPlural,\n        },\n        meridiemParse: /ночы|раніцы|дня|вечара/,\n        isPM: function (input) {\n            return /^(дня|вечара)$/.test(input);\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночы';\n            } else if (hour < 12) {\n                return 'раніцы';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечара';\n            }\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return (number % 10 === 2 || number % 10 === 3) &&\n                        number % 100 !== 12 &&\n                        number % 100 !== 13\n                        ? number + '-і'\n                        : number + '-ы';\n                case 'D':\n                    return number + '-га';\n                default:\n                    return number;\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return be;\n\n})));\n","var getUint64 = require('../utils/numbers.js').getUint64;\n\nvar parseSidx = function(data) {\n  var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n      result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4)),\n        references: [],\n        referenceId: view.getUint32(4),\n        timescale: view.getUint32(8)\n      },\n    i = 12;\n\n  if (result.version === 0) {\n    result.earliestPresentationTime = view.getUint32(i);\n    result.firstOffset = view.getUint32(i + 4);\n    i += 8;\n  } else {\n    // read 64 bits\n    result.earliestPresentationTime = getUint64(data.subarray(i));\n    result.firstOffset = getUint64(data.subarray(i + 8));\n    i += 16;\n  }\n\n  i += 2; // reserved\n\n  var referenceCount = view.getUint16(i);\n\n  i += 2; // start of references\n\n  for (; referenceCount > 0; i += 12, referenceCount--) {\n    result.references.push({\n      referenceType: (data[i] & 0x80) >>> 7,\n      referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n      subsegmentDuration: view.getUint32(i + 4),\n      startsWithSap: !!(data[i + 8] & 0x80),\n      sapType: (data[i + 8] & 0x70) >>> 4,\n      sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n    });\n  }\n\n  return result;\n};\n\n\nmodule.exports = parseSidx;\n","var dom = require('./dom')\nexports.DOMImplementation = dom.DOMImplementation\nexports.XMLSerializer = dom.XMLSerializer\nexports.DOMParser = require('./dom-parser').DOMParser\n","//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enIn = moment.defineLocale('en-in', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 1st is the first week of the year.\n        },\n    });\n\n    return enIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function translate(number, withoutSuffix, key, isFuture) {\n        switch (key) {\n            case 's':\n                return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n            case 'ss':\n                return number + (withoutSuffix ? ' секунд' : ' секундын');\n            case 'm':\n            case 'mm':\n                return number + (withoutSuffix ? ' минут' : ' минутын');\n            case 'h':\n            case 'hh':\n                return number + (withoutSuffix ? ' цаг' : ' цагийн');\n            case 'd':\n            case 'dd':\n                return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n            case 'M':\n            case 'MM':\n                return number + (withoutSuffix ? ' сар' : ' сарын');\n            case 'y':\n            case 'yy':\n                return number + (withoutSuffix ? ' жил' : ' жилийн');\n            default:\n                return number;\n        }\n    }\n\n    var mn = moment.defineLocale('mn', {\n        months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n            '_'\n        ),\n        monthsShort:\n            '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n        weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n        weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'YYYY-MM-DD',\n            LL: 'YYYY оны MMMMын D',\n            LLL: 'YYYY оны MMMMын D HH:mm',\n            LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n        },\n        meridiemParse: /ҮӨ|ҮХ/i,\n        isPM: function (input) {\n            return input === 'ҮХ';\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ҮӨ';\n            } else {\n                return 'ҮХ';\n            }\n        },\n        calendar: {\n            sameDay: '[Өнөөдөр] LT',\n            nextDay: '[Маргааш] LT',\n            nextWeek: '[Ирэх] dddd LT',\n            lastDay: '[Өчигдөр] LT',\n            lastWeek: '[Өнгөрсөн] dddd LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s дараа',\n            past: '%s өмнө',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: translate,\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + ' өдөр';\n                default:\n                    return number;\n            }\n        },\n    });\n\n    return mn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var tlPh = moment.defineLocale('tl-ph', {\n        months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n            '_'\n        ),\n        monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n            '_'\n        ),\n        weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'MM/D/YYYY',\n            LL: 'MMMM D, YYYY',\n            LLL: 'MMMM D, YYYY HH:mm',\n            LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: 'LT [ngayong araw]',\n            nextDay: '[Bukas ng] LT',\n            nextWeek: 'LT [sa susunod na] dddd',\n            lastDay: 'LT [kahapon]',\n            lastWeek: 'LT [noong nakaraang] dddd',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'sa loob ng %s',\n            past: '%s ang nakalipas',\n            s: 'ilang segundo',\n            ss: '%d segundo',\n            m: 'isang minuto',\n            mm: '%d minuto',\n            h: 'isang oras',\n            hh: '%d oras',\n            d: 'isang araw',\n            dd: '%d araw',\n            M: 'isang buwan',\n            MM: '%d buwan',\n            y: 'isang taon',\n            yy: '%d taon',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}/,\n        ordinal: function (number) {\n            return number;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return tlPh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var ocLnc = moment.defineLocale('oc-lnc', {\n        months: {\n            standalone:\n                'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n                    '_'\n                ),\n            format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n                '_'\n            ),\n            isFormat: /D[oD]?(\\s)+MMMM/,\n        },\n        monthsShort:\n            'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n            '_'\n        ),\n        weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM [de] YYYY',\n            ll: 'D MMM YYYY',\n            LLL: 'D MMMM [de] YYYY [a] H:mm',\n            lll: 'D MMM YYYY, H:mm',\n            LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n            llll: 'ddd D MMM YYYY, H:mm',\n        },\n        calendar: {\n            sameDay: '[uèi a] LT',\n            nextDay: '[deman a] LT',\n            nextWeek: 'dddd [a] LT',\n            lastDay: '[ièr a] LT',\n            lastWeek: 'dddd [passat a] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: \"d'aquí %s\",\n            past: 'fa %s',\n            s: 'unas segondas',\n            ss: '%d segondas',\n            m: 'una minuta',\n            mm: '%d minutas',\n            h: 'una ora',\n            hh: '%d oras',\n            d: 'un jorn',\n            dd: '%d jorns',\n            M: 'un mes',\n            MM: '%d meses',\n            y: 'un an',\n            yy: '%d ans',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal: function (number, period) {\n            var output =\n                number === 1\n                    ? 'r'\n                    : number === 2\n                      ? 'n'\n                      : number === 3\n                        ? 'r'\n                        : number === 4\n                          ? 't'\n                          : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4,\n        },\n    });\n\n    return ocLnc;\n\n})));\n","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function plural(n) {\n        if (n % 100 === 11) {\n            return true;\n        } else if (n % 10 === 1) {\n            return false;\n        }\n        return true;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture\n                    ? 'nokkrar sekúndur'\n                    : 'nokkrum sekúndum';\n            case 'ss':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n                    );\n                }\n                return result + 'sekúnda';\n            case 'm':\n                return withoutSuffix ? 'mínúta' : 'mínútu';\n            case 'mm':\n                if (plural(number)) {\n                    return (\n                        result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n                    );\n                } else if (withoutSuffix) {\n                    return result + 'mínúta';\n                }\n                return result + 'mínútu';\n            case 'hh':\n                if (plural(number)) {\n                    return (\n                        result +\n                        (withoutSuffix || isFuture\n                            ? 'klukkustundir'\n                            : 'klukkustundum')\n                    );\n                }\n                return result + 'klukkustund';\n            case 'd':\n                if (withoutSuffix) {\n                    return 'dagur';\n                }\n                return isFuture ? 'dag' : 'degi';\n            case 'dd':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'dagar';\n                    }\n                    return result + (isFuture ? 'daga' : 'dögum');\n                } else if (withoutSuffix) {\n                    return result + 'dagur';\n                }\n                return result + (isFuture ? 'dag' : 'degi');\n            case 'M':\n                if (withoutSuffix) {\n                    return 'mánuður';\n                }\n                return isFuture ? 'mánuð' : 'mánuði';\n            case 'MM':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'mánuðir';\n                    }\n                    return result + (isFuture ? 'mánuði' : 'mánuðum');\n                } else if (withoutSuffix) {\n                    return result + 'mánuður';\n                }\n                return result + (isFuture ? 'mánuð' : 'mánuði');\n            case 'y':\n                return withoutSuffix || isFuture ? 'ár' : 'ári';\n            case 'yy':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n                }\n                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n        }\n    }\n\n    var is = moment.defineLocale('is', {\n        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n        weekdays:\n            'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n                '_'\n            ),\n        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS: 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY [kl.] H:mm',\n            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n        },\n        calendar: {\n            sameDay: '[í dag kl.] LT',\n            nextDay: '[á morgun kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[í gær kl.] LT',\n            lastWeek: '[síðasta] dddd [kl.] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'eftir %s',\n            past: 'fyrir %s síðan',\n            s: translate,\n            ss: translate,\n            m: translate,\n            mm: translate,\n            h: 'klukkustund',\n            hh: translate,\n            d: translate,\n            dd: translate,\n            M: translate,\n            MM: translate,\n            y: translate,\n            yy: translate,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return is;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var enNz = moment.defineLocale('en-nz', {\n        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n            '_'\n        ),\n        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat: {\n            LT: 'h:mm A',\n            LTS: 'h:mm:ss A',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY h:mm A',\n            LLLL: 'dddd, D MMMM YYYY h:mm A',\n        },\n        calendar: {\n            sameDay: '[Today at] LT',\n            nextDay: '[Tomorrow at] LT',\n            nextWeek: 'dddd [at] LT',\n            lastDay: '[Yesterday at] LT',\n            lastWeek: '[Last] dddd [at] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'in %s',\n            past: '%s ago',\n            s: 'a few seconds',\n            ss: '%d seconds',\n            m: 'a minute',\n            mm: '%d minutes',\n            h: 'an hour',\n            hh: '%d hours',\n            d: 'a day',\n            dd: '%d days',\n            M: 'a month',\n            MM: '%d months',\n            y: 'a year',\n            yy: '%d years',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    ~~((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return enNz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var suffixes = {\n        1: \"'inji\",\n        5: \"'inji\",\n        8: \"'inji\",\n        70: \"'inji\",\n        80: \"'inji\",\n        2: \"'nji\",\n        7: \"'nji\",\n        20: \"'nji\",\n        50: \"'nji\",\n        3: \"'ünji\",\n        4: \"'ünji\",\n        100: \"'ünji\",\n        6: \"'njy\",\n        9: \"'unjy\",\n        10: \"'unjy\",\n        30: \"'unjy\",\n        60: \"'ynjy\",\n        90: \"'ynjy\",\n    };\n\n    var tk = moment.defineLocale('tk', {\n        months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n            '_'\n        ),\n        monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n        weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n            '_'\n        ),\n        weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n        weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[bugün sagat] LT',\n            nextDay: '[ertir sagat] LT',\n            nextWeek: '[indiki] dddd [sagat] LT',\n            lastDay: '[düýn] LT',\n            lastWeek: '[geçen] dddd [sagat] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s soň',\n            past: '%s öň',\n            s: 'birnäçe sekunt',\n            m: 'bir minut',\n            mm: '%d minut',\n            h: 'bir sagat',\n            hh: '%d sagat',\n            d: 'bir gün',\n            dd: '%d gün',\n            M: 'bir aý',\n            MM: '%d aý',\n            y: 'bir ýyl',\n            yy: '%d ýyl',\n        },\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'Do':\n                case 'DD':\n                    return number;\n                default:\n                    if (number === 0) {\n                        // special case for zero\n                        return number + \"'unjy\";\n                    }\n                    var a = number % 10,\n                        b = (number % 100) - a,\n                        c = number >= 100 ? 100 : null;\n                    return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n            }\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return tk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var units = {\n        ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n        m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        h: 'stundas_stundām_stunda_stundas'.split('_'),\n        hh: 'stundas_stundām_stunda_stundas'.split('_'),\n        d: 'dienas_dienām_diena_dienas'.split('_'),\n        dd: 'dienas_dienām_diena_dienas'.split('_'),\n        M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        y: 'gada_gadiem_gads_gadi'.split('_'),\n        yy: 'gada_gadiem_gads_gadi'.split('_'),\n    };\n    /**\n     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n     */\n    function format(forms, number, withoutSuffix) {\n        if (withoutSuffix) {\n            // E.g. \"21 minūte\", \"3 minūtes\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n        } else {\n            // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n            // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n        }\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        return number + ' ' + format(units[key], number, withoutSuffix);\n    }\n    function relativeTimeWithSingular(number, withoutSuffix, key) {\n        return format(units[key], number, withoutSuffix);\n    }\n    function relativeSeconds(number, withoutSuffix) {\n        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n    }\n\n    var lv = moment.defineLocale('lv', {\n        months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n            '_'\n        ),\n        monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n        weekdays:\n            'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n                '_'\n            ),\n        weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD.MM.YYYY.',\n            LL: 'YYYY. [gada] D. MMMM',\n            LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n            LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n        },\n        calendar: {\n            sameDay: '[Šodien pulksten] LT',\n            nextDay: '[Rīt pulksten] LT',\n            nextWeek: 'dddd [pulksten] LT',\n            lastDay: '[Vakar pulksten] LT',\n            lastWeek: '[Pagājušā] dddd [pulksten] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'pēc %s',\n            past: 'pirms %s',\n            s: relativeSeconds,\n            ss: relativeTimeWithPlural,\n            m: relativeTimeWithSingular,\n            mm: relativeTimeWithPlural,\n            h: relativeTimeWithSingular,\n            hh: relativeTimeWithPlural,\n            d: relativeTimeWithSingular,\n            dd: relativeTimeWithPlural,\n            M: relativeTimeWithSingular,\n            MM: relativeTimeWithPlural,\n            y: relativeTimeWithSingular,\n            yy: relativeTimeWithPlural,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lv;\n\n})));\n","/**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\nvar\n  ONE_SECOND_IN_TS = 90000, // 90kHz clock\n  secondsToVideoTs,\n  secondsToAudioTs,\n  videoTsToSeconds,\n  audioTsToSeconds,\n  audioTsToVideoTs,\n  videoTsToAudioTs,\n  metadataTsToSeconds;\n\nsecondsToVideoTs = function(seconds) {\n  return seconds * ONE_SECOND_IN_TS;\n};\n\nsecondsToAudioTs = function(seconds, sampleRate) {\n  return seconds * sampleRate;\n};\n\nvideoTsToSeconds = function(timestamp) {\n  return timestamp / ONE_SECOND_IN_TS;\n};\n\naudioTsToSeconds = function(timestamp, sampleRate) {\n  return timestamp / sampleRate;\n};\n\naudioTsToVideoTs = function(timestamp, sampleRate) {\n  return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n};\n\nvideoTsToAudioTs = function(timestamp, sampleRate) {\n  return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n};\n\n/**\n * Adjust ID3 tag or caption timing information by the timeline pts values\n * (if keepOriginalTimestamps is false) and convert to seconds\n */\nmetadataTsToSeconds = function(timestamp, timelineStartPts, keepOriginalTimestamps) {\n  return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n};\n\nmodule.exports = {\n  ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\n  secondsToVideoTs: secondsToVideoTs,\n  secondsToAudioTs: secondsToAudioTs,\n  videoTsToSeconds: videoTsToSeconds,\n  audioTsToSeconds: audioTsToSeconds,\n  audioTsToVideoTs: audioTsToVideoTs,\n  videoTsToAudioTs: videoTsToAudioTs,\n  metadataTsToSeconds: metadataTsToSeconds\n};\n","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            m: ['eng Minutt', 'enger Minutt'],\n            h: ['eng Stonn', 'enger Stonn'],\n            d: ['een Dag', 'engem Dag'],\n            M: ['ee Mount', 'engem Mount'],\n            y: ['ee Joer', 'engem Joer'],\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    function processFutureTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'a ' + string;\n        }\n        return 'an ' + string;\n    }\n    function processPastTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'viru ' + string;\n        }\n        return 'virun ' + string;\n    }\n    /**\n     * Returns true if the word before the given number loses the '-n' ending.\n     * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n     *\n     * @param number {integer}\n     * @returns {boolean}\n     */\n    function eifelerRegelAppliesToNumber(number) {\n        number = parseInt(number, 10);\n        if (isNaN(number)) {\n            return false;\n        }\n        if (number < 0) {\n            // Negative Number --> always true\n            return true;\n        } else if (number < 10) {\n            // Only 1 digit\n            if (4 <= number && number <= 7) {\n                return true;\n            }\n            return false;\n        } else if (number < 100) {\n            // 2 digits\n            var lastDigit = number % 10,\n                firstDigit = number / 10;\n            if (lastDigit === 0) {\n                return eifelerRegelAppliesToNumber(firstDigit);\n            }\n            return eifelerRegelAppliesToNumber(lastDigit);\n        } else if (number < 10000) {\n            // 3 or 4 digits --> recursively check first digit\n            while (number >= 10) {\n                number = number / 10;\n            }\n            return eifelerRegelAppliesToNumber(number);\n        } else {\n            // Anything larger than 4 digits: recursively check first n-3 digits\n            number = number / 1000;\n            return eifelerRegelAppliesToNumber(number);\n        }\n    }\n\n    var lb = moment.defineLocale('lb', {\n        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n            '_'\n        ),\n        monthsShort:\n            'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n                '_'\n            ),\n        monthsParseExact: true,\n        weekdays:\n            'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n                '_'\n            ),\n        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'H:mm [Auer]',\n            LTS: 'H:mm:ss [Auer]',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm [Auer]',\n            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n        },\n        calendar: {\n            sameDay: '[Haut um] LT',\n            sameElse: 'L',\n            nextDay: '[Muer um] LT',\n            nextWeek: 'dddd [um] LT',\n            lastDay: '[Gëschter um] LT',\n            lastWeek: function () {\n                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n                switch (this.day()) {\n                    case 2:\n                    case 4:\n                        return '[Leschten] dddd [um] LT';\n                    default:\n                        return '[Leschte] dddd [um] LT';\n                }\n            },\n        },\n        relativeTime: {\n            future: processFutureTime,\n            past: processPastTime,\n            s: 'e puer Sekonnen',\n            ss: '%d Sekonnen',\n            m: processRelativeTime,\n            mm: '%d Minutten',\n            h: processRelativeTime,\n            hh: '%d Stonnen',\n            d: processRelativeTime,\n            dd: '%d Deeg',\n            M: processRelativeTime,\n            MM: '%d Méint',\n            y: processRelativeTime,\n            yy: '%d Joer',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return lb;\n\n})));\n","var topLevel = typeof global !== 'undefined' ? global :\n    typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n    doccy = document;\n} else {\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n    if (!doccy) {\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n    }\n}\n\nmodule.exports = doccy;\n","//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var jv = moment.defineLocale('jv', {\n        months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n        weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n        weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n        weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [pukul] HH.mm',\n            LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n        },\n        meridiemParse: /enjing|siyang|sonten|ndalu/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'enjing') {\n                return hour;\n            } else if (meridiem === 'siyang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'enjing';\n            } else if (hours < 15) {\n                return 'siyang';\n            } else if (hours < 19) {\n                return 'sonten';\n            } else {\n                return 'ndalu';\n            }\n        },\n        calendar: {\n            sameDay: '[Dinten puniko pukul] LT',\n            nextDay: '[Mbenjang pukul] LT',\n            nextWeek: 'dddd [pukul] LT',\n            lastDay: '[Kala wingi pukul] LT',\n            lastWeek: 'dddd [kepengker pukul] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'wonten ing %s',\n            past: '%s ingkang kepengker',\n            s: 'sawetawis detik',\n            ss: '%d detik',\n            m: 'setunggal menit',\n            mm: '%d menit',\n            h: 'setunggal jam',\n            hh: '%d jam',\n            d: 'sedinten',\n            dd: '%d dinten',\n            M: 'sewulan',\n            MM: '%d wulan',\n            y: 'setaun',\n            yy: '%d taun',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 7, // The week that contains Jan 7th is the first week of the year.\n        },\n    });\n\n    return jv;\n\n})));\n","//! moment.js locale configuration\n//! locale  :  Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var arTn = moment.defineLocale('ar-tn', {\n        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n            '_'\n        ),\n        monthsShort:\n            'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n                '_'\n            ),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            ss: '%d ثانية',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات',\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return arTn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var pt = moment.defineLocale('pt', {\n        months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n            '_'\n        ),\n        monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n        weekdays:\n            'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n                '_'\n            ),\n        weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n        weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D [de] MMMM [de] YYYY',\n            LLL: 'D [de] MMMM [de] YYYY HH:mm',\n            LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n        },\n        calendar: {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return this.day() === 0 || this.day() === 6\n                    ? '[Último] dddd [às] LT' // Saturday + Sunday\n                    : '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'em %s',\n            past: 'há %s',\n            s: 'segundos',\n            ss: '%d segundos',\n            m: 'um minuto',\n            mm: '%d minutos',\n            h: 'uma hora',\n            hh: '%d horas',\n            d: 'um dia',\n            dd: '%d dias',\n            w: 'uma semana',\n            ww: '%d semanas',\n            M: 'um mês',\n            MM: '%d meses',\n            y: 'um ano',\n            yy: '%d anos',\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    return pt;\n\n})));\n","var win;\n\nif (typeof window !== \"undefined\") {\n    win = window;\n} else if (typeof global !== \"undefined\") {\n    win = global;\n} else if (typeof self !== \"undefined\"){\n    win = self;\n} else {\n    win = {};\n}\n\nmodule.exports = win;\n","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n    // This is currently too difficult (maybe even impossible) to add.\n    var tzl = moment.defineLocale('tzl', {\n        months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n            '_'\n        ),\n        monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n        weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n        weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n        weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n        longDateFormat: {\n            LT: 'HH.mm',\n            LTS: 'HH.mm.ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM [dallas] YYYY',\n            LLL: 'D. MMMM [dallas] YYYY HH.mm',\n            LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n        },\n        meridiemParse: /d\\'o|d\\'a/i,\n        isPM: function (input) {\n            return \"d'o\" === input.toLowerCase();\n        },\n        meridiem: function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? \"d'o\" : \"D'O\";\n            } else {\n                return isLower ? \"d'a\" : \"D'A\";\n            }\n        },\n        calendar: {\n            sameDay: '[oxhi à] LT',\n            nextDay: '[demà à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[ieiri à] LT',\n            lastWeek: '[sür el] dddd [lasteu à] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'osprei %s',\n            past: 'ja%s',\n            s: processRelativeTime,\n            ss: processRelativeTime,\n            m: processRelativeTime,\n            mm: processRelativeTime,\n            h: processRelativeTime,\n            hh: processRelativeTime,\n            d: processRelativeTime,\n            dd: processRelativeTime,\n            M: processRelativeTime,\n            MM: processRelativeTime,\n            y: processRelativeTime,\n            yy: processRelativeTime,\n        },\n        dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4, // The week that contains Jan 4th is the first week of the year.\n        },\n    });\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            s: ['viensas secunds', \"'iensas secunds\"],\n            ss: [number + ' secunds', '' + number + ' secunds'],\n            m: [\"'n míut\", \"'iens míut\"],\n            mm: [number + ' míuts', '' + number + ' míuts'],\n            h: [\"'n þora\", \"'iensa þora\"],\n            hh: [number + ' þoras', '' + number + ' þoras'],\n            d: [\"'n ziua\", \"'iensa ziua\"],\n            dd: [number + ' ziuas', '' + number + ' ziuas'],\n            M: [\"'n mes\", \"'iens mes\"],\n            MM: [number + ' mesen', '' + number + ' mesen'],\n            y: [\"'n ar\", \"'iens ar\"],\n            yy: [number + ' ars', '' + number + ' ars'],\n        };\n        return isFuture\n            ? format[key][0]\n            : withoutSuffix\n              ? format[key][0]\n              : format[key][1];\n    }\n\n    return tzl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '੧',\n            2: '੨',\n            3: '੩',\n            4: '੪',\n            5: '੫',\n            6: '੬',\n            7: '੭',\n            8: '੮',\n            9: '੯',\n            0: '੦',\n        },\n        numberMap = {\n            '੧': '1',\n            '੨': '2',\n            '੩': '3',\n            '੪': '4',\n            '੫': '5',\n            '੬': '6',\n            '੭': '7',\n            '੮': '8',\n            '੯': '9',\n            '੦': '0',\n        };\n\n    var paIn = moment.defineLocale('pa-in', {\n        // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n        months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n            '_'\n        ),\n        monthsShort:\n            'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n                '_'\n            ),\n        weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n            '_'\n        ),\n        weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        longDateFormat: {\n            LT: 'A h:mm ਵਜੇ',\n            LTS: 'A h:mm:ss ਵਜੇ',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n            LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n        },\n        calendar: {\n            sameDay: '[ਅਜ] LT',\n            nextDay: '[ਕਲ] LT',\n            nextWeek: '[ਅਗਲਾ] dddd, LT',\n            lastDay: '[ਕਲ] LT',\n            lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: '%s ਵਿੱਚ',\n            past: '%s ਪਿਛਲੇ',\n            s: 'ਕੁਝ ਸਕਿੰਟ',\n            ss: '%d ਸਕਿੰਟ',\n            m: 'ਇਕ ਮਿੰਟ',\n            mm: '%d ਮਿੰਟ',\n            h: 'ਇੱਕ ਘੰਟਾ',\n            hh: '%d ਘੰਟੇ',\n            d: 'ਇੱਕ ਦਿਨ',\n            dd: '%d ਦਿਨ',\n            M: 'ਇੱਕ ਮਹੀਨਾ',\n            MM: '%d ਮਹੀਨੇ',\n            y: 'ਇੱਕ ਸਾਲ',\n            yy: '%d ਸਾਲ',\n        },\n        preparse: function (string) {\n            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ਰਾਤ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ਸਵੇਰ') {\n                return hour;\n            } else if (meridiem === 'ਦੁਪਹਿਰ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ਸ਼ਾਮ') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ਰਾਤ';\n            } else if (hour < 10) {\n                return 'ਸਵੇਰ';\n            } else if (hour < 17) {\n                return 'ਦੁਪਹਿਰ';\n            } else if (hour < 20) {\n                return 'ਸ਼ਾਮ';\n            } else {\n                return 'ਰਾਤ';\n            }\n        },\n        week: {\n            dow: 0, // Sunday is the first day of the week.\n            doy: 6, // The week that contains Jan 6th is the first week of the year.\n        },\n    });\n\n    return paIn;\n\n})));\n","function _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","import window from 'global/window';\nvar DEFAULT_LOCATION = 'https://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n  // return early if we don't need to resolve\n  if (/^[a-z]+:/i.test(relativeUrl)) {\n    return relativeUrl;\n  } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n  if (/^data:/.test(baseUrl)) {\n    baseUrl = window.location && window.location.href || '';\n  }\n\n  var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n  // and if baseUrl isn't an absolute url\n\n  var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n  baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n  var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n  // and if we're location-less, remove the location\n  // otherwise, return the url unmodified\n\n  if (removeLocation) {\n    return newUrl.href.slice(DEFAULT_LOCATION.length);\n  } else if (protocolLess) {\n    return newUrl.href.slice(newUrl.protocol.length);\n  }\n\n  return newUrl.href;\n};\n\nexport default resolveUrl;","/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n  function Stream() {\n    this.listeners = {};\n  }\n  /**\n   * Add a listener for a specified event type.\n   *\n   * @param {string} type the event name\n   * @param {Function} listener the callback to be invoked when an event of\n   * the specified type occurs\n   */\n\n\n  var _proto = Stream.prototype;\n\n  _proto.on = function on(type, listener) {\n    if (!this.listeners[type]) {\n      this.listeners[type] = [];\n    }\n\n    this.listeners[type].push(listener);\n  }\n  /**\n   * Remove a listener for a specified event type.\n   *\n   * @param {string} type the event name\n   * @param {Function} listener  a function previously registered for this\n   * type of event through `on`\n   * @return {boolean} if we could turn it off or not\n   */\n  ;\n\n  _proto.off = function off(type, listener) {\n    if (!this.listeners[type]) {\n      return false;\n    }\n\n    var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n    // In Video.js we slice listener functions\n    // on trigger so that it does not mess up the order\n    // while we loop through.\n    //\n    // Here we slice on off so that the loop in trigger\n    // can continue using it's old reference to loop without\n    // messing up the order.\n\n    this.listeners[type] = this.listeners[type].slice(0);\n    this.listeners[type].splice(index, 1);\n    return index > -1;\n  }\n  /**\n   * Trigger an event of the specified type on this stream. Any additional\n   * arguments to this function are passed as parameters to event listeners.\n   *\n   * @param {string} type the event name\n   */\n  ;\n\n  _proto.trigger = function trigger(type) {\n    var callbacks = this.listeners[type];\n\n    if (!callbacks) {\n      return;\n    } // Slicing the arguments on every invocation of this method\n    // can add a significant amount of overhead. Avoid the\n    // intermediate object creation for the common case of a\n    // single callback argument\n\n\n    if (arguments.length === 2) {\n      var length = callbacks.length;\n\n      for (var i = 0; i < length; ++i) {\n        callbacks[i].call(this, arguments[1]);\n      }\n    } else {\n      var args = Array.prototype.slice.call(arguments, 1);\n      var _length = callbacks.length;\n\n      for (var _i = 0; _i < _length; ++_i) {\n        callbacks[_i].apply(this, args);\n      }\n    }\n  }\n  /**\n   * Destroys the stream and cleans up.\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.listeners = {};\n  }\n  /**\n   * Forwards all `data` events on this stream to the destination stream. The\n   * destination stream should provide a method `push` to receive the data\n   * events as they arrive.\n   *\n   * @param {Stream} destination the stream that will receive all `data` events\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n   */\n  ;\n\n  _proto.pipe = function pipe(destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n  };\n\n  return Stream;\n}();\n\nexport { Stream as default };","import window from 'global/window';\n\nvar atob = function atob(s) {\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}","/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */\nimport Stream from '@videojs/vhs-utils/es/stream.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array.js';\n\n/**\n * @file m3u8/line-stream.js\n */\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\nclass LineStream extends Stream {\n  constructor() {\n    super();\n    this.buffer = '';\n  }\n  /**\n   * Add new data to be parsed.\n   *\n   * @param {string} data the text to process\n   */\n\n\n  push(data) {\n    let nextNewline;\n    this.buffer += data;\n    nextNewline = this.buffer.indexOf('\\n');\n\n    for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n      this.trigger('data', this.buffer.substring(0, nextNewline));\n      this.buffer = this.buffer.substring(nextNewline + 1);\n    }\n  }\n\n}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n  // optionally match and capture 0+ digits before `@`\n  // optionally match and capture 0+ digits after `@`\n  const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n  const result = {};\n\n  if (match[1]) {\n    result.length = parseInt(match[1], 10);\n  }\n\n  if (match[2]) {\n    result.offset = parseInt(match[2], 10);\n  }\n\n  return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue   -> key '=' value\n * key        -> [^=]*\n * value      -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nconst attributeSeparator = function () {\n  const key = '[^=]*';\n  const value = '\"[^\"]*\"|[^,]*';\n  const keyvalue = '(?:' + key + ')=(?:' + value + ')';\n  return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nconst parseAttributes = function (attributes) {\n  const result = {};\n\n  if (!attributes) {\n    return result;\n  } // split the string using attributes as the separator\n\n\n  const attrs = attributes.split(attributeSeparator());\n  let i = attrs.length;\n  let attr;\n\n  while (i--) {\n    // filter out unmatched portions of the string\n    if (attrs[i] === '') {\n      continue;\n    } // split the key and value\n\n\n    attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n    attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n    attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n    attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n    result[attr[0]] = attr[1];\n  }\n\n  return result;\n};\n/**\n * Converts a string into a resolution object\n *\n * @param {string} resolution a string such as 3840x2160\n *\n * @return {Object} An object representing the resolution\n *\n */\n\n\nconst parseResolution = resolution => {\n  const split = resolution.split('x');\n  const result = {};\n\n  if (split[0]) {\n    result.width = parseInt(split[0], 10);\n  }\n\n  if (split[1]) {\n    result.height = parseInt(split[1], 10);\n  }\n\n  return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nclass ParseStream extends Stream {\n  constructor() {\n    super();\n    this.customParsers = [];\n    this.tagMappers = [];\n  }\n  /**\n   * Parses an additional line of input.\n   *\n   * @param {string} line a single line of an M3U8 file to parse\n   */\n\n\n  push(line) {\n    let match;\n    let event; // strip whitespace\n\n    line = line.trim();\n\n    if (line.length === 0) {\n      // ignore empty lines\n      return;\n    } // URIs\n\n\n    if (line[0] !== '#') {\n      this.trigger('data', {\n        type: 'uri',\n        uri: line\n      });\n      return;\n    } // map tags\n\n\n    const newLines = this.tagMappers.reduce((acc, mapper) => {\n      const mappedLine = mapper(line); // skip if unchanged\n\n      if (mappedLine === line) {\n        return acc;\n      }\n\n      return acc.concat([mappedLine]);\n    }, [line]);\n    newLines.forEach(newLine => {\n      for (let i = 0; i < this.customParsers.length; i++) {\n        if (this.customParsers[i].call(this, newLine)) {\n          return;\n        }\n      } // Comments\n\n\n      if (newLine.indexOf('#EXT') !== 0) {\n        this.trigger('data', {\n          type: 'comment',\n          text: newLine.slice(1)\n        });\n        return;\n      } // strip off any carriage returns here so the regex matching\n      // doesn't have to account for them.\n\n\n      newLine = newLine.replace('\\r', ''); // Tags\n\n      match = /^#EXTM3U/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'm3u'\n        });\n        return;\n      }\n\n      match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'inf'\n        };\n\n        if (match[1]) {\n          event.duration = parseFloat(match[1]);\n        }\n\n        if (match[2]) {\n          event.title = match[2];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'targetduration'\n        };\n\n        if (match[1]) {\n          event.duration = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'version'\n        };\n\n        if (match[1]) {\n          event.version = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'discontinuity-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'playlist-type'\n        };\n\n        if (match[1]) {\n          event.playlistType = match[1];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = _extends(parseByterange(match[1]), {\n          type: 'tag',\n          tagType: 'byterange'\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'allow-cache'\n        };\n\n        if (match[1]) {\n          event.allowed = !/NO/.test(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'map'\n        };\n\n        if (match[1]) {\n          const attributes = parseAttributes(match[1]);\n\n          if (attributes.URI) {\n            event.uri = attributes.URI;\n          }\n\n          if (attributes.BYTERANGE) {\n            event.byterange = parseByterange(attributes.BYTERANGE);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'stream-inf'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n\n          if (event.attributes.RESOLUTION) {\n            event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);\n          }\n\n          if (event.attributes.BANDWIDTH) {\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n          }\n\n          if (event.attributes['FRAME-RATE']) {\n            event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n          }\n\n          if (event.attributes['PROGRAM-ID']) {\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'endlist'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'discontinuity'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'program-date-time'\n        };\n\n        if (match[1]) {\n          event.dateTimeString = match[1];\n          event.dateTimeObject = new Date(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'key'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n          if (event.attributes.IV) {\n            if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n              event.attributes.IV = event.attributes.IV.substring(2);\n            }\n\n            event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n            event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n            event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n            event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n            event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n            event.attributes.IV = new Uint32Array(event.attributes.IV);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'start'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n          event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n          event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out-cont'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-in'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'skip'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n          event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n        }\n\n        if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n          event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'part'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['DURATION'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['INDEPENDENT', 'GAP'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/.test(event.attributes[key]);\n          }\n        });\n\n        if (event.attributes.hasOwnProperty('BYTERANGE')) {\n          event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'server-control'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/.test(event.attributes[key]);\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'part-inf'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['PART-TARGET'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'preload-hint'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseInt(event.attributes[key], 10);\n            const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n            event.attributes.byterange = event.attributes.byterange || {};\n            event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n            delete event.attributes[key];\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'rendition-report'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseInt(event.attributes[key], 10);\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'daterange'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['ID', 'CLASS'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = String(event.attributes[key]);\n          }\n        });\n        ['START-DATE', 'END-DATE'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = new Date(event.attributes[key]);\n          }\n        });\n        ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['END-ON-NEXT'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/i.test(event.attributes[key]);\n          }\n        });\n        ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = event.attributes[key].toString(16);\n          }\n        });\n        const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n        for (const key in event.attributes) {\n          if (!clientAttributePattern.test(key)) {\n            continue;\n          }\n\n          const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n          const isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n          event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'independent-segments'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-I-FRAMES-ONLY/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'i-frames-only'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-CONTENT-STEERING:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'content-steering'\n        };\n        event.attributes = parseAttributes(match[1]);\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'i-frame-playlist'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.URI) {\n          event.uri = event.attributes.URI;\n        }\n\n        if (event.attributes.BANDWIDTH) {\n          event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n        }\n\n        if (event.attributes.RESOLUTION) {\n          event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);\n        }\n\n        if (event.attributes['AVERAGE-BANDWIDTH']) {\n          event.attributes['AVERAGE-BANDWIDTH'] = parseInt(event.attributes['AVERAGE-BANDWIDTH'], 10);\n        }\n\n        if (event.attributes['FRAME-RATE']) {\n          event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DEFINE:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'define'\n        };\n        event.attributes = parseAttributes(match[1]);\n        this.trigger('data', event);\n        return;\n      } // unknown tag type\n\n\n      this.trigger('data', {\n        type: 'tag',\n        data: newLine.slice(4)\n      });\n    });\n  }\n  /**\n   * Add a parser for custom headers\n   *\n   * @param {Object}   options              a map of options for the added parser\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {string}   options.customType   the custom type to register to the output\n   * @param {Function} [options.dataParser] function to parse the line into an object\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n   */\n\n\n  addParser({\n    expression,\n    customType,\n    dataParser,\n    segment\n  }) {\n    if (typeof dataParser !== 'function') {\n      dataParser = line => line;\n    }\n\n    this.customParsers.push(line => {\n      const match = expression.exec(line);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'custom',\n          data: dataParser(line),\n          customType,\n          segment\n        });\n        return true;\n      }\n    });\n  }\n  /**\n   * Add a custom header mapper\n   *\n   * @param {Object}   options\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {Function} options.map          function to translate tag into a different tag\n   */\n\n\n  addTagMapper({\n    expression,\n    map\n  }) {\n    const mapFn = line => {\n      if (expression.test(line)) {\n        return map(line);\n      }\n\n      return line;\n    };\n\n    this.tagMappers.push(mapFn);\n  }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n  const result = {};\n  Object.keys(attributes).forEach(function (key) {\n    result[camelCase(key)] = attributes[key];\n  });\n  return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\n\nconst setHoldBack = function (manifest) {\n  const {\n    serverControl,\n    targetDuration,\n    partTargetDuration\n  } = manifest;\n\n  if (!serverControl) {\n    return;\n  }\n\n  const tag = '#EXT-X-SERVER-CONTROL';\n  const hb = 'holdBack';\n  const phb = 'partHoldBack';\n  const minTargetDuration = targetDuration && targetDuration * 3;\n  const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n  if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n    serverControl[hb] = minTargetDuration;\n    this.trigger('info', {\n      message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n    });\n  }\n\n  if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n    });\n    serverControl[hb] = minTargetDuration;\n  } // default no part hold back to part target duration * 3\n\n\n  if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n    serverControl[phb] = partTargetDuration * 3;\n    this.trigger('info', {\n      message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n    });\n  } // if part hold back is too small default it to part target duration * 2\n\n\n  if (partTargetDuration && serverControl[phb] < minPartDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).`\n    });\n    serverControl[phb] = minPartDuration;\n  }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @param {Object} [opts] Options for the constructor, needed for substitutions\n * @param {string} [opts.uri] URL to check for query params\n * @param {Object} [opts.mainDefinitions] Definitions on main playlist that can be imported\n * @extends Stream\n */\n\n\nclass Parser extends Stream {\n  constructor(opts = {}) {\n    super();\n    this.lineStream = new LineStream();\n    this.parseStream = new ParseStream();\n    this.lineStream.pipe(this.parseStream);\n    this.mainDefinitions = opts.mainDefinitions || {};\n    this.params = new URL(opts.uri, 'https://a.com').searchParams;\n    this.lastProgramDateTime = null;\n    /* eslint-disable consistent-this */\n\n    const self = this;\n    /* eslint-enable consistent-this */\n\n    const uris = [];\n    let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n    let currentMap; // if specified, the active decryption key\n\n    let key;\n    let hasParts = false;\n\n    const noop = function () {};\n\n    const defaultMediaGroups = {\n      'AUDIO': {},\n      'VIDEO': {},\n      'CLOSED-CAPTIONS': {},\n      'SUBTITLES': {}\n    }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n    // used in MPDs with Widevine encrypted streams.\n\n    const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n    let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n    this.manifest = {\n      allowCache: true,\n      discontinuityStarts: [],\n      dateRanges: [],\n      iFramePlaylists: [],\n      segments: []\n    }; // keep track of the last seen segment's byte range end, as segments are not required\n    // to provide the offset, in which case it defaults to the next byte after the\n    // previous segment\n\n    let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n    let lastPartByterangeEnd = 0;\n    const dateRangeTags = {};\n    this.on('end', () => {\n      // only add preloadSegment if we don't yet have a uri for it.\n      // and we actually have parts/preloadHints\n      if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n        return;\n      }\n\n      if (!currentUri.map && currentMap) {\n        currentUri.map = currentMap;\n      }\n\n      if (!currentUri.key && key) {\n        currentUri.key = key;\n      }\n\n      if (!currentUri.timeline && typeof currentTimeline === 'number') {\n        currentUri.timeline = currentTimeline;\n      }\n\n      this.manifest.preloadSegment = currentUri;\n    }); // update the manifest with the m3u8 entry from the parse stream\n\n    this.parseStream.on('data', function (entry) {\n      let mediaGroup;\n      let rendition; // Replace variables in uris and attributes as defined in #EXT-X-DEFINE tags\n\n      if (self.manifest.definitions) {\n        for (const def in self.manifest.definitions) {\n          if (entry.uri) {\n            entry.uri = entry.uri.replace(`{$${def}}`, self.manifest.definitions[def]);\n          }\n\n          if (entry.attributes) {\n            for (const attr in entry.attributes) {\n              if (typeof entry.attributes[attr] === 'string') {\n                entry.attributes[attr] = entry.attributes[attr].replace(`{$${def}}`, self.manifest.definitions[def]);\n              }\n            }\n          }\n        }\n      }\n\n      ({\n        tag() {\n          // switch based on the tag type\n          (({\n            version() {\n              if (entry.version) {\n                this.manifest.version = entry.version;\n              }\n            },\n\n            'allow-cache'() {\n              this.manifest.allowCache = entry.allowed;\n\n              if (!('allowed' in entry)) {\n                this.trigger('info', {\n                  message: 'defaulting allowCache to YES'\n                });\n                this.manifest.allowCache = true;\n              }\n            },\n\n            byterange() {\n              const byterange = {};\n\n              if ('length' in entry) {\n                currentUri.byterange = byterange;\n                byterange.length = entry.length;\n\n                if (!('offset' in entry)) {\n                  /*\n                   * From the latest spec (as of this writing):\n                   * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n                   *\n                   * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n                   * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n                   *\n                   * \"If o [offset] is not present, the sub-range begins at the next byte\n                   * following the sub-range of the previous media segment.\"\n                   */\n                  entry.offset = lastByterangeEnd;\n                }\n              }\n\n              if ('offset' in entry) {\n                currentUri.byterange = byterange;\n                byterange.offset = entry.offset;\n              }\n\n              lastByterangeEnd = byterange.offset + byterange.length;\n            },\n\n            endlist() {\n              this.manifest.endList = true;\n            },\n\n            inf() {\n              if (!('mediaSequence' in this.manifest)) {\n                this.manifest.mediaSequence = 0;\n                this.trigger('info', {\n                  message: 'defaulting media sequence to zero'\n                });\n              }\n\n              if (!('discontinuitySequence' in this.manifest)) {\n                this.manifest.discontinuitySequence = 0;\n                this.trigger('info', {\n                  message: 'defaulting discontinuity sequence to zero'\n                });\n              }\n\n              if (entry.title) {\n                currentUri.title = entry.title;\n              }\n\n              if (entry.duration > 0) {\n                currentUri.duration = entry.duration;\n              }\n\n              if (entry.duration === 0) {\n                currentUri.duration = 0.01;\n                this.trigger('info', {\n                  message: 'updating zero segment duration to a small value'\n                });\n              }\n\n              this.manifest.segments = uris;\n            },\n\n            key() {\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without attribute list'\n                });\n                return;\n              } // clear the active encryption key\n\n\n              if (entry.attributes.METHOD === 'NONE') {\n                key = null;\n                return;\n              }\n\n              if (!entry.attributes.URI) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without URI'\n                });\n                return;\n              }\n\n              if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n                this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                this.manifest.contentProtection['com.apple.fps.1_0'] = {\n                  attributes: entry.attributes\n                };\n                return;\n              }\n\n              if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n                this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                this.manifest.contentProtection['com.microsoft.playready'] = {\n                  uri: entry.attributes.URI\n                };\n                return;\n              } // check if the content is encrypted for Widevine\n              // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\n                const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n                if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n                  this.trigger('warn', {\n                    message: 'invalid key method provided for Widevine'\n                  });\n                  return;\n                }\n\n                if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n                  this.trigger('warn', {\n                    message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n                  });\n                }\n\n                if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n                  this.trigger('warn', {\n                    message: 'invalid key URI provided for Widevine'\n                  });\n                  return;\n                }\n\n                if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n                  this.trigger('warn', {\n                    message: 'invalid key ID provided for Widevine'\n                  });\n                  return;\n                } // if Widevine key attributes are valid, store them as `contentProtection`\n                // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n                this.manifest.contentProtection = this.manifest.contentProtection || {};\n                this.manifest.contentProtection['com.widevine.alpha'] = {\n                  attributes: {\n                    schemeIdUri: entry.attributes.KEYFORMAT,\n                    // remove '0x' from the key id string\n                    keyId: entry.attributes.KEYID.substring(2)\n                  },\n                  // decode the base64-encoded PSSH box\n                  pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n                };\n                return;\n              }\n\n              if (!entry.attributes.METHOD) {\n                this.trigger('warn', {\n                  message: 'defaulting key method to AES-128'\n                });\n              } // setup an encryption key for upcoming segments\n\n\n              key = {\n                method: entry.attributes.METHOD || 'AES-128',\n                uri: entry.attributes.URI\n              };\n\n              if (typeof entry.attributes.IV !== 'undefined') {\n                key.iv = entry.attributes.IV;\n              }\n            },\n\n            'media-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid media sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.mediaSequence = entry.number;\n            },\n\n            'discontinuity-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.discontinuitySequence = entry.number;\n              currentTimeline = entry.number;\n            },\n\n            'playlist-type'() {\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\n                this.trigger('warn', {\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\n                });\n                return;\n              }\n\n              this.manifest.playlistType = entry.playlistType;\n            },\n\n            map() {\n              currentMap = {};\n\n              if (entry.uri) {\n                currentMap.uri = entry.uri;\n              }\n\n              if (entry.byterange) {\n                currentMap.byterange = entry.byterange;\n              }\n\n              if (key) {\n                currentMap.key = key;\n              }\n            },\n\n            'stream-inf'() {\n              this.manifest.playlists = uris;\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring empty stream-inf attributes'\n                });\n                return;\n              }\n\n              if (!currentUri.attributes) {\n                currentUri.attributes = {};\n              }\n\n              _extends(currentUri.attributes, entry.attributes);\n            },\n\n            media() {\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n                this.trigger('warn', {\n                  message: 'ignoring incomplete or missing media group'\n                });\n                return;\n              } // find the media group, creating defaults as necessary\n\n\n              const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n              mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n              mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n              rendition = {\n                default: /yes/i.test(entry.attributes.DEFAULT)\n              };\n\n              if (rendition.default) {\n                rendition.autoselect = true;\n              } else {\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n              }\n\n              if (entry.attributes.LANGUAGE) {\n                rendition.language = entry.attributes.LANGUAGE;\n              }\n\n              if (entry.attributes.URI) {\n                rendition.uri = entry.attributes.URI;\n              }\n\n              if (entry.attributes['INSTREAM-ID']) {\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\n              }\n\n              if (entry.attributes.CHARACTERISTICS) {\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\n              }\n\n              if (entry.attributes.FORCED) {\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\n              } // insert the new rendition\n\n\n              mediaGroup[entry.attributes.NAME] = rendition;\n            },\n\n            discontinuity() {\n              currentTimeline += 1;\n              currentUri.discontinuity = true;\n              this.manifest.discontinuityStarts.push(uris.length);\n            },\n\n            'program-date-time'() {\n              if (typeof this.manifest.dateTimeString === 'undefined') {\n                // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n                // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n                // to the manifest object\n                // TODO: Consider removing this in future major version\n                this.manifest.dateTimeString = entry.dateTimeString;\n                this.manifest.dateTimeObject = entry.dateTimeObject;\n              }\n\n              currentUri.dateTimeString = entry.dateTimeString;\n              currentUri.dateTimeObject = entry.dateTimeObject;\n              const {\n                lastProgramDateTime\n              } = this;\n              this.lastProgramDateTime = new Date(entry.dateTimeString).getTime(); // We should extrapolate Program Date Time backward only during first program date time occurrence.\n              // Once we have at least one program date time point, we can always extrapolate it forward using lastProgramDateTime reference.\n\n              if (lastProgramDateTime === null) {\n                // Extrapolate Program Date Time backward\n                // Since it is first program date time occurrence we're assuming that\n                // all this.manifest.segments have no program date time info\n                this.manifest.segments.reduceRight((programDateTime, segment) => {\n                  segment.programDateTime = programDateTime - segment.duration * 1000;\n                  return segment.programDateTime;\n                }, this.lastProgramDateTime);\n              }\n            },\n\n            targetduration() {\n              if (!isFinite(entry.duration) || entry.duration < 0) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid target duration: ' + entry.duration\n                });\n                return;\n              }\n\n              this.manifest.targetDuration = entry.duration;\n              setHoldBack.call(this, this.manifest);\n            },\n\n            start() {\n              if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n                this.trigger('warn', {\n                  message: 'ignoring start declaration without appropriate attribute list'\n                });\n                return;\n              }\n\n              this.manifest.start = {\n                timeOffset: entry.attributes['TIME-OFFSET'],\n                precise: entry.attributes.PRECISE\n              };\n            },\n\n            'cue-out'() {\n              currentUri.cueOut = entry.data;\n            },\n\n            'cue-out-cont'() {\n              currentUri.cueOutCont = entry.data;\n            },\n\n            'cue-in'() {\n              currentUri.cueIn = entry.data;\n            },\n\n            'skip'() {\n              this.manifest.skip = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n            },\n\n            'part'() {\n              hasParts = true; // parts are always specifed before a segment\n\n              const segmentIndex = this.manifest.segments.length;\n              const part = camelCaseKeys(entry.attributes);\n              currentUri.parts = currentUri.parts || [];\n              currentUri.parts.push(part);\n\n              if (part.byterange) {\n                if (!part.byterange.hasOwnProperty('offset')) {\n                  part.byterange.offset = lastPartByterangeEnd;\n                }\n\n                lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n              }\n\n              const partIndex = currentUri.parts.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n              if (this.manifest.renditionReports) {\n                this.manifest.renditionReports.forEach((r, i) => {\n                  if (!r.hasOwnProperty('lastPart')) {\n                    this.trigger('warn', {\n                      message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n                    });\n                  }\n                });\n              }\n            },\n\n            'server-control'() {\n              const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\n              if (!attrs.hasOwnProperty('canBlockReload')) {\n                attrs.canBlockReload = false;\n                this.trigger('info', {\n                  message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n                });\n              }\n\n              setHoldBack.call(this, this.manifest);\n\n              if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n                this.trigger('warn', {\n                  message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n                });\n              }\n            },\n\n            'preload-hint'() {\n              // parts are always specifed before a segment\n              const segmentIndex = this.manifest.segments.length;\n              const hint = camelCaseKeys(entry.attributes);\n              const isPart = hint.type && hint.type === 'PART';\n              currentUri.preloadHints = currentUri.preloadHints || [];\n              currentUri.preloadHints.push(hint);\n\n              if (hint.byterange) {\n                if (!hint.byterange.hasOwnProperty('offset')) {\n                  // use last part byterange end or zero if not a part.\n                  hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n\n                  if (isPart) {\n                    lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n                  }\n                }\n              }\n\n              const index = currentUri.preloadHints.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n              if (!hint.type) {\n                return;\n              } // search through all preload hints except for the current one for\n              // a duplicate type.\n\n\n              for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n                const otherHint = currentUri.preloadHints[i];\n\n                if (!otherHint.type) {\n                  continue;\n                }\n\n                if (otherHint.type === hint.type) {\n                  this.trigger('warn', {\n                    message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n                  });\n                }\n              }\n            },\n\n            'rendition-report'() {\n              const report = camelCaseKeys(entry.attributes);\n              this.manifest.renditionReports = this.manifest.renditionReports || [];\n              this.manifest.renditionReports.push(report);\n              const index = this.manifest.renditionReports.length - 1;\n              const required = ['LAST-MSN', 'URI'];\n\n              if (hasParts) {\n                required.push('LAST-PART');\n              }\n\n              this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n            },\n\n            'part-inf'() {\n              this.manifest.partInf = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n              if (this.manifest.partInf.partTarget) {\n                this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n              }\n\n              setHoldBack.call(this, this.manifest);\n            },\n\n            'daterange'() {\n              this.manifest.dateRanges.push(camelCaseKeys(entry.attributes));\n              const index = this.manifest.dateRanges.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n              const dateRange = this.manifest.dateRanges[index];\n\n              if (dateRange.endDate && dateRange.startDate && new Date(dateRange.endDate) < new Date(dateRange.startDate)) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n                });\n              }\n\n              if (dateRange.duration && dateRange.duration < 0) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE DURATION must not be negative'\n                });\n              }\n\n              if (dateRange.plannedDuration && dateRange.plannedDuration < 0) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n                });\n              }\n\n              const endOnNextYes = !!dateRange.endOnNext;\n\n              if (endOnNextYes && !dateRange.class) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n                });\n              }\n\n              if (endOnNextYes && (dateRange.duration || dateRange.endDate)) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n                });\n              }\n\n              if (dateRange.duration && dateRange.endDate) {\n                const startDate = dateRange.startDate;\n                const newDateInSeconds = startDate.getTime() + dateRange.duration * 1000;\n                this.manifest.dateRanges[index].endDate = new Date(newDateInSeconds);\n              }\n\n              if (!dateRangeTags[dateRange.id]) {\n                dateRangeTags[dateRange.id] = dateRange;\n              } else {\n                for (const attribute in dateRangeTags[dateRange.id]) {\n                  if (!!dateRange[attribute] && JSON.stringify(dateRangeTags[dateRange.id][attribute]) !== JSON.stringify(dateRange[attribute])) {\n                    this.trigger('warn', {\n                      message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values'\n                    });\n                    break;\n                  }\n                } // if tags with the same ID do not have conflicting attributes, merge them\n\n\n                const dateRangeWithSameId = this.manifest.dateRanges.findIndex(dateRangeToFind => dateRangeToFind.id === dateRange.id);\n                this.manifest.dateRanges[dateRangeWithSameId] = _extends(this.manifest.dateRanges[dateRangeWithSameId], dateRange);\n                dateRangeTags[dateRange.id] = _extends(dateRangeTags[dateRange.id], dateRange); // after merging, delete the duplicate dateRange that was added last\n\n                this.manifest.dateRanges.pop();\n              }\n            },\n\n            'independent-segments'() {\n              this.manifest.independentSegments = true;\n            },\n\n            'i-frames-only'() {\n              this.manifest.iFramesOnly = true;\n              this.requiredCompatibilityversion(this.manifest.version, 4);\n            },\n\n            'content-steering'() {\n              this.manifest.contentSteering = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-CONTENT-STEERING', entry.attributes, ['SERVER-URI']);\n            },\n\n            /** @this {Parser} */\n            define() {\n              this.manifest.definitions = this.manifest.definitions || {};\n\n              const addDef = (n, v) => {\n                if (n in this.manifest.definitions) {\n                  // An EXT-X-DEFINE tag MUST NOT specify the same Variable Name as any other\n                  // EXT-X-DEFINE tag in the same Playlist.  Parsers that encounter duplicate\n                  // Variable Name declarations MUST fail to parse the Playlist.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: Duplicate name ${n}`\n                  });\n                  return;\n                }\n\n                this.manifest.definitions[n] = v;\n              };\n\n              if ('QUERYPARAM' in entry.attributes) {\n                if ('NAME' in entry.attributes || 'IMPORT' in entry.attributes) {\n                  // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a\n                  // QUERYPARAM attribute, but only one of the three.  Otherwise, the\n                  // client MUST fail to parse the Playlist.\n                  this.trigger('error', {\n                    message: 'EXT-X-DEFINE: Invalid attributes'\n                  });\n                  return;\n                }\n\n                const val = this.params.get(entry.attributes.QUERYPARAM);\n\n                if (!val) {\n                  // If the QUERYPARAM attribute value does not match any query parameter in\n                  // the URI or the matching parameter has no associated value, the parser\n                  // MUST fail to parse the Playlist.  If more than one parameter matches,\n                  // any of the associated values MAY be used.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: No query param ${entry.attributes.QUERYPARAM}`\n                  });\n                  return;\n                }\n\n                addDef(entry.attributes.QUERYPARAM, decodeURIComponent(val));\n                return;\n              }\n\n              if ('NAME' in entry.attributes) {\n                if ('IMPORT' in entry.attributes) {\n                  // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a\n                  // QUERYPARAM attribute, but only one of the three.  Otherwise, the\n                  // client MUST fail to parse the Playlist.\n                  this.trigger('error', {\n                    message: 'EXT-X-DEFINE: Invalid attributes'\n                  });\n                  return;\n                }\n\n                if (!('VALUE' in entry.attributes) || typeof entry.attributes.VALUE !== 'string') {\n                  // This attribute is REQUIRED if the EXT-X-DEFINE tag has a NAME attribute.\n                  // The quoted-string MAY be empty.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: No value for ${entry.attributes.NAME}`\n                  });\n                  return;\n                }\n\n                addDef(entry.attributes.NAME, entry.attributes.VALUE);\n                return;\n              }\n\n              if ('IMPORT' in entry.attributes) {\n                if (!this.mainDefinitions[entry.attributes.IMPORT]) {\n                  // Covers two conditions, as mainDefinitions will always be empty on main\n                  //\n                  // EXT-X-DEFINE tags containing the IMPORT attribute MUST NOT occur in\n                  // Multivariant Playlists; they are only allowed in Media Playlists.\n                  //\n                  // If the IMPORT attribute value does not match any Variable Name in the\n                  // Multivariant Playlist, or if the Media Playlist loaded from a\n                  // Multivariant Playlist, the parser MUST fail the Playlist.\n                  this.trigger('error', {\n                    message: `EXT-X-DEFINE: No value ${entry.attributes.IMPORT} to import, or IMPORT used on main playlist`\n                  });\n                  return;\n                }\n\n                addDef(entry.attributes.IMPORT, this.mainDefinitions[entry.attributes.IMPORT]);\n                return;\n              } // An EXT-X-DEFINE tag MUST contain either a NAME, an IMPORT, or a QUERYPARAM\n              // attribute, but only one of the three.  Otherwise, the client MUST fail to\n              // parse the Playlist.\n\n\n              this.trigger('error', {\n                message: 'EXT-X-DEFINE: No attribute'\n              });\n            },\n\n            'i-frame-playlist'() {\n              this.manifest.iFramePlaylists.push({\n                attributes: entry.attributes,\n                uri: entry.uri,\n                timeline: currentTimeline\n              });\n              this.warnOnMissingAttributes_('#EXT-X-I-FRAME-STREAM-INF', entry.attributes, ['BANDWIDTH', 'URI']);\n            }\n\n          })[entry.tagType] || noop).call(self);\n        },\n\n        uri() {\n          currentUri.uri = entry.uri;\n          uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n          if (this.manifest.targetDuration && !('duration' in currentUri)) {\n            this.trigger('warn', {\n              message: 'defaulting segment duration to the target duration'\n            });\n            currentUri.duration = this.manifest.targetDuration;\n          } // annotate with encryption information, if necessary\n\n\n          if (key) {\n            currentUri.key = key;\n          }\n\n          currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n          if (currentMap) {\n            currentUri.map = currentMap;\n          } // reset the last byterange end as it needs to be 0 between parts\n\n\n          lastPartByterangeEnd = 0; // Once we have at least one program date time we can always extrapolate it forward\n\n          if (this.lastProgramDateTime !== null) {\n            currentUri.programDateTime = this.lastProgramDateTime;\n            this.lastProgramDateTime += currentUri.duration * 1000;\n          } // prepare for the next URI\n\n\n          currentUri = {};\n        },\n\n        comment() {// comments are not important for playback\n        },\n\n        custom() {\n          // if this is segment-level data attach the output to the segment\n          if (entry.segment) {\n            currentUri.custom = currentUri.custom || {};\n            currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n          } else {\n            this.manifest.custom = this.manifest.custom || {};\n            this.manifest.custom[entry.customType] = entry.data;\n          }\n        }\n\n      })[entry.type].call(self);\n    });\n  }\n\n  requiredCompatibilityversion(currentVersion, targetVersion) {\n    if (currentVersion < targetVersion || !currentVersion) {\n      this.trigger('warn', {\n        message: `manifest must be at least version ${targetVersion}`\n      });\n    }\n  }\n\n  warnOnMissingAttributes_(identifier, attributes, required) {\n    const missing = [];\n    required.forEach(function (key) {\n      if (!attributes.hasOwnProperty(key)) {\n        missing.push(key);\n      }\n    });\n\n    if (missing.length) {\n      this.trigger('warn', {\n        message: `${identifier} lacks required attribute(s): ${missing.join(', ')}`\n      });\n    }\n  }\n  /**\n   * Parse the input string and update the manifest object.\n   *\n   * @param {string} chunk a potentially incomplete portion of the manifest\n   */\n\n\n  push(chunk) {\n    this.lineStream.push(chunk);\n  }\n  /**\n   * Flush any remaining input. This can be handy if the last line of an M3U8\n   * manifest did not contain a trailing newline but the file has been\n   * completely received.\n   */\n\n\n  end() {\n    // flush any buffered input\n    this.lineStream.push('\\n');\n\n    if (this.manifest.dateRanges.length && this.lastProgramDateTime === null) {\n      this.trigger('warn', {\n        message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n      });\n    }\n\n    this.lastProgramDateTime = null;\n    this.trigger('end');\n  }\n  /**\n   * Add an additional parser for non-standard tags\n   *\n   * @param {Object}   options              a map of options for the added parser\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {string}   options.customType   the custom type to register to the output\n   * @param {Function} [options.dataParser] function to parse the line into an object\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n   */\n\n\n  addParser(options) {\n    this.parseStream.addParser(options);\n  }\n  /**\n   * Add a custom header mapper\n   *\n   * @param {Object}   options\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {Function} options.map          function to translate tag into a different tag\n   */\n\n\n  addTagMapper(options) {\n    this.parseStream.addTagMapper(options);\n  }\n\n}\n\nexport { LineStream, ParseStream, Parser };\n","import window from 'global/window';\nvar regexs = {\n  // to determine mime types\n  mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n  webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n  ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n  // to determine if a codec is audio or video\n  video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n  audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n  text: /^(stpp.ttml.im1t)/,\n  // mux.js support regex\n  muxerVideo: /^(avc0?1)/,\n  muxerAudio: /^(mp4a)/,\n  // match nothing as muxer does not support text right now.\n  // there cannot never be a character before the start of a string\n  // so this matches nothing.\n  muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard\n * `avc1.<hhhhhh>`\n *\n * @param {string} codec\n *        Codec string to translate\n * @return {string}\n *         The translated codec string\n */\n\nexport var translateLegacyCodec = function translateLegacyCodec(codec) {\n  if (!codec) {\n    return codec;\n  }\n\n  return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n    var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n    var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n    return 'avc1.' + profileHex + '00' + avcLevelHex;\n  });\n};\n/**\n * Replace the old apple-style `avc1.<dd>.<dd>` codec strings with the standard\n * `avc1.<hhhhhh>`\n *\n * @param {string[]} codecs\n *        An array of codec strings to translate\n * @return {string[]}\n *         The translated array of codec strings\n */\n\nexport var translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n  return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the\n * standard `avc1.<hhhhhh>`.\n *\n * @param {string} codecString\n *        The codec string\n * @return {string}\n *         The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nexport var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n  return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n    return translateLegacyCodecs([match])[0];\n  });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n *           Number of codecs parsed\n * @property {string} [videoCodec]\n *           Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n *           Video object type indicator (if found)\n * @property {string|null} audioProfile\n *           Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n *        The codec string to parse\n * @return {ParsedCodecInfo}\n *         Parsed codec info\n */\n\nexport var parseCodecs = function parseCodecs(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  var codecs = codecString.split(',');\n  var result = [];\n  codecs.forEach(function (codec) {\n    codec = codec.trim();\n    var codecType;\n    mediaTypes.forEach(function (name) {\n      var match = regexs[name].exec(codec.toLowerCase());\n\n      if (!match || match.length <= 1) {\n        return;\n      }\n\n      codecType = name; // maintain codec case\n\n      var type = codec.substring(0, match[1].length);\n      var details = codec.replace(type, '');\n      result.push({\n        type: type,\n        details: details,\n        mediaType: name\n      });\n    });\n\n    if (!codecType) {\n      result.push({\n        type: codec,\n        details: '',\n        mediaType: 'unknown'\n      });\n    }\n  });\n  return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n *        The master playlist\n * @param {string} audioGroupId\n *        ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n *         Parsed codec info\n */\n\nexport var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n  if (!master.mediaGroups.AUDIO || !audioGroupId) {\n    return null;\n  }\n\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n  if (!audioGroup) {\n    return null;\n  }\n\n  for (var name in audioGroup) {\n    var audioType = audioGroup[name];\n\n    if (audioType.default && audioType.playlists) {\n      // codec should be the same for all playlists within the audio type\n      return parseCodecs(audioType.playlists[0].attributes.CODECS);\n    }\n  }\n\n  return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.video.test(codec.trim().toLowerCase());\n};\nexport var isAudioCodec = function isAudioCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n  if (codec === void 0) {\n    codec = '';\n  }\n\n  return regexs.text.test(codec.trim().toLowerCase());\n};\nexport var getMimeForCodec = function getMimeForCodec(codecString) {\n  if (!codecString || typeof codecString !== 'string') {\n    return;\n  }\n\n  var codecs = codecString.toLowerCase().split(',').map(function (c) {\n    return translateLegacyCodec(c.trim());\n  }); // default to video type\n\n  var type = 'video'; // only change to audio type if the only codec we have is\n  // audio\n\n  if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n    type = 'audio';\n  } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n    // text uses application/<container> for now\n    type = 'application';\n  } // default the container to mp4\n\n\n  var container = 'mp4'; // every codec must be able to go into the container\n  // for that container to be the correct one\n\n  if (codecs.every(function (c) {\n    return regexs.mp4.test(c);\n  })) {\n    container = 'mp4';\n  } else if (codecs.every(function (c) {\n    return regexs.webm.test(c);\n  })) {\n    container = 'webm';\n  } else if (codecs.every(function (c) {\n    return regexs.ogg.test(c);\n  })) {\n    container = 'ogg';\n  }\n\n  return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\n/**\n * Tests whether the codec is supported by MediaSource. Optionally also tests ManagedMediaSource.\n *\n * @param {string} codecString\n *        Codec to test\n * @param {boolean} [withMMS]\n *        Whether to check if ManagedMediaSource supports it\n * @return {boolean}\n *          Codec is supported\n */\n\nexport var browserSupportsCodec = function browserSupportsCodec(codecString, withMMS) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  if (withMMS === void 0) {\n    withMMS = false;\n  }\n\n  return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || withMMS && window.ManagedMediaSource && window.ManagedMediaSource.isTypeSupported && window.ManagedMediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n  if (codecString === void 0) {\n    codecString = '';\n  }\n\n  return codecString.toLowerCase().split(',').every(function (codec) {\n    codec = codec.trim(); // any match is supported.\n\n    for (var i = 0; i < upperMediaTypes.length; i++) {\n      var type = upperMediaTypes[i];\n\n      if (regexs[\"muxer\" + type].test(codec)) {\n        return true;\n      }\n    }\n\n    return false;\n  });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';","import window from 'global/window'; // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n  var acc = '';\n\n  while (len--) {\n    acc += str;\n  }\n\n  return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\n\nexport var countBits = function countBits(x) {\n  return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nexport var countBytes = function countBytes(x) {\n  return Math.ceil(countBits(x) / 8);\n};\nexport var padStart = function padStart(b, len, str) {\n  if (str === void 0) {\n    str = ' ';\n  }\n\n  return (repeat(str, len) + b.toString()).slice(-len);\n};\nexport var isArrayBufferView = function isArrayBufferView(obj) {\n  if (ArrayBuffer.isView === 'function') {\n    return ArrayBuffer.isView(obj);\n  }\n\n  return obj && obj.buffer instanceof ArrayBuffer;\n};\nexport var isTypedArray = function isTypedArray(obj) {\n  return isArrayBufferView(obj);\n};\nexport var toUint8 = function toUint8(bytes) {\n  if (bytes instanceof Uint8Array) {\n    return bytes;\n  }\n\n  if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n    // any non-number or NaN leads to empty uint8array\n    // eslint-disable-next-line\n    if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n      bytes = 0;\n    } else {\n      bytes = [bytes];\n    }\n  }\n\n  return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nexport var toHexString = function toHexString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(16), 2, '0');\n  }\n\n  return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n  bytes = toUint8(bytes);\n  var str = '';\n\n  for (var i = 0; i < bytes.length; i++) {\n    str += padStart(bytes[i].toString(2), 8, '0');\n  }\n\n  return str;\n};\nvar BigInt = window.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nexport var ENDIANNESS = function () {\n  var a = new Uint16Array([0xFFCC]);\n  var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n  if (b[0] === 0xFF) {\n    return 'big';\n  }\n\n  if (b[0] === 0xCC) {\n    return 'little';\n  }\n\n  return 'unknown';\n}();\nexport var IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexport var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexport var bytesToNumber = function bytesToNumber(bytes, _temp) {\n  var _ref = _temp === void 0 ? {} : _temp,\n      _ref$signed = _ref.signed,\n      signed = _ref$signed === void 0 ? false : _ref$signed,\n      _ref$le = _ref.le,\n      le = _ref$le === void 0 ? false : _ref$le;\n\n  bytes = toUint8(bytes);\n  var fn = le ? 'reduce' : 'reduceRight';\n  var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n  var number = obj.call(bytes, function (total, byte, i) {\n    var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n    return total + BigInt(byte) * BYTE_TABLE[exponent];\n  }, BigInt(0));\n\n  if (signed) {\n    var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n    number = BigInt(number);\n\n    if (number > max) {\n      number -= max;\n      number -= max;\n      number -= BigInt(2);\n    }\n  }\n\n  return Number(number);\n};\nexport var numberToBytes = function numberToBytes(number, _temp2) {\n  var _ref2 = _temp2 === void 0 ? {} : _temp2,\n      _ref2$le = _ref2.le,\n      le = _ref2$le === void 0 ? false : _ref2$le;\n\n  // eslint-disable-next-line\n  if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n    number = 0;\n  }\n\n  number = BigInt(number);\n  var byteCount = countBytes(number);\n  var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\n  for (var i = 0; i < byteCount; i++) {\n    var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n    bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n\n    if (number < 0) {\n      bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n      bytes[byteIndex] -= i === 0 ? 1 : 2;\n    }\n  }\n\n  return bytes;\n};\nexport var bytesToString = function bytesToString(bytes) {\n  if (!bytes) {\n    return '';\n  } // TODO: should toUint8 handle cases where we only have 8 bytes\n  // but report more since this is a Uint16+ Array?\n\n\n  bytes = Array.prototype.slice.call(bytes);\n  var string = String.fromCharCode.apply(null, toUint8(bytes));\n\n  try {\n    return decodeURIComponent(escape(string));\n  } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n    // or full non string data. Just return the potentially garbled string.\n  }\n\n  return string;\n};\nexport var stringToBytes = function stringToBytes(string, stringIsBytes) {\n  if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n    string = string.toString();\n  }\n\n  if (typeof string !== 'string') {\n    return new Uint8Array();\n  } // If the string already is bytes, we don't have to do this\n  // otherwise we do this so that we split multi length characters\n  // into individual bytes\n\n\n  if (!stringIsBytes) {\n    string = unescape(encodeURIComponent(string));\n  }\n\n  var view = new Uint8Array(string.length);\n\n  for (var i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n\n  return view;\n};\nexport var concatTypedArrays = function concatTypedArrays() {\n  for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n    buffers[_key] = arguments[_key];\n  }\n\n  buffers = buffers.filter(function (b) {\n    return b && (b.byteLength || b.length) && typeof b !== 'string';\n  });\n\n  if (buffers.length <= 1) {\n    // for 0 length we will return empty uint8\n    // for 1 length we return the first uint8\n    return toUint8(buffers[0]);\n  }\n\n  var totalLen = buffers.reduce(function (total, buf, i) {\n    return total + (buf.byteLength || buf.length);\n  }, 0);\n  var tempBuffer = new Uint8Array(totalLen);\n  var offset = 0;\n  buffers.forEach(function (buf) {\n    buf = toUint8(buf);\n    tempBuffer.set(buf, offset);\n    offset += buf.byteLength;\n  });\n  return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n *        Bytes to check in\n *\n * @param {Uint8Array|Array} b\n *        Bytes to check for\n *\n * @param {Object} options\n *        options\n *\n * @param {Array|Uint8Array} [offset=0]\n *        offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n *        mask to use on bytes before comparison.\n *\n * @return {boolean}\n *         If all bytes in b are inside of a, taking into account\n *         bit masks.\n */\n\nexport var bytesMatch = function bytesMatch(a, b, _temp3) {\n  var _ref3 = _temp3 === void 0 ? {} : _temp3,\n      _ref3$offset = _ref3.offset,\n      offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n      _ref3$mask = _ref3.mask,\n      mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n\n  a = toUint8(a);\n  b = toUint8(b); // ie 11 does not support uint8 every\n\n  var fn = b.every ? b.every : Array.prototype.every;\n  return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8\n  fn.call(b, function (bByte, i) {\n    var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n    return bByte === aByte;\n  });\n};\nexport var sliceBytes = function sliceBytes(src, start, end) {\n  if (Uint8Array.prototype.slice) {\n    return Uint8Array.prototype.slice.call(src, start, end);\n  }\n\n  return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nexport var reverseBytes = function reverseBytes(src) {\n  if (src.reverse) {\n    return src.reverse();\n  }\n\n  return Array.prototype.reverse.call(src);\n};","var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n *        Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n *         VHS source type string\n */\n\nexport var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n  if (MPEGURL_REGEX.test(type)) {\n    return 'hls';\n  }\n\n  if (DASH_REGEX.test(type)) {\n    return 'dash';\n  } // Denotes the special case of a manifest object passed to http-streaming instead of a\n  // source URL.\n  //\n  // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n  //\n  // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n  // project, and the +json suffix identifies the structure of the media type.\n\n\n  if (type === 'application/vnd.videojs.vhs+json') {\n    return 'vhs-json';\n  }\n\n  return null;\n};","/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */\nimport resolveUrl from '@videojs/vhs-utils/es/resolve-url';\nimport window from 'global/window';\nimport { forEachMediaGroup } from '@videojs/vhs-utils/es/media-groups';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array';\nimport { DOMParser } from '@xmldom/xmldom';\n\nvar version = \"1.3.1\";\n\nconst isObject = obj => {\n  return !!obj && typeof obj === 'object';\n};\n\nconst merge = (...objects) => {\n  return objects.reduce((result, source) => {\n    if (typeof source !== 'object') {\n      return result;\n    }\n\n    Object.keys(source).forEach(key => {\n      if (Array.isArray(result[key]) && Array.isArray(source[key])) {\n        result[key] = result[key].concat(source[key]);\n      } else if (isObject(result[key]) && isObject(source[key])) {\n        result[key] = merge(result[key], source[key]);\n      } else {\n        result[key] = source[key];\n      }\n    });\n    return result;\n  }, {});\n};\nconst values = o => Object.keys(o).map(k => o[k]);\n\nconst range = (start, end) => {\n  const result = [];\n\n  for (let i = start; i < end; i++) {\n    result.push(i);\n  }\n\n  return result;\n};\nconst flatten = lists => lists.reduce((x, y) => x.concat(y), []);\nconst from = list => {\n  if (!list.length) {\n    return [];\n  }\n\n  const result = [];\n\n  for (let i = 0; i < list.length; i++) {\n    result.push(list[i]);\n  }\n\n  return result;\n};\nconst findIndexes = (l, key) => l.reduce((a, e, i) => {\n  if (e[key]) {\n    a.push(i);\n  }\n\n  return a;\n}, []);\n/**\n * Returns a union of the included lists provided each element can be identified by a key.\n *\n * @param {Array} list - list of lists to get the union of\n * @param {Function} keyFunction - the function to use as a key for each element\n *\n * @return {Array} the union of the arrays\n */\n\nconst union = (lists, keyFunction) => {\n  return values(lists.reduce((acc, list) => {\n    list.forEach(el => {\n      acc[keyFunction(el)] = el;\n    });\n    return acc;\n  }, {}));\n};\n\nvar errors = {\n  INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\n  INVALID_NUMBER_OF_CONTENT_STEERING: 'INVALID_NUMBER_OF_CONTENT_STEERING',\n  DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\n  DASH_INVALID_XML: 'DASH_INVALID_XML',\n  NO_BASE_URL: 'NO_BASE_URL',\n  MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\n  SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\n  UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\n};\n\n/**\n * @typedef {Object} SingleUri\n * @property {string} uri - relative location of segment\n * @property {string} resolvedUri - resolved location of segment\n * @property {Object} byterange - Object containing information on how to make byte range\n *   requests following byte-range-spec per RFC2616.\n * @property {String} byterange.length - length of range request\n * @property {String} byterange.offset - byte offset of range request\n *\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\n */\n\n/**\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\n * that conforms to how m3u8-parser is structured\n *\n * @see https://github.com/videojs/m3u8-parser\n *\n * @param {string} baseUrl - baseUrl provided by <BaseUrl> nodes\n * @param {string} source - source url for segment\n * @param {string} range - optional range used for range calls,\n *   follows  RFC 2616, Clause 14.35.1\n * @return {SingleUri} full segment information transformed into a format similar\n *   to m3u8-parser\n */\n\nconst urlTypeToSegment = ({\n  baseUrl = '',\n  source = '',\n  range = '',\n  indexRange = ''\n}) => {\n  const segment = {\n    uri: source,\n    resolvedUri: resolveUrl(baseUrl || '', source)\n  };\n\n  if (range || indexRange) {\n    const rangeStr = range ? range : indexRange;\n    const ranges = rangeStr.split('-'); // default to parsing this as a BigInt if possible\n\n    let startRange = window.BigInt ? window.BigInt(ranges[0]) : parseInt(ranges[0], 10);\n    let endRange = window.BigInt ? window.BigInt(ranges[1]) : parseInt(ranges[1], 10); // convert back to a number if less than MAX_SAFE_INTEGER\n\n    if (startRange < Number.MAX_SAFE_INTEGER && typeof startRange === 'bigint') {\n      startRange = Number(startRange);\n    }\n\n    if (endRange < Number.MAX_SAFE_INTEGER && typeof endRange === 'bigint') {\n      endRange = Number(endRange);\n    }\n\n    let length;\n\n    if (typeof endRange === 'bigint' || typeof startRange === 'bigint') {\n      length = window.BigInt(endRange) - window.BigInt(startRange) + window.BigInt(1);\n    } else {\n      length = endRange - startRange + 1;\n    }\n\n    if (typeof length === 'bigint' && length < Number.MAX_SAFE_INTEGER) {\n      length = Number(length);\n    } // byterange should be inclusive according to\n    // RFC 2616, Clause 14.35.1\n\n\n    segment.byterange = {\n      length,\n      offset: startRange\n    };\n  }\n\n  return segment;\n};\nconst byteRangeToString = byterange => {\n  // `endRange` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let endRange;\n\n  if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n    endRange = window.BigInt(byterange.offset) + window.BigInt(byterange.length) - window.BigInt(1);\n  } else {\n    endRange = byterange.offset + byterange.length - 1;\n  }\n\n  return `${byterange.offset}-${endRange}`;\n};\n\n/**\n * parse the end number attribue that can be a string\n * number, or undefined.\n *\n * @param {string|number|undefined} endNumber\n *        The end number attribute.\n *\n * @return {number|null}\n *          The result of parsing the end number.\n */\n\nconst parseEndNumber = endNumber => {\n  if (endNumber && typeof endNumber !== 'number') {\n    endNumber = parseInt(endNumber, 10);\n  }\n\n  if (isNaN(endNumber)) {\n    return null;\n  }\n\n  return endNumber;\n};\n/**\n * Functions for calculating the range of available segments in static and dynamic\n * manifests.\n */\n\n\nconst segmentRange = {\n  /**\n   * Returns the entire range of available segments for a static MPD\n   *\n   * @param {Object} attributes\n   *        Inheritied MPD attributes\n   * @return {{ start: number, end: number }}\n   *         The start and end numbers for available segments\n   */\n  static(attributes) {\n    const {\n      duration,\n      timescale = 1,\n      sourceDuration,\n      periodDuration\n    } = attributes;\n    const endNumber = parseEndNumber(attributes.endNumber);\n    const segmentDuration = duration / timescale;\n\n    if (typeof endNumber === 'number') {\n      return {\n        start: 0,\n        end: endNumber\n      };\n    }\n\n    if (typeof periodDuration === 'number') {\n      return {\n        start: 0,\n        end: periodDuration / segmentDuration\n      };\n    }\n\n    return {\n      start: 0,\n      end: sourceDuration / segmentDuration\n    };\n  },\n\n  /**\n   * Returns the current live window range of available segments for a dynamic MPD\n   *\n   * @param {Object} attributes\n   *        Inheritied MPD attributes\n   * @return {{ start: number, end: number }}\n   *         The start and end numbers for available segments\n   */\n  dynamic(attributes) {\n    const {\n      NOW,\n      clientOffset,\n      availabilityStartTime,\n      timescale = 1,\n      duration,\n      periodStart = 0,\n      minimumUpdatePeriod = 0,\n      timeShiftBufferDepth = Infinity\n    } = attributes;\n    const endNumber = parseEndNumber(attributes.endNumber); // clientOffset is passed in at the top level of mpd-parser and is an offset calculated\n    // after retrieving UTC server time.\n\n    const now = (NOW + clientOffset) / 1000; // WC stands for Wall Clock.\n    // Convert the period start time to EPOCH.\n\n    const periodStartWC = availabilityStartTime + periodStart; // Period end in EPOCH is manifest's retrieval time + time until next update.\n\n    const periodEndWC = now + minimumUpdatePeriod;\n    const periodDuration = periodEndWC - periodStartWC;\n    const segmentCount = Math.ceil(periodDuration * timescale / duration);\n    const availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\n    const availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\n    return {\n      start: Math.max(0, availableStart),\n      end: typeof endNumber === 'number' ? endNumber : Math.min(segmentCount, availableEnd)\n    };\n  }\n\n};\n/**\n * Maps a range of numbers to objects with information needed to build the corresponding\n * segment list\n *\n * @name toSegmentsCallback\n * @function\n * @param {number} number\n *        Number of the segment\n * @param {number} index\n *        Index of the number in the range list\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\n *         Object with segment timing and duration info\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\n * information needed to build the segment list.\n *\n * @param {Object} attributes\n *        Inherited MPD attributes\n * @return {toSegmentsCallback}\n *         Callback map function\n */\n\nconst toSegments = attributes => number => {\n  const {\n    duration,\n    timescale = 1,\n    periodStart,\n    startNumber = 1\n  } = attributes;\n  return {\n    number: startNumber + number,\n    duration: duration / timescale,\n    timeline: periodStart,\n    time: number * duration\n  };\n};\n/**\n * Returns a list of objects containing segment timing and duration info used for\n * building the list of segments. This uses the @duration attribute specified\n * in the MPD manifest to derive the range of segments.\n *\n * @param {Object} attributes\n *        Inherited MPD attributes\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n *         List of Objects with segment timing and duration info\n */\n\nconst parseByDuration = attributes => {\n  const {\n    type,\n    duration,\n    timescale = 1,\n    periodDuration,\n    sourceDuration\n  } = attributes;\n  const {\n    start,\n    end\n  } = segmentRange[type](attributes);\n  const segments = range(start, end).map(toSegments(attributes));\n\n  if (type === 'static') {\n    const index = segments.length - 1; // section is either a period or the full source\n\n    const sectionDuration = typeof periodDuration === 'number' ? periodDuration : sourceDuration; // final segment may be less than full segment duration\n\n    segments[index].duration = sectionDuration - duration / timescale * index;\n  }\n\n  return segments;\n};\n\n/**\n * Translates SegmentBase into a set of segments.\n * (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n *   Object containing all inherited attributes from parent elements with attribute\n *   names as keys\n * @return {Object.<Array>} list of segments\n */\n\nconst segmentsFromBase = attributes => {\n  const {\n    baseUrl,\n    initialization = {},\n    sourceDuration,\n    indexRange = '',\n    periodStart,\n    presentationTime,\n    number = 0,\n    duration\n  } = attributes; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\n\n  if (!baseUrl) {\n    throw new Error(errors.NO_BASE_URL);\n  }\n\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    baseUrl,\n    source: baseUrl,\n    indexRange\n  });\n  segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\n  // (since SegmentBase is only for one total segment)\n\n  if (duration) {\n    const segmentTimeInfo = parseByDuration(attributes);\n\n    if (segmentTimeInfo.length) {\n      segment.duration = segmentTimeInfo[0].duration;\n      segment.timeline = segmentTimeInfo[0].timeline;\n    }\n  } else if (sourceDuration) {\n    segment.duration = sourceDuration;\n    segment.timeline = periodStart;\n  } // If presentation time is provided, these segments are being generated by SIDX\n  // references, and should use the time provided. For the general case of SegmentBase,\n  // there should only be one segment in the period, so its presentation time is the same\n  // as its period start.\n\n\n  segment.presentationTime = presentationTime || periodStart;\n  segment.number = number;\n  return [segment];\n};\n/**\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\n * according to the sidx information given.\n *\n * playlist.sidx has metadadata about the sidx where-as the sidx param\n * is the parsed sidx box itself.\n *\n * @param {Object} playlist the playlist to update the sidx information for\n * @param {Object} sidx the parsed sidx box\n * @return {Object} the playlist object with the updated sidx information\n */\n\nconst addSidxSegmentsToPlaylist$1 = (playlist, sidx, baseUrl) => {\n  // Retain init segment information\n  const initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial main manifest parsing\n\n  const sourceDuration = playlist.sidx.duration; // Retain source timeline\n\n  const timeline = playlist.timeline || 0;\n  const sidxByteRange = playlist.sidx.byterange;\n  const sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\n\n  const timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\n\n  const mediaReferences = sidx.references.filter(r => r.referenceType !== 1);\n  const segments = [];\n  const type = playlist.endList ? 'static' : 'dynamic';\n  const periodStart = playlist.sidx.timeline;\n  let presentationTime = periodStart;\n  let number = playlist.mediaSequence || 0; // firstOffset is the offset from the end of the sidx box\n\n  let startIndex; // eslint-disable-next-line\n\n  if (typeof sidx.firstOffset === 'bigint') {\n    startIndex = window.BigInt(sidxEnd) + sidx.firstOffset;\n  } else {\n    startIndex = sidxEnd + sidx.firstOffset;\n  }\n\n  for (let i = 0; i < mediaReferences.length; i++) {\n    const reference = sidx.references[i]; // size of the referenced (sub)segment\n\n    const size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\n    // this will be converted to seconds when generating segments\n\n    const duration = reference.subsegmentDuration; // should be an inclusive range\n\n    let endIndex; // eslint-disable-next-line\n\n    if (typeof startIndex === 'bigint') {\n      endIndex = startIndex + window.BigInt(size) - window.BigInt(1);\n    } else {\n      endIndex = startIndex + size - 1;\n    }\n\n    const indexRange = `${startIndex}-${endIndex}`;\n    const attributes = {\n      baseUrl,\n      timescale,\n      timeline,\n      periodStart,\n      presentationTime,\n      number,\n      duration,\n      sourceDuration,\n      indexRange,\n      type\n    };\n    const segment = segmentsFromBase(attributes)[0];\n\n    if (initSegment) {\n      segment.map = initSegment;\n    }\n\n    segments.push(segment);\n\n    if (typeof startIndex === 'bigint') {\n      startIndex += window.BigInt(size);\n    } else {\n      startIndex += size;\n    }\n\n    presentationTime += duration / timescale;\n    number++;\n  }\n\n  playlist.segments = segments;\n  return playlist;\n};\n\nconst SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES']; // allow one 60fps frame as leniency (arbitrarily chosen)\n\nconst TIME_FUDGE = 1 / 60;\n/**\n * Given a list of timelineStarts, combines, dedupes, and sorts them.\n *\n * @param {TimelineStart[]} timelineStarts - list of timeline starts\n *\n * @return {TimelineStart[]} the combined and deduped timeline starts\n */\n\nconst getUniqueTimelineStarts = timelineStarts => {\n  return union(timelineStarts, ({\n    timeline\n  }) => timeline).sort((a, b) => a.timeline > b.timeline ? 1 : -1);\n};\n/**\n * Finds the playlist with the matching NAME attribute.\n *\n * @param {Array} playlists - playlists to search through\n * @param {string} name - the NAME attribute to search for\n *\n * @return {Object|null} the matching playlist object, or null\n */\n\nconst findPlaylistWithName = (playlists, name) => {\n  for (let i = 0; i < playlists.length; i++) {\n    if (playlists[i].attributes.NAME === name) {\n      return playlists[i];\n    }\n  }\n\n  return null;\n};\n/**\n * Gets a flattened array of media group playlists.\n *\n * @param {Object} manifest - the main manifest object\n *\n * @return {Array} the media group playlists\n */\n\nconst getMediaGroupPlaylists = manifest => {\n  let mediaGroupPlaylists = [];\n  forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => {\n    mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);\n  });\n  return mediaGroupPlaylists;\n};\n/**\n * Updates the playlist's media sequence numbers.\n *\n * @param {Object} config - options object\n * @param {Object} config.playlist - the playlist to update\n * @param {number} config.mediaSequence - the mediaSequence number to start with\n */\n\nconst updateMediaSequenceForPlaylist = ({\n  playlist,\n  mediaSequence\n}) => {\n  playlist.mediaSequence = mediaSequence;\n  playlist.segments.forEach((segment, index) => {\n    segment.number = playlist.mediaSequence + index;\n  });\n};\n/**\n * Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists\n * and a complete list of timeline starts.\n *\n * If no matching playlist is found, only the discontinuity sequence number of the playlist\n * will be updated.\n *\n * Since early available timelines are not supported, at least one segment must be present.\n *\n * @param {Object} config - options object\n * @param {Object[]} oldPlaylists - the old playlists to use as a reference\n * @param {Object[]} newPlaylists - the new playlists to update\n * @param {Object} timelineStarts - all timelineStarts seen in the stream to this point\n */\n\nconst updateSequenceNumbers = ({\n  oldPlaylists,\n  newPlaylists,\n  timelineStarts\n}) => {\n  newPlaylists.forEach(playlist => {\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\n      return timeline === playlist.timeline;\n    }); // Playlists NAMEs come from DASH Representation IDs, which are mandatory\n    // (see ISO_23009-1-2012 5.3.5.2).\n    //\n    // If the same Representation existed in a prior Period, it will retain the same NAME.\n\n    const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);\n\n    if (!oldPlaylist) {\n      // Since this is a new playlist, the media sequence values can start from 0 without\n      // consequence.\n      return;\n    } // TODO better support for live SIDX\n    //\n    // As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).\n    // This is evident by a playlist only having a single SIDX reference. In a multiperiod\n    // playlist there would need to be multiple SIDX references. In addition, live SIDX is\n    // not supported when the SIDX properties change on refreshes.\n    //\n    // In the future, if support needs to be added, the merging logic here can be called\n    // after SIDX references are resolved. For now, exit early to prevent exceptions being\n    // thrown due to undefined references.\n\n\n    if (playlist.sidx) {\n      return;\n    } // Since we don't yet support early available timelines, we don't need to support\n    // playlists with no segments.\n\n\n    const firstNewSegment = playlist.segments[0];\n    const oldMatchingSegmentIndex = oldPlaylist.segments.findIndex(function (oldSegment) {\n      return Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) < TIME_FUDGE;\n    }); // No matching segment from the old playlist means the entire playlist was refreshed.\n    // In this case the media sequence should account for this update, and the new segments\n    // should be marked as discontinuous from the prior content, since the last prior\n    // timeline was removed.\n\n    if (oldMatchingSegmentIndex === -1) {\n      updateMediaSequenceForPlaylist({\n        playlist,\n        mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length\n      });\n      playlist.segments[0].discontinuity = true;\n      playlist.discontinuityStarts.unshift(0); // No matching segment does not necessarily mean there's missing content.\n      //\n      // If the new playlist's timeline is the same as the last seen segment's timeline,\n      // then a discontinuity can be added to identify that there's potentially missing\n      // content. If there's no missing content, the discontinuity should still be rather\n      // harmless. It's possible that if segment durations are accurate enough, that the\n      // existence of a gap can be determined using the presentation times and durations,\n      // but if the segment timing info is off, it may introduce more problems than simply\n      // adding the discontinuity.\n      //\n      // If the new playlist's timeline is different from the last seen segment's timeline,\n      // then a discontinuity can be added to identify that this is the first seen segment\n      // of a new timeline. However, the logic at the start of this function that\n      // determined the disconinuity sequence by timeline index is now off by one (the\n      // discontinuity of the newest timeline hasn't yet fallen off the manifest...since\n      // we added it), so the disconinuity sequence must be decremented.\n      //\n      // A period may also have a duration of zero, so the case of no segments is handled\n      // here even though we don't yet support early available periods.\n\n      if (!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline || oldPlaylist.segments.length && playlist.timeline > oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline) {\n        playlist.discontinuitySequence--;\n      }\n\n      return;\n    } // If the first segment matched with a prior segment on a discontinuity (it's matching\n    // on the first segment of a period), then the discontinuitySequence shouldn't be the\n    // timeline's matching one, but instead should be the one prior, and the first segment\n    // of the new manifest should be marked with a discontinuity.\n    //\n    // The reason for this special case is that discontinuity sequence shows how many\n    // discontinuities have fallen off of the playlist, and discontinuities are marked on\n    // the first segment of a new \"timeline.\" Because of this, while DASH will retain that\n    // Period while the \"timeline\" exists, HLS keeps track of it via the discontinuity\n    // sequence, and that first segment is an indicator, but can be removed before that\n    // timeline is gone.\n\n\n    const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];\n\n    if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {\n      firstNewSegment.discontinuity = true;\n      playlist.discontinuityStarts.unshift(0);\n      playlist.discontinuitySequence--;\n    }\n\n    updateMediaSequenceForPlaylist({\n      playlist,\n      mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number\n    });\n  });\n};\n/**\n * Given an old parsed manifest object and a new parsed manifest object, updates the\n * sequence and timing values within the new manifest to ensure that it lines up with the\n * old.\n *\n * @param {Array} oldManifest - the old main manifest object\n * @param {Array} newManifest - the new main manifest object\n *\n * @return {Object} the updated new manifest object\n */\n\nconst positionManifestOnTimeline = ({\n  oldManifest,\n  newManifest\n}) => {\n  // Starting from v4.1.2 of the IOP, section 4.4.3.3 states:\n  //\n  // \"MPD@availabilityStartTime and Period@start shall not be changed over MPD updates.\"\n  //\n  // This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160\n  //\n  // Because of this change, and the difficulty of supporting periods with changing start\n  // times, periods with changing start times are not supported. This makes the logic much\n  // simpler, since periods with the same start time can be considerred the same period\n  // across refreshes.\n  //\n  // To give an example as to the difficulty of handling periods where the start time may\n  // change, if a single period manifest is refreshed with another manifest with a single\n  // period, and both the start and end times are increased, then the only way to determine\n  // if it's a new period or an old one that has changed is to look through the segments of\n  // each playlist and determine the presentation time bounds to find a match. In addition,\n  // if the period start changed to exceed the old period end, then there would be no\n  // match, and it would not be possible to determine whether the refreshed period is a new\n  // one or the old one.\n  const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));\n  const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest)); // Save all seen timelineStarts to the new manifest. Although this potentially means that\n  // there's a \"memory leak\" in that it will never stop growing, in reality, only a couple\n  // of properties are saved for each seen Period. Even long running live streams won't\n  // generate too many Periods, unless the stream is watched for decades. In the future,\n  // this can be optimized by mapping to discontinuity sequence numbers for each timeline,\n  // but it may not become an issue, and the additional info can be useful for debugging.\n\n  newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts, newManifest.timelineStarts]);\n  updateSequenceNumbers({\n    oldPlaylists,\n    newPlaylists,\n    timelineStarts: newManifest.timelineStarts\n  });\n  return newManifest;\n};\n\nconst generateSidxKey = sidx => sidx && sidx.uri + '-' + byteRangeToString(sidx.byterange);\n\nconst mergeDiscontiguousPlaylists = playlists => {\n  // Break out playlists into groups based on their baseUrl\n  const playlistsByBaseUrl = playlists.reduce(function (acc, cur) {\n    if (!acc[cur.attributes.baseUrl]) {\n      acc[cur.attributes.baseUrl] = [];\n    }\n\n    acc[cur.attributes.baseUrl].push(cur);\n    return acc;\n  }, {});\n  let allPlaylists = [];\n  Object.values(playlistsByBaseUrl).forEach(playlistGroup => {\n    const mergedPlaylists = values(playlistGroup.reduce((acc, playlist) => {\n      // assuming playlist IDs are the same across periods\n      // TODO: handle multiperiod where representation sets are not the same\n      // across periods\n      const name = playlist.attributes.id + (playlist.attributes.lang || '');\n\n      if (!acc[name]) {\n        // First Period\n        acc[name] = playlist;\n        acc[name].attributes.timelineStarts = [];\n      } else {\n        // Subsequent Periods\n        if (playlist.segments) {\n          // first segment of subsequent periods signal a discontinuity\n          if (playlist.segments[0]) {\n            playlist.segments[0].discontinuity = true;\n          }\n\n          acc[name].segments.push(...playlist.segments);\n        } // bubble up contentProtection, this assumes all DRM content\n        // has the same contentProtection\n\n\n        if (playlist.attributes.contentProtection) {\n          acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\n        }\n      }\n\n      acc[name].attributes.timelineStarts.push({\n        // Although they represent the same number, it's important to have both to make it\n        // compatible with HLS potentially having a similar attribute.\n        start: playlist.attributes.periodStart,\n        timeline: playlist.attributes.periodStart\n      });\n      return acc;\n    }, {}));\n    allPlaylists = allPlaylists.concat(mergedPlaylists);\n  });\n  return allPlaylists.map(playlist => {\n    playlist.discontinuityStarts = findIndexes(playlist.segments || [], 'discontinuity');\n    return playlist;\n  });\n};\n\nconst addSidxSegmentsToPlaylist = (playlist, sidxMapping) => {\n  const sidxKey = generateSidxKey(playlist.sidx);\n  const sidxMatch = sidxKey && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\n\n  if (sidxMatch) {\n    addSidxSegmentsToPlaylist$1(playlist, sidxMatch, playlist.sidx.resolvedUri);\n  }\n\n  return playlist;\n};\nconst addSidxSegmentsToPlaylists = (playlists, sidxMapping = {}) => {\n  if (!Object.keys(sidxMapping).length) {\n    return playlists;\n  }\n\n  for (const i in playlists) {\n    playlists[i] = addSidxSegmentsToPlaylist(playlists[i], sidxMapping);\n  }\n\n  return playlists;\n};\nconst formatAudioPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  mediaSequence,\n  discontinuitySequence,\n  discontinuityStarts\n}, isAudioOnly) => {\n  const playlist = {\n    attributes: {\n      NAME: attributes.id,\n      BANDWIDTH: attributes.bandwidth,\n      CODECS: attributes.codecs,\n      ['PROGRAM-ID']: 1\n    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuitySequence,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  if (isAudioOnly) {\n    playlist.attributes.AUDIO = 'audio';\n    playlist.attributes.SUBTITLES = 'subs';\n  }\n\n  return playlist;\n};\nconst formatVttPlaylist = ({\n  attributes,\n  segments,\n  mediaSequence,\n  discontinuityStarts,\n  discontinuitySequence\n}) => {\n  if (typeof segments === 'undefined') {\n    // vtt tracks may use single file in BaseURL\n    segments = [{\n      uri: attributes.baseUrl,\n      timeline: attributes.periodStart,\n      resolvedUri: attributes.baseUrl || '',\n      duration: attributes.sourceDuration,\n      number: 0\n    }]; // targetDuration should be the same duration as the only segment\n\n    attributes.duration = attributes.sourceDuration;\n  }\n\n  const m3u8Attributes = {\n    NAME: attributes.id,\n    BANDWIDTH: attributes.bandwidth,\n    ['PROGRAM-ID']: 1\n  };\n\n  if (attributes.codecs) {\n    m3u8Attributes.CODECS = attributes.codecs;\n  }\n\n  const vttPlaylist = {\n    attributes: m3u8Attributes,\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    timelineStarts: attributes.timelineStarts,\n    discontinuityStarts,\n    discontinuitySequence,\n    mediaSequence,\n    segments\n  };\n\n  if (attributes.serviceLocation) {\n    vttPlaylist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  return vttPlaylist;\n};\nconst organizeAudioPlaylists = (playlists, sidxMapping = {}, isAudioOnly = false) => {\n  let mainPlaylist;\n  const formattedPlaylists = playlists.reduce((a, playlist) => {\n    const role = playlist.attributes.role && playlist.attributes.role.value || '';\n    const language = playlist.attributes.lang || '';\n    let label = playlist.attributes.label || 'main';\n\n    if (language && !playlist.attributes.label) {\n      const roleLabel = role ? ` (${role})` : '';\n      label = `${playlist.attributes.lang}${roleLabel}`;\n    }\n\n    if (!a[label]) {\n      a[label] = {\n        language,\n        autoselect: true,\n        default: role === 'main',\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    const formatted = addSidxSegmentsToPlaylist(formatAudioPlaylist(playlist, isAudioOnly), sidxMapping);\n    a[label].playlists.push(formatted);\n\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\n      mainPlaylist = playlist;\n      mainPlaylist.default = true;\n    }\n\n    return a;\n  }, {}); // if no playlists have role \"main\", mark the first as main\n\n  if (!mainPlaylist) {\n    const firstLabel = Object.keys(formattedPlaylists)[0];\n    formattedPlaylists[firstLabel].default = true;\n  }\n\n  return formattedPlaylists;\n};\nconst organizeVttPlaylists = (playlists, sidxMapping = {}) => {\n  return playlists.reduce((a, playlist) => {\n    const label = playlist.attributes.label || playlist.attributes.lang || 'text';\n    const language = playlist.attributes.lang || 'und';\n\n    if (!a[label]) {\n      a[label] = {\n        language,\n        default: false,\n        autoselect: false,\n        playlists: [],\n        uri: ''\n      };\n    }\n\n    a[label].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(playlist), sidxMapping));\n    return a;\n  }, {});\n};\n\nconst organizeCaptionServices = captionServices => captionServices.reduce((svcObj, svc) => {\n  if (!svc) {\n    return svcObj;\n  }\n\n  svc.forEach(service => {\n    const {\n      channel,\n      language\n    } = service;\n    svcObj[language] = {\n      autoselect: false,\n      default: false,\n      instreamId: channel,\n      language\n    };\n\n    if (service.hasOwnProperty('aspectRatio')) {\n      svcObj[language].aspectRatio = service.aspectRatio;\n    }\n\n    if (service.hasOwnProperty('easyReader')) {\n      svcObj[language].easyReader = service.easyReader;\n    }\n\n    if (service.hasOwnProperty('3D')) {\n      svcObj[language]['3D'] = service['3D'];\n    }\n  });\n  return svcObj;\n}, {});\n\nconst formatVideoPlaylist = ({\n  attributes,\n  segments,\n  sidx,\n  discontinuityStarts\n}) => {\n  const playlist = {\n    attributes: {\n      NAME: attributes.id,\n      AUDIO: 'audio',\n      SUBTITLES: 'subs',\n      RESOLUTION: {\n        width: attributes.width,\n        height: attributes.height\n      },\n      CODECS: attributes.codecs,\n      BANDWIDTH: attributes.bandwidth,\n      ['PROGRAM-ID']: 1\n    },\n    uri: '',\n    endList: attributes.type === 'static',\n    timeline: attributes.periodStart,\n    resolvedUri: attributes.baseUrl || '',\n    targetDuration: attributes.duration,\n    discontinuityStarts,\n    timelineStarts: attributes.timelineStarts,\n    segments\n  };\n\n  if (attributes.frameRate) {\n    playlist.attributes['FRAME-RATE'] = attributes.frameRate;\n  }\n\n  if (attributes.contentProtection) {\n    playlist.contentProtection = attributes.contentProtection;\n  }\n\n  if (attributes.serviceLocation) {\n    playlist.attributes.serviceLocation = attributes.serviceLocation;\n  }\n\n  if (sidx) {\n    playlist.sidx = sidx;\n  }\n\n  return playlist;\n};\n\nconst videoOnly = ({\n  attributes\n}) => attributes.mimeType === 'video/mp4' || attributes.mimeType === 'video/webm' || attributes.contentType === 'video';\n\nconst audioOnly = ({\n  attributes\n}) => attributes.mimeType === 'audio/mp4' || attributes.mimeType === 'audio/webm' || attributes.contentType === 'audio';\n\nconst vttOnly = ({\n  attributes\n}) => attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\n/**\n * Contains start and timeline properties denoting a timeline start. For DASH, these will\n * be the same number.\n *\n * @typedef {Object} TimelineStart\n * @property {number} start - the start time of the timeline\n * @property {number} timeline - the timeline number\n */\n\n/**\n * Adds appropriate media and discontinuity sequence values to the segments and playlists.\n *\n * Throughout mpd-parser, the `number` attribute is used in relation to `startNumber`, a\n * DASH specific attribute used in constructing segment URI's from templates. However, from\n * an HLS perspective, the `number` attribute on a segment would be its `mediaSequence`\n * value, which should start at the original media sequence value (or 0) and increment by 1\n * for each segment thereafter. Since DASH's `startNumber` values are independent per\n * period, it doesn't make sense to use it for `number`. Instead, assume everything starts\n * from a 0 mediaSequence value and increment from there.\n *\n * Note that VHS currently doesn't use the `number` property, but it can be helpful for\n * debugging and making sense of the manifest.\n *\n * For live playlists, to account for values increasing in manifests when periods are\n * removed on refreshes, merging logic should be used to update the numbers to their\n * appropriate values (to ensure they're sequential and increasing).\n *\n * @param {Object[]} playlists - the playlists to update\n * @param {TimelineStart[]} timelineStarts - the timeline starts for the manifest\n */\n\n\nconst addMediaSequenceValues = (playlists, timelineStarts) => {\n  // increment all segments sequentially\n  playlists.forEach(playlist => {\n    playlist.mediaSequence = 0;\n    playlist.discontinuitySequence = timelineStarts.findIndex(function ({\n      timeline\n    }) {\n      return timeline === playlist.timeline;\n    });\n\n    if (!playlist.segments) {\n      return;\n    }\n\n    playlist.segments.forEach((segment, index) => {\n      segment.number = index;\n    });\n  });\n};\n/**\n * Given a media group object, flattens all playlists within the media group into a single\n * array.\n *\n * @param {Object} mediaGroupObject - the media group object\n *\n * @return {Object[]}\n *         The media group playlists\n */\n\nconst flattenMediaGroupPlaylists = mediaGroupObject => {\n  if (!mediaGroupObject) {\n    return [];\n  }\n\n  return Object.keys(mediaGroupObject).reduce((acc, label) => {\n    const labelContents = mediaGroupObject[label];\n    return acc.concat(labelContents.playlists);\n  }, []);\n};\nconst toM3u8 = ({\n  dashPlaylists,\n  locations,\n  contentSteering,\n  sidxMapping = {},\n  previousManifest,\n  eventStream\n}) => {\n  if (!dashPlaylists.length) {\n    return {};\n  } // grab all main manifest attributes\n\n\n  const {\n    sourceDuration: duration,\n    type,\n    suggestedPresentationDelay,\n    minimumUpdatePeriod\n  } = dashPlaylists[0].attributes;\n  const videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\n  const audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\n  const vttPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(vttOnly));\n  const captions = dashPlaylists.map(playlist => playlist.attributes.captionServices).filter(Boolean);\n  const manifest = {\n    allowCache: true,\n    discontinuityStarts: [],\n    segments: [],\n    endList: true,\n    mediaGroups: {\n      AUDIO: {},\n      VIDEO: {},\n      ['CLOSED-CAPTIONS']: {},\n      SUBTITLES: {}\n    },\n    uri: '',\n    duration,\n    playlists: addSidxSegmentsToPlaylists(videoPlaylists, sidxMapping)\n  };\n\n  if (minimumUpdatePeriod >= 0) {\n    manifest.minimumUpdatePeriod = minimumUpdatePeriod * 1000;\n  }\n\n  if (locations) {\n    manifest.locations = locations;\n  }\n\n  if (contentSteering) {\n    manifest.contentSteering = contentSteering;\n  }\n\n  if (type === 'dynamic') {\n    manifest.suggestedPresentationDelay = suggestedPresentationDelay;\n  }\n\n  if (eventStream && eventStream.length > 0) {\n    manifest.eventStream = eventStream;\n  }\n\n  const isAudioOnly = manifest.playlists.length === 0;\n  const organizedAudioGroup = audioPlaylists.length ? organizeAudioPlaylists(audioPlaylists, sidxMapping, isAudioOnly) : null;\n  const organizedVttGroup = vttPlaylists.length ? organizeVttPlaylists(vttPlaylists, sidxMapping) : null;\n  const formattedPlaylists = videoPlaylists.concat(flattenMediaGroupPlaylists(organizedAudioGroup), flattenMediaGroupPlaylists(organizedVttGroup));\n  const playlistTimelineStarts = formattedPlaylists.map(({\n    timelineStarts\n  }) => timelineStarts);\n  manifest.timelineStarts = getUniqueTimelineStarts(playlistTimelineStarts);\n  addMediaSequenceValues(formattedPlaylists, manifest.timelineStarts);\n\n  if (organizedAudioGroup) {\n    manifest.mediaGroups.AUDIO.audio = organizedAudioGroup;\n  }\n\n  if (organizedVttGroup) {\n    manifest.mediaGroups.SUBTITLES.subs = organizedVttGroup;\n  }\n\n  if (captions.length) {\n    manifest.mediaGroups['CLOSED-CAPTIONS'].cc = organizeCaptionServices(captions);\n  }\n\n  if (previousManifest) {\n    return positionManifestOnTimeline({\n      oldManifest: previousManifest,\n      newManifest: manifest\n    });\n  }\n\n  return manifest;\n};\n\n/**\n * Calculates the R (repetition) value for a live stream (for the final segment\n * in a manifest where the r value is negative 1)\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {number} time\n *        current time (typically the total time up until the final segment)\n * @param {number} duration\n *        duration property for the given <S />\n *\n * @return {number}\n *        R value to reach the end of the given period\n */\nconst getLiveRValue = (attributes, time, duration) => {\n  const {\n    NOW,\n    clientOffset,\n    availabilityStartTime,\n    timescale = 1,\n    periodStart = 0,\n    minimumUpdatePeriod = 0\n  } = attributes;\n  const now = (NOW + clientOffset) / 1000;\n  const periodStartWC = availabilityStartTime + periodStart;\n  const periodEndWC = now + minimumUpdatePeriod;\n  const periodDuration = periodEndWC - periodStartWC;\n  return Math.ceil((periodDuration * timescale - time) / duration);\n};\n/**\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\n * timing and duration\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {Object[]} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n *         List of Objects with segment timing and duration info\n */\n\n\nconst parseByTimeline = (attributes, segmentTimeline) => {\n  const {\n    type,\n    minimumUpdatePeriod = 0,\n    media = '',\n    sourceDuration,\n    timescale = 1,\n    startNumber = 1,\n    periodStart: timeline\n  } = attributes;\n  const segments = [];\n  let time = -1;\n\n  for (let sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\n    const S = segmentTimeline[sIndex];\n    const duration = S.d;\n    const repeat = S.r || 0;\n    const segmentTime = S.t || 0;\n\n    if (time < 0) {\n      // first segment\n      time = segmentTime;\n    }\n\n    if (segmentTime && segmentTime > time) {\n      // discontinuity\n      // TODO: How to handle this type of discontinuity\n      // timeline++ here would treat it like HLS discontuity and content would\n      // get appended without gap\n      // E.G.\n      //  <S t=\"0\" d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S d=\"1\" />\n      //  <S t=\"5\" d=\"1\" />\n      // would have $Time$ values of [0, 1, 2, 5]\n      // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\n      // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\n      // does the value of sourceDuration consider this when calculating arbitrary\n      // negative @r repeat value?\n      // E.G. Same elements as above with this added at the end\n      //  <S d=\"1\" r=\"-1\" />\n      //  with a sourceDuration of 10\n      // Would the 2 gaps be included in the time duration calculations resulting in\n      // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\n      // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\n      time = segmentTime;\n    }\n\n    let count;\n\n    if (repeat < 0) {\n      const nextS = sIndex + 1;\n\n      if (nextS === segmentTimeline.length) {\n        // last segment\n        if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\n          count = getLiveRValue(attributes, time, duration);\n        } else {\n          // TODO: This may be incorrect depending on conclusion of TODO above\n          count = (sourceDuration * timescale - time) / duration;\n        }\n      } else {\n        count = (segmentTimeline[nextS].t - time) / duration;\n      }\n    } else {\n      count = repeat + 1;\n    }\n\n    const end = startNumber + segments.length + count;\n    let number = startNumber + segments.length;\n\n    while (number < end) {\n      segments.push({\n        number,\n        duration: duration / timescale,\n        time,\n        timeline\n      });\n      time += duration;\n      number++;\n    }\n  }\n\n  return segments;\n};\n\nconst identifierPattern = /\\$([A-z]*)(?:(%0)([0-9]+)d)?\\$/g;\n/**\n * Replaces template identifiers with corresponding values. To be used as the callback\n * for String.prototype.replace\n *\n * @name replaceCallback\n * @function\n * @param {string} match\n *        Entire match of identifier\n * @param {string} identifier\n *        Name of matched identifier\n * @param {string} format\n *        Format tag string. Its presence indicates that padding is expected\n * @param {string} width\n *        Desired length of the replaced value. Values less than this width shall be left\n *        zero padded\n * @return {string}\n *         Replacement for the matched identifier\n */\n\n/**\n * Returns a function to be used as a callback for String.prototype.replace to replace\n * template identifiers\n *\n * @param {Obect} values\n *        Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n *        Value of the Representation@id attribute\n * @param {number} values.Number\n *        Number of the corresponding segment\n * @param {number} values.Bandwidth\n *        Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n *        Timestamp value of the corresponding segment\n * @return {replaceCallback}\n *         Callback to be used with String.prototype.replace to replace identifiers\n */\n\nconst identifierReplacement = values => (match, identifier, format, width) => {\n  if (match === '$$') {\n    // escape sequence\n    return '$';\n  }\n\n  if (typeof values[identifier] === 'undefined') {\n    return match;\n  }\n\n  const value = '' + values[identifier];\n\n  if (identifier === 'RepresentationID') {\n    // Format tag shall not be present with RepresentationID\n    return value;\n  }\n\n  if (!format) {\n    width = 1;\n  } else {\n    width = parseInt(width, 10);\n  }\n\n  if (value.length >= width) {\n    return value;\n  }\n\n  return `${new Array(width - value.length + 1).join('0')}${value}`;\n};\n/**\n * Constructs a segment url from a template string\n *\n * @param {string} url\n *        Template string to construct url from\n * @param {Obect} values\n *        Object containing values that shall be used to replace known identifiers\n * @param {number} values.RepresentationID\n *        Value of the Representation@id attribute\n * @param {number} values.Number\n *        Number of the corresponding segment\n * @param {number} values.Bandwidth\n *        Value of the Representation@bandwidth attribute.\n * @param {number} values.Time\n *        Timestamp value of the corresponding segment\n * @return {string}\n *         Segment url with identifiers replaced\n */\n\nconst constructTemplateUrl = (url, values) => url.replace(identifierPattern, identifierReplacement(values));\n/**\n * Generates a list of objects containing timing and duration information about each\n * segment needed to generate segment uris and the complete segment object\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {Object[]|undefined} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *        the SegmentTimeline element\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\n *         List of Objects with segment timing and duration info\n */\n\nconst parseTemplateInfo = (attributes, segmentTimeline) => {\n  if (!attributes.duration && !segmentTimeline) {\n    // if neither @duration or SegmentTimeline are present, then there shall be exactly\n    // one media segment\n    return [{\n      number: attributes.startNumber || 1,\n      duration: attributes.sourceDuration,\n      time: 0,\n      timeline: attributes.periodStart\n    }];\n  }\n\n  if (attributes.duration) {\n    return parseByDuration(attributes);\n  }\n\n  return parseByTimeline(attributes, segmentTimeline);\n};\n/**\n * Generates a list of segments using information provided by the SegmentTemplate element\n *\n * @param {Object} attributes\n *        Object containing all inherited attributes from parent elements with attribute\n *        names as keys\n * @param {Object[]|undefined} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *        the SegmentTimeline element\n * @return {Object[]}\n *         List of segment objects\n */\n\nconst segmentsFromTemplate = (attributes, segmentTimeline) => {\n  const templateValues = {\n    RepresentationID: attributes.id,\n    Bandwidth: attributes.bandwidth || 0\n  };\n  const {\n    initialization = {\n      sourceURL: '',\n      range: ''\n    }\n  } = attributes;\n  const mapSegment = urlTypeToSegment({\n    baseUrl: attributes.baseUrl,\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\n    range: initialization.range\n  });\n  const segments = parseTemplateInfo(attributes, segmentTimeline);\n  return segments.map(segment => {\n    templateValues.Number = segment.number;\n    templateValues.Time = segment.time;\n    const uri = constructTemplateUrl(attributes.media || '', templateValues); // See DASH spec section 5.3.9.2.2\n    // - if timescale isn't present on any level, default to 1.\n\n    const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n    const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n    const presentationTime = // Even if the @t attribute is not specified for the segment, segment.time is\n    // calculated in mpd-parser prior to this, so it's assumed to be available.\n    attributes.periodStart + (segment.time - presentationTimeOffset) / timescale;\n    const map = {\n      uri,\n      timeline: segment.timeline,\n      duration: segment.duration,\n      resolvedUri: resolveUrl(attributes.baseUrl || '', uri),\n      map: mapSegment,\n      number: segment.number,\n      presentationTime\n    };\n    return map;\n  });\n};\n\n/**\n * Converts a <SegmentUrl> (of type URLType from the DASH spec 5.3.9.2 Table 14)\n * to an object that matches the output of a segment in videojs/mpd-parser\n *\n * @param {Object} attributes\n *   Object containing all inherited attributes from parent elements with attribute\n *   names as keys\n * @param {Object} segmentUrl\n *   <SegmentURL> node to translate into a segment object\n * @return {Object} translated segment object\n */\n\nconst SegmentURLToSegmentObject = (attributes, segmentUrl) => {\n  const {\n    baseUrl,\n    initialization = {}\n  } = attributes;\n  const initSegment = urlTypeToSegment({\n    baseUrl,\n    source: initialization.sourceURL,\n    range: initialization.range\n  });\n  const segment = urlTypeToSegment({\n    baseUrl,\n    source: segmentUrl.media,\n    range: segmentUrl.mediaRange\n  });\n  segment.map = initSegment;\n  return segment;\n};\n/**\n * Generates a list of segments using information provided by the SegmentList element\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\n * node should be translated into segment.\n *\n * @param {Object} attributes\n *   Object containing all inherited attributes from parent elements with attribute\n *   names as keys\n * @param {Object[]|undefined} segmentTimeline\n *        List of objects representing the attributes of each S element contained within\n *        the SegmentTimeline element\n * @return {Object.<Array>} list of segments\n */\n\n\nconst segmentsFromList = (attributes, segmentTimeline) => {\n  const {\n    duration,\n    segmentUrls = [],\n    periodStart\n  } = attributes; // Per spec (5.3.9.2.1) no way to determine segment duration OR\n  // if both SegmentTimeline and @duration are defined, it is outside of spec.\n\n  if (!duration && !segmentTimeline || duration && segmentTimeline) {\n    throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\n  }\n\n  const segmentUrlMap = segmentUrls.map(segmentUrlObject => SegmentURLToSegmentObject(attributes, segmentUrlObject));\n  let segmentTimeInfo;\n\n  if (duration) {\n    segmentTimeInfo = parseByDuration(attributes);\n  }\n\n  if (segmentTimeline) {\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\n  }\n\n  const segments = segmentTimeInfo.map((segmentTime, index) => {\n    if (segmentUrlMap[index]) {\n      const segment = segmentUrlMap[index]; // See DASH spec section 5.3.9.2.2\n      // - if timescale isn't present on any level, default to 1.\n\n      const timescale = attributes.timescale || 1; // - if presentationTimeOffset isn't present on any level, default to 0\n\n      const presentationTimeOffset = attributes.presentationTimeOffset || 0;\n      segment.timeline = segmentTime.timeline;\n      segment.duration = segmentTime.duration;\n      segment.number = segmentTime.number;\n      segment.presentationTime = periodStart + (segmentTime.time - presentationTimeOffset) / timescale;\n      return segment;\n    } // Since we're mapping we should get rid of any blank segments (in case\n    // the given SegmentTimeline is handling for more elements than we have\n    // SegmentURLs for).\n\n  }).filter(segment => segment);\n  return segments;\n};\n\nconst generateSegments = ({\n  attributes,\n  segmentInfo\n}) => {\n  let segmentAttributes;\n  let segmentsFn;\n\n  if (segmentInfo.template) {\n    segmentsFn = segmentsFromTemplate;\n    segmentAttributes = merge(attributes, segmentInfo.template);\n  } else if (segmentInfo.base) {\n    segmentsFn = segmentsFromBase;\n    segmentAttributes = merge(attributes, segmentInfo.base);\n  } else if (segmentInfo.list) {\n    segmentsFn = segmentsFromList;\n    segmentAttributes = merge(attributes, segmentInfo.list);\n  }\n\n  const segmentsInfo = {\n    attributes\n  };\n\n  if (!segmentsFn) {\n    return segmentsInfo;\n  }\n\n  const segments = segmentsFn(segmentAttributes, segmentInfo.segmentTimeline); // The @duration attribute will be used to determin the playlist's targetDuration which\n  // must be in seconds. Since we've generated the segment list, we no longer need\n  // @duration to be in @timescale units, so we can convert it here.\n\n  if (segmentAttributes.duration) {\n    const {\n      duration,\n      timescale = 1\n    } = segmentAttributes;\n    segmentAttributes.duration = duration / timescale;\n  } else if (segments.length) {\n    // if there is no @duration attribute, use the largest segment duration as\n    // as target duration\n    segmentAttributes.duration = segments.reduce((max, segment) => {\n      return Math.max(max, Math.ceil(segment.duration));\n    }, 0);\n  } else {\n    segmentAttributes.duration = 0;\n  }\n\n  segmentsInfo.attributes = segmentAttributes;\n  segmentsInfo.segments = segments; // This is a sidx box without actual segment information\n\n  if (segmentInfo.base && segmentAttributes.indexRange) {\n    segmentsInfo.sidx = segments[0];\n    segmentsInfo.segments = [];\n  }\n\n  return segmentsInfo;\n};\nconst toPlaylists = representations => representations.map(generateSegments);\n\nconst findChildren = (element, name) => from(element.childNodes).filter(({\n  tagName\n}) => tagName === name);\nconst getContent = element => element.textContent.trim();\n\n/**\n * Converts the provided string that may contain a division operation to a number.\n *\n * @param {string} value - the provided string value\n *\n * @return {number} the parsed string value\n */\nconst parseDivisionValue = value => {\n  return parseFloat(value.split('/').reduce((prev, current) => prev / current));\n};\n\nconst parseDuration = str => {\n  const SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n  const SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n  const SECONDS_IN_DAY = 24 * 60 * 60;\n  const SECONDS_IN_HOUR = 60 * 60;\n  const SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\n\n  const durationRegex = /P(?:(\\d*)Y)?(?:(\\d*)M)?(?:(\\d*)D)?(?:T(?:(\\d*)H)?(?:(\\d*)M)?(?:([\\d.]*)S)?)?/;\n  const match = durationRegex.exec(str);\n\n  if (!match) {\n    return 0;\n  }\n\n  const [year, month, day, hour, minute, second] = match.slice(1);\n  return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\n};\nconst parseDate = str => {\n  // Date format without timezone according to ISO 8601\n  // YYY-MM-DDThh:mm:ss.ssssss\n  const dateRegex = /^\\d+-\\d+-\\d+T\\d+:\\d+:\\d+(\\.\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\n  // expressed by ending with 'Z'\n\n  if (dateRegex.test(str)) {\n    str += 'Z';\n  }\n\n  return Date.parse(str);\n};\n\nconst parsers = {\n  /**\n   * Specifies the duration of the entire Media Presentation. Format is a duration string\n   * as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  mediaPresentationDuration(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the Segment availability start time for all Segments referred to in this\n   * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\n   * time. Format is a date string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The date as seconds from unix epoch\n   */\n  availabilityStartTime(value) {\n    return parseDate(value) / 1000;\n  },\n\n  /**\n   * Specifies the smallest period between potential changes to the MPD. Format is a\n   * duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  minimumUpdatePeriod(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the suggested presentation delay. Format is a\n   * duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  suggestedPresentationDelay(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * specifices the type of mpd. Can be either \"static\" or \"dynamic\"\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   *\n   * @return {string}\n   *         The type as a string\n   */\n  type(value) {\n    return value;\n  },\n\n  /**\n   * Specifies the duration of the smallest time shifting buffer for any Representation\n   * in the MPD. Format is a duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  timeShiftBufferDepth(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\n   * Format is a duration string as specified in ISO 8601\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The duration in seconds\n   */\n  start(value) {\n    return parseDuration(value);\n  },\n\n  /**\n   * Specifies the width of the visual presentation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed width\n   */\n  width(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the height of the visual presentation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed height\n   */\n  height(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the bitrate of the representation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed bandwidth\n   */\n  bandwidth(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the frame rate of the representation\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed frame rate\n   */\n  frameRate(value) {\n    return parseDivisionValue(value);\n  },\n\n  /**\n   * Specifies the number of the first Media Segment in this Representation in the Period\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed number\n   */\n  startNumber(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the timescale in units per seconds\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed timescale\n   */\n  timescale(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the presentationTimeOffset.\n   *\n   * @param {string} value\n   *        value of the attribute as a string\n   *\n   * @return {number}\n   *         The parsed presentationTimeOffset\n   */\n  presentationTimeOffset(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the constant approximate Segment duration\n   * NOTE: The <Period> element also contains an @duration attribute. This duration\n   *       specifies the duration of the Period. This attribute is currently not\n   *       supported by the rest of the parser, however we still check for it to prevent\n   *       errors.\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed duration\n   */\n  duration(value) {\n    const parsedValue = parseInt(value, 10);\n\n    if (isNaN(parsedValue)) {\n      return parseDuration(value);\n    }\n\n    return parsedValue;\n  },\n\n  /**\n   * Specifies the Segment duration, in units of the value of the @timescale.\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed duration\n   */\n  d(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the MPD start time, in @timescale units, the first Segment in the series\n   * starts relative to the beginning of the Period\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed time\n   */\n  t(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the repeat count of the number of following contiguous Segments with the\n   * same duration expressed by the value of @d\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {number}\n   *         The parsed number\n   */\n  r(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Specifies the presentationTime.\n   *\n   * @param {string} value\n   *        value of the attribute as a string\n   *\n   * @return {number}\n   *         The parsed presentationTime\n   */\n  presentationTime(value) {\n    return parseInt(value, 10);\n  },\n\n  /**\n   * Default parser for all other attributes. Acts as a no-op and just returns the value\n   * as a string\n   *\n   * @param {string} value\n   *        value of attribute as a string\n   * @return {string}\n   *         Unparsed value\n   */\n  DEFAULT(value) {\n    return value;\n  }\n\n};\n/**\n * Gets all the attributes and values of the provided node, parses attributes with known\n * types, and returns an object with attribute names mapped to values.\n *\n * @param {Node} el\n *        The node to parse attributes from\n * @return {Object}\n *         Object with all attributes of el parsed\n */\n\nconst parseAttributes = el => {\n  if (!(el && el.attributes)) {\n    return {};\n  }\n\n  return from(el.attributes).reduce((a, e) => {\n    const parseFn = parsers[e.name] || parsers.DEFAULT;\n    a[e.name] = parseFn(e.value);\n    return a;\n  }, {});\n};\n\nconst keySystemsMap = {\n  'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\n  'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\n  'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\n  'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime',\n  // ISO_IEC 23009-1_2022 5.8.5.2.2 The mp4 Protection Scheme\n  'urn:mpeg:dash:mp4protection:2011': 'mp4protection'\n};\n/**\n * Builds a list of urls that is the product of the reference urls and BaseURL values\n *\n * @param {Object[]} references\n *        List of objects containing the reference URL as well as its attributes\n * @param {Node[]} baseUrlElements\n *        List of BaseURL nodes from the mpd\n * @return {Object[]}\n *         List of objects with resolved urls and attributes\n */\n\nconst buildBaseUrls = (references, baseUrlElements) => {\n  if (!baseUrlElements.length) {\n    return references;\n  }\n\n  return flatten(references.map(function (reference) {\n    return baseUrlElements.map(function (baseUrlElement) {\n      const initialBaseUrl = getContent(baseUrlElement);\n      const resolvedBaseUrl = resolveUrl(reference.baseUrl, initialBaseUrl);\n      const finalBaseUrl = merge(parseAttributes(baseUrlElement), {\n        baseUrl: resolvedBaseUrl\n      }); // If the URL is resolved, we want to get the serviceLocation from the reference\n      // assuming there is no serviceLocation on the initialBaseUrl\n\n      if (resolvedBaseUrl !== initialBaseUrl && !finalBaseUrl.serviceLocation && reference.serviceLocation) {\n        finalBaseUrl.serviceLocation = reference.serviceLocation;\n      }\n\n      return finalBaseUrl;\n    });\n  }));\n};\n/**\n * Contains all Segment information for its containing AdaptationSet\n *\n * @typedef {Object} SegmentInformation\n * @property {Object|undefined} template\n *           Contains the attributes for the SegmentTemplate node\n * @property {Object[]|undefined} segmentTimeline\n *           Contains a list of atrributes for each S node within the SegmentTimeline node\n * @property {Object|undefined} list\n *           Contains the attributes for the SegmentList node\n * @property {Object|undefined} base\n *           Contains the attributes for the SegmentBase node\n */\n\n/**\n * Returns all available Segment information contained within the AdaptationSet node\n *\n * @param {Node} adaptationSet\n *        The AdaptationSet node to get Segment information from\n * @return {SegmentInformation}\n *         The Segment information contained within the provided AdaptationSet\n */\n\nconst getSegmentInformation = adaptationSet => {\n  const segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\n  const segmentList = findChildren(adaptationSet, 'SegmentList')[0];\n  const segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(s => merge({\n    tag: 'SegmentURL'\n  }, parseAttributes(s)));\n  const segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\n  const segmentTimelineParentNode = segmentList || segmentTemplate;\n  const segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\n  const segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\n  const segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\n  // @initialization and an <Initialization> node.  @initialization can be templated,\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\n  // both @initialization and an <Initialization> subelement we opt to override with\n  // the node, as this interaction is not defined in the spec.\n\n  const template = segmentTemplate && parseAttributes(segmentTemplate);\n\n  if (template && segmentInitialization) {\n    template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\n  } else if (template && template.initialization) {\n    // If it is @initialization we convert it to an object since this is the format that\n    // later functions will rely on for the initialization segment.  This is only valid\n    // for <SegmentTemplate>\n    template.initialization = {\n      sourceURL: template.initialization\n    };\n  }\n\n  const segmentInfo = {\n    template,\n    segmentTimeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(s => parseAttributes(s)),\n    list: segmentList && merge(parseAttributes(segmentList), {\n      segmentUrls,\n      initialization: parseAttributes(segmentInitialization)\n    }),\n    base: segmentBase && merge(parseAttributes(segmentBase), {\n      initialization: parseAttributes(segmentInitialization)\n    })\n  };\n  Object.keys(segmentInfo).forEach(key => {\n    if (!segmentInfo[key]) {\n      delete segmentInfo[key];\n    }\n  });\n  return segmentInfo;\n};\n/**\n * Contains Segment information and attributes needed to construct a Playlist object\n * from a Representation\n *\n * @typedef {Object} RepresentationInformation\n * @property {SegmentInformation} segmentInfo\n *           Segment information for this Representation\n * @property {Object} attributes\n *           Inherited attributes for this Representation\n */\n\n/**\n * Maps a Representation node to an object containing Segment information and attributes\n *\n * @name inheritBaseUrlsCallback\n * @function\n * @param {Node} representation\n *        Representation node from the mpd\n * @return {RepresentationInformation}\n *         Representation information needed to construct a Playlist object\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\n * Segment information and attributes using inherited BaseURL nodes.\n *\n * @param {Object} adaptationSetAttributes\n *        Contains attributes inherited by the AdaptationSet\n * @param {Object[]} adaptationSetBaseUrls\n *        List of objects containing resolved base URLs and attributes\n *        inherited by the AdaptationSet\n * @param {SegmentInformation} adaptationSetSegmentInfo\n *        Contains Segment information for the AdaptationSet\n * @return {inheritBaseUrlsCallback}\n *         Callback map function\n */\n\nconst inheritBaseUrls = (adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) => representation => {\n  const repBaseUrlElements = findChildren(representation, 'BaseURL');\n  const repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\n  const attributes = merge(adaptationSetAttributes, parseAttributes(representation));\n  const representationSegmentInfo = getSegmentInformation(representation);\n  return repBaseUrls.map(baseUrl => {\n    return {\n      segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\n      attributes: merge(attributes, baseUrl)\n    };\n  });\n};\n/**\n * Tranforms a series of content protection nodes to\n * an object containing pssh data by key system\n *\n * @param {Node[]} contentProtectionNodes\n *        Content protection nodes\n * @return {Object}\n *        Object containing pssh data by key system\n */\n\nconst generateKeySystemInformation = contentProtectionNodes => {\n  return contentProtectionNodes.reduce((acc, node) => {\n    const attributes = parseAttributes(node); // Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated\n    // as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system\n    // UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do\n    // .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).\n\n    if (attributes.schemeIdUri) {\n      attributes.schemeIdUri = attributes.schemeIdUri.toLowerCase();\n    }\n\n    const keySystem = keySystemsMap[attributes.schemeIdUri];\n\n    if (keySystem) {\n      acc[keySystem] = {\n        attributes\n      };\n      const psshNode = findChildren(node, 'cenc:pssh')[0];\n\n      if (psshNode) {\n        const pssh = getContent(psshNode);\n        acc[keySystem].pssh = pssh && decodeB64ToUint8Array(pssh);\n      }\n    }\n\n    return acc;\n  }, {});\n}; // defined in ANSI_SCTE 214-1 2016\n\n\nconst parseCaptionServiceMetadata = service => {\n  // 608 captions\n  if (service.schemeIdUri === 'urn:scte:dash:cc:cea-608:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      let channel;\n      let language; // default language to value\n\n      language = value;\n\n      if (/^CC\\d=/.test(value)) {\n        [channel, language] = value.split('=');\n      } else if (/^CC\\d$/.test(value)) {\n        channel = value;\n      }\n\n      return {\n        channel,\n        language\n      };\n    });\n  } else if (service.schemeIdUri === 'urn:scte:dash:cc:cea-708:2015') {\n    const values = typeof service.value !== 'string' ? [] : service.value.split(';');\n    return values.map(value => {\n      const flags = {\n        // service or channel number 1-63\n        'channel': undefined,\n        // language is a 3ALPHA per ISO 639.2/B\n        // field is required\n        'language': undefined,\n        // BIT 1/0 or ?\n        // default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown\n        'aspectRatio': 1,\n        // BIT 1/0\n        // easy reader flag indicated the text is tailed to the needs of beginning readers\n        // default 0, or off\n        'easyReader': 0,\n        // BIT 1/0\n        // If 3d metadata is present (CEA-708.1) then 1\n        // default 0\n        '3D': 0\n      };\n\n      if (/=/.test(value)) {\n        const [channel, opts = ''] = value.split('=');\n        flags.channel = channel;\n        flags.language = value;\n        opts.split(',').forEach(opt => {\n          const [name, val] = opt.split(':');\n\n          if (name === 'lang') {\n            flags.language = val; // er for easyReadery\n          } else if (name === 'er') {\n            flags.easyReader = Number(val); // war for wide aspect ratio\n          } else if (name === 'war') {\n            flags.aspectRatio = Number(val);\n          } else if (name === '3D') {\n            flags['3D'] = Number(val);\n          }\n        });\n      } else {\n        flags.language = value;\n      }\n\n      if (flags.channel) {\n        flags.channel = 'SERVICE' + flags.channel;\n      }\n\n      return flags;\n    });\n  }\n};\n/**\n * A map callback that will parse all event stream data for a collection of periods\n * DASH ISO_IEC_23009 5.10.2.2\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#mpd-event-timing\n *\n * @param {PeriodInformation} period object containing necessary period information\n * @return a collection of parsed eventstream event objects\n */\n\nconst toEventStream = period => {\n  // get and flatten all EventStreams tags and parse attributes and children\n  return flatten(findChildren(period.node, 'EventStream').map(eventStream => {\n    const eventStreamAttributes = parseAttributes(eventStream);\n    const schemeIdUri = eventStreamAttributes.schemeIdUri; // find all Events per EventStream tag and map to return objects\n\n    return findChildren(eventStream, 'Event').map(event => {\n      const eventAttributes = parseAttributes(event);\n      const presentationTime = eventAttributes.presentationTime || 0;\n      const timescale = eventStreamAttributes.timescale || 1;\n      const duration = eventAttributes.duration || 0;\n      const start = presentationTime / timescale + period.attributes.start;\n      return {\n        schemeIdUri,\n        value: eventStreamAttributes.value,\n        id: eventAttributes.id,\n        start,\n        end: start + duration / timescale,\n        messageData: getContent(event) || eventAttributes.messageData,\n        contentEncoding: eventStreamAttributes.contentEncoding,\n        presentationTimeOffset: eventStreamAttributes.presentationTimeOffset || 0\n      };\n    });\n  }));\n};\n/**\n * Maps an AdaptationSet node to a list of Representation information objects\n *\n * @name toRepresentationsCallback\n * @function\n * @param {Node} adaptationSet\n *        AdaptationSet node from the mpd\n * @return {RepresentationInformation[]}\n *         List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\n * Representation information objects\n *\n * @param {Object} periodAttributes\n *        Contains attributes inherited by the Period\n * @param {Object[]} periodBaseUrls\n *        Contains list of objects with resolved base urls and attributes\n *        inherited by the Period\n * @param {string[]} periodSegmentInfo\n *        Contains Segment Information at the period level\n * @return {toRepresentationsCallback}\n *         Callback map function\n */\n\nconst toRepresentations = (periodAttributes, periodBaseUrls, periodSegmentInfo) => adaptationSet => {\n  const adaptationSetAttributes = parseAttributes(adaptationSet);\n  const adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\n  const role = findChildren(adaptationSet, 'Role')[0];\n  const roleAttributes = {\n    role: parseAttributes(role)\n  };\n  let attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\n  const accessibility = findChildren(adaptationSet, 'Accessibility')[0];\n  const captionServices = parseCaptionServiceMetadata(parseAttributes(accessibility));\n\n  if (captionServices) {\n    attrs = merge(attrs, {\n      captionServices\n    });\n  }\n\n  const label = findChildren(adaptationSet, 'Label')[0];\n\n  if (label && label.childNodes.length) {\n    const labelVal = label.childNodes[0].nodeValue.trim();\n    attrs = merge(attrs, {\n      label: labelVal\n    });\n  }\n\n  const contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\n\n  if (Object.keys(contentProtection).length) {\n    attrs = merge(attrs, {\n      contentProtection\n    });\n  }\n\n  const segmentInfo = getSegmentInformation(adaptationSet);\n  const representations = findChildren(adaptationSet, 'Representation');\n  const adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\n  return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\n};\n/**\n * Contains all period information for mapping nodes onto adaptation sets.\n *\n * @typedef {Object} PeriodInformation\n * @property {Node} period.node\n *           Period node from the mpd\n * @property {Object} period.attributes\n *           Parsed period attributes from node plus any added\n */\n\n/**\n * Maps a PeriodInformation object to a list of Representation information objects for all\n * AdaptationSet nodes contained within the Period.\n *\n * @name toAdaptationSetsCallback\n * @function\n * @param {PeriodInformation} period\n *        Period object containing necessary period information\n * @param {number} periodStart\n *        Start time of the Period within the mpd\n * @return {RepresentationInformation[]}\n *         List of objects containing Representaion information\n */\n\n/**\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\n * Representation information objects\n *\n * @param {Object} mpdAttributes\n *        Contains attributes inherited by the mpd\n  * @param {Object[]} mpdBaseUrls\n *        Contains list of objects with resolved base urls and attributes\n *        inherited by the mpd\n * @return {toAdaptationSetsCallback}\n *         Callback map function\n */\n\nconst toAdaptationSets = (mpdAttributes, mpdBaseUrls) => (period, index) => {\n  const periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period.node, 'BaseURL'));\n  const periodAttributes = merge(mpdAttributes, {\n    periodStart: period.attributes.start\n  });\n\n  if (typeof period.attributes.duration === 'number') {\n    periodAttributes.periodDuration = period.attributes.duration;\n  }\n\n  const adaptationSets = findChildren(period.node, 'AdaptationSet');\n  const periodSegmentInfo = getSegmentInformation(period.node);\n  return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\n};\n/**\n * Tranforms an array of content steering nodes into an object\n * containing CDN content steering information from the MPD manifest.\n *\n * For more information on the DASH spec for Content Steering parsing, see:\n * https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {Node[]} contentSteeringNodes\n *        Content steering nodes\n * @param {Function} eventHandler\n *        The event handler passed into the parser options to handle warnings\n * @return {Object}\n *        Object containing content steering data\n */\n\nconst generateContentSteeringInformation = (contentSteeringNodes, eventHandler) => {\n  // If there are more than one ContentSteering tags, throw an error\n  if (contentSteeringNodes.length > 1) {\n    eventHandler({\n      type: 'warn',\n      message: 'The MPD manifest should contain no more than one ContentSteering tag'\n    });\n  } // Return a null value if there are no ContentSteering tags\n\n\n  if (!contentSteeringNodes.length) {\n    return null;\n  }\n\n  const infoFromContentSteeringTag = merge({\n    serverURL: getContent(contentSteeringNodes[0])\n  }, parseAttributes(contentSteeringNodes[0])); // Converts `queryBeforeStart` to a boolean, as well as setting the default value\n  // to `false` if it doesn't exist\n\n  infoFromContentSteeringTag.queryBeforeStart = infoFromContentSteeringTag.queryBeforeStart === 'true';\n  return infoFromContentSteeringTag;\n};\n/**\n * Gets Period@start property for a given period.\n *\n * @param {Object} options\n *        Options object\n * @param {Object} options.attributes\n *        Period attributes\n * @param {Object} [options.priorPeriodAttributes]\n *        Prior period attributes (if prior period is available)\n * @param {string} options.mpdType\n *        The MPD@type these periods came from\n * @return {number|null}\n *         The period start, or null if it's an early available period or error\n */\n\nconst getPeriodStart = ({\n  attributes,\n  priorPeriodAttributes,\n  mpdType\n}) => {\n  // Summary of period start time calculation from DASH spec section 5.3.2.1\n  //\n  // A period's start is the first period's start + time elapsed after playing all\n  // prior periods to this one. Periods continue one after the other in time (without\n  // gaps) until the end of the presentation.\n  //\n  // The value of Period@start should be:\n  // 1. if Period@start is present: value of Period@start\n  // 2. if previous period exists and it has @duration: previous Period@start +\n  //    previous Period@duration\n  // 3. if this is first period and MPD@type is 'static': 0\n  // 4. in all other cases, consider the period an \"early available period\" (note: not\n  //    currently supported)\n  // (1)\n  if (typeof attributes.start === 'number') {\n    return attributes.start;\n  } // (2)\n\n\n  if (priorPeriodAttributes && typeof priorPeriodAttributes.start === 'number' && typeof priorPeriodAttributes.duration === 'number') {\n    return priorPeriodAttributes.start + priorPeriodAttributes.duration;\n  } // (3)\n\n\n  if (!priorPeriodAttributes && mpdType === 'static') {\n    return 0;\n  } // (4)\n  // There is currently no logic for calculating the Period@start value if there is\n  // no Period@start or prior Period@start and Period@duration available. This is not made\n  // explicit by the DASH interop guidelines or the DASH spec, however, since there's\n  // nothing about any other resolution strategies, it's implied. Thus, this case should\n  // be considered an early available period, or error, and null should suffice for both\n  // of those cases.\n\n\n  return null;\n};\n/**\n * Traverses the mpd xml tree to generate a list of Representation information objects\n * that have inherited attributes from parent nodes\n *\n * @param {Node} mpd\n *        The root node of the mpd\n * @param {Object} options\n *        Available options for inheritAttributes\n * @param {string} options.manifestUri\n *        The uri source of the mpd\n * @param {number} options.NOW\n *        Current time per DASH IOP.  Default is current time in ms since epoch\n * @param {number} options.clientOffset\n *        Client time difference from NOW (in milliseconds)\n * @return {RepresentationInformation[]}\n *         List of objects containing Representation information\n */\n\nconst inheritAttributes = (mpd, options = {}) => {\n  const {\n    manifestUri = '',\n    NOW = Date.now(),\n    clientOffset = 0,\n    // TODO: For now, we are expecting an eventHandler callback function\n    // to be passed into the mpd parser as an option.\n    // In the future, we should enable stream parsing by using the Stream class from vhs-utils.\n    // This will support new features including a standardized event handler.\n    // See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.\n    // https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9\n    eventHandler = function () {}\n  } = options;\n  const periodNodes = findChildren(mpd, 'Period');\n\n  if (!periodNodes.length) {\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\n  }\n\n  const locations = findChildren(mpd, 'Location');\n  const mpdAttributes = parseAttributes(mpd);\n  const mpdBaseUrls = buildBaseUrls([{\n    baseUrl: manifestUri\n  }], findChildren(mpd, 'BaseURL'));\n  const contentSteeringNodes = findChildren(mpd, 'ContentSteering'); // See DASH spec section 5.3.1.2, Semantics of MPD element. Default type to 'static'.\n\n  mpdAttributes.type = mpdAttributes.type || 'static';\n  mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\n  mpdAttributes.NOW = NOW;\n  mpdAttributes.clientOffset = clientOffset;\n\n  if (locations.length) {\n    mpdAttributes.locations = locations.map(getContent);\n  }\n\n  const periods = []; // Since toAdaptationSets acts on individual periods right now, the simplest approach to\n  // adding properties that require looking at prior periods is to parse attributes and add\n  // missing ones before toAdaptationSets is called. If more such properties are added, it\n  // may be better to refactor toAdaptationSets.\n\n  periodNodes.forEach((node, index) => {\n    const attributes = parseAttributes(node); // Use the last modified prior period, as it may contain added information necessary\n    // for this period.\n\n    const priorPeriod = periods[index - 1];\n    attributes.start = getPeriodStart({\n      attributes,\n      priorPeriodAttributes: priorPeriod ? priorPeriod.attributes : null,\n      mpdType: mpdAttributes.type\n    });\n    periods.push({\n      node,\n      attributes\n    });\n  });\n  return {\n    locations: mpdAttributes.locations,\n    contentSteeringInfo: generateContentSteeringInformation(contentSteeringNodes, eventHandler),\n    // TODO: There are occurences where this `representationInfo` array contains undesired\n    // duplicates. This generally occurs when there are multiple BaseURL nodes that are\n    // direct children of the MPD node. When we attempt to resolve URLs from a combination of the\n    // parent BaseURL and a child BaseURL, and the value does not resolve,\n    // we end up returning the child BaseURL multiple times.\n    // We need to determine a way to remove these duplicates in a safe way.\n    // See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527\n    representationInfo: flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls))),\n    eventStream: flatten(periods.map(toEventStream))\n  };\n};\n\nconst stringToMpdXml = manifestString => {\n  if (manifestString === '') {\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\n  }\n\n  const parser = new DOMParser();\n  let xml;\n  let mpd;\n\n  try {\n    xml = parser.parseFromString(manifestString, 'application/xml');\n    mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\n  } catch (e) {// ie 11 throws on invalid xml\n  }\n\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\n    throw new Error(errors.DASH_INVALID_XML);\n  }\n\n  return mpd;\n};\n\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} mpd\n *        XML string of the MPD manifest\n * @return {Object|null}\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\nconst parseUTCTimingScheme = mpd => {\n  const UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\n\n  if (!UTCTimingNode) {\n    return null;\n  }\n\n  const attributes = parseAttributes(UTCTimingNode);\n\n  switch (attributes.schemeIdUri) {\n    case 'urn:mpeg:dash:utc:http-head:2014':\n    case 'urn:mpeg:dash:utc:http-head:2012':\n      attributes.method = 'HEAD';\n      break;\n\n    case 'urn:mpeg:dash:utc:http-xsdate:2014':\n    case 'urn:mpeg:dash:utc:http-iso:2014':\n    case 'urn:mpeg:dash:utc:http-xsdate:2012':\n    case 'urn:mpeg:dash:utc:http-iso:2012':\n      attributes.method = 'GET';\n      break;\n\n    case 'urn:mpeg:dash:utc:direct:2014':\n    case 'urn:mpeg:dash:utc:direct:2012':\n      attributes.method = 'DIRECT';\n      attributes.value = Date.parse(attributes.value);\n      break;\n\n    case 'urn:mpeg:dash:utc:http-ntp:2014':\n    case 'urn:mpeg:dash:utc:ntp:2014':\n    case 'urn:mpeg:dash:utc:sntp:2014':\n    default:\n      throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\n  }\n\n  return attributes;\n};\n\nconst VERSION = version;\n/*\n * Given a DASH manifest string and options, parses the DASH manifest into an object in the\n * form outputed by m3u8-parser and accepted by videojs/http-streaming.\n *\n * For live DASH manifests, if `previousManifest` is provided in options, then the newly\n * parsed DASH manifest will have its media sequence and discontinuity sequence values\n * updated to reflect its position relative to the prior manifest.\n *\n * @param {string} manifestString - the DASH manifest as a string\n * @param {options} [options] - any options\n *\n * @return {Object} the manifest object\n */\n\nconst parse = (manifestString, options = {}) => {\n  const parsedManifestInfo = inheritAttributes(stringToMpdXml(manifestString), options);\n  const playlists = toPlaylists(parsedManifestInfo.representationInfo);\n  return toM3u8({\n    dashPlaylists: playlists,\n    locations: parsedManifestInfo.locations,\n    contentSteering: parsedManifestInfo.contentSteeringInfo,\n    sidxMapping: options.sidxMapping,\n    previousManifest: options.previousManifest,\n    eventStream: parsedManifestInfo.eventStream\n  });\n};\n/**\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\n *\n * @param {string} manifestString\n *        XML string of the MPD manifest\n * @return {Object|null}\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\n */\n\n\nconst parseUTCTiming = manifestString => parseUTCTimingScheme(stringToMpdXml(manifestString));\n\nexport { VERSION, addSidxSegmentsToPlaylist$1 as addSidxSegmentsToPlaylist, generateSidxKey, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists };\n","/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n *        The parsed master manifest object\n * @param {string[]} groups\n *        The media groups to call the callback for\n * @param {Function} callback\n *        Callback to call for each media group\n */\nexport var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n  groups.forEach(function (mediaType) {\n    for (var groupKey in master.mediaGroups[mediaType]) {\n      for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n        var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n        callback(mediaProperties, mediaType, groupKey, labelKey);\n      }\n    }\n  });\n};","import { stringToBytes, toUint8, bytesMatch, bytesToString, toHexString, padStart, bytesToNumber } from './byte-helpers.js';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js';\nimport { parseOpusHead } from './opus-helpers.js';\n\nvar normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return stringToBytes(path);\n  }\n\n  if (typeof path === 'number') {\n    return path;\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar DESCRIPTORS;\nexport var parseDescriptors = function parseDescriptors(bytes) {\n  bytes = toUint8(bytes);\n  var results = [];\n  var i = 0;\n\n  while (bytes.length > i) {\n    var tag = bytes[i];\n    var size = 0;\n    var headerSize = 0; // tag\n\n    headerSize++;\n    var byte = bytes[headerSize]; // first byte\n\n    headerSize++;\n\n    while (byte & 0x80) {\n      size = (byte & 0x7F) << 7;\n      byte = bytes[headerSize];\n      headerSize++;\n    }\n\n    size += byte & 0x7F;\n\n    for (var z = 0; z < DESCRIPTORS.length; z++) {\n      var _DESCRIPTORS$z = DESCRIPTORS[z],\n          id = _DESCRIPTORS$z.id,\n          parser = _DESCRIPTORS$z.parser;\n\n      if (tag === id) {\n        results.push(parser(bytes.subarray(headerSize, headerSize + size)));\n        break;\n      }\n    }\n\n    i += size + headerSize;\n  }\n\n  return results;\n};\nDESCRIPTORS = [{\n  id: 0x03,\n  parser: function parser(bytes) {\n    var desc = {\n      tag: 0x03,\n      id: bytes[0] << 8 | bytes[1],\n      flags: bytes[2],\n      size: 3,\n      dependsOnEsId: 0,\n      ocrEsId: 0,\n      descriptors: [],\n      url: ''\n    }; // depends on es id\n\n    if (desc.flags & 0x80) {\n      desc.dependsOnEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    } // url\n\n\n    if (desc.flags & 0x40) {\n      var len = bytes[desc.size];\n      desc.url = bytesToString(bytes.subarray(desc.size + 1, desc.size + 1 + len));\n      desc.size += len;\n    } // ocr es id\n\n\n    if (desc.flags & 0x20) {\n      desc.ocrEsId = bytes[desc.size] << 8 | bytes[desc.size + 1];\n      desc.size += 2;\n    }\n\n    desc.descriptors = parseDescriptors(bytes.subarray(desc.size)) || [];\n    return desc;\n  }\n}, {\n  id: 0x04,\n  parser: function parser(bytes) {\n    // DecoderConfigDescriptor\n    var desc = {\n      tag: 0x04,\n      oti: bytes[0],\n      streamType: bytes[1],\n      bufferSize: bytes[2] << 16 | bytes[3] << 8 | bytes[4],\n      maxBitrate: bytes[5] << 24 | bytes[6] << 16 | bytes[7] << 8 | bytes[8],\n      avgBitrate: bytes[9] << 24 | bytes[10] << 16 | bytes[11] << 8 | bytes[12],\n      descriptors: parseDescriptors(bytes.subarray(13))\n    };\n    return desc;\n  }\n}, {\n  id: 0x05,\n  parser: function parser(bytes) {\n    // DecoderSpecificInfo\n    return {\n      tag: 0x05,\n      bytes: bytes\n    };\n  }\n}, {\n  id: 0x06,\n  parser: function parser(bytes) {\n    // SLConfigDescriptor\n    return {\n      tag: 0x06,\n      bytes: bytes\n    };\n  }\n}];\n/**\n * find any number of boxes by name given a path to it in an iso bmff\n * such as mp4.\n *\n * @param {TypedArray} bytes\n *        bytes for the iso bmff to search for boxes in\n *\n * @param {Uint8Array[]|string[]|string|Uint8Array} name\n *        An array of paths or a single path representing the name\n *        of boxes to search through in bytes. Paths may be\n *        uint8 (character codes) or strings.\n *\n * @param {boolean} [complete=false]\n *        Should we search only for complete boxes on the final path.\n *        This is very useful when you do not want to get back partial boxes\n *        in the case of streaming files.\n *\n * @return {Uint8Array[]}\n *         An array of the end paths that we found.\n */\n\nexport var findBox = function findBox(bytes, paths, complete) {\n  if (complete === void 0) {\n    complete = false;\n  }\n\n  paths = normalizePaths(paths);\n  bytes = toUint8(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    // short-circuit the search for empty paths\n    return results;\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    var size = (bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]) >>> 0;\n    var type = bytes.subarray(i + 4, i + 8); // invalid box format.\n\n    if (size === 0) {\n      break;\n    }\n\n    var end = i + size;\n\n    if (end > bytes.length) {\n      // this box is bigger than the number of bytes we have\n      // and complete is set, we cannot find any more boxes.\n      if (complete) {\n        break;\n      }\n\n      end = bytes.length;\n    }\n\n    var data = bytes.subarray(i + 8, end);\n\n    if (bytesMatch(type, paths[0])) {\n      if (paths.length === 1) {\n        // this is the end of the path and we've found the box we were\n        // looking for\n        results.push(data);\n      } else {\n        // recursively search for the next box along the path\n        results.push.apply(results, findBox(data, paths.slice(1), complete));\n      }\n    }\n\n    i = end;\n  } // we've finished searching all of bytes\n\n\n  return results;\n};\n/**\n * Search for a single matching box by name in an iso bmff format like\n * mp4. This function is useful for finding codec boxes which\n * can be placed arbitrarily in sample descriptions depending\n * on the version of the file or file type.\n *\n * @param {TypedArray} bytes\n *        bytes for the iso bmff to search for boxes in\n *\n * @param {string|Uint8Array} name\n *        The name of the box to find.\n *\n * @return {Uint8Array[]}\n *         a subarray of bytes representing the name boxed we found.\n */\n\nexport var findNamedBox = function findNamedBox(bytes, name) {\n  name = normalizePath(name);\n\n  if (!name.length) {\n    // short-circuit the search for empty paths\n    return bytes.subarray(bytes.length);\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    if (bytesMatch(bytes.subarray(i, i + name.length), name)) {\n      var size = (bytes[i - 4] << 24 | bytes[i - 3] << 16 | bytes[i - 2] << 8 | bytes[i - 1]) >>> 0;\n      var end = size > 1 ? i + size : bytes.byteLength;\n      return bytes.subarray(i + 4, end);\n    }\n\n    i++;\n  } // we've finished searching all of bytes\n\n\n  return bytes.subarray(bytes.length);\n};\n\nvar parseSamples = function parseSamples(data, entrySize, parseEntry) {\n  if (entrySize === void 0) {\n    entrySize = 4;\n  }\n\n  if (parseEntry === void 0) {\n    parseEntry = function parseEntry(d) {\n      return bytesToNumber(d);\n    };\n  }\n\n  var entries = [];\n\n  if (!data || !data.length) {\n    return entries;\n  }\n\n  var entryCount = bytesToNumber(data.subarray(4, 8));\n\n  for (var i = 8; entryCount; i += entrySize, entryCount--) {\n    entries.push(parseEntry(data.subarray(i, i + entrySize)));\n  }\n\n  return entries;\n};\n\nexport var buildFrameTable = function buildFrameTable(stbl, timescale) {\n  var keySamples = parseSamples(findBox(stbl, ['stss'])[0]);\n  var chunkOffsets = parseSamples(findBox(stbl, ['stco'])[0]);\n  var timeToSamples = parseSamples(findBox(stbl, ['stts'])[0], 8, function (entry) {\n    return {\n      sampleCount: bytesToNumber(entry.subarray(0, 4)),\n      sampleDelta: bytesToNumber(entry.subarray(4, 8))\n    };\n  });\n  var samplesToChunks = parseSamples(findBox(stbl, ['stsc'])[0], 12, function (entry) {\n    return {\n      firstChunk: bytesToNumber(entry.subarray(0, 4)),\n      samplesPerChunk: bytesToNumber(entry.subarray(4, 8)),\n      sampleDescriptionIndex: bytesToNumber(entry.subarray(8, 12))\n    };\n  });\n  var stsz = findBox(stbl, ['stsz'])[0]; // stsz starts with a 4 byte sampleSize which we don't need\n\n  var sampleSizes = parseSamples(stsz && stsz.length && stsz.subarray(4) || null);\n  var frames = [];\n\n  for (var chunkIndex = 0; chunkIndex < chunkOffsets.length; chunkIndex++) {\n    var samplesInChunk = void 0;\n\n    for (var i = 0; i < samplesToChunks.length; i++) {\n      var sampleToChunk = samplesToChunks[i];\n      var isThisOne = chunkIndex + 1 >= sampleToChunk.firstChunk && (i + 1 >= samplesToChunks.length || chunkIndex + 1 < samplesToChunks[i + 1].firstChunk);\n\n      if (isThisOne) {\n        samplesInChunk = sampleToChunk.samplesPerChunk;\n        break;\n      }\n    }\n\n    var chunkOffset = chunkOffsets[chunkIndex];\n\n    for (var _i = 0; _i < samplesInChunk; _i++) {\n      var frameEnd = sampleSizes[frames.length]; // if we don't have key samples every frame is a keyframe\n\n      var keyframe = !keySamples.length;\n\n      if (keySamples.length && keySamples.indexOf(frames.length + 1) !== -1) {\n        keyframe = true;\n      }\n\n      var frame = {\n        keyframe: keyframe,\n        start: chunkOffset,\n        end: chunkOffset + frameEnd\n      };\n\n      for (var k = 0; k < timeToSamples.length; k++) {\n        var _timeToSamples$k = timeToSamples[k],\n            sampleCount = _timeToSamples$k.sampleCount,\n            sampleDelta = _timeToSamples$k.sampleDelta;\n\n        if (frames.length <= sampleCount) {\n          // ms to ns\n          var lastTimestamp = frames.length ? frames[frames.length - 1].timestamp : 0;\n          frame.timestamp = lastTimestamp + sampleDelta / timescale * 1000;\n          frame.duration = sampleDelta;\n          break;\n        }\n      }\n\n      frames.push(frame);\n      chunkOffset += frameEnd;\n    }\n  }\n\n  return frames;\n};\nexport var addSampleDescription = function addSampleDescription(track, bytes) {\n  var codec = bytesToString(bytes.subarray(0, 4));\n\n  if (track.type === 'video') {\n    track.info = track.info || {};\n    track.info.width = bytes[28] << 8 | bytes[29];\n    track.info.height = bytes[30] << 8 | bytes[31];\n  } else if (track.type === 'audio') {\n    track.info = track.info || {};\n    track.info.channels = bytes[20] << 8 | bytes[21];\n    track.info.bitDepth = bytes[22] << 8 | bytes[23];\n    track.info.sampleRate = bytes[28] << 8 | bytes[29];\n  }\n\n  if (codec === 'avc1') {\n    var avcC = findNamedBox(bytes, 'avcC'); // AVCDecoderConfigurationRecord\n\n    codec += \".\" + getAvcCodec(avcC);\n    track.info.avcC = avcC; // TODO: do we need to parse all this?\n\n    /* {\n      configurationVersion: avcC[0],\n      profile: avcC[1],\n      profileCompatibility: avcC[2],\n      level: avcC[3],\n      lengthSizeMinusOne: avcC[4] & 0x3\n    };\n     let spsNalUnitCount = avcC[5] & 0x1F;\n    const spsNalUnits = track.info.avc.spsNalUnits = [];\n     // past spsNalUnitCount\n    let offset = 6;\n     while (spsNalUnitCount--) {\n      const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n       spsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n       offset += nalLen + 2;\n    }\n    let ppsNalUnitCount = avcC[offset];\n    const ppsNalUnits = track.info.avc.ppsNalUnits = [];\n     // past ppsNalUnitCount\n    offset += 1;\n     while (ppsNalUnitCount--) {\n      const nalLen = avcC[offset] << 8 | avcC[offset + 1];\n       ppsNalUnits.push(avcC.subarray(offset + 2, offset + 2 + nalLen));\n       offset += nalLen + 2;\n    }*/\n    // HEVCDecoderConfigurationRecord\n  } else if (codec === 'hvc1' || codec === 'hev1') {\n    codec += \".\" + getHvcCodec(findNamedBox(bytes, 'hvcC'));\n  } else if (codec === 'mp4a' || codec === 'mp4v') {\n    var esds = findNamedBox(bytes, 'esds');\n    var esDescriptor = parseDescriptors(esds.subarray(4))[0];\n    var decoderConfig = esDescriptor && esDescriptor.descriptors.filter(function (_ref) {\n      var tag = _ref.tag;\n      return tag === 0x04;\n    })[0];\n\n    if (decoderConfig) {\n      // most codecs do not have a further '.'\n      // such as 0xa5 for ac-3 and 0xa6 for e-ac-3\n      codec += '.' + toHexString(decoderConfig.oti);\n\n      if (decoderConfig.oti === 0x40) {\n        codec += '.' + (decoderConfig.descriptors[0].bytes[0] >> 3).toString();\n      } else if (decoderConfig.oti === 0x20) {\n        codec += '.' + decoderConfig.descriptors[0].bytes[4].toString();\n      } else if (decoderConfig.oti === 0xdd) {\n        codec = 'vorbis';\n      }\n    } else if (track.type === 'audio') {\n      codec += '.40.2';\n    } else {\n      codec += '.20.9';\n    }\n  } else if (codec === 'av01') {\n    // AV1DecoderConfigurationRecord\n    codec += \".\" + getAv1Codec(findNamedBox(bytes, 'av1C'));\n  } else if (codec === 'vp09') {\n    // VPCodecConfigurationRecord\n    var vpcC = findNamedBox(bytes, 'vpcC'); // https://www.webmproject.org/vp9/mp4/\n\n    var profile = vpcC[0];\n    var level = vpcC[1];\n    var bitDepth = vpcC[2] >> 4;\n    var chromaSubsampling = (vpcC[2] & 0x0F) >> 1;\n    var videoFullRangeFlag = (vpcC[2] & 0x0F) >> 3;\n    var colourPrimaries = vpcC[3];\n    var transferCharacteristics = vpcC[4];\n    var matrixCoefficients = vpcC[5];\n    codec += \".\" + padStart(profile, 2, '0');\n    codec += \".\" + padStart(level, 2, '0');\n    codec += \".\" + padStart(bitDepth, 2, '0');\n    codec += \".\" + padStart(chromaSubsampling, 2, '0');\n    codec += \".\" + padStart(colourPrimaries, 2, '0');\n    codec += \".\" + padStart(transferCharacteristics, 2, '0');\n    codec += \".\" + padStart(matrixCoefficients, 2, '0');\n    codec += \".\" + padStart(videoFullRangeFlag, 2, '0');\n  } else if (codec === 'theo') {\n    codec = 'theora';\n  } else if (codec === 'spex') {\n    codec = 'speex';\n  } else if (codec === '.mp3') {\n    codec = 'mp4a.40.34';\n  } else if (codec === 'msVo') {\n    codec = 'vorbis';\n  } else if (codec === 'Opus') {\n    codec = 'opus';\n    var dOps = findNamedBox(bytes, 'dOps');\n    track.info.opus = parseOpusHead(dOps); // TODO: should this go into the webm code??\n    // Firefox requires a codecDelay for opus playback\n    // see https://bugzilla.mozilla.org/show_bug.cgi?id=1276238\n\n    track.info.codecDelay = 6500000;\n  } else {\n    codec = codec.toLowerCase();\n  }\n  /* eslint-enable */\n  // flac, ac-3, ec-3, opus\n\n\n  track.codec = codec;\n};\nexport var parseTracks = function parseTracks(bytes, frameTable) {\n  if (frameTable === void 0) {\n    frameTable = true;\n  }\n\n  bytes = toUint8(bytes);\n  var traks = findBox(bytes, ['moov', 'trak'], true);\n  var tracks = [];\n  traks.forEach(function (trak) {\n    var track = {\n      bytes: trak\n    };\n    var mdia = findBox(trak, ['mdia'])[0];\n    var hdlr = findBox(mdia, ['hdlr'])[0];\n    var trakType = bytesToString(hdlr.subarray(8, 12));\n\n    if (trakType === 'soun') {\n      track.type = 'audio';\n    } else if (trakType === 'vide') {\n      track.type = 'video';\n    } else {\n      track.type = trakType;\n    }\n\n    var tkhd = findBox(trak, ['tkhd'])[0];\n\n    if (tkhd) {\n      var view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n      var tkhdVersion = view.getUint8(0);\n      track.number = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n    }\n\n    var mdhd = findBox(mdia, ['mdhd'])[0];\n\n    if (mdhd) {\n      // mdhd is a FullBox, meaning it will have its own version as the first byte\n      var version = mdhd[0];\n      var index = version === 0 ? 12 : 20;\n      track.timescale = (mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]) >>> 0;\n    }\n\n    var stbl = findBox(mdia, ['minf', 'stbl'])[0];\n    var stsd = findBox(stbl, ['stsd'])[0];\n    var descriptionCount = bytesToNumber(stsd.subarray(4, 8));\n    var offset = 8; // add codec and codec info\n\n    while (descriptionCount--) {\n      var len = bytesToNumber(stsd.subarray(offset, offset + 4));\n      var sampleDescriptor = stsd.subarray(offset + 4, offset + 4 + len);\n      addSampleDescription(track, sampleDescriptor);\n      offset += 4 + len;\n    }\n\n    if (frameTable) {\n      track.frameTable = buildFrameTable(stbl, track.timescale);\n    } // codec has no sub parameters\n\n\n    tracks.push(track);\n  });\n  return tracks;\n};\nexport var parseMediaInfo = function parseMediaInfo(bytes) {\n  var mvhd = findBox(bytes, ['moov', 'mvhd'], true)[0];\n\n  if (!mvhd || !mvhd.length) {\n    return;\n  }\n\n  var info = {}; // ms to ns\n  // mvhd v1 has 8 byte duration and other fields too\n\n  if (mvhd[0] === 1) {\n    info.timestampScale = bytesToNumber(mvhd.subarray(20, 24));\n    info.duration = bytesToNumber(mvhd.subarray(24, 32));\n  } else {\n    info.timestampScale = bytesToNumber(mvhd.subarray(12, 16));\n    info.duration = bytesToNumber(mvhd.subarray(16, 20));\n  }\n\n  info.bytes = mvhd;\n  return info;\n};","import { toUint8, bytesMatch } from './byte-helpers.js';\nvar ID3 = toUint8([0x49, 0x44, 0x33]);\nexport var getId3Size = function getId3Size(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = toUint8(bytes);\n  var flags = bytes[offset + 5];\n  var returnSize = bytes[offset + 6] << 21 | bytes[offset + 7] << 14 | bytes[offset + 8] << 7 | bytes[offset + 9];\n  var footerPresent = (flags & 16) >> 4;\n\n  if (footerPresent) {\n    return returnSize + 20;\n  }\n\n  return returnSize + 10;\n};\nexport var getId3Offset = function getId3Offset(bytes, offset) {\n  if (offset === void 0) {\n    offset = 0;\n  }\n\n  bytes = toUint8(bytes);\n\n  if (bytes.length - offset < 10 || !bytesMatch(bytes, ID3, {\n    offset: offset\n  })) {\n    return offset;\n  }\n\n  offset += getId3Size(bytes, offset); // recursive check for id3 tags as some files\n  // have multiple ID3 tag sections even though\n  // they should not.\n\n  return getId3Offset(bytes, offset);\n};","export var OPUS_HEAD = new Uint8Array([// O, p, u, s\n0x4f, 0x70, 0x75, 0x73, // H, e, a, d\n0x48, 0x65, 0x61, 0x64]); // https://wiki.xiph.org/OggOpus\n// https://vfrmaniac.fushizen.eu/contents/opus_in_isobmff.html\n// https://opus-codec.org/docs/opusfile_api-0.7/structOpusHead.html\n\nexport var parseOpusHead = function parseOpusHead(bytes) {\n  var view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n  var version = view.getUint8(0); // version 0, from mp4, does not use littleEndian.\n\n  var littleEndian = version !== 0;\n  var config = {\n    version: version,\n    channels: view.getUint8(1),\n    preSkip: view.getUint16(2, littleEndian),\n    sampleRate: view.getUint32(4, littleEndian),\n    outputGain: view.getUint16(8, littleEndian),\n    channelMappingFamily: view.getUint8(10)\n  };\n\n  if (config.channelMappingFamily > 0 && bytes.length > 10) {\n    config.streamCount = view.getUint8(11);\n    config.twoChannelStreamCount = view.getUint8(12);\n    config.channelMapping = [];\n\n    for (var c = 0; c < config.channels; c++) {\n      config.channelMapping.push(view.getUint8(13 + c));\n    }\n  }\n\n  return config;\n};\nexport var setOpusHead = function setOpusHead(config) {\n  var size = config.channelMappingFamily <= 0 ? 11 : 12 + config.channels;\n  var view = new DataView(new ArrayBuffer(size));\n  var littleEndian = config.version !== 0;\n  view.setUint8(0, config.version);\n  view.setUint8(1, config.channels);\n  view.setUint16(2, config.preSkip, littleEndian);\n  view.setUint32(4, config.sampleRate, littleEndian);\n  view.setUint16(8, config.outputGain, littleEndian);\n  view.setUint8(10, config.channelMappingFamily);\n\n  if (config.channelMappingFamily > 0) {\n    view.setUint8(11, config.streamCount);\n    config.channelMapping.foreach(function (cm, i) {\n      view.setUint8(12 + i, cm);\n    });\n  }\n\n  return new Uint8Array(view.buffer);\n};","import { toUint8, bytesToNumber, bytesMatch, bytesToString, numberToBytes, padStart } from './byte-helpers';\nimport { getAvcCodec, getHvcCodec, getAv1Codec } from './codec-helpers.js'; // relevant specs for this parser:\n// https://matroska-org.github.io/libebml/specs.html\n// https://www.matroska.org/technical/elements.html\n// https://www.webmproject.org/docs/container/\n\nexport var EBML_TAGS = {\n  EBML: toUint8([0x1A, 0x45, 0xDF, 0xA3]),\n  DocType: toUint8([0x42, 0x82]),\n  Segment: toUint8([0x18, 0x53, 0x80, 0x67]),\n  SegmentInfo: toUint8([0x15, 0x49, 0xA9, 0x66]),\n  Tracks: toUint8([0x16, 0x54, 0xAE, 0x6B]),\n  Track: toUint8([0xAE]),\n  TrackNumber: toUint8([0xd7]),\n  DefaultDuration: toUint8([0x23, 0xe3, 0x83]),\n  TrackEntry: toUint8([0xAE]),\n  TrackType: toUint8([0x83]),\n  FlagDefault: toUint8([0x88]),\n  CodecID: toUint8([0x86]),\n  CodecPrivate: toUint8([0x63, 0xA2]),\n  VideoTrack: toUint8([0xe0]),\n  AudioTrack: toUint8([0xe1]),\n  // Not used yet, but will be used for live webm/mkv\n  // see https://www.matroska.org/technical/basics.html#block-structure\n  // see https://www.matroska.org/technical/basics.html#simpleblock-structure\n  Cluster: toUint8([0x1F, 0x43, 0xB6, 0x75]),\n  Timestamp: toUint8([0xE7]),\n  TimestampScale: toUint8([0x2A, 0xD7, 0xB1]),\n  BlockGroup: toUint8([0xA0]),\n  BlockDuration: toUint8([0x9B]),\n  Block: toUint8([0xA1]),\n  SimpleBlock: toUint8([0xA3])\n};\n/**\n * This is a simple table to determine the length\n * of things in ebml. The length is one based (starts at 1,\n * rather than zero) and for every zero bit before a one bit\n * we add one to length. We also need this table because in some\n * case we have to xor all the length bits from another value.\n */\n\nvar LENGTH_TABLE = [128, 64, 32, 16, 8, 4, 2, 1];\n\nvar getLength = function getLength(byte) {\n  var len = 1;\n\n  for (var i = 0; i < LENGTH_TABLE.length; i++) {\n    if (byte & LENGTH_TABLE[i]) {\n      break;\n    }\n\n    len++;\n  }\n\n  return len;\n}; // length in ebml is stored in the first 4 to 8 bits\n// of the first byte. 4 for the id length and 8 for the\n// data size length. Length is measured by converting the number to binary\n// then 1 + the number of zeros before a 1 is encountered starting\n// from the left.\n\n\nvar getvint = function getvint(bytes, offset, removeLength, signed) {\n  if (removeLength === void 0) {\n    removeLength = true;\n  }\n\n  if (signed === void 0) {\n    signed = false;\n  }\n\n  var length = getLength(bytes[offset]);\n  var valueBytes = bytes.subarray(offset, offset + length); // NOTE that we do **not** subarray here because we need to copy these bytes\n  // as they will be modified below to remove the dataSizeLen bits and we do not\n  // want to modify the original data. normally we could just call slice on\n  // uint8array but ie 11 does not support that...\n\n  if (removeLength) {\n    valueBytes = Array.prototype.slice.call(bytes, offset, offset + length);\n    valueBytes[0] ^= LENGTH_TABLE[length - 1];\n  }\n\n  return {\n    length: length,\n    value: bytesToNumber(valueBytes, {\n      signed: signed\n    }),\n    bytes: valueBytes\n  };\n};\n\nvar normalizePath = function normalizePath(path) {\n  if (typeof path === 'string') {\n    return path.match(/.{1,2}/g).map(function (p) {\n      return normalizePath(p);\n    });\n  }\n\n  if (typeof path === 'number') {\n    return numberToBytes(path);\n  }\n\n  return path;\n};\n\nvar normalizePaths = function normalizePaths(paths) {\n  if (!Array.isArray(paths)) {\n    return [normalizePath(paths)];\n  }\n\n  return paths.map(function (p) {\n    return normalizePath(p);\n  });\n};\n\nvar getInfinityDataSize = function getInfinityDataSize(id, bytes, offset) {\n  if (offset >= bytes.length) {\n    return bytes.length;\n  }\n\n  var innerid = getvint(bytes, offset, false);\n\n  if (bytesMatch(id.bytes, innerid.bytes)) {\n    return offset;\n  }\n\n  var dataHeader = getvint(bytes, offset + innerid.length);\n  return getInfinityDataSize(id, bytes, offset + dataHeader.length + dataHeader.value + innerid.length);\n};\n/**\n * Notes on the EBLM format.\n *\n * EBLM uses \"vints\" tags. Every vint tag contains\n * two parts\n *\n * 1. The length from the first byte. You get this by\n *    converting the byte to binary and counting the zeros\n *    before a 1. Then you add 1 to that. Examples\n *    00011111 = length 4 because there are 3 zeros before a 1.\n *    00100000 = length 3 because there are 2 zeros before a 1.\n *    00000011 = length 7 because there are 6 zeros before a 1.\n *\n * 2. The bits used for length are removed from the first byte\n *    Then all the bytes are merged into a value. NOTE: this\n *    is not the case for id ebml tags as there id includes\n *    length bits.\n *\n */\n\n\nexport var findEbml = function findEbml(bytes, paths) {\n  paths = normalizePaths(paths);\n  bytes = toUint8(bytes);\n  var results = [];\n\n  if (!paths.length) {\n    return results;\n  }\n\n  var i = 0;\n\n  while (i < bytes.length) {\n    var id = getvint(bytes, i, false);\n    var dataHeader = getvint(bytes, i + id.length);\n    var dataStart = i + id.length + dataHeader.length; // dataSize is unknown or this is a live stream\n\n    if (dataHeader.value === 0x7f) {\n      dataHeader.value = getInfinityDataSize(id, bytes, dataStart);\n\n      if (dataHeader.value !== bytes.length) {\n        dataHeader.value -= dataStart;\n      }\n    }\n\n    var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value;\n    var data = bytes.subarray(dataStart, dataEnd);\n\n    if (bytesMatch(paths[0], id.bytes)) {\n      if (paths.length === 1) {\n        // this is the end of the paths and we've found the tag we were\n        // looking for\n        results.push(data);\n      } else {\n        // recursively search for the next tag inside of the data\n        // of this one\n        results = results.concat(findEbml(data, paths.slice(1)));\n      }\n    }\n\n    var totalLength = id.length + dataHeader.length + data.length; // move past this tag entirely, we are not looking for it\n\n    i += totalLength;\n  }\n\n  return results;\n}; // see https://www.matroska.org/technical/basics.html#block-structure\n\nexport var decodeBlock = function decodeBlock(block, type, timestampScale, clusterTimestamp) {\n  var duration;\n\n  if (type === 'group') {\n    duration = findEbml(block, [EBML_TAGS.BlockDuration])[0];\n\n    if (duration) {\n      duration = bytesToNumber(duration);\n      duration = 1 / timestampScale * duration * timestampScale / 1000;\n    }\n\n    block = findEbml(block, [EBML_TAGS.Block])[0];\n    type = 'block'; // treat data as a block after this point\n  }\n\n  var dv = new DataView(block.buffer, block.byteOffset, block.byteLength);\n  var trackNumber = getvint(block, 0);\n  var timestamp = dv.getInt16(trackNumber.length, false);\n  var flags = block[trackNumber.length + 2];\n  var data = block.subarray(trackNumber.length + 3); // pts/dts in seconds\n\n  var ptsdts = 1 / timestampScale * (clusterTimestamp + timestamp) * timestampScale / 1000; // return the frame\n\n  var parsed = {\n    duration: duration,\n    trackNumber: trackNumber.value,\n    keyframe: type === 'simple' && flags >> 7 === 1,\n    invisible: (flags & 0x08) >> 3 === 1,\n    lacing: (flags & 0x06) >> 1,\n    discardable: type === 'simple' && (flags & 0x01) === 1,\n    frames: [],\n    pts: ptsdts,\n    dts: ptsdts,\n    timestamp: timestamp\n  };\n\n  if (!parsed.lacing) {\n    parsed.frames.push(data);\n    return parsed;\n  }\n\n  var numberOfFrames = data[0] + 1;\n  var frameSizes = [];\n  var offset = 1; // Fixed\n\n  if (parsed.lacing === 2) {\n    var sizeOfFrame = (data.length - offset) / numberOfFrames;\n\n    for (var i = 0; i < numberOfFrames; i++) {\n      frameSizes.push(sizeOfFrame);\n    }\n  } // xiph\n\n\n  if (parsed.lacing === 1) {\n    for (var _i = 0; _i < numberOfFrames - 1; _i++) {\n      var size = 0;\n\n      do {\n        size += data[offset];\n        offset++;\n      } while (data[offset - 1] === 0xFF);\n\n      frameSizes.push(size);\n    }\n  } // ebml\n\n\n  if (parsed.lacing === 3) {\n    // first vint is unsinged\n    // after that vints are singed and\n    // based on a compounding size\n    var _size = 0;\n\n    for (var _i2 = 0; _i2 < numberOfFrames - 1; _i2++) {\n      var vint = _i2 === 0 ? getvint(data, offset) : getvint(data, offset, true, true);\n      _size += vint.value;\n      frameSizes.push(_size);\n      offset += vint.length;\n    }\n  }\n\n  frameSizes.forEach(function (size) {\n    parsed.frames.push(data.subarray(offset, offset + size));\n    offset += size;\n  });\n  return parsed;\n}; // VP9 Codec Feature Metadata (CodecPrivate)\n// https://www.webmproject.org/docs/container/\n\nvar parseVp9Private = function parseVp9Private(bytes) {\n  var i = 0;\n  var params = {};\n\n  while (i < bytes.length) {\n    var id = bytes[i] & 0x7f;\n    var len = bytes[i + 1];\n    var val = void 0;\n\n    if (len === 1) {\n      val = bytes[i + 2];\n    } else {\n      val = bytes.subarray(i + 2, i + 2 + len);\n    }\n\n    if (id === 1) {\n      params.profile = val;\n    } else if (id === 2) {\n      params.level = val;\n    } else if (id === 3) {\n      params.bitDepth = val;\n    } else if (id === 4) {\n      params.chromaSubsampling = val;\n    } else {\n      params[id] = val;\n    }\n\n    i += 2 + len;\n  }\n\n  return params;\n};\n\nexport var parseTracks = function parseTracks(bytes) {\n  bytes = toUint8(bytes);\n  var decodedTracks = [];\n  var tracks = findEbml(bytes, [EBML_TAGS.Segment, EBML_TAGS.Tracks, EBML_TAGS.Track]);\n\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Tracks, EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    tracks = findEbml(bytes, [EBML_TAGS.Track]);\n  }\n\n  if (!tracks.length) {\n    return decodedTracks;\n  }\n\n  tracks.forEach(function (track) {\n    var trackType = findEbml(track, EBML_TAGS.TrackType)[0];\n\n    if (!trackType || !trackType.length) {\n      return;\n    } // 1 is video, 2 is audio, 17 is subtitle\n    // other values are unimportant in this context\n\n\n    if (trackType[0] === 1) {\n      trackType = 'video';\n    } else if (trackType[0] === 2) {\n      trackType = 'audio';\n    } else if (trackType[0] === 17) {\n      trackType = 'subtitle';\n    } else {\n      return;\n    } // todo parse language\n\n\n    var decodedTrack = {\n      rawCodec: bytesToString(findEbml(track, [EBML_TAGS.CodecID])[0]),\n      type: trackType,\n      codecPrivate: findEbml(track, [EBML_TAGS.CodecPrivate])[0],\n      number: bytesToNumber(findEbml(track, [EBML_TAGS.TrackNumber])[0]),\n      defaultDuration: bytesToNumber(findEbml(track, [EBML_TAGS.DefaultDuration])[0]),\n      default: findEbml(track, [EBML_TAGS.FlagDefault])[0],\n      rawData: track\n    };\n    var codec = '';\n\n    if (/V_MPEG4\\/ISO\\/AVC/.test(decodedTrack.rawCodec)) {\n      codec = \"avc1.\" + getAvcCodec(decodedTrack.codecPrivate);\n    } else if (/V_MPEGH\\/ISO\\/HEVC/.test(decodedTrack.rawCodec)) {\n      codec = \"hev1.\" + getHvcCodec(decodedTrack.codecPrivate);\n    } else if (/V_MPEG4\\/ISO\\/ASP/.test(decodedTrack.rawCodec)) {\n      if (decodedTrack.codecPrivate) {\n        codec = 'mp4v.20.' + decodedTrack.codecPrivate[4].toString();\n      } else {\n        codec = 'mp4v.20.9';\n      }\n    } else if (/^V_THEORA/.test(decodedTrack.rawCodec)) {\n      codec = 'theora';\n    } else if (/^V_VP8/.test(decodedTrack.rawCodec)) {\n      codec = 'vp8';\n    } else if (/^V_VP9/.test(decodedTrack.rawCodec)) {\n      if (decodedTrack.codecPrivate) {\n        var _parseVp9Private = parseVp9Private(decodedTrack.codecPrivate),\n            profile = _parseVp9Private.profile,\n            level = _parseVp9Private.level,\n            bitDepth = _parseVp9Private.bitDepth,\n            chromaSubsampling = _parseVp9Private.chromaSubsampling;\n\n        codec = 'vp09.';\n        codec += padStart(profile, 2, '0') + \".\";\n        codec += padStart(level, 2, '0') + \".\";\n        codec += padStart(bitDepth, 2, '0') + \".\";\n        codec += \"\" + padStart(chromaSubsampling, 2, '0'); // Video -> Colour -> Ebml name\n\n        var matrixCoefficients = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB1]])[0] || [];\n        var videoFullRangeFlag = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xB9]])[0] || [];\n        var transferCharacteristics = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBA]])[0] || [];\n        var colourPrimaries = findEbml(track, [0xE0, [0x55, 0xB0], [0x55, 0xBB]])[0] || []; // if we find any optional codec parameter specify them all.\n\n        if (matrixCoefficients.length || videoFullRangeFlag.length || transferCharacteristics.length || colourPrimaries.length) {\n          codec += \".\" + padStart(colourPrimaries[0], 2, '0');\n          codec += \".\" + padStart(transferCharacteristics[0], 2, '0');\n          codec += \".\" + padStart(matrixCoefficients[0], 2, '0');\n          codec += \".\" + padStart(videoFullRangeFlag[0], 2, '0');\n        }\n      } else {\n        codec = 'vp9';\n      }\n    } else if (/^V_AV1/.test(decodedTrack.rawCodec)) {\n      codec = \"av01.\" + getAv1Codec(decodedTrack.codecPrivate);\n    } else if (/A_ALAC/.test(decodedTrack.rawCodec)) {\n      codec = 'alac';\n    } else if (/A_MPEG\\/L2/.test(decodedTrack.rawCodec)) {\n      codec = 'mp2';\n    } else if (/A_MPEG\\/L3/.test(decodedTrack.rawCodec)) {\n      codec = 'mp3';\n    } else if (/^A_AAC/.test(decodedTrack.rawCodec)) {\n      if (decodedTrack.codecPrivate) {\n        codec = 'mp4a.40.' + (decodedTrack.codecPrivate[0] >>> 3).toString();\n      } else {\n        codec = 'mp4a.40.2';\n      }\n    } else if (/^A_AC3/.test(decodedTrack.rawCodec)) {\n      codec = 'ac-3';\n    } else if (/^A_PCM/.test(decodedTrack.rawCodec)) {\n      codec = 'pcm';\n    } else if (/^A_MS\\/ACM/.test(decodedTrack.rawCodec)) {\n      codec = 'speex';\n    } else if (/^A_EAC3/.test(decodedTrack.rawCodec)) {\n      codec = 'ec-3';\n    } else if (/^A_VORBIS/.test(decodedTrack.rawCodec)) {\n      codec = 'vorbis';\n    } else if (/^A_FLAC/.test(decodedTrack.rawCodec)) {\n      codec = 'flac';\n    } else if (/^A_OPUS/.test(decodedTrack.rawCodec)) {\n      codec = 'opus';\n    }\n\n    decodedTrack.codec = codec;\n    decodedTracks.push(decodedTrack);\n  });\n  return decodedTracks.sort(function (a, b) {\n    return a.number - b.number;\n  });\n};\nexport var parseData = function parseData(data, tracks) {\n  var allBlocks = [];\n  var segment = findEbml(data, [EBML_TAGS.Segment])[0];\n  var timestampScale = findEbml(segment, [EBML_TAGS.SegmentInfo, EBML_TAGS.TimestampScale])[0]; // in nanoseconds, defaults to 1ms\n\n  if (timestampScale && timestampScale.length) {\n    timestampScale = bytesToNumber(timestampScale);\n  } else {\n    timestampScale = 1000000;\n  }\n\n  var clusters = findEbml(segment, [EBML_TAGS.Cluster]);\n\n  if (!tracks) {\n    tracks = parseTracks(segment);\n  }\n\n  clusters.forEach(function (cluster, ci) {\n    var simpleBlocks = findEbml(cluster, [EBML_TAGS.SimpleBlock]).map(function (b) {\n      return {\n        type: 'simple',\n        data: b\n      };\n    });\n    var blockGroups = findEbml(cluster, [EBML_TAGS.BlockGroup]).map(function (b) {\n      return {\n        type: 'group',\n        data: b\n      };\n    });\n    var timestamp = findEbml(cluster, [EBML_TAGS.Timestamp])[0] || 0;\n\n    if (timestamp && timestamp.length) {\n      timestamp = bytesToNumber(timestamp);\n    } // get all blocks then sort them into the correct order\n\n\n    var blocks = simpleBlocks.concat(blockGroups).sort(function (a, b) {\n      return a.data.byteOffset - b.data.byteOffset;\n    });\n    blocks.forEach(function (block, bi) {\n      var decoded = decodeBlock(block.data, block.type, timestampScale, timestamp);\n      allBlocks.push(decoded);\n    });\n  });\n  return {\n    tracks: tracks,\n    blocks: allBlocks\n  };\n};","import { bytesMatch, toUint8 } from './byte-helpers.js';\nexport var NAL_TYPE_ONE = toUint8([0x00, 0x00, 0x00, 0x01]);\nexport var NAL_TYPE_TWO = toUint8([0x00, 0x00, 0x01]);\nexport var EMULATION_PREVENTION = toUint8([0x00, 0x00, 0x03]);\n/**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n *\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\nexport var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(bytes) {\n  var positions = [];\n  var i = 1; // Find all `Emulation Prevention Bytes`\n\n  while (i < bytes.length - 2) {\n    if (bytesMatch(bytes.subarray(i, i + 3), EMULATION_PREVENTION)) {\n      positions.push(i + 2);\n      i++;\n    }\n\n    i++;\n  } // If no Emulation Prevention Bytes were found just return the original\n  // array\n\n\n  if (positions.length === 0) {\n    return bytes;\n  } // Create a new array to hold the NAL unit data\n\n\n  var newLength = bytes.length - positions.length;\n  var newData = new Uint8Array(newLength);\n  var sourceIndex = 0;\n\n  for (i = 0; i < newLength; sourceIndex++, i++) {\n    if (sourceIndex === positions[0]) {\n      // Skip this byte\n      sourceIndex++; // Remove this position index\n\n      positions.shift();\n    }\n\n    newData[i] = bytes[sourceIndex];\n  }\n\n  return newData;\n};\nexport var findNal = function findNal(bytes, dataType, types, nalLimit) {\n  if (nalLimit === void 0) {\n    nalLimit = Infinity;\n  }\n\n  bytes = toUint8(bytes);\n  types = [].concat(types);\n  var i = 0;\n  var nalStart;\n  var nalsFound = 0; // keep searching until:\n  // we reach the end of bytes\n  // we reach the maximum number of nals they want to seach\n  // NOTE: that we disregard nalLimit when we have found the start\n  // of the nal we want so that we can find the end of the nal we want.\n\n  while (i < bytes.length && (nalsFound < nalLimit || nalStart)) {\n    var nalOffset = void 0;\n\n    if (bytesMatch(bytes.subarray(i), NAL_TYPE_ONE)) {\n      nalOffset = 4;\n    } else if (bytesMatch(bytes.subarray(i), NAL_TYPE_TWO)) {\n      nalOffset = 3;\n    } // we are unsynced,\n    // find the next nal unit\n\n\n    if (!nalOffset) {\n      i++;\n      continue;\n    }\n\n    nalsFound++;\n\n    if (nalStart) {\n      return discardEmulationPreventionBytes(bytes.subarray(nalStart, i));\n    }\n\n    var nalType = void 0;\n\n    if (dataType === 'h264') {\n      nalType = bytes[i + nalOffset] & 0x1f;\n    } else if (dataType === 'h265') {\n      nalType = bytes[i + nalOffset] >> 1 & 0x3f;\n    }\n\n    if (types.indexOf(nalType) !== -1) {\n      nalStart = i + nalOffset;\n    } // nal header is 1 length for h264, and 2 for h265\n\n\n    i += nalOffset + (dataType === 'h264' ? 1 : 2);\n  }\n\n  return bytes.subarray(0, 0);\n};\nexport var findH264Nal = function findH264Nal(bytes, type, nalLimit) {\n  return findNal(bytes, 'h264', type, nalLimit);\n};\nexport var findH265Nal = function findH265Nal(bytes, type, nalLimit) {\n  return findNal(bytes, 'h265', type, nalLimit);\n};","import { toUint8, bytesMatch } from './byte-helpers.js';\nimport { findBox } from './mp4-helpers.js';\nimport { findEbml, EBML_TAGS } from './ebml-helpers.js';\nimport { getId3Offset } from './id3-helpers.js';\nimport { findH264Nal, findH265Nal } from './nal-helpers.js';\nvar CONSTANTS = {\n  // \"webm\" string literal in hex\n  'webm': toUint8([0x77, 0x65, 0x62, 0x6d]),\n  // \"matroska\" string literal in hex\n  'matroska': toUint8([0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61]),\n  // \"fLaC\" string literal in hex\n  'flac': toUint8([0x66, 0x4c, 0x61, 0x43]),\n  // \"OggS\" string literal in hex\n  'ogg': toUint8([0x4f, 0x67, 0x67, 0x53]),\n  // ac-3 sync byte, also works for ec-3 as that is simply a codec\n  // of ac-3\n  'ac3': toUint8([0x0b, 0x77]),\n  // \"RIFF\" string literal in hex used for wav and avi\n  'riff': toUint8([0x52, 0x49, 0x46, 0x46]),\n  // \"AVI\" string literal in hex\n  'avi': toUint8([0x41, 0x56, 0x49]),\n  // \"WAVE\" string literal in hex\n  'wav': toUint8([0x57, 0x41, 0x56, 0x45]),\n  // \"ftyp3g\" string literal in hex\n  '3gp': toUint8([0x66, 0x74, 0x79, 0x70, 0x33, 0x67]),\n  // \"ftyp\" string literal in hex\n  'mp4': toUint8([0x66, 0x74, 0x79, 0x70]),\n  // \"styp\" string literal in hex\n  'fmp4': toUint8([0x73, 0x74, 0x79, 0x70]),\n  // \"ftypqt\" string literal in hex\n  'mov': toUint8([0x66, 0x74, 0x79, 0x70, 0x71, 0x74]),\n  // moov string literal in hex\n  'moov': toUint8([0x6D, 0x6F, 0x6F, 0x76]),\n  // moof string literal in hex\n  'moof': toUint8([0x6D, 0x6F, 0x6F, 0x66])\n};\nvar _isLikely = {\n  aac: function aac(bytes) {\n    var offset = getId3Offset(bytes);\n    return bytesMatch(bytes, [0xFF, 0x10], {\n      offset: offset,\n      mask: [0xFF, 0x16]\n    });\n  },\n  mp3: function mp3(bytes) {\n    var offset = getId3Offset(bytes);\n    return bytesMatch(bytes, [0xFF, 0x02], {\n      offset: offset,\n      mask: [0xFF, 0x06]\n    });\n  },\n  webm: function webm(bytes) {\n    var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is webm\n\n    return bytesMatch(docType, CONSTANTS.webm);\n  },\n  mkv: function mkv(bytes) {\n    var docType = findEbml(bytes, [EBML_TAGS.EBML, EBML_TAGS.DocType])[0]; // check if DocType EBML tag is matroska\n\n    return bytesMatch(docType, CONSTANTS.matroska);\n  },\n  mp4: function mp4(bytes) {\n    // if this file is another base media file format, it is not mp4\n    if (_isLikely['3gp'](bytes) || _isLikely.mov(bytes)) {\n      return false;\n    } // if this file starts with a ftyp or styp box its mp4\n\n\n    if (bytesMatch(bytes, CONSTANTS.mp4, {\n      offset: 4\n    }) || bytesMatch(bytes, CONSTANTS.fmp4, {\n      offset: 4\n    })) {\n      return true;\n    } // if this file starts with a moof/moov box its mp4\n\n\n    if (bytesMatch(bytes, CONSTANTS.moof, {\n      offset: 4\n    }) || bytesMatch(bytes, CONSTANTS.moov, {\n      offset: 4\n    })) {\n      return true;\n    }\n  },\n  mov: function mov(bytes) {\n    return bytesMatch(bytes, CONSTANTS.mov, {\n      offset: 4\n    });\n  },\n  '3gp': function gp(bytes) {\n    return bytesMatch(bytes, CONSTANTS['3gp'], {\n      offset: 4\n    });\n  },\n  ac3: function ac3(bytes) {\n    var offset = getId3Offset(bytes);\n    return bytesMatch(bytes, CONSTANTS.ac3, {\n      offset: offset\n    });\n  },\n  ts: function ts(bytes) {\n    if (bytes.length < 189 && bytes.length >= 1) {\n      return bytes[0] === 0x47;\n    }\n\n    var i = 0; // check the first 376 bytes for two matching sync bytes\n\n    while (i + 188 < bytes.length && i < 188) {\n      if (bytes[i] === 0x47 && bytes[i + 188] === 0x47) {\n        return true;\n      }\n\n      i += 1;\n    }\n\n    return false;\n  },\n  flac: function flac(bytes) {\n    var offset = getId3Offset(bytes);\n    return bytesMatch(bytes, CONSTANTS.flac, {\n      offset: offset\n    });\n  },\n  ogg: function ogg(bytes) {\n    return bytesMatch(bytes, CONSTANTS.ogg);\n  },\n  avi: function avi(bytes) {\n    return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.avi, {\n      offset: 8\n    });\n  },\n  wav: function wav(bytes) {\n    return bytesMatch(bytes, CONSTANTS.riff) && bytesMatch(bytes, CONSTANTS.wav, {\n      offset: 8\n    });\n  },\n  'h264': function h264(bytes) {\n    // find seq_parameter_set_rbsp\n    return findH264Nal(bytes, 7, 3).length;\n  },\n  'h265': function h265(bytes) {\n    // find video_parameter_set_rbsp or seq_parameter_set_rbsp\n    return findH265Nal(bytes, [32, 33], 3).length;\n  }\n}; // get all the isLikely functions\n// but make sure 'ts' is above h264 and h265\n// but below everything else as it is the least specific\n\nvar isLikelyTypes = Object.keys(_isLikely) // remove ts, h264, h265\n.filter(function (t) {\n  return t !== 'ts' && t !== 'h264' && t !== 'h265';\n}) // add it back to the bottom\n.concat(['ts', 'h264', 'h265']); // make sure we are dealing with uint8 data.\n\nisLikelyTypes.forEach(function (type) {\n  var isLikelyFn = _isLikely[type];\n\n  _isLikely[type] = function (bytes) {\n    return isLikelyFn(toUint8(bytes));\n  };\n}); // export after wrapping\n\nexport var isLikely = _isLikely; // A useful list of file signatures can be found here\n// https://en.wikipedia.org/wiki/List_of_file_signatures\n\nexport var detectContainerForBytes = function detectContainerForBytes(bytes) {\n  bytes = toUint8(bytes);\n\n  for (var i = 0; i < isLikelyTypes.length; i++) {\n    var type = isLikelyTypes[i];\n\n    if (isLikely[type](bytes)) {\n      return type;\n    }\n  }\n\n  return '';\n}; // fmp4 is not a container\n\nexport var isLikelyFmp4MediaSegment = function isLikelyFmp4MediaSegment(bytes) {\n  return findBox(bytes, ['moof']).length > 0;\n};","/**\n * @license\n * Video.js 8.22.0 <http://videojs.com/>\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\n * Available under Apache License Version 2.0\n * <https://github.com/videojs/video.js/blob/main/LICENSE>\n *\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\n * Available under Apache License Version 2.0\n * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>\n */\n\nimport window$1 from 'global/window';\nimport document$1 from 'global/document';\nimport XHR from '@videojs/xhr';\nimport vtt from 'videojs-vtt.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport _resolveUrl from '@videojs/vhs-utils/es/resolve-url.js';\nimport { Parser } from 'm3u8-parser';\nimport { DEFAULT_VIDEO_CODEC, DEFAULT_AUDIO_CODEC, parseCodecs, muxerSupportsCodec, browserSupportsCodec, translateLegacyCodec, codecsFromDefault, isAudioCodec, getMimeForCodec } from '@videojs/vhs-utils/es/codecs.js';\nimport { simpleTypeFromSourceType } from '@videojs/vhs-utils/es/media-types.js';\nimport { isArrayBufferView, concatTypedArrays, stringToBytes, toUint8 } from '@videojs/vhs-utils/es/byte-helpers';\nimport { generateSidxKey, parseUTCTiming, parse, addSidxSegmentsToPlaylist } from 'mpd-parser';\nimport parseSidx from 'mux.js/lib/tools/parse-sidx';\nimport { getId3Offset } from '@videojs/vhs-utils/es/id3-helpers';\nimport { detectContainerForBytes, isLikelyFmp4MediaSegment } from '@videojs/vhs-utils/es/containers';\nimport { ONE_SECOND_IN_TS } from 'mux.js/lib/utils/clock';\n\nvar version$6 = \"8.22.0\";\n\n/**\n * An Object that contains lifecycle hooks as keys which point to an array\n * of functions that are run when a lifecycle is triggered\n *\n * @private\n */\nconst hooks_ = {};\n\n/**\n * Get a list of hooks for a specific lifecycle\n *\n * @param  {string} type\n *         the lifecycle to get hooks from\n *\n * @param  {Function|Function[]} [fn]\n *         Optionally add a hook (or hooks) to the lifecycle that your are getting.\n *\n * @return {Array}\n *         an array of hooks, or an empty array if there are none.\n */\nconst hooks = function (type, fn) {\n  hooks_[type] = hooks_[type] || [];\n  if (fn) {\n    hooks_[type] = hooks_[type].concat(fn);\n  }\n  return hooks_[type];\n};\n\n/**\n * Add a function hook to a specific videojs lifecycle.\n *\n * @param {string} type\n *        the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n *        The function or array of functions to attach.\n */\nconst hook = function (type, fn) {\n  hooks(type, fn);\n};\n\n/**\n * Remove a hook from a specific videojs lifecycle.\n *\n * @param  {string} type\n *         the lifecycle that the function hooked to\n *\n * @param  {Function} fn\n *         The hooked function to remove\n *\n * @return {boolean}\n *         The function that was removed or undef\n */\nconst removeHook = function (type, fn) {\n  const index = hooks(type).indexOf(fn);\n  if (index <= -1) {\n    return false;\n  }\n  hooks_[type] = hooks_[type].slice();\n  hooks_[type].splice(index, 1);\n  return true;\n};\n\n/**\n * Add a function hook that will only run once to a specific videojs lifecycle.\n *\n * @param {string} type\n *        the lifecycle to hook the function to.\n *\n * @param {Function|Function[]}\n *        The function or array of functions to attach.\n */\nconst hookOnce = function (type, fn) {\n  hooks(type, [].concat(fn).map(original => {\n    const wrapper = (...args) => {\n      removeHook(type, wrapper);\n      return original(...args);\n    };\n    return wrapper;\n  }));\n};\n\n/**\n * @file fullscreen-api.js\n * @module fullscreen-api\n */\n\n/**\n * Store the browser-specific methods for the fullscreen API.\n *\n * @type {Object}\n * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\n * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\n */\nconst FullscreenApi = {\n  prefixed: true\n};\n\n// browser API methods\nconst apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'],\n// WebKit\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen']];\nconst specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n  // check for exitFullscreen function\n  if (apiMap[i][1] in document$1) {\n    browserApi = apiMap[i];\n    break;\n  }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n  for (let i = 0; i < browserApi.length; i++) {\n    FullscreenApi[specApi[i]] = browserApi[i];\n  }\n  FullscreenApi.prefixed = browserApi[0] !== specApi[0];\n}\n\n/**\n * @file create-logger.js\n * @module create-logger\n */\n\n// This is the private tracking variable for the logging history.\nlet history = [];\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @private\n * @param  {string} name\n *         The name of the console method to use.\n *\n * @param  {Object} log\n *         The arguments to be passed to the matching console method.\n *\n * @param {string} [styles]\n *        styles for name\n */\nconst LogByTypeFactory = (name, log, styles) => (type, level, args) => {\n  const lvl = log.levels[level];\n  const lvlRegExp = new RegExp(`^(${lvl})$`);\n  let resultName = name;\n  if (type !== 'log') {\n    // Add the type to the front of the message when it's not \"log\".\n    args.unshift(type.toUpperCase() + ':');\n  }\n  if (styles) {\n    resultName = `%c${name}`;\n    args.unshift(styles);\n  }\n\n  // Add console prefix after adding to history.\n  args.unshift(resultName + ':');\n\n  // Add a clone of the args at this point to history.\n  if (history) {\n    history.push([].concat(args));\n\n    // only store 1000 history entries\n    const splice = history.length - 1000;\n    history.splice(0, splice > 0 ? splice : 0);\n  }\n\n  // If there's no console then don't try to output messages, but they will\n  // still be stored in history.\n  if (!window$1.console) {\n    return;\n  }\n\n  // Was setting these once outside of this function, but containing them\n  // in the function makes it easier to test cases where console doesn't exist\n  // when the module is executed.\n  let fn = window$1.console[type];\n  if (!fn && type === 'debug') {\n    // Certain browsers don't have support for console.debug. For those, we\n    // should default to the closest comparable log.\n    fn = window$1.console.info || window$1.console.log;\n  }\n\n  // Bail out if there's no console or if this type is not allowed by the\n  // current logging level.\n  if (!fn || !lvl || !lvlRegExp.test(type)) {\n    return;\n  }\n  fn[Array.isArray(args) ? 'apply' : 'call'](window$1.console, args);\n};\nfunction createLogger$1(name, delimiter = ':', styles = '') {\n  // This is the private tracking variable for logging level.\n  let level = 'info';\n\n  // the curried logByType bound to the specific log and history\n  let logByType;\n\n  /**\n   * Logs plain debug messages. Similar to `console.log`.\n   *\n   * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n   * of our JSDoc template, we cannot properly document this as both a function\n   * and a namespace, so its function signature is documented here.\n   *\n   * #### Arguments\n   * ##### *args\n   * *[]\n   *\n   * Any combination of values that could be passed to `console.log()`.\n   *\n   * #### Return Value\n   *\n   * `undefined`\n   *\n   * @namespace\n   * @param    {...*} args\n   *           One or more messages or objects that should be logged.\n   */\n  function log(...args) {\n    logByType('log', level, args);\n  }\n\n  // This is the logByType helper that the logging methods below use\n  logByType = LogByTypeFactory(name, log, styles);\n\n  /**\n   * Create a new subLogger which chains the old name to the new name.\n   *\n   * For example, doing `mylogger = videojs.log.createLogger('player')` and then using that logger will log the following:\n   * ```js\n   *  mylogger('foo');\n   *  // > VIDEOJS: player: foo\n   * ```\n   *\n   * @param {string} subName\n   *        The name to add call the new logger\n   * @param {string} [subDelimiter]\n   *        Optional delimiter\n   * @param {string} [subStyles]\n   *        Optional styles\n   * @return {Object}\n   */\n  log.createLogger = (subName, subDelimiter, subStyles) => {\n    const resultDelimiter = subDelimiter !== undefined ? subDelimiter : delimiter;\n    const resultStyles = subStyles !== undefined ? subStyles : styles;\n    const resultName = `${name} ${resultDelimiter} ${subName}`;\n    return createLogger$1(resultName, resultDelimiter, resultStyles);\n  };\n\n  /**\n   * Create a new logger.\n   *\n   * @param {string} newName\n   *        The name for the new logger\n   * @param {string} [newDelimiter]\n   *        Optional delimiter\n   * @param {string} [newStyles]\n   *        Optional styles\n   * @return {Object}\n   */\n  log.createNewLogger = (newName, newDelimiter, newStyles) => {\n    return createLogger$1(newName, newDelimiter, newStyles);\n  };\n\n  /**\n   * Enumeration of available logging levels, where the keys are the level names\n   * and the values are `|`-separated strings containing logging methods allowed\n   * in that logging level. These strings are used to create a regular expression\n   * matching the function name being called.\n   *\n   * Levels provided by Video.js are:\n   *\n   * - `off`: Matches no calls. Any value that can be cast to `false` will have\n   *   this effect. The most restrictive.\n   * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\n   *   `log.warn`, and `log.error`).\n   * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\n   * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\n   * - `warn`: Matches `log.warn` and `log.error` calls.\n   * - `error`: Matches only `log.error` calls.\n   *\n   * @type {Object}\n   */\n  log.levels = {\n    all: 'debug|log|warn|error',\n    off: '',\n    debug: 'debug|log|warn|error',\n    info: 'log|warn|error',\n    warn: 'warn|error',\n    error: 'error',\n    DEFAULT: level\n  };\n\n  /**\n   * Get or set the current logging level.\n   *\n   * If a string matching a key from {@link module:log.levels} is provided, acts\n   * as a setter.\n   *\n   * @param  {'all'|'debug'|'info'|'warn'|'error'|'off'} [lvl]\n   *         Pass a valid level to set a new logging level.\n   *\n   * @return {string}\n   *         The current logging level.\n   */\n  log.level = lvl => {\n    if (typeof lvl === 'string') {\n      if (!log.levels.hasOwnProperty(lvl)) {\n        throw new Error(`\"${lvl}\" in not a valid log level`);\n      }\n      level = lvl;\n    }\n    return level;\n  };\n\n  /**\n   * Returns an array containing everything that has been logged to the history.\n   *\n   * This array is a shallow clone of the internal history record. However, its\n   * contents are _not_ cloned; so, mutating objects inside this array will\n   * mutate them in history.\n   *\n   * @return {Array}\n   */\n  log.history = () => history ? [].concat(history) : [];\n\n  /**\n   * Allows you to filter the history by the given logger name\n   *\n   * @param {string} fname\n   *        The name to filter by\n   *\n   * @return {Array}\n   *         The filtered list to return\n   */\n  log.history.filter = fname => {\n    return (history || []).filter(historyItem => {\n      // if the first item in each historyItem includes `fname`, then it's a match\n      return new RegExp(`.*${fname}.*`).test(historyItem[0]);\n    });\n  };\n\n  /**\n   * Clears the internal history tracking, but does not prevent further history\n   * tracking.\n   */\n  log.history.clear = () => {\n    if (history) {\n      history.length = 0;\n    }\n  };\n\n  /**\n   * Disable history tracking if it is currently enabled.\n   */\n  log.history.disable = () => {\n    if (history !== null) {\n      history.length = 0;\n      history = null;\n    }\n  };\n\n  /**\n   * Enable history tracking if it is currently disabled.\n   */\n  log.history.enable = () => {\n    if (history === null) {\n      history = [];\n    }\n  };\n\n  /**\n   * Logs error messages. Similar to `console.error`.\n   *\n   * @param {...*} args\n   *        One or more messages or objects that should be logged as an error\n   */\n  log.error = (...args) => logByType('error', level, args);\n\n  /**\n   * Logs warning messages. Similar to `console.warn`.\n   *\n   * @param {...*} args\n   *        One or more messages or objects that should be logged as a warning.\n   */\n  log.warn = (...args) => logByType('warn', level, args);\n\n  /**\n   * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\n   * log if `console.debug` is not available\n   *\n   * @param {...*} args\n   *        One or more messages or objects that should be logged as debug.\n   */\n  log.debug = (...args) => logByType('debug', level, args);\n  return log;\n}\n\n/**\n * @file log.js\n * @module log\n */\nconst log$1 = createLogger$1('VIDEOJS');\nconst createLogger = log$1.createLogger;\n\n/**\n * @file obj.js\n * @module obj\n */\n\n/**\n * @callback obj:EachCallback\n *\n * @param {*} value\n *        The current key for the object that is being iterated over.\n *\n * @param {string} key\n *        The current key-value for object that is being iterated over\n */\n\n/**\n * @callback obj:ReduceCallback\n *\n * @param {*} accum\n *        The value that is accumulating over the reduce loop.\n *\n * @param {*} value\n *        The current key for the object that is being iterated over.\n *\n * @param {string} key\n *        The current key-value for object that is being iterated over\n *\n * @return {*}\n *         The new accumulated value.\n */\nconst toString = Object.prototype.toString;\n\n/**\n * Get the keys of an Object\n *\n * @param {Object}\n *        The Object to get the keys from\n *\n * @return {string[]}\n *         An array of the keys from the object. Returns an empty array if the\n *         object passed in was invalid or had no keys.\n *\n * @private\n */\nconst keys = function (object) {\n  return isObject(object) ? Object.keys(object) : [];\n};\n\n/**\n * Array-like iteration for objects.\n *\n * @param {Object} object\n *        The object to iterate over\n *\n * @param {obj:EachCallback} fn\n *        The callback function which is called for each key in the object.\n */\nfunction each(object, fn) {\n  keys(object).forEach(key => fn(object[key], key));\n}\n\n/**\n * Array-like reduce for objects.\n *\n * @param {Object} object\n *        The Object that you want to reduce.\n *\n * @param {Function} fn\n *         A callback function which is called for each key in the object. It\n *         receives the accumulated value and the per-iteration value and key\n *         as arguments.\n *\n * @param {*} [initial = 0]\n *        Starting value\n *\n * @return {*}\n *         The final accumulated value.\n */\nfunction reduce(object, fn, initial = 0) {\n  return keys(object).reduce((accum, key) => fn(accum, object[key], key), initial);\n}\n\n/**\n * Returns whether a value is an object of any kind - including DOM nodes,\n * arrays, regular expressions, etc. Not functions, though.\n *\n * This avoids the gotcha where using `typeof` on a `null` value\n * results in `'object'`.\n *\n * @param  {Object} value\n * @return {boolean}\n */\nfunction isObject(value) {\n  return !!value && typeof value === 'object';\n}\n\n/**\n * Returns whether an object appears to be a \"plain\" object - that is, a\n * direct instance of `Object`.\n *\n * @param  {Object} value\n * @return {boolean}\n */\nfunction isPlain(value) {\n  return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object;\n}\n\n/**\n * Merge two objects recursively.\n *\n * Performs a deep merge like\n * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\n * plain objects (not arrays, elements, or anything else).\n *\n * Non-plain object values will be copied directly from the right-most\n * argument.\n *\n * @param   {Object[]} sources\n *          One or more objects to merge into a new object.\n *\n * @return {Object}\n *          A new object that is the merged result of all sources.\n */\nfunction merge$1(...sources) {\n  const result = {};\n  sources.forEach(source => {\n    if (!source) {\n      return;\n    }\n    each(source, (value, key) => {\n      if (!isPlain(value)) {\n        result[key] = value;\n        return;\n      }\n      if (!isPlain(result[key])) {\n        result[key] = {};\n      }\n      result[key] = merge$1(result[key], value);\n    });\n  });\n  return result;\n}\n\n/**\n * Returns an array of values for a given object\n *\n * @param  {Object} source - target object\n * @return {Array<unknown>} - object values\n */\nfunction values(source = {}) {\n  const result = [];\n  for (const key in source) {\n    if (source.hasOwnProperty(key)) {\n      const value = source[key];\n      result.push(value);\n    }\n  }\n  return result;\n}\n\n/**\n * Object.defineProperty but \"lazy\", which means that the value is only set after\n * it is retrieved the first time, rather than being set right away.\n *\n * @param {Object} obj the object to set the property on\n * @param {string} key the key for the property to set\n * @param {Function} getValue the function used to get the value when it is needed.\n * @param {boolean} setter whether a setter should be allowed or not\n */\nfunction defineLazyProperty(obj, key, getValue, setter = true) {\n  const set = value => Object.defineProperty(obj, key, {\n    value,\n    enumerable: true,\n    writable: true\n  });\n  const options = {\n    configurable: true,\n    enumerable: true,\n    get() {\n      const value = getValue();\n      set(value);\n      return value;\n    }\n  };\n  if (setter) {\n    options.set = set;\n  }\n  return Object.defineProperty(obj, key, options);\n}\n\nvar Obj = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  each: each,\n  reduce: reduce,\n  isObject: isObject,\n  isPlain: isPlain,\n  merge: merge$1,\n  values: values,\n  defineLazyProperty: defineLazyProperty\n});\n\n/**\n * @file browser.js\n * @module browser\n */\n\n/**\n * Whether or not this device is an iPod.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_IPOD = false;\n\n/**\n * The detected iOS version - or `null`.\n *\n * @static\n * @type {string|null}\n */\nlet IOS_VERSION = null;\n\n/**\n * Whether or not this is an Android device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_ANDROID = false;\n\n/**\n * The detected Android version - or `null` if not Android or indeterminable.\n *\n * @static\n * @type {number|string|null}\n */\nlet ANDROID_VERSION;\n\n/**\n * Whether or not this is Mozilla Firefox.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_FIREFOX = false;\n\n/**\n * Whether or not this is Microsoft Edge.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_EDGE = false;\n\n/**\n * Whether or not this is any Chromium Browser\n *\n * @static\n * @type {Boolean}\n */\nlet IS_CHROMIUM = false;\n\n/**\n * Whether or not this is any Chromium browser that is not Edge.\n *\n * This will also be `true` for Chrome on iOS, which will have different support\n * as it is actually Safari under the hood.\n *\n * Deprecated, as the behaviour to not match Edge was to prevent Legacy Edge's UA matching.\n * IS_CHROMIUM should be used instead.\n * \"Chromium but not Edge\" could be explicitly tested with IS_CHROMIUM && !IS_EDGE\n *\n * @static\n * @deprecated\n * @type {Boolean}\n */\nlet IS_CHROME = false;\n\n/**\n * The detected Chromium version - or `null`.\n *\n * @static\n * @type {number|null}\n */\nlet CHROMIUM_VERSION = null;\n\n/**\n * The detected Google Chrome version - or `null`.\n * This has always been the _Chromium_ version, i.e. would return on Chromium Edge.\n * Deprecated, use CHROMIUM_VERSION instead.\n *\n * @static\n * @deprecated\n * @type {number|null}\n */\nlet CHROME_VERSION = null;\n\n/**\n * Whether or not this is a Chromecast receiver application.\n *\n * @static\n * @type {Boolean}\n */\nconst IS_CHROMECAST_RECEIVER = Boolean(window$1.cast && window$1.cast.framework && window$1.cast.framework.CastReceiverContext);\n\n/**\n * The detected Internet Explorer version - or `null`.\n *\n * @static\n * @deprecated\n * @type {number|null}\n */\nlet IE_VERSION = null;\n\n/**\n * Whether or not this is desktop Safari.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_SAFARI = false;\n\n/**\n * Whether or not this is a Windows machine.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_WINDOWS = false;\n\n/**\n * Whether or not this device is an iPad.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_IPAD = false;\n\n/**\n * Whether or not this device is an iPhone.\n *\n * @static\n * @type {Boolean}\n */\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nlet IS_IPHONE = false;\n\n/**\n * Whether or not this is a Tizen device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_TIZEN = false;\n\n/**\n * Whether or not this is a WebOS device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_WEBOS = false;\n\n/**\n * Whether or not this is a Smart TV (Tizen or WebOS) device.\n *\n * @static\n * @type {Boolean}\n */\nlet IS_SMART_TV = false;\n\n/**\n * Whether or not this device is touch-enabled.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nconst TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window$1 || window$1.navigator.maxTouchPoints || window$1.DocumentTouch && window$1.document instanceof window$1.DocumentTouch));\nconst UAD = window$1.navigator && window$1.navigator.userAgentData;\nif (UAD && UAD.platform && UAD.brands) {\n  // If userAgentData is present, use it instead of userAgent to avoid warnings\n  // Currently only implemented on Chromium\n  // userAgentData does not expose Android version, so ANDROID_VERSION remains `null`\n\n  IS_ANDROID = UAD.platform === 'Android';\n  IS_EDGE = Boolean(UAD.brands.find(b => b.brand === 'Microsoft Edge'));\n  IS_CHROMIUM = Boolean(UAD.brands.find(b => b.brand === 'Chromium'));\n  IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n  CHROMIUM_VERSION = CHROME_VERSION = (UAD.brands.find(b => b.brand === 'Chromium') || {}).version || null;\n  IS_WINDOWS = UAD.platform === 'Windows';\n}\n\n// If the browser is not Chromium, either userAgentData is not present which could be an old Chromium browser,\n//  or it's a browser that has added userAgentData since that we don't have tests for yet. In either case,\n// the checks need to be made agiainst the regular userAgent string.\nif (!IS_CHROMIUM) {\n  const USER_AGENT = window$1.navigator && window$1.navigator.userAgent || '';\n  IS_IPOD = /iPod/i.test(USER_AGENT);\n  IOS_VERSION = function () {\n    const match = USER_AGENT.match(/OS (\\d+)_/i);\n    if (match && match[1]) {\n      return match[1];\n    }\n    return null;\n  }();\n  IS_ANDROID = /Android/i.test(USER_AGENT);\n  ANDROID_VERSION = function () {\n    // This matches Android Major.Minor.Patch versions\n    // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n    const match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);\n    if (!match) {\n      return null;\n    }\n    const major = match[1] && parseFloat(match[1]);\n    const minor = match[2] && parseFloat(match[2]);\n    if (major && minor) {\n      return parseFloat(match[1] + '.' + match[2]);\n    } else if (major) {\n      return major;\n    }\n    return null;\n  }();\n  IS_FIREFOX = /Firefox/i.test(USER_AGENT);\n  IS_EDGE = /Edg/i.test(USER_AGENT);\n  IS_CHROMIUM = /Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT);\n  IS_CHROME = !IS_EDGE && IS_CHROMIUM;\n  CHROMIUM_VERSION = CHROME_VERSION = function () {\n    const match = USER_AGENT.match(/(Chrome|CriOS)\\/(\\d+)/);\n    if (match && match[2]) {\n      return parseFloat(match[2]);\n    }\n    return null;\n  }();\n  IE_VERSION = function () {\n    const result = /MSIE\\s(\\d+)\\.\\d/.exec(USER_AGENT);\n    let version = result && parseFloat(result[1]);\n    if (!version && /Trident\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\n      // IE 11 has a different user agent string than other IE versions\n      version = 11.0;\n    }\n    return version;\n  }();\n  IS_TIZEN = /Tizen/i.test(USER_AGENT);\n  IS_WEBOS = /Web0S/i.test(USER_AGENT);\n  IS_SMART_TV = IS_TIZEN || IS_WEBOS;\n  IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE && !IS_SMART_TV;\n  IS_WINDOWS = /Windows/i.test(USER_AGENT);\n  IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT);\n  IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\n}\n\n/**\n * Whether or not this is an iOS device.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nconst IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\n/**\n * Whether or not this is any flavor of Safari - including iOS.\n *\n * @static\n * @const\n * @type {Boolean}\n */\nconst IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\n\nvar browser = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  get IS_IPOD () { return IS_IPOD; },\n  get IOS_VERSION () { return IOS_VERSION; },\n  get IS_ANDROID () { return IS_ANDROID; },\n  get ANDROID_VERSION () { return ANDROID_VERSION; },\n  get IS_FIREFOX () { return IS_FIREFOX; },\n  get IS_EDGE () { return IS_EDGE; },\n  get IS_CHROMIUM () { return IS_CHROMIUM; },\n  get IS_CHROME () { return IS_CHROME; },\n  get CHROMIUM_VERSION () { return CHROMIUM_VERSION; },\n  get CHROME_VERSION () { return CHROME_VERSION; },\n  IS_CHROMECAST_RECEIVER: IS_CHROMECAST_RECEIVER,\n  get IE_VERSION () { return IE_VERSION; },\n  get IS_SAFARI () { return IS_SAFARI; },\n  get IS_WINDOWS () { return IS_WINDOWS; },\n  get IS_IPAD () { return IS_IPAD; },\n  get IS_IPHONE () { return IS_IPHONE; },\n  get IS_TIZEN () { return IS_TIZEN; },\n  get IS_WEBOS () { return IS_WEBOS; },\n  get IS_SMART_TV () { return IS_SMART_TV; },\n  TOUCH_ENABLED: TOUCH_ENABLED,\n  IS_IOS: IS_IOS,\n  IS_ANY_SAFARI: IS_ANY_SAFARI\n});\n\n/**\n * @file dom.js\n * @module dom\n */\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @private\n * @param  {string} str\n *         The string to check\n *\n * @return {boolean}\n *         Will be `true` if the string is non-blank, `false` otherwise.\n *\n */\nfunction isNonBlankString(str) {\n  // we use str.trim as it will trim any whitespace characters\n  // from the front or back of non-whitespace characters. aka\n  // Any string that contains non-whitespace characters will\n  // still contain them after `trim` but whitespace only strings\n  // will have a length of 0, failing this check.\n  return typeof str === 'string' && Boolean(str.trim());\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @private\n * @param  {string} str\n *         The string to check for whitespace.\n *\n * @throws {Error}\n *         Throws an error if there is whitespace in the string.\n */\nfunction throwIfWhitespace(str) {\n  // str.indexOf instead of regex because str.indexOf is faster performance wise.\n  if (str.indexOf(' ') >= 0) {\n    throw new Error('class has illegal whitespace characters');\n  }\n}\n\n/**\n * Whether the current DOM interface appears to be real (i.e. not simulated).\n *\n * @return {boolean}\n *         Will be `true` if the DOM appears to be real, `false` otherwise.\n */\nfunction isReal() {\n  // Both document and window will never be undefined thanks to `global`.\n  return document$1 === window$1.document;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @param  {*} value\n *         The value to check.\n *\n * @return {boolean}\n *         Will be `true` if the value is a DOM element, `false` otherwise.\n */\nfunction isEl(value) {\n  return isObject(value) && value.nodeType === 1;\n}\n\n/**\n * Determines if the current DOM is embedded in an iframe.\n *\n * @return {boolean}\n *         Will be `true` if the DOM is embedded in an iframe, `false`\n *         otherwise.\n */\nfunction isInFrame() {\n  // We need a try/catch here because Safari will throw errors when attempting\n  // to get either `parent` or `self`\n  try {\n    return window$1.parent !== window$1.self;\n  } catch (x) {\n    return true;\n  }\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @private\n * @param   {string} method\n *          The method to create the query with.\n *\n * @return  {Function}\n *          The query method\n */\nfunction createQuerier(method) {\n  return function (selector, context) {\n    if (!isNonBlankString(selector)) {\n      return document$1[method](null);\n    }\n    if (isNonBlankString(context)) {\n      context = document$1.querySelector(context);\n    }\n    const ctx = isEl(context) ? context : document$1;\n    return ctx[method] && ctx[method](selector);\n  };\n}\n\n/**\n * Creates an element and applies properties, attributes, and inserts content.\n *\n * @param  {string} [tagName='div']\n *         Name of tag to be created.\n *\n * @param  {Object} [properties={}]\n *         Element properties to be applied.\n *\n * @param  {Object} [attributes={}]\n *         Element attributes to be applied.\n *\n * @param {ContentDescriptor} [content]\n *        A content descriptor object.\n *\n * @return {Element}\n *         The element that was created.\n */\nfunction createEl(tagName = 'div', properties = {}, attributes = {}, content) {\n  const el = document$1.createElement(tagName);\n  Object.getOwnPropertyNames(properties).forEach(function (propName) {\n    const val = properties[propName];\n\n    // Handle textContent since it's not supported everywhere and we have a\n    // method for it.\n    if (propName === 'textContent') {\n      textContent(el, val);\n    } else if (el[propName] !== val || propName === 'tabIndex') {\n      el[propName] = val;\n    }\n  });\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n    el.setAttribute(attrName, attributes[attrName]);\n  });\n  if (content) {\n    appendContent(el, content);\n  }\n  return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param  {HTMLElement} el\n *         The element to add text content into\n *\n * @param  {string} text\n *         The text content to add.\n *\n * @return {Element}\n *         The element with added text content.\n */\nfunction textContent(el, text) {\n  if (typeof el.textContent === 'undefined') {\n    el.innerText = text;\n  } else {\n    el.textContent = text;\n  }\n  return el;\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child\n *        Element to insert\n *\n * @param {Element} parent\n *        Element to insert child into\n */\nfunction prependTo(child, parent) {\n  if (parent.firstChild) {\n    parent.insertBefore(child, parent.firstChild);\n  } else {\n    parent.appendChild(child);\n  }\n}\n\n/**\n * Check if an element has a class name.\n *\n * @param  {Element} element\n *         Element to check\n *\n * @param  {string} classToCheck\n *         Class name to check for\n *\n * @return {boolean}\n *         Will be `true` if the element has a class, `false` otherwise.\n *\n * @throws {Error}\n *         Throws an error if `classToCheck` has white space.\n */\nfunction hasClass(element, classToCheck) {\n  throwIfWhitespace(classToCheck);\n  return element.classList.contains(classToCheck);\n}\n\n/**\n * Add a class name to an element.\n *\n * @param  {Element} element\n *         Element to add class name to.\n *\n * @param  {...string} classesToAdd\n *         One or more class name to add.\n *\n * @return {Element}\n *         The DOM element with the added class name.\n */\nfunction addClass(element, ...classesToAdd) {\n  element.classList.add(...classesToAdd.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\n  return element;\n}\n\n/**\n * Remove a class name from an element.\n *\n * @param  {Element} element\n *         Element to remove a class name from.\n *\n * @param  {...string} classesToRemove\n *         One or more class name to remove.\n *\n * @return {Element}\n *         The DOM element with class name removed.\n */\nfunction removeClass(element, ...classesToRemove) {\n  // Protect in case the player gets disposed\n  if (!element) {\n    log$1.warn(\"removeClass was called with an element that doesn't exist\");\n    return null;\n  }\n  element.classList.remove(...classesToRemove.reduce((prev, current) => prev.concat(current.split(/\\s+/)), []));\n  return element;\n}\n\n/**\n * The callback definition for toggleClass.\n *\n * @callback PredicateCallback\n * @param    {Element} element\n *           The DOM element of the Component.\n *\n * @param    {string} classToToggle\n *           The `className` that wants to be toggled\n *\n * @return   {boolean|undefined}\n *           If `true` is returned, the `classToToggle` will be added to the\n *           `element`, but not removed. If `false`, the `classToToggle` will be removed from\n *           the `element`, but not added. If `undefined`, the callback will be ignored.\n *\n */\n\n/**\n * Adds or removes a class name to/from an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @param  {Element} element\n *         The element to toggle a class name on.\n *\n * @param  {string} classToToggle\n *         The class that should be toggled.\n *\n * @param  {boolean|PredicateCallback} [predicate]\n *         See the return value for {@link module:dom~PredicateCallback}\n *\n * @return {Element}\n *         The element with a class that has been toggled.\n */\nfunction toggleClass(element, classToToggle, predicate) {\n  if (typeof predicate === 'function') {\n    predicate = predicate(element, classToToggle);\n  }\n  if (typeof predicate !== 'boolean') {\n    predicate = undefined;\n  }\n  classToToggle.split(/\\s+/).forEach(className => element.classList.toggle(className, predicate));\n  return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el\n *        Element to add attributes to.\n *\n * @param {Object} [attributes]\n *        Attributes to be applied.\n */\nfunction setAttributes(el, attributes) {\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\n    const attrValue = attributes[attrName];\n    if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n      el.removeAttribute(attrName);\n    } else {\n      el.setAttribute(attrName, attrValue === true ? '' : attrValue);\n    }\n  });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag.\n *\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute.\n *\n * @param  {Element} tag\n *         Element from which to get tag attributes.\n *\n * @return {Object}\n *         All attributes of the element. Boolean attributes will be `true` or\n *         `false`, others will be strings.\n */\nfunction getAttributes(tag) {\n  const obj = {};\n\n  // known boolean attributes\n  // we can check for matching boolean properties, but not all browsers\n  // and not all tags know about these attributes, so, we still want to check them manually\n  const knownBooleans = ['autoplay', 'controls', 'playsinline', 'loop', 'muted', 'default', 'defaultMuted'];\n  if (tag && tag.attributes && tag.attributes.length > 0) {\n    const attrs = tag.attributes;\n    for (let i = attrs.length - 1; i >= 0; i--) {\n      const attrName = attrs[i].name;\n      /** @type {boolean|string} */\n      let attrVal = attrs[i].value;\n\n      // check for known booleans\n      // the matching element property will return a value for typeof\n      if (knownBooleans.includes(attrName)) {\n        // the value of an included boolean attribute is typically an empty\n        // string ('') which would equal false if we just check for a false value.\n        // we also don't want support bad code like autoplay='false'\n        attrVal = attrVal !== null ? true : false;\n      }\n      obj[attrName] = attrVal;\n    }\n  }\n  return obj;\n}\n\n/**\n * Get the value of an element's attribute.\n *\n * @param {Element} el\n *        A DOM element.\n *\n * @param {string} attribute\n *        Attribute to get the value of.\n *\n * @return {string}\n *         The value of the attribute.\n */\nfunction getAttribute(el, attribute) {\n  return el.getAttribute(attribute);\n}\n\n/**\n * Set the value of an element's attribute.\n *\n * @param {Element} el\n *        A DOM element.\n *\n * @param {string} attribute\n *        Attribute to set.\n *\n * @param {string} value\n *        Value to set the attribute to.\n */\nfunction setAttribute(el, attribute, value) {\n  el.setAttribute(attribute, value);\n}\n\n/**\n * Remove an element's attribute.\n *\n * @param {Element} el\n *        A DOM element.\n *\n * @param {string} attribute\n *        Attribute to remove.\n */\nfunction removeAttribute(el, attribute) {\n  el.removeAttribute(attribute);\n}\n\n/**\n * Attempt to block the ability to select text.\n */\nfunction blockTextSelection() {\n  document$1.body.focus();\n  document$1.onselectstart = function () {\n    return false;\n  };\n}\n\n/**\n * Turn off text selection blocking.\n */\nfunction unblockTextSelection() {\n  document$1.onselectstart = function () {\n    return true;\n  };\n}\n\n/**\n * Identical to the native `getBoundingClientRect` function, but ensures that\n * the method is supported at all (it is in all browsers we claim to support)\n * and that the element is in the DOM before continuing.\n *\n * This wrapper function also shims properties which are not provided by some\n * older browsers (namely, IE8).\n *\n * Additionally, some browsers do not support adding properties to a\n * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\n * properties (except `x` and `y` which are not widely supported). This helps\n * avoid implementations where keys are non-enumerable.\n *\n * @param  {Element} el\n *         Element whose `ClientRect` we want to calculate.\n *\n * @return {Object|undefined}\n *         Always returns a plain object - or `undefined` if it cannot.\n */\nfunction getBoundingClientRect(el) {\n  if (el && el.getBoundingClientRect && el.parentNode) {\n    const rect = el.getBoundingClientRect();\n    const result = {};\n    ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(k => {\n      if (rect[k] !== undefined) {\n        result[k] = rect[k];\n      }\n    });\n    if (!result.height) {\n      result.height = parseFloat(computedStyle(el, 'height'));\n    }\n    if (!result.width) {\n      result.width = parseFloat(computedStyle(el, 'width'));\n    }\n    return result;\n  }\n}\n\n/**\n * Represents the position of a DOM element on the page.\n *\n * @typedef  {Object} module:dom~Position\n *\n * @property {number} left\n *           Pixels to the left.\n *\n * @property {number} top\n *           Pixels from the top.\n */\n\n/**\n * Get the position of an element in the DOM.\n *\n * Uses `getBoundingClientRect` technique from John Resig.\n *\n * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @param  {Element} el\n *         Element from which to get offset.\n *\n * @return {module:dom~Position}\n *         The position of the element that was passed in.\n */\nfunction findPosition(el) {\n  if (!el || el && !el.offsetParent) {\n    return {\n      left: 0,\n      top: 0,\n      width: 0,\n      height: 0\n    };\n  }\n  const width = el.offsetWidth;\n  const height = el.offsetHeight;\n  let left = 0;\n  let top = 0;\n  while (el.offsetParent && el !== document$1[FullscreenApi.fullscreenElement]) {\n    left += el.offsetLeft;\n    top += el.offsetTop;\n    el = el.offsetParent;\n  }\n  return {\n    left,\n    top,\n    width,\n    height\n  };\n}\n\n/**\n * Represents x and y coordinates for a DOM element or mouse pointer.\n *\n * @typedef  {Object} module:dom~Coordinates\n *\n * @property {number} x\n *           x coordinate in pixels\n *\n * @property {number} y\n *           y coordinate in pixels\n */\n\n/**\n * Get the pointer position within an element.\n *\n * The base on the coordinates are the bottom left of the element.\n *\n * @param  {Element} el\n *         Element on which to get the pointer position on.\n *\n * @param  {Event} event\n *         Event object.\n *\n * @return {module:dom~Coordinates}\n *         A coordinates object corresponding to the mouse position.\n *\n */\nfunction getPointerPosition(el, event) {\n  const translated = {\n    x: 0,\n    y: 0\n  };\n  if (IS_IOS) {\n    let item = el;\n    while (item && item.nodeName.toLowerCase() !== 'html') {\n      const transform = computedStyle(item, 'transform');\n      if (/^matrix/.test(transform)) {\n        const values = transform.slice(7, -1).split(/,\\s/).map(Number);\n        translated.x += values[4];\n        translated.y += values[5];\n      } else if (/^matrix3d/.test(transform)) {\n        const values = transform.slice(9, -1).split(/,\\s/).map(Number);\n        translated.x += values[12];\n        translated.y += values[13];\n      }\n      if (item.assignedSlot && item.assignedSlot.parentElement && window$1.WebKitCSSMatrix) {\n        const transformValue = window$1.getComputedStyle(item.assignedSlot.parentElement).transform;\n        const matrix = new window$1.WebKitCSSMatrix(transformValue);\n        translated.x += matrix.m41;\n        translated.y += matrix.m42;\n      }\n      item = item.parentNode || item.host;\n    }\n  }\n  const position = {};\n  const boxTarget = findPosition(event.target);\n  const box = findPosition(el);\n  const boxW = box.width;\n  const boxH = box.height;\n  let offsetY = event.offsetY - (box.top - boxTarget.top);\n  let offsetX = event.offsetX - (box.left - boxTarget.left);\n  if (event.changedTouches) {\n    offsetX = event.changedTouches[0].pageX - box.left;\n    offsetY = event.changedTouches[0].pageY + box.top;\n    if (IS_IOS) {\n      offsetX -= translated.x;\n      offsetY -= translated.y;\n    }\n  }\n  position.y = 1 - Math.max(0, Math.min(1, offsetY / boxH));\n  position.x = Math.max(0, Math.min(1, offsetX / boxW));\n  return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param  {*} value\n *         Check if this value is a text node.\n *\n * @return {boolean}\n *         Will be `true` if the value is a text node, `false` otherwise.\n */\nfunction isTextNode(value) {\n  return isObject(value) && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @param  {Element} el\n *         The element to empty children from\n *\n * @return {Element}\n *         The element with no children\n */\nfunction emptyEl(el) {\n  while (el.firstChild) {\n    el.removeChild(el.firstChild);\n  }\n  return el;\n}\n\n/**\n * This is a mixed value that describes content to be injected into the DOM\n * via some method. It can be of the following types:\n *\n * Type       | Description\n * -----------|-------------\n * `string`   | The value will be normalized into a text node.\n * `Element`  | The value will be accepted as-is.\n * `Text`     | A TextNode. The value will be accepted as-is.\n * `Array`    | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\n * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\n *\n * @typedef {string|Element|Text|Array|Function} ContentDescriptor\n */\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but helps protect\n * from falling into the trap of simply writing to `innerHTML`, which could\n * be an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * @param {ContentDescriptor} content\n *        A content descriptor value.\n *\n * @return {Array}\n *         All of the content that was passed in, normalized to an array of\n *         elements or text nodes.\n */\nfunction normalizeContent(content) {\n  // First, invoke content if it is a function. If it produces an array,\n  // that needs to happen before normalization.\n  if (typeof content === 'function') {\n    content = content();\n  }\n\n  // Next up, normalize to an array, so one or many items can be normalized,\n  // filtered, and returned.\n  return (Array.isArray(content) ? content : [content]).map(value => {\n    // First, invoke value if it is a function to produce a new value,\n    // which will be subsequently normalized to a Node of some kind.\n    if (typeof value === 'function') {\n      value = value();\n    }\n    if (isEl(value) || isTextNode(value)) {\n      return value;\n    }\n    if (typeof value === 'string' && /\\S/.test(value)) {\n      return document$1.createTextNode(value);\n    }\n  }).filter(value => value);\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @param  {Element} el\n *         Element to append normalized content to.\n *\n * @param {ContentDescriptor} content\n *        A content descriptor value.\n *\n * @return {Element}\n *         The element with appended normalized content.\n */\nfunction appendContent(el, content) {\n  normalizeContent(content).forEach(node => el.appendChild(node));\n  return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @param {Element} el\n *        Element to insert normalized content into.\n *\n * @param {ContentDescriptor} content\n *        A content descriptor value.\n *\n * @return {Element}\n *         The element with inserted normalized content.\n */\nfunction insertContent(el, content) {\n  return appendContent(emptyEl(el), content);\n}\n\n/**\n * Check if an event was a single left click.\n *\n * @param  {MouseEvent} event\n *         Event object.\n *\n * @return {boolean}\n *         Will be `true` if a single left click, `false` otherwise.\n */\nfunction isSingleLeftClick(event) {\n  // Note: if you create something draggable, be sure to\n  // call it on both `mousedown` and `mousemove` event,\n  // otherwise `mousedown` should be enough for a button\n\n  if (event.button === undefined && event.buttons === undefined) {\n    // Why do we need `buttons` ?\n    // Because, middle mouse sometimes have this:\n    // e.button === 0 and e.buttons === 4\n    // Furthermore, we want to prevent combination click, something like\n    // HOLD middlemouse then left click, that would be\n    // e.button === 0, e.buttons === 5\n    // just `button` is not gonna work\n\n    // Alright, then what this block does ?\n    // this is for chrome `simulate mobile devices`\n    // I want to support this as well\n\n    return true;\n  }\n  if (event.button === 0 && event.buttons === undefined) {\n    // Touch screen, sometimes on some specific device, `buttons`\n    // doesn't have anything (safari on ios, blackberry...)\n\n    return true;\n  }\n\n  // `mouseup` event on a single left click has\n  // `button` and `buttons` equal to 0\n  if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\n    return true;\n  }\n\n  // MacOS Sonoma trackpad when \"tap to click enabled\"\n  if (event.type === 'mousedown' && event.button === 0 && event.buttons === 0) {\n    return true;\n  }\n  if (event.button !== 0 || event.buttons !== 1) {\n    // This is the reason we have those if else block above\n    // if any special case we can catch and let it slide\n    // we do it above, when get to here, this definitely\n    // is-not-left-click\n\n    return false;\n  }\n  return true;\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param  {string} selector\n *         A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param  {Element|String} [context=document]\n *         A DOM element within which to query. Can also be a selector\n *         string in which case the first matching element will be used\n *         as context. If missing (or no element matches selector), falls\n *         back to `document`.\n *\n * @return {Element|null}\n *         The element that was found or null.\n */\nconst $ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @param  {string} selector\n *         A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param  {Element|String} [context=document]\n *         A DOM element within which to query. Can also be a selector\n *         string in which case the first matching element will be used\n *         as context. If missing (or no element matches selector), falls\n *         back to `document`.\n *\n * @return {NodeList}\n *         A element list of elements that were found. Will be empty if none\n *         were found.\n *\n */\nconst $$ = createQuerier('querySelectorAll');\n\n/**\n * A safe getComputedStyle.\n *\n * This is needed because in Firefox, if the player is loaded in an iframe with\n * `display:none`, then `getComputedStyle` returns `null`, so, we do a\n * null-check to make sure that the player doesn't break in these cases.\n *\n * @param    {Element} el\n *           The element you want the computed style of\n *\n * @param    {string} prop\n *           The property name you want\n *\n * @see      https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\nfunction computedStyle(el, prop) {\n  if (!el || !prop) {\n    return '';\n  }\n  if (typeof window$1.getComputedStyle === 'function') {\n    let computedStyleValue;\n    try {\n      computedStyleValue = window$1.getComputedStyle(el);\n    } catch (e) {\n      return '';\n    }\n    return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\n  }\n  return '';\n}\n\n/**\n * Copy document style sheets to another window.\n *\n * @param    {Window} win\n *           The window element you want to copy the document style sheets to.\n *\n */\nfunction copyStyleSheetsToWindow(win) {\n  [...document$1.styleSheets].forEach(styleSheet => {\n    try {\n      const cssRules = [...styleSheet.cssRules].map(rule => rule.cssText).join('');\n      const style = document$1.createElement('style');\n      style.textContent = cssRules;\n      win.document.head.appendChild(style);\n    } catch (e) {\n      const link = document$1.createElement('link');\n      link.rel = 'stylesheet';\n      link.type = styleSheet.type;\n      // For older Safari this has to be the string; on other browsers setting the MediaList works\n      link.media = styleSheet.media.mediaText;\n      link.href = styleSheet.href;\n      win.document.head.appendChild(link);\n    }\n  });\n}\n\nvar Dom = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  isReal: isReal,\n  isEl: isEl,\n  isInFrame: isInFrame,\n  createEl: createEl,\n  textContent: textContent,\n  prependTo: prependTo,\n  hasClass: hasClass,\n  addClass: addClass,\n  removeClass: removeClass,\n  toggleClass: toggleClass,\n  setAttributes: setAttributes,\n  getAttributes: getAttributes,\n  getAttribute: getAttribute,\n  setAttribute: setAttribute,\n  removeAttribute: removeAttribute,\n  blockTextSelection: blockTextSelection,\n  unblockTextSelection: unblockTextSelection,\n  getBoundingClientRect: getBoundingClientRect,\n  findPosition: findPosition,\n  getPointerPosition: getPointerPosition,\n  isTextNode: isTextNode,\n  emptyEl: emptyEl,\n  normalizeContent: normalizeContent,\n  appendContent: appendContent,\n  insertContent: insertContent,\n  isSingleLeftClick: isSingleLeftClick,\n  $: $,\n  $$: $$,\n  computedStyle: computedStyle,\n  copyStyleSheetsToWindow: copyStyleSheetsToWindow\n});\n\n/**\n * @file setup.js - Functions for setting up a player without\n * user interaction based on the data-setup `attribute` of the video tag.\n *\n * @module setup\n */\nlet _windowLoaded = false;\nlet videojs$1;\n\n/**\n * Set up any tags that have a data-setup `attribute` when the player is started.\n */\nconst autoSetup = function () {\n  if (videojs$1.options.autoSetup === false) {\n    return;\n  }\n  const vids = Array.prototype.slice.call(document$1.getElementsByTagName('video'));\n  const audios = Array.prototype.slice.call(document$1.getElementsByTagName('audio'));\n  const divs = Array.prototype.slice.call(document$1.getElementsByTagName('video-js'));\n  const mediaEls = vids.concat(audios, divs);\n\n  // Check if any media elements exist\n  if (mediaEls && mediaEls.length > 0) {\n    for (let i = 0, e = mediaEls.length; i < e; i++) {\n      const mediaEl = mediaEls[i];\n\n      // Check if element exists, has getAttribute func.\n      if (mediaEl && mediaEl.getAttribute) {\n        // Make sure this player hasn't already been set up.\n        if (mediaEl.player === undefined) {\n          const options = mediaEl.getAttribute('data-setup');\n\n          // Check if data-setup attr exists.\n          // We only auto-setup if they've added the data-setup attr.\n          if (options !== null) {\n            // Create new video.js instance.\n            videojs$1(mediaEl);\n          }\n        }\n\n        // If getAttribute isn't defined, we need to wait for the DOM.\n      } else {\n        autoSetupTimeout(1);\n        break;\n      }\n    }\n\n    // No videos were found, so keep looping unless page is finished loading.\n  } else if (!_windowLoaded) {\n    autoSetupTimeout(1);\n  }\n};\n\n/**\n * Wait until the page is loaded before running autoSetup. This will be called in\n * autoSetup if `hasLoaded` returns false.\n *\n * @param {number} wait\n *        How long to wait in ms\n *\n * @param {module:videojs} [vjs]\n *        The videojs library function\n */\nfunction autoSetupTimeout(wait, vjs) {\n  // Protect against breakage in non-browser environments\n  if (!isReal()) {\n    return;\n  }\n  if (vjs) {\n    videojs$1 = vjs;\n  }\n  window$1.setTimeout(autoSetup, wait);\n}\n\n/**\n * Used to set the internal tracking of window loaded state to true.\n *\n * @private\n */\nfunction setWindowLoaded() {\n  _windowLoaded = true;\n  window$1.removeEventListener('load', setWindowLoaded);\n}\nif (isReal()) {\n  if (document$1.readyState === 'complete') {\n    setWindowLoaded();\n  } else {\n    /**\n     * Listen for the load event on window, and set _windowLoaded to true.\n     *\n     * We use a standard event listener here to avoid incrementing the GUID\n     * before any players are created.\n     *\n     * @listens load\n     */\n    window$1.addEventListener('load', setWindowLoaded);\n  }\n}\n\n/**\n * @file stylesheet.js\n * @module stylesheet\n */\n\n/**\n * Create a DOM style element given a className for it.\n *\n * @param {string} className\n *        The className to add to the created style element.\n *\n * @return {Element}\n *         The element that was created.\n */\nconst createStyleElement = function (className) {\n  const style = document$1.createElement('style');\n  style.className = className;\n  return style;\n};\n\n/**\n * Add text to a DOM element.\n *\n * @param {Element} el\n *        The Element to add text content to.\n *\n * @param {string} content\n *        The text to add to the element.\n */\nconst setTextContent = function (el, content) {\n  if (el.styleSheet) {\n    el.styleSheet.cssText = content;\n  } else {\n    el.textContent = content;\n  }\n};\n\n/**\n * @file dom-data.js\n * @module dom-data\n */\n\n/**\n * Element Data Store.\n *\n * Allows for binding data to an element without putting it directly on the\n * element. Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nvar DomData = new WeakMap();\n\n/**\n * @file guid.js\n * @module guid\n */\n\n// Default value for GUIDs. This allows us to reset the GUID counter in tests.\n//\n// The initial GUID is 3 because some users have come to rely on the first\n// default player ID ending up as `vjs_video_3`.\n//\n// See: https://github.com/videojs/video.js/pull/6216\nconst _initialGuid = 3;\n\n/**\n * Unique ID for an element or function\n *\n * @type {Number}\n */\nlet _guid = _initialGuid;\n\n/**\n * Get a unique auto-incrementing ID by number that has not been returned before.\n *\n * @return {number}\n *         A new unique ID.\n */\nfunction newGUID() {\n  return _guid++;\n}\n\n/**\n * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n *\n * @file events.js\n * @module events\n */\n\n/**\n * Clean up the listener cache and dispatchers\n *\n * @param {Element|Object} elem\n *        Element to clean up\n *\n * @param {string} type\n *        Type of event to clean up\n */\nfunction _cleanUpEvents(elem, type) {\n  if (!DomData.has(elem)) {\n    return;\n  }\n  const data = DomData.get(elem);\n\n  // Remove the events of a particular type if there are none left\n  if (data.handlers[type].length === 0) {\n    delete data.handlers[type];\n    // data.handlers[type] = null;\n    // Setting to null was causing an error with data.handlers\n\n    // Remove the meta-handler from the element\n    if (elem.removeEventListener) {\n      elem.removeEventListener(type, data.dispatcher, false);\n    } else if (elem.detachEvent) {\n      elem.detachEvent('on' + type, data.dispatcher);\n    }\n  }\n\n  // Remove the events object if there are no types left\n  if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n    delete data.handlers;\n    delete data.dispatcher;\n    delete data.disabled;\n  }\n\n  // Finally remove the element data if there is no data left\n  if (Object.getOwnPropertyNames(data).length === 0) {\n    DomData.delete(elem);\n  }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn\n *        The event method we want to use.\n *\n * @param {Element|Object} elem\n *        Element or object to bind listeners to\n *\n * @param {string[]} types\n *        Type of event to bind to.\n *\n * @param {Function} callback\n *        Event listener.\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n  types.forEach(function (type) {\n    // Call the event method for each one of the types\n    fn(elem, type, callback);\n  });\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event\n *        Event object to fix.\n *\n * @return {Object}\n *         Fixed event object.\n */\nfunction fixEvent(event) {\n  if (event.fixed_) {\n    return event;\n  }\n  function returnTrue() {\n    return true;\n  }\n  function returnFalse() {\n    return false;\n  }\n\n  // Test if fixing up is needed\n  // Used to check if !event.stopPropagation instead of isPropagationStopped\n  // But native events return true for stopPropagation, but don't have\n  // other expected methods like isPropagationStopped. Seems to be a problem\n  // with the Javascript Ninja code. So we're just overriding all events now.\n  if (!event || !event.isPropagationStopped || !event.isImmediatePropagationStopped) {\n    const old = event || window$1.event;\n    event = {};\n    // Clone the old object so that we can modify the values event = {};\n    // IE8 Doesn't like when you mess with native event properties\n    // Firefox returns false for event.hasOwnProperty('type') and other props\n    //  which makes copying more difficult.\n\n    // TODO: Probably best to create an allowlist of event props\n    const deprecatedProps = ['layerX', 'layerY', 'keyLocation', 'path', 'webkitMovementX', 'webkitMovementY', 'mozPressure', 'mozInputSource'];\n    for (const key in old) {\n      // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n      // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n      // and webkitMovementX/Y\n      // Lighthouse complains if Event.path is copied\n      if (!deprecatedProps.includes(key)) {\n        // Chrome 32+ warns if you try to copy deprecated returnValue, but\n        // we still want to if preventDefault isn't supported (IE8).\n        if (!(key === 'returnValue' && old.preventDefault)) {\n          event[key] = old[key];\n        }\n      }\n    }\n\n    // The event occurred on this element\n    if (!event.target) {\n      event.target = event.srcElement || document$1;\n    }\n\n    // Handle which other element the event is related to\n    if (!event.relatedTarget) {\n      event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\n    }\n\n    // Stop the default browser action\n    event.preventDefault = function () {\n      if (old.preventDefault) {\n        old.preventDefault();\n      }\n      event.returnValue = false;\n      old.returnValue = false;\n      event.defaultPrevented = true;\n    };\n    event.defaultPrevented = false;\n\n    // Stop the event from bubbling\n    event.stopPropagation = function () {\n      if (old.stopPropagation) {\n        old.stopPropagation();\n      }\n      event.cancelBubble = true;\n      old.cancelBubble = true;\n      event.isPropagationStopped = returnTrue;\n    };\n    event.isPropagationStopped = returnFalse;\n\n    // Stop the event from bubbling and executing other handlers\n    event.stopImmediatePropagation = function () {\n      if (old.stopImmediatePropagation) {\n        old.stopImmediatePropagation();\n      }\n      event.isImmediatePropagationStopped = returnTrue;\n      event.stopPropagation();\n    };\n    event.isImmediatePropagationStopped = returnFalse;\n\n    // Handle mouse position\n    if (event.clientX !== null && event.clientX !== undefined) {\n      const doc = document$1.documentElement;\n      const body = document$1.body;\n      event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n      event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n    }\n\n    // Handle key presses\n    event.which = event.charCode || event.keyCode;\n\n    // Fix button for mouse clicks:\n    // 0 == left; 1 == middle; 2 == right\n    if (event.button !== null && event.button !== undefined) {\n      // The following is disabled because it does not pass videojs-standard\n      // and... yikes.\n      /* eslint-disable */\n      event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\n      /* eslint-enable */\n    }\n  }\n  event.fixed_ = true;\n  // Returns fixed-up instance\n  return event;\n}\n\n/**\n * Whether passive event listeners are supported\n */\nlet _supportsPassive;\nconst supportsPassive = function () {\n  if (typeof _supportsPassive !== 'boolean') {\n    _supportsPassive = false;\n    try {\n      const opts = Object.defineProperty({}, 'passive', {\n        get() {\n          _supportsPassive = true;\n        }\n      });\n      window$1.addEventListener('test', null, opts);\n      window$1.removeEventListener('test', null, opts);\n    } catch (e) {\n      // disregard\n    }\n  }\n  return _supportsPassive;\n};\n\n/**\n * Touch events Chrome expects to be passive\n */\nconst passiveEvents = ['touchstart', 'touchmove'];\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem\n *        Element or object to bind listeners to\n *\n * @param {string|string[]} type\n *        Type of event to bind to.\n *\n * @param {Function} fn\n *        Event listener.\n */\nfunction on(elem, type, fn) {\n  if (Array.isArray(type)) {\n    return _handleMultipleEvents(on, elem, type, fn);\n  }\n  if (!DomData.has(elem)) {\n    DomData.set(elem, {});\n  }\n  const data = DomData.get(elem);\n\n  // We need a place to store all our handler data\n  if (!data.handlers) {\n    data.handlers = {};\n  }\n  if (!data.handlers[type]) {\n    data.handlers[type] = [];\n  }\n  if (!fn.guid) {\n    fn.guid = newGUID();\n  }\n  data.handlers[type].push(fn);\n  if (!data.dispatcher) {\n    data.disabled = false;\n    data.dispatcher = function (event, hash) {\n      if (data.disabled) {\n        return;\n      }\n      event = fixEvent(event);\n      const handlers = data.handlers[event.type];\n      if (handlers) {\n        // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n        const handlersCopy = handlers.slice(0);\n        for (let m = 0, n = handlersCopy.length; m < n; m++) {\n          if (event.isImmediatePropagationStopped()) {\n            break;\n          } else {\n            try {\n              handlersCopy[m].call(elem, event, hash);\n            } catch (e) {\n              log$1.error(e);\n            }\n          }\n        }\n      }\n    };\n  }\n  if (data.handlers[type].length === 1) {\n    if (elem.addEventListener) {\n      let options = false;\n      if (supportsPassive() && passiveEvents.indexOf(type) > -1) {\n        options = {\n          passive: true\n        };\n      }\n      elem.addEventListener(type, data.dispatcher, options);\n    } else if (elem.attachEvent) {\n      elem.attachEvent('on' + type, data.dispatcher);\n    }\n  }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem\n *        Object to remove listeners from.\n *\n * @param {string|string[]} [type]\n *        Type of listener to remove. Don't include to remove all events from element.\n *\n * @param {Function} [fn]\n *        Specific listener to remove. Don't include to remove listeners for an event\n *        type.\n */\nfunction off(elem, type, fn) {\n  // Don't want to add a cache object through getElData if not needed\n  if (!DomData.has(elem)) {\n    return;\n  }\n  const data = DomData.get(elem);\n\n  // If no events exist, nothing to unbind\n  if (!data.handlers) {\n    return;\n  }\n  if (Array.isArray(type)) {\n    return _handleMultipleEvents(off, elem, type, fn);\n  }\n\n  // Utility function\n  const removeType = function (el, t) {\n    data.handlers[t] = [];\n    _cleanUpEvents(el, t);\n  };\n\n  // Are we removing all bound events?\n  if (type === undefined) {\n    for (const t in data.handlers) {\n      if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\n        removeType(elem, t);\n      }\n    }\n    return;\n  }\n  const handlers = data.handlers[type];\n\n  // If no handlers exist, nothing to unbind\n  if (!handlers) {\n    return;\n  }\n\n  // If no listener was provided, remove all listeners for type\n  if (!fn) {\n    removeType(elem, type);\n    return;\n  }\n\n  // We're only removing a single handler\n  if (fn.guid) {\n    for (let n = 0; n < handlers.length; n++) {\n      if (handlers[n].guid === fn.guid) {\n        handlers.splice(n--, 1);\n      }\n    }\n  }\n  _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem\n *        Element to trigger an event on\n *\n * @param {EventTarget~Event|string} event\n *        A string (the type) or an event object with a type attribute\n *\n * @param {Object} [hash]\n *        data hash to pass along with the event\n *\n * @return {boolean|undefined}\n *         Returns the opposite of `defaultPrevented` if default was\n *         prevented. Otherwise, returns `undefined`\n */\nfunction trigger(elem, event, hash) {\n  // Fetches element data and a reference to the parent (for bubbling).\n  // Don't want to add a data object to cache for every parent,\n  // so checking hasElData first.\n  const elemData = DomData.has(elem) ? DomData.get(elem) : {};\n  const parent = elem.parentNode || elem.ownerDocument;\n  // type = event.type || event,\n  // handler;\n\n  // If an event name was passed as a string, creates an event out of it\n  if (typeof event === 'string') {\n    event = {\n      type: event,\n      target: elem\n    };\n  } else if (!event.target) {\n    event.target = elem;\n  }\n\n  // Normalizes the event properties.\n  event = fixEvent(event);\n\n  // If the passed element has a dispatcher, executes the established handlers.\n  if (elemData.dispatcher) {\n    elemData.dispatcher.call(elem, event, hash);\n  }\n\n  // Unless explicitly stopped or the event does not bubble (e.g. media events)\n  // recursively calls this function to bubble the event up the DOM.\n  if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n    trigger.call(null, parent, event, hash);\n\n    // If at the top of the DOM, triggers the default action unless disabled.\n  } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\n    if (!DomData.has(event.target)) {\n      DomData.set(event.target, {});\n    }\n    const targetData = DomData.get(event.target);\n\n    // Checks if the target has a default action for this event.\n    if (event.target[event.type]) {\n      // Temporarily disables event dispatching on the target as we have already executed the handler.\n      targetData.disabled = true;\n      // Executes the default action.\n      if (typeof event.target[event.type] === 'function') {\n        event.target[event.type]();\n      }\n      // Re-enables event dispatching.\n      targetData.disabled = false;\n    }\n  }\n\n  // Inform the triggerer if the default was prevented by returning false\n  return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event.\n *\n * @param {Element|Object} elem\n *        Element or object to bind to.\n *\n * @param {string|string[]} type\n *        Name/type of event\n *\n * @param {Event~EventListener} fn\n *        Event listener function\n */\nfunction one(elem, type, fn) {\n  if (Array.isArray(type)) {\n    return _handleMultipleEvents(one, elem, type, fn);\n  }\n  const func = function () {\n    off(elem, type, func);\n    fn.apply(this, arguments);\n  };\n\n  // copy the guid to the new function so it can removed using the original function's ID\n  func.guid = fn.guid = fn.guid || newGUID();\n  on(elem, type, func);\n}\n\n/**\n * Trigger a listener only once and then turn if off for all\n * configured events\n *\n * @param {Element|Object} elem\n *        Element or object to bind to.\n *\n * @param {string|string[]} type\n *        Name/type of event\n *\n * @param {Event~EventListener} fn\n *        Event listener function\n */\nfunction any(elem, type, fn) {\n  const func = function () {\n    off(elem, type, func);\n    fn.apply(this, arguments);\n  };\n\n  // copy the guid to the new function so it can removed using the original function's ID\n  func.guid = fn.guid = fn.guid || newGUID();\n\n  // multiple ons, but one off for everything\n  on(elem, type, func);\n}\n\nvar Events = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  fixEvent: fixEvent,\n  on: on,\n  off: off,\n  trigger: trigger,\n  one: one,\n  any: any\n});\n\n/**\n * @file fn.js\n * @module fn\n */\nconst UPDATE_REFRESH_INTERVAL = 30;\n\n/**\n * A private, internal-only function for changing the context of a function.\n *\n * It also stores a unique id on the function so it can be easily removed from\n * events.\n *\n * @private\n * @function\n * @param    {*} context\n *           The object to bind as scope.\n *\n * @param    {Function} fn\n *           The function to be bound to a scope.\n *\n * @param    {number} [uid]\n *           An optional unique ID for the function to be set\n *\n * @return   {Function}\n *           The new function that will be bound into the context given\n */\nconst bind_ = function (context, fn, uid) {\n  // Make sure the function has a unique ID\n  if (!fn.guid) {\n    fn.guid = newGUID();\n  }\n\n  // Create the new function that changes the context\n  const bound = fn.bind(context);\n\n  // Allow for the ability to individualize this function\n  // Needed in the case where multiple objects might share the same prototype\n  // IF both items add an event listener with the same function, then you try to remove just one\n  // it will remove both because they both have the same guid.\n  // when using this, you need to use the bind method when you remove the listener as well.\n  // currently used in text tracks\n  bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\n  return bound;\n};\n\n/**\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\n * at most once per every `wait` milliseconds.\n *\n * @function\n * @param    {Function} fn\n *           The function to be throttled.\n *\n * @param    {number}   wait\n *           The number of milliseconds by which to throttle.\n *\n * @return   {Function}\n */\nconst throttle = function (fn, wait) {\n  let last = window$1.performance.now();\n  const throttled = function (...args) {\n    const now = window$1.performance.now();\n    if (now - last >= wait) {\n      fn(...args);\n      last = now;\n    }\n  };\n  return throttled;\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked.\n *\n * Inspired by lodash and underscore implementations.\n *\n * @function\n * @param    {Function} func\n *           The function to wrap with debounce behavior.\n *\n * @param    {number} wait\n *           The number of milliseconds to wait after the last invocation.\n *\n * @param    {boolean} [immediate]\n *           Whether or not to invoke the function immediately upon creation.\n *\n * @param    {Object} [context=window]\n *           The \"context\" in which the debounced function should debounce. For\n *           example, if this function should be tied to a Video.js player,\n *           the player can be passed here. Alternatively, defaults to the\n *           global `window` object.\n *\n * @return   {Function}\n *           A debounced function.\n */\nconst debounce$1 = function (func, wait, immediate, context = window$1) {\n  let timeout;\n  const cancel = () => {\n    context.clearTimeout(timeout);\n    timeout = null;\n  };\n\n  /* eslint-disable consistent-this */\n  const debounced = function () {\n    const self = this;\n    const args = arguments;\n    let later = function () {\n      timeout = null;\n      later = null;\n      if (!immediate) {\n        func.apply(self, args);\n      }\n    };\n    if (!timeout && immediate) {\n      func.apply(self, args);\n    }\n    context.clearTimeout(timeout);\n    timeout = context.setTimeout(later, wait);\n  };\n  /* eslint-enable consistent-this */\n\n  debounced.cancel = cancel;\n  return debounced;\n};\n\nvar Fn = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  UPDATE_REFRESH_INTERVAL: UPDATE_REFRESH_INTERVAL,\n  bind_: bind_,\n  throttle: throttle,\n  debounce: debounce$1\n});\n\n/**\n * @file src/js/event-target.js\n */\nlet EVENT_MAP;\n\n/**\n * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\n * adds shorthand functions that wrap around lengthy functions. For example:\n * the `on` function is a wrapper around `addEventListener`.\n *\n * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\n * @class EventTarget\n */\nclass EventTarget$2 {\n  /**\n   * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n   * function that will get called when an event with a certain name gets triggered.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to call with `EventTarget`s\n   */\n  on(type, fn) {\n    // Remove the addEventListener alias before calling Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\n    on(this, type, fn);\n    this.addEventListener = ael;\n  }\n  /**\n   * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n   * This makes it so that the `event listener` will no longer get called when the\n   * named event happens.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to remove.\n   */\n  off(type, fn) {\n    off(this, type, fn);\n  }\n  /**\n   * This function will add an `event listener` that gets triggered only once. After the\n   * first trigger it will get removed. This is like adding an `event listener`\n   * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to be called once for each event name.\n   */\n  one(type, fn) {\n    // Remove the addEventListener aliasing Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\n    one(this, type, fn);\n    this.addEventListener = ael;\n  }\n  /**\n   * This function will add an `event listener` that gets triggered only once and is\n   * removed from all events. This is like adding an array of `event listener`s\n   * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the\n   * first time it is triggered.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to be called once for each event name.\n   */\n  any(type, fn) {\n    // Remove the addEventListener aliasing Events.on\n    // so we don't get into an infinite type loop\n    const ael = this.addEventListener;\n    this.addEventListener = () => {};\n    any(this, type, fn);\n    this.addEventListener = ael;\n  }\n  /**\n   * This function causes an event to happen. This will then cause any `event listeners`\n   * that are waiting for that event, to get called. If there are no `event listeners`\n   * for an event then nothing will happen.\n   *\n   * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n   * Trigger will also call the `on` + `uppercaseEventName` function.\n   *\n   * Example:\n   * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n   * `onClick` if it exists.\n   *\n   * @param {string|EventTarget~Event|Object} event\n   *        The name of the event, an `Event`, or an object with a key of type set to\n   *        an event name.\n   */\n  trigger(event) {\n    const type = event.type || event;\n\n    // deprecation\n    // In a future version we should default target to `this`\n    // similar to how we default the target to `elem` in\n    // `Events.trigger`. Right now the default `target` will be\n    // `document` due to the `Event.fixEvent` call.\n    if (typeof event === 'string') {\n      event = {\n        type\n      };\n    }\n    event = fixEvent(event);\n    if (this.allowedEvents_[type] && this['on' + type]) {\n      this['on' + type](event);\n    }\n    trigger(this, event);\n  }\n  queueTrigger(event) {\n    // only set up EVENT_MAP if it'll be used\n    if (!EVENT_MAP) {\n      EVENT_MAP = new Map();\n    }\n    const type = event.type || event;\n    let map = EVENT_MAP.get(this);\n    if (!map) {\n      map = new Map();\n      EVENT_MAP.set(this, map);\n    }\n    const oldTimeout = map.get(type);\n    map.delete(type);\n    window$1.clearTimeout(oldTimeout);\n    const timeout = window$1.setTimeout(() => {\n      map.delete(type);\n      // if we cleared out all timeouts for the current target, delete its map\n      if (map.size === 0) {\n        map = null;\n        EVENT_MAP.delete(this);\n      }\n      this.trigger(event);\n    }, 0);\n    map.set(type, timeout);\n  }\n}\n\n/**\n * A Custom DOM event.\n *\n * @typedef {CustomEvent} Event\n * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\n */\n\n/**\n * All event listeners should follow the following format.\n *\n * @callback EventListener\n * @this {EventTarget}\n *\n * @param {Event} event\n *        the event that triggered this function\n *\n * @param {Object} [hash]\n *        hash of data sent during the event\n */\n\n/**\n * An object containing event names as keys and booleans as values.\n *\n * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\n *         will have extra functionality. See that function for more information.\n *\n * @property EventTarget.prototype.allowedEvents_\n * @protected\n */\nEventTarget$2.prototype.allowedEvents_ = {};\n\n/**\n * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#on}\n */\nEventTarget$2.prototype.addEventListener = EventTarget$2.prototype.on;\n\n/**\n * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#off}\n */\nEventTarget$2.prototype.removeEventListener = EventTarget$2.prototype.off;\n\n/**\n * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\n * the standard DOM API.\n *\n * @function\n * @see {@link EventTarget#trigger}\n */\nEventTarget$2.prototype.dispatchEvent = EventTarget$2.prototype.trigger;\n\n/**\n * @file mixins/evented.js\n * @module evented\n */\nconst objName = obj => {\n  if (typeof obj.name === 'function') {\n    return obj.name();\n  }\n  if (typeof obj.name === 'string') {\n    return obj.name;\n  }\n  if (obj.name_) {\n    return obj.name_;\n  }\n  if (obj.constructor && obj.constructor.name) {\n    return obj.constructor.name;\n  }\n  return typeof obj;\n};\n\n/**\n * Returns whether or not an object has had the evented mixin applied.\n *\n * @param  {Object} object\n *         An object to test.\n *\n * @return {boolean}\n *         Whether or not the object appears to be evented.\n */\nconst isEvented = object => object instanceof EventTarget$2 || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(k => typeof object[k] === 'function');\n\n/**\n * Adds a callback to run after the evented mixin applied.\n *\n * @param  {Object} target\n *         An object to Add\n * @param  {Function} callback\n *         The callback to run.\n */\nconst addEventedCallback = (target, callback) => {\n  if (isEvented(target)) {\n    callback();\n  } else {\n    if (!target.eventedCallbacks) {\n      target.eventedCallbacks = [];\n    }\n    target.eventedCallbacks.push(callback);\n  }\n};\n\n/**\n * Whether a value is a valid event type - non-empty string or array.\n *\n * @private\n * @param  {string|Array} type\n *         The type value to test.\n *\n * @return {boolean}\n *         Whether or not the type is a valid event type.\n */\nconst isValidEventType = type =>\n// The regex here verifies that the `type` contains at least one non-\n// whitespace character.\ntypeof type === 'string' && /\\S/.test(type) || Array.isArray(type) && !!type.length;\n\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n *         If the target does not appear to be a valid event target.\n *\n * @param  {Object} target\n *         The object to test.\n *\n * @param  {Object} obj\n *         The evented object we are validating for\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n */\nconst validateTarget = (target, obj, fnName) => {\n  if (!target || !target.nodeName && !isEvented(target)) {\n    throw new Error(`Invalid target for ${objName(obj)}#${fnName}; must be a DOM node or evented object.`);\n  }\n};\n\n/**\n * Validates a value to determine if it is a valid event target. Throws if not.\n *\n * @private\n * @throws {Error}\n *         If the type does not appear to be a valid event type.\n *\n * @param  {string|Array} type\n *         The type to test.\n *\n * @param  {Object} obj\n*         The evented object we are validating for\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n */\nconst validateEventType = (type, obj, fnName) => {\n  if (!isValidEventType(type)) {\n    throw new Error(`Invalid event type for ${objName(obj)}#${fnName}; must be a non-empty string or array.`);\n  }\n};\n\n/**\n * Validates a value to determine if it is a valid listener. Throws if not.\n *\n * @private\n * @throws {Error}\n *         If the listener is not a function.\n *\n * @param  {Function} listener\n *         The listener to test.\n *\n * @param  {Object} obj\n *         The evented object we are validating for\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n */\nconst validateListener = (listener, obj, fnName) => {\n  if (typeof listener !== 'function') {\n    throw new Error(`Invalid listener for ${objName(obj)}#${fnName}; must be a function.`);\n  }\n};\n\n/**\n * Takes an array of arguments given to `on()` or `one()`, validates them, and\n * normalizes them into an object.\n *\n * @private\n * @param  {Object} self\n *         The evented object on which `on()` or `one()` was called. This\n *         object will be bound as the `this` value for the listener.\n *\n * @param  {Array} args\n *         An array of arguments passed to `on()` or `one()`.\n *\n * @param  {string} fnName\n *         The name of the evented mixin function that called this.\n *\n * @return {Object}\n *         An object containing useful values for `on()` or `one()` calls.\n */\nconst normalizeListenArgs = (self, args, fnName) => {\n  // If the number of arguments is less than 3, the target is always the\n  // evented object itself.\n  const isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\n  let target;\n  let type;\n  let listener;\n  if (isTargetingSelf) {\n    target = self.eventBusEl_;\n\n    // Deal with cases where we got 3 arguments, but we are still listening to\n    // the evented object itself.\n    if (args.length >= 3) {\n      args.shift();\n    }\n    [type, listener] = args;\n  } else {\n    // This was `[target, type, listener] = args;` but this block needs more than\n    // one statement to produce minified output compatible with Chrome 53.\n    // See https://github.com/videojs/video.js/pull/8810\n    target = args[0];\n    type = args[1];\n    listener = args[2];\n  }\n  validateTarget(target, self, fnName);\n  validateEventType(type, self, fnName);\n  validateListener(listener, self, fnName);\n  listener = bind_(self, listener);\n  return {\n    isTargetingSelf,\n    target,\n    type,\n    listener\n  };\n};\n\n/**\n * Adds the listener to the event type(s) on the target, normalizing for\n * the type of target.\n *\n * @private\n * @param  {Element|Object} target\n *         A DOM node or evented object.\n *\n * @param  {string} method\n *         The event binding method to use (\"on\" or \"one\").\n *\n * @param  {string|Array} type\n *         One or more event type(s).\n *\n * @param  {Function} listener\n *         A listener function.\n */\nconst listen = (target, method, type, listener) => {\n  validateTarget(target, target, method);\n  if (target.nodeName) {\n    Events[method](target, type, listener);\n  } else {\n    target[method](type, listener);\n  }\n};\n\n/**\n * Contains methods that provide event capabilities to an object which is passed\n * to {@link module:evented|evented}.\n *\n * @mixin EventedMixin\n */\nconst EventedMixin = {\n  /**\n   * Add a listener to an event (or events) on this object or another evented\n   * object.\n   *\n   * @param  {string|Array|Element|Object} targetOrType\n   *         If this is a string or array, it represents the event type(s)\n   *         that will trigger the listener.\n   *\n   *         Another evented object can be passed here instead, which will\n   *         cause the listener to listen for events on _that_ object.\n   *\n   *         In either case, the listener's `this` value will be bound to\n   *         this object.\n   *\n   * @param  {string|Array|Function} typeOrListener\n   *         If the first argument was a string or array, this should be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function.\n   */\n  on(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'on');\n    listen(target, 'on', type, listener);\n\n    // If this object is listening to another evented object.\n    if (!isTargetingSelf) {\n      // If this object is disposed, remove the listener.\n      const removeListenerOnDispose = () => this.off(target, type, listener);\n\n      // Use the same function ID as the listener so we can remove it later it\n      // using the ID of the original listener.\n      removeListenerOnDispose.guid = listener.guid;\n\n      // Add a listener to the target's dispose event as well. This ensures\n      // that if the target is disposed BEFORE this object, we remove the\n      // removal listener that was just added. Otherwise, we create a memory leak.\n      const removeRemoverOnTargetDispose = () => this.off('dispose', removeListenerOnDispose);\n\n      // Use the same function ID as the listener so we can remove it later\n      // it using the ID of the original listener.\n      removeRemoverOnTargetDispose.guid = listener.guid;\n      listen(this, 'on', 'dispose', removeListenerOnDispose);\n      listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\n    }\n  },\n  /**\n   * Add a listener to an event (or events) on this object or another evented\n   * object. The listener will be called once per event and then removed.\n   *\n   * @param  {string|Array|Element|Object} targetOrType\n   *         If this is a string or array, it represents the event type(s)\n   *         that will trigger the listener.\n   *\n   *         Another evented object can be passed here instead, which will\n   *         cause the listener to listen for events on _that_ object.\n   *\n   *         In either case, the listener's `this` value will be bound to\n   *         this object.\n   *\n   * @param  {string|Array|Function} typeOrListener\n   *         If the first argument was a string or array, this should be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function.\n   */\n  one(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'one');\n\n    // Targeting this evented object.\n    if (isTargetingSelf) {\n      listen(target, 'one', type, listener);\n\n      // Targeting another evented object.\n    } else {\n      // TODO: This wrapper is incorrect! It should only\n      //       remove the wrapper for the event type that called it.\n      //       Instead all listeners are removed on the first trigger!\n      //       see https://github.com/videojs/video.js/issues/5962\n      const wrapper = (...largs) => {\n        this.off(target, type, wrapper);\n        listener.apply(null, largs);\n      };\n\n      // Use the same function ID as the listener so we can remove it later\n      // it using the ID of the original listener.\n      wrapper.guid = listener.guid;\n      listen(target, 'one', type, wrapper);\n    }\n  },\n  /**\n   * Add a listener to an event (or events) on this object or another evented\n   * object. The listener will only be called once for the first event that is triggered\n   * then removed.\n   *\n   * @param  {string|Array|Element|Object} targetOrType\n   *         If this is a string or array, it represents the event type(s)\n   *         that will trigger the listener.\n   *\n   *         Another evented object can be passed here instead, which will\n   *         cause the listener to listen for events on _that_ object.\n   *\n   *         In either case, the listener's `this` value will be bound to\n   *         this object.\n   *\n   * @param  {string|Array|Function} typeOrListener\n   *         If the first argument was a string or array, this should be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function.\n   */\n  any(...args) {\n    const {\n      isTargetingSelf,\n      target,\n      type,\n      listener\n    } = normalizeListenArgs(this, args, 'any');\n\n    // Targeting this evented object.\n    if (isTargetingSelf) {\n      listen(target, 'any', type, listener);\n\n      // Targeting another evented object.\n    } else {\n      const wrapper = (...largs) => {\n        this.off(target, type, wrapper);\n        listener.apply(null, largs);\n      };\n\n      // Use the same function ID as the listener so we can remove it later\n      // it using the ID of the original listener.\n      wrapper.guid = listener.guid;\n      listen(target, 'any', type, wrapper);\n    }\n  },\n  /**\n   * Removes listener(s) from event(s) on an evented object.\n   *\n   * @param  {string|Array|Element|Object} [targetOrType]\n   *         If this is a string or array, it represents the event type(s).\n   *\n   *         Another evented object can be passed here instead, in which case\n   *         ALL 3 arguments are _required_.\n   *\n   * @param  {string|Array|Function} [typeOrListener]\n   *         If the first argument was a string or array, this may be the\n   *         listener function. Otherwise, this is a string or array of event\n   *         type(s).\n   *\n   * @param  {Function} [listener]\n   *         If the first argument was another evented object, this will be\n   *         the listener function; otherwise, _all_ listeners bound to the\n   *         event type(s) will be removed.\n   */\n  off(targetOrType, typeOrListener, listener) {\n    // Targeting this evented object.\n    if (!targetOrType || isValidEventType(targetOrType)) {\n      off(this.eventBusEl_, targetOrType, typeOrListener);\n\n      // Targeting another evented object.\n    } else {\n      const target = targetOrType;\n      const type = typeOrListener;\n\n      // Fail fast and in a meaningful way!\n      validateTarget(target, this, 'off');\n      validateEventType(type, this, 'off');\n      validateListener(listener, this, 'off');\n\n      // Ensure there's at least a guid, even if the function hasn't been used\n      listener = bind_(this, listener);\n\n      // Remove the dispose listener on this evented object, which was given\n      // the same guid as the event listener in on().\n      this.off('dispose', listener);\n      if (target.nodeName) {\n        off(target, type, listener);\n        off(target, 'dispose', listener);\n      } else if (isEvented(target)) {\n        target.off(type, listener);\n        target.off('dispose', listener);\n      }\n    }\n  },\n  /**\n   * Fire an event on this evented object, causing its listeners to be called.\n   *\n   * @param   {string|Object} event\n   *          An event type or an object with a type property.\n   *\n   * @param   {Object} [hash]\n   *          An additional object to pass along to listeners.\n   *\n   * @return {boolean}\n   *          Whether or not the default behavior was prevented.\n   */\n  trigger(event, hash) {\n    validateTarget(this.eventBusEl_, this, 'trigger');\n    const type = event && typeof event !== 'string' ? event.type : event;\n    if (!isValidEventType(type)) {\n      throw new Error(`Invalid event type for ${objName(this)}#trigger; ` + 'must be a non-empty string or object with a type key that has a non-empty value.');\n    }\n    return trigger(this.eventBusEl_, event, hash);\n  }\n};\n\n/**\n * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\n *\n * @param  {Object} target\n *         The object to which to add event methods.\n *\n * @param  {Object} [options={}]\n *         Options for customizing the mixin behavior.\n *\n * @param  {string} [options.eventBusKey]\n *         By default, adds a `eventBusEl_` DOM element to the target object,\n *         which is used as an event bus. If the target object already has a\n *         DOM element that should be used, pass its key here.\n *\n * @return {Object}\n *         The target object.\n */\nfunction evented(target, options = {}) {\n  const {\n    eventBusKey\n  } = options;\n\n  // Set or create the eventBusEl_.\n  if (eventBusKey) {\n    if (!target[eventBusKey].nodeName) {\n      throw new Error(`The eventBusKey \"${eventBusKey}\" does not refer to an element.`);\n    }\n    target.eventBusEl_ = target[eventBusKey];\n  } else {\n    target.eventBusEl_ = createEl('span', {\n      className: 'vjs-event-bus'\n    });\n  }\n  Object.assign(target, EventedMixin);\n  if (target.eventedCallbacks) {\n    target.eventedCallbacks.forEach(callback => {\n      callback();\n    });\n  }\n\n  // When any evented object is disposed, it removes all its listeners.\n  target.on('dispose', () => {\n    target.off();\n    [target, target.el_, target.eventBusEl_].forEach(function (val) {\n      if (val && DomData.has(val)) {\n        DomData.delete(val);\n      }\n    });\n    window$1.setTimeout(() => {\n      target.eventBusEl_ = null;\n    }, 0);\n  });\n  return target;\n}\n\n/**\n * @file mixins/stateful.js\n * @module stateful\n */\n\n/**\n * Contains methods that provide statefulness to an object which is passed\n * to {@link module:stateful}.\n *\n * @mixin StatefulMixin\n */\nconst StatefulMixin = {\n  /**\n   * A hash containing arbitrary keys and values representing the state of\n   * the object.\n   *\n   * @type {Object}\n   */\n  state: {},\n  /**\n   * Set the state of an object by mutating its\n   * {@link module:stateful~StatefulMixin.state|state} object in place.\n   *\n   * @fires   module:stateful~StatefulMixin#statechanged\n   * @param   {Object|Function} stateUpdates\n   *          A new set of properties to shallow-merge into the plugin state.\n   *          Can be a plain object or a function returning a plain object.\n   *\n   * @return {Object|undefined}\n   *          An object containing changes that occurred. If no changes\n   *          occurred, returns `undefined`.\n   */\n  setState(stateUpdates) {\n    // Support providing the `stateUpdates` state as a function.\n    if (typeof stateUpdates === 'function') {\n      stateUpdates = stateUpdates();\n    }\n    let changes;\n    each(stateUpdates, (value, key) => {\n      // Record the change if the value is different from what's in the\n      // current state.\n      if (this.state[key] !== value) {\n        changes = changes || {};\n        changes[key] = {\n          from: this.state[key],\n          to: value\n        };\n      }\n      this.state[key] = value;\n    });\n\n    // Only trigger \"statechange\" if there were changes AND we have a trigger\n    // function. This allows us to not require that the target object be an\n    // evented object.\n    if (changes && isEvented(this)) {\n      /**\n       * An event triggered on an object that is both\n       * {@link module:stateful|stateful} and {@link module:evented|evented}\n       * indicating that its state has changed.\n       *\n       * @event    module:stateful~StatefulMixin#statechanged\n       * @type     {Object}\n       * @property {Object} changes\n       *           A hash containing the properties that were changed and\n       *           the values they were changed `from` and `to`.\n       */\n      this.trigger({\n        changes,\n        type: 'statechanged'\n      });\n    }\n    return changes;\n  }\n};\n\n/**\n * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\n * object.\n *\n * If the target object is {@link module:evented|evented} and has a\n * `handleStateChanged` method, that method will be automatically bound to the\n * `statechanged` event on itself.\n *\n * @param   {Object} target\n *          The object to be made stateful.\n *\n * @param   {Object} [defaultState]\n *          A default set of properties to populate the newly-stateful object's\n *          `state` property.\n *\n * @return {Object}\n *          Returns the `target`.\n */\nfunction stateful(target, defaultState) {\n  Object.assign(target, StatefulMixin);\n\n  // This happens after the mixing-in because we need to replace the `state`\n  // added in that step.\n  target.state = Object.assign({}, target.state, defaultState);\n\n  // Auto-bind the `handleStateChanged` method of the target object if it exists.\n  if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\n    target.on('statechanged', target.handleStateChanged);\n  }\n  return target;\n}\n\n/**\n * @file str.js\n * @module to-lower-case\n */\n\n/**\n * Lowercase the first letter of a string.\n *\n * @param {string} string\n *        String to be lowercased\n *\n * @return {string}\n *         The string with a lowercased first letter\n */\nconst toLowerCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toLowerCase());\n};\n\n/**\n * Uppercase the first letter of a string.\n *\n * @param {string} string\n *        String to be uppercased\n *\n * @return {string}\n *         The string with an uppercased first letter\n */\nconst toTitleCase$1 = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * Compares the TitleCase versions of the two strings for equality.\n *\n * @param {string} str1\n *        The first string to compare\n *\n * @param {string} str2\n *        The second string to compare\n *\n * @return {boolean}\n *         Whether the TitleCase versions of the strings are equal\n */\nconst titleCaseEquals = function (str1, str2) {\n  return toTitleCase$1(str1) === toTitleCase$1(str2);\n};\n\nvar Str = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  toLowerCase: toLowerCase,\n  toTitleCase: toTitleCase$1,\n  titleCaseEquals: titleCaseEquals\n});\n\n/**\n * Player Component - Base class for all UI objects\n *\n * @file component.js\n */\n\n/** @import Player from './player' */\n\n/**\n * A callback to be called if and when the component is ready.\n * `this` will be the Component instance.\n *\n * @callback ReadyCallback\n * @returns  {void}\n */\n\n/**\n * Base class for all UI Components.\n * Components are UI objects which represent both a javascript object and an element\n * in the DOM. They can be children of other components, and can have\n * children themselves.\n *\n * Components can also use methods from {@link EventTarget}\n */\nclass Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of component options.\n   *\n   * @param {Object[]} [options.children]\n   *        An array of children objects to initialize this component with. Children objects have\n   *        a name property that will be used if more than one component of the same type needs to be\n   *        added.\n   *\n   * @param  {string} [options.className]\n   *         A class or space separated list of classes to add the component\n   *\n   * @param {ReadyCallback} [ready]\n   *        Function that gets called when the `Component` is ready.\n   */\n  constructor(player, options, ready) {\n    // The component might be the player itself and we can't pass `this` to super\n    if (!player && this.play) {\n      this.player_ = player = this; // eslint-disable-line\n    } else {\n      this.player_ = player;\n    }\n    this.isDisposed_ = false;\n\n    // Hold the reference to the parent component via `addChild` method\n    this.parentComponent_ = null;\n\n    // Make a copy of prototype.options_ to protect against overriding defaults\n    this.options_ = merge$1({}, this.options_);\n\n    // Updated options with supplied options\n    options = this.options_ = merge$1(this.options_, options);\n\n    // Get ID from options or options element if one is supplied\n    this.id_ = options.id || options.el && options.el.id;\n\n    // If there was no ID from the options, generate one\n    if (!this.id_) {\n      // Don't require the player ID function in the case of mock players\n      const id = player && player.id && player.id() || 'no_player';\n      this.id_ = `${id}_component_${newGUID()}`;\n    }\n    this.name_ = options.name || null;\n\n    // Create element if one wasn't provided in options\n    if (options.el) {\n      this.el_ = options.el;\n    } else if (options.createEl !== false) {\n      this.el_ = this.createEl();\n    }\n    if (options.className && this.el_) {\n      options.className.split(' ').forEach(c => this.addClass(c));\n    }\n\n    // Remove the placeholder event methods. If the component is evented, the\n    // real methods are added next\n    ['on', 'off', 'one', 'any', 'trigger'].forEach(fn => {\n      this[fn] = undefined;\n    });\n\n    // if evented is anything except false, we want to mixin in evented\n    if (options.evented !== false) {\n      // Make this an evented object and use `el_`, if available, as its event bus\n      evented(this, {\n        eventBusKey: this.el_ ? 'el_' : null\n      });\n      this.handleLanguagechange = this.handleLanguagechange.bind(this);\n      this.on(this.player_, 'languagechange', this.handleLanguagechange);\n    }\n    stateful(this, this.constructor.defaultState);\n    this.children_ = [];\n    this.childIndex_ = {};\n    this.childNameIndex_ = {};\n    this.setTimeoutIds_ = new Set();\n    this.setIntervalIds_ = new Set();\n    this.rafIds_ = new Set();\n    this.namedRafs_ = new Map();\n    this.clearingTimersOnDispose_ = false;\n\n    // Add any child components in options\n    if (options.initChildren !== false) {\n      this.initChildren();\n    }\n\n    // Don't want to trigger ready here or it will go before init is actually\n    // finished for all children that run this constructor\n    this.ready(ready);\n    if (options.reportTouchActivity !== false) {\n      this.enableTouchActivity();\n    }\n  }\n\n  // `on`, `off`, `one`, `any` and `trigger` are here so tsc includes them in definitions.\n  // They are replaced or removed in the constructor\n\n  /**\n   * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\n   * function that will get called when an event with a certain name gets triggered.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to call with `EventTarget`s\n   */\n\n  /**\n   * Removes an `event listener` for a specific event from an instance of `EventTarget`.\n   * This makes it so that the `event listener` will no longer get called when the\n   * named event happens.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} [fn]\n   *        The function to remove. If not specified, all listeners managed by Video.js will be removed.\n   */\n\n  /**\n   * This function will add an `event listener` that gets triggered only once. After the\n   * first trigger it will get removed. This is like adding an `event listener`\n   * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to be called once for each event name.\n   */\n\n  /**\n   * This function will add an `event listener` that gets triggered only once and is\n   * removed from all events. This is like adding an array of `event listener`s\n   * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the\n   * first time it is triggered.\n   *\n   * @param {string|string[]} type\n   *        An event name or an array of event names.\n   *\n   * @param {Function} fn\n   *        The function to be called once for each event name.\n   */\n\n  /**\n   * This function causes an event to happen. This will then cause any `event listeners`\n   * that are waiting for that event, to get called. If there are no `event listeners`\n   * for an event then nothing will happen.\n   *\n   * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\n   * Trigger will also call the `on` + `uppercaseEventName` function.\n   *\n   * Example:\n   * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\n   * `onClick` if it exists.\n   *\n   * @param {string|Event|Object} event\n   *        The name of the event, an `Event`, or an object with a key of type set to\n   *        an event name.\n   *\n   * @param {Object} [hash]\n   *        Optionally extra argument to pass through to an event listener\n   */\n\n  /**\n   * Dispose of the `Component` and all child components.\n   *\n   * @fires Component#dispose\n   *\n   * @param {Object} options\n   * @param {Element} options.originalEl element with which to replace player element\n   */\n  dispose(options = {}) {\n    // Bail out if the component has already been disposed.\n    if (this.isDisposed_) {\n      return;\n    }\n    if (this.readyQueue_) {\n      this.readyQueue_.length = 0;\n    }\n\n    /**\n     * Triggered when a `Component` is disposed.\n     *\n     * @event Component#dispose\n     * @type {Event}\n     *\n     * @property {boolean} [bubbles=false]\n     *           set to false so that the dispose event does not\n     *           bubble up\n     */\n    this.trigger({\n      type: 'dispose',\n      bubbles: false\n    });\n    this.isDisposed_ = true;\n\n    // Dispose all children.\n    if (this.children_) {\n      for (let i = this.children_.length - 1; i >= 0; i--) {\n        if (this.children_[i].dispose) {\n          this.children_[i].dispose();\n        }\n      }\n    }\n\n    // Delete child references\n    this.children_ = null;\n    this.childIndex_ = null;\n    this.childNameIndex_ = null;\n    this.parentComponent_ = null;\n    if (this.el_) {\n      // Remove element from DOM\n      if (this.el_.parentNode) {\n        if (options.restoreEl) {\n          this.el_.parentNode.replaceChild(options.restoreEl, this.el_);\n        } else {\n          this.el_.parentNode.removeChild(this.el_);\n        }\n      }\n      this.el_ = null;\n    }\n\n    // remove reference to the player after disposing of the element\n    this.player_ = null;\n  }\n\n  /**\n   * Determine whether or not this component has been disposed.\n   *\n   * @return {boolean}\n   *         If the component has been disposed, will be `true`. Otherwise, `false`.\n   */\n  isDisposed() {\n    return Boolean(this.isDisposed_);\n  }\n\n  /**\n   * Return the {@link Player} that the `Component` has attached to.\n   *\n   * @return {Player}\n   *         The player that this `Component` has attached to.\n   */\n  player() {\n    return this.player_;\n  }\n\n  /**\n   * Deep merge of options objects with new options.\n   * > Note: When both `obj` and `options` contain properties whose values are objects.\n   *         The two properties get merged using {@link module:obj.merge}\n   *\n   * @param {Object} obj\n   *        The object that contains new options.\n   *\n   * @return {Object}\n   *         A new object of `this.options_` and `obj` merged together.\n   */\n  options(obj) {\n    if (!obj) {\n      return this.options_;\n    }\n    this.options_ = merge$1(this.options_, obj);\n    return this.options_;\n  }\n\n  /**\n   * Get the `Component`s DOM element\n   *\n   * @return {Element}\n   *         The DOM element for this `Component`.\n   */\n  el() {\n    return this.el_;\n  }\n\n  /**\n   * Create the `Component`s DOM element.\n   *\n   * @param {string} [tagName]\n   *        Element's DOM node type. e.g. 'div'\n   *\n   * @param {Object} [properties]\n   *        An object of properties that should be set.\n   *\n   * @param {Object} [attributes]\n   *        An object of attributes that should be set.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl(tagName, properties, attributes) {\n    return createEl(tagName, properties, attributes);\n  }\n\n  /**\n   * Localize a string given the string in english.\n   *\n   * If tokens are provided, it'll try and run a simple token replacement on the provided string.\n   * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\n   *\n   * If a `defaultValue` is provided, it'll use that over `string`,\n   * if a value isn't found in provided language files.\n   * This is useful if you want to have a descriptive key for token replacement\n   * but have a succinct localized string and not require `en.json` to be included.\n   *\n   * Currently, it is used for the progress bar timing.\n   * ```js\n   * {\n   *   \"progress bar timing: currentTime={1} duration={2}\": \"{1} of {2}\"\n   * }\n   * ```\n   * It is then used like so:\n   * ```js\n   * this.localize('progress bar timing: currentTime={1} duration{2}',\n   *               [this.player_.currentTime(), this.player_.duration()],\n   *               '{1} of {2}');\n   * ```\n   *\n   * Which outputs something like: `01:23 of 24:56`.\n   *\n   *\n   * @param {string} string\n   *        The string to localize and the key to lookup in the language files.\n   * @param {string[]} [tokens]\n   *        If the current item has token replacements, provide the tokens here.\n   * @param {string} [defaultValue]\n   *        Defaults to `string`. Can be a default value to use for token replacement\n   *        if the lookup key is needed to be separate.\n   *\n   * @return {string}\n   *         The localized string or if no localization exists the english string.\n   */\n  localize(string, tokens, defaultValue = string) {\n    const code = this.player_.language && this.player_.language();\n    const languages = this.player_.languages && this.player_.languages();\n    const language = languages && languages[code];\n    const primaryCode = code && code.split('-')[0];\n    const primaryLang = languages && languages[primaryCode];\n    let localizedString = defaultValue;\n    if (language && language[string]) {\n      localizedString = language[string];\n    } else if (primaryLang && primaryLang[string]) {\n      localizedString = primaryLang[string];\n    }\n    if (tokens) {\n      localizedString = localizedString.replace(/\\{(\\d+)\\}/g, function (match, index) {\n        const value = tokens[index - 1];\n        let ret = value;\n        if (typeof value === 'undefined') {\n          ret = match;\n        }\n        return ret;\n      });\n    }\n    return localizedString;\n  }\n\n  /**\n   * Handles language change for the player in components. Should be overridden by sub-components.\n   *\n   * @abstract\n   */\n  handleLanguagechange() {}\n\n  /**\n   * Return the `Component`s DOM element. This is where children get inserted.\n   * This will usually be the the same as the element returned in {@link Component#el}.\n   *\n   * @return {Element}\n   *         The content element for this `Component`.\n   */\n  contentEl() {\n    return this.contentEl_ || this.el_;\n  }\n\n  /**\n   * Get this `Component`s ID\n   *\n   * @return {string}\n   *         The id of this `Component`\n   */\n  id() {\n    return this.id_;\n  }\n\n  /**\n   * Get the `Component`s name. The name gets used to reference the `Component`\n   * and is set during registration.\n   *\n   * @return {string}\n   *         The name of this `Component`.\n   */\n  name() {\n    return this.name_;\n  }\n\n  /**\n   * Get an array of all child components\n   *\n   * @return {Array}\n   *         The children\n   */\n  children() {\n    return this.children_;\n  }\n\n  /**\n   * Returns the child `Component` with the given `id`.\n   *\n   * @param {string} id\n   *        The id of the child `Component` to get.\n   *\n   * @return {Component|undefined}\n   *         The child `Component` with the given `id` or undefined.\n   */\n  getChildById(id) {\n    return this.childIndex_[id];\n  }\n\n  /**\n   * Returns the child `Component` with the given `name`.\n   *\n   * @param {string} name\n   *        The name of the child `Component` to get.\n   *\n   * @return {Component|undefined}\n   *         The child `Component` with the given `name` or undefined.\n   */\n  getChild(name) {\n    if (!name) {\n      return;\n    }\n    return this.childNameIndex_[name];\n  }\n\n  /**\n   * Returns the descendant `Component` following the givent\n   * descendant `names`. For instance ['foo', 'bar', 'baz'] would\n   * try to get 'foo' on the current component, 'bar' on the 'foo'\n   * component and 'baz' on the 'bar' component and return undefined\n   * if any of those don't exist.\n   *\n   * @param {...string[]|...string} names\n   *        The name of the child `Component` to get.\n   *\n   * @return {Component|undefined}\n   *         The descendant `Component` following the given descendant\n   *         `names` or undefined.\n   */\n  getDescendant(...names) {\n    // flatten array argument into the main array\n    names = names.reduce((acc, n) => acc.concat(n), []);\n    let currentChild = this;\n    for (let i = 0; i < names.length; i++) {\n      currentChild = currentChild.getChild(names[i]);\n      if (!currentChild || !currentChild.getChild) {\n        return;\n      }\n    }\n    return currentChild;\n  }\n\n  /**\n   * Adds an SVG icon element to another element or component.\n   *\n   * @param {string} iconName\n   *        The name of icon. A list of all the icon names can be found at 'sandbox/svg-icons.html'\n   *\n   * @param {Element} [el=this.el()]\n   *        Element to set the title on. Defaults to the current Component's element.\n   *\n   * @return {Element}\n   *        The newly created icon element.\n   */\n  setIcon(iconName, el = this.el()) {\n    // TODO: In v9 of video.js, we will want to remove font icons entirely.\n    // This means this check, as well as the others throughout the code, and\n    // the unecessary CSS for font icons, will need to be removed.\n    // See https://github.com/videojs/video.js/pull/8260 as to which components\n    // need updating.\n    if (!this.player_.options_.experimentalSvgIcons) {\n      return;\n    }\n    const xmlnsURL = 'http://www.w3.org/2000/svg';\n\n    // The below creates an element in the format of:\n    // <span><svg><use>....</use></svg></span>\n    const iconContainer = createEl('span', {\n      className: 'vjs-icon-placeholder vjs-svg-icon'\n    }, {\n      'aria-hidden': 'true'\n    });\n    const svgEl = document$1.createElementNS(xmlnsURL, 'svg');\n    svgEl.setAttributeNS(null, 'viewBox', '0 0 512 512');\n    const useEl = document$1.createElementNS(xmlnsURL, 'use');\n    svgEl.appendChild(useEl);\n    useEl.setAttributeNS(null, 'href', `#vjs-icon-${iconName}`);\n    iconContainer.appendChild(svgEl);\n\n    // Replace a pre-existing icon if one exists.\n    if (this.iconIsSet_) {\n      el.replaceChild(iconContainer, el.querySelector('.vjs-icon-placeholder'));\n    } else {\n      el.appendChild(iconContainer);\n    }\n    this.iconIsSet_ = true;\n    return iconContainer;\n  }\n\n  /**\n   * Add a child `Component` inside the current `Component`.\n   *\n   * @param {string|Component} child\n   *        The name or instance of a child to add.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of options that will get passed to children of\n   *        the child.\n   *\n   * @param {number} [index=this.children_.length]\n   *        The index to attempt to add a child into.\n   *\n   *\n   * @return {Component}\n   *         The `Component` that gets added as a child. When using a string the\n   *         `Component` will get created by this process.\n   */\n  addChild(child, options = {}, index = this.children_.length) {\n    let component;\n    let componentName;\n\n    // If child is a string, create component with options\n    if (typeof child === 'string') {\n      componentName = toTitleCase$1(child);\n      const componentClassName = options.componentClass || componentName;\n\n      // Set name through options\n      options.name = componentName;\n\n      // Create a new object & element for this controls set\n      // If there's no .player_, this is a player\n      const ComponentClass = Component$1.getComponent(componentClassName);\n      if (!ComponentClass) {\n        throw new Error(`Component ${componentClassName} does not exist`);\n      }\n\n      // data stored directly on the videojs object may be\n      // misidentified as a component to retain\n      // backwards-compatibility with 4.x. check to make sure the\n      // component class can be instantiated.\n      if (typeof ComponentClass !== 'function') {\n        return null;\n      }\n      component = new ComponentClass(this.player_ || this, options);\n\n      // child is a component instance\n    } else {\n      component = child;\n    }\n    if (component.parentComponent_) {\n      component.parentComponent_.removeChild(component);\n    }\n    this.children_.splice(index, 0, component);\n    component.parentComponent_ = this;\n    if (typeof component.id === 'function') {\n      this.childIndex_[component.id()] = component;\n    }\n\n    // If a name wasn't used to create the component, check if we can use the\n    // name function of the component\n    componentName = componentName || component.name && toTitleCase$1(component.name());\n    if (componentName) {\n      this.childNameIndex_[componentName] = component;\n      this.childNameIndex_[toLowerCase(componentName)] = component;\n    }\n\n    // Add the UI object's element to the container div (box)\n    // Having an element is not required\n    if (typeof component.el === 'function' && component.el()) {\n      // If inserting before a component, insert before that component's element\n      let refNode = null;\n      if (this.children_[index + 1]) {\n        // Most children are components, but the video tech is an HTML element\n        if (this.children_[index + 1].el_) {\n          refNode = this.children_[index + 1].el_;\n        } else if (isEl(this.children_[index + 1])) {\n          refNode = this.children_[index + 1];\n        }\n      }\n      this.contentEl().insertBefore(component.el(), refNode);\n    }\n\n    // Return so it can stored on parent object if desired.\n    return component;\n  }\n\n  /**\n   * Remove a child `Component` from this `Component`s list of children. Also removes\n   * the child `Component`s element from this `Component`s element.\n   *\n   * @param {Component} component\n   *        The child `Component` to remove.\n   */\n  removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n    if (!component || !this.children_) {\n      return;\n    }\n    let childFound = false;\n    for (let i = this.children_.length - 1; i >= 0; i--) {\n      if (this.children_[i] === component) {\n        childFound = true;\n        this.children_.splice(i, 1);\n        break;\n      }\n    }\n    if (!childFound) {\n      return;\n    }\n    component.parentComponent_ = null;\n    this.childIndex_[component.id()] = null;\n    this.childNameIndex_[toTitleCase$1(component.name())] = null;\n    this.childNameIndex_[toLowerCase(component.name())] = null;\n    const compEl = component.el();\n    if (compEl && compEl.parentNode === this.contentEl()) {\n      this.contentEl().removeChild(component.el());\n    }\n  }\n\n  /**\n   * Add and initialize default child `Component`s based upon options.\n   */\n  initChildren() {\n    const children = this.options_.children;\n    if (children) {\n      // `this` is `parent`\n      const parentOptions = this.options_;\n      const handleAdd = child => {\n        const name = child.name;\n        let opts = child.opts;\n\n        // Allow options for children to be set at the parent options\n        // e.g. videojs(id, { controlBar: false });\n        // instead of videojs(id, { children: { controlBar: false });\n        if (parentOptions[name] !== undefined) {\n          opts = parentOptions[name];\n        }\n\n        // Allow for disabling default components\n        // e.g. options['children']['posterImage'] = false\n        if (opts === false) {\n          return;\n        }\n\n        // Allow options to be passed as a simple boolean if no configuration\n        // is necessary.\n        if (opts === true) {\n          opts = {};\n        }\n\n        // We also want to pass the original player options\n        // to each component as well so they don't need to\n        // reach back into the player for options later.\n        opts.playerOptions = this.options_.playerOptions;\n\n        // Create and add the child component.\n        // Add a direct reference to the child by name on the parent instance.\n        // If two of the same component are used, different names should be supplied\n        // for each\n        const newChild = this.addChild(name, opts);\n        if (newChild) {\n          this[name] = newChild;\n        }\n      };\n\n      // Allow for an array of children details to passed in the options\n      let workingChildren;\n      const Tech = Component$1.getComponent('Tech');\n      if (Array.isArray(children)) {\n        workingChildren = children;\n      } else {\n        workingChildren = Object.keys(children);\n      }\n      workingChildren\n      // children that are in this.options_ but also in workingChildren  would\n      // give us extra children we do not want. So, we want to filter them out.\n      .concat(Object.keys(this.options_).filter(function (child) {\n        return !workingChildren.some(function (wchild) {\n          if (typeof wchild === 'string') {\n            return child === wchild;\n          }\n          return child === wchild.name;\n        });\n      })).map(child => {\n        let name;\n        let opts;\n        if (typeof child === 'string') {\n          name = child;\n          opts = children[name] || this.options_[name] || {};\n        } else {\n          name = child.name;\n          opts = child;\n        }\n        return {\n          name,\n          opts\n        };\n      }).filter(child => {\n        // we have to make sure that child.name isn't in the techOrder since\n        // techs are registered as Components but can't aren't compatible\n        // See https://github.com/videojs/video.js/issues/2772\n        const c = Component$1.getComponent(child.opts.componentClass || toTitleCase$1(child.name));\n        return c && !Tech.isTech(c);\n      }).forEach(handleAdd);\n    }\n  }\n\n  /**\n   * Builds the default DOM class name. Should be overridden by sub-components.\n   *\n   * @return {string}\n   *         The DOM class name for this object.\n   *\n   * @abstract\n   */\n  buildCSSClass() {\n    // Child classes can include a function that does:\n    // return 'CLASS NAME' + this._super();\n    return '';\n  }\n\n  /**\n   * Bind a listener to the component's ready state.\n   * Different from event listeners in that if the ready event has already happened\n   * it will trigger the function immediately.\n   *\n   * @param {ReadyCallback} fn\n   *        Function that gets called when the `Component` is ready.\n   */\n  ready(fn, sync = false) {\n    if (!fn) {\n      return;\n    }\n    if (!this.isReady_) {\n      this.readyQueue_ = this.readyQueue_ || [];\n      this.readyQueue_.push(fn);\n      return;\n    }\n    if (sync) {\n      fn.call(this);\n    } else {\n      // Call the function asynchronously by default for consistency\n      this.setTimeout(fn, 1);\n    }\n  }\n\n  /**\n   * Trigger all the ready listeners for this `Component`.\n   *\n   * @fires Component#ready\n   */\n  triggerReady() {\n    this.isReady_ = true;\n\n    // Ensure ready is triggered asynchronously\n    this.setTimeout(function () {\n      const readyQueue = this.readyQueue_;\n\n      // Reset Ready Queue\n      this.readyQueue_ = [];\n      if (readyQueue && readyQueue.length > 0) {\n        readyQueue.forEach(function (fn) {\n          fn.call(this);\n        }, this);\n      }\n\n      // Allow for using event listeners also\n      /**\n       * Triggered when a `Component` is ready.\n       *\n       * @event Component#ready\n       * @type {Event}\n       */\n      this.trigger('ready');\n    }, 1);\n  }\n\n  /**\n   * Find a single DOM element matching a `selector`. This can be within the `Component`s\n   * `contentEl()` or another custom context.\n   *\n   * @param {string} selector\n   *        A valid CSS selector, which will be passed to `querySelector`.\n   *\n   * @param {Element|string} [context=this.contentEl()]\n   *        A DOM element within which to query. Can also be a selector string in\n   *        which case the first matching element will get used as context. If\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\n   *        nothing it falls back to `document`.\n   *\n   * @return {Element|null}\n   *         the dom element that was found, or null\n   *\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n   */\n  $(selector, context) {\n    return $(selector, context || this.contentEl());\n  }\n\n  /**\n   * Finds all DOM element matching a `selector`. This can be within the `Component`s\n   * `contentEl()` or another custom context.\n   *\n   * @param {string} selector\n   *        A valid CSS selector, which will be passed to `querySelectorAll`.\n   *\n   * @param {Element|string} [context=this.contentEl()]\n   *        A DOM element within which to query. Can also be a selector string in\n   *        which case the first matching element will get used as context. If\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\n   *        nothing it falls back to `document`.\n   *\n   * @return {NodeList}\n   *         a list of dom elements that were found\n   *\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\n   */\n  $$(selector, context) {\n    return $$(selector, context || this.contentEl());\n  }\n\n  /**\n   * Check if a component's element has a CSS class name.\n   *\n   * @param {string} classToCheck\n   *        CSS class name to check.\n   *\n   * @return {boolean}\n   *         - True if the `Component` has the class.\n   *         - False if the `Component` does not have the class`\n   */\n  hasClass(classToCheck) {\n    return hasClass(this.el_, classToCheck);\n  }\n\n  /**\n   * Add a CSS class name to the `Component`s element.\n   *\n   * @param {...string} classesToAdd\n   *        One or more CSS class name to add.\n   */\n  addClass(...classesToAdd) {\n    addClass(this.el_, ...classesToAdd);\n  }\n\n  /**\n   * Remove a CSS class name from the `Component`s element.\n   *\n   * @param {...string} classesToRemove\n   *        One or more CSS class name to remove.\n   */\n  removeClass(...classesToRemove) {\n    removeClass(this.el_, ...classesToRemove);\n  }\n\n  /**\n   * Add or remove a CSS class name from the component's element.\n   * - `classToToggle` gets added when {@link Component#hasClass} would return false.\n   * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\n   *\n   * @param  {string} classToToggle\n   *         The class to add or remove. Passed to DOMTokenList's toggle()\n   *\n   * @param  {boolean|Dom.PredicateCallback} [predicate]\n   *         A boolean or function that returns a boolean. Passed to DOMTokenList's toggle().\n   */\n  toggleClass(classToToggle, predicate) {\n    toggleClass(this.el_, classToToggle, predicate);\n  }\n\n  /**\n   * Show the `Component`s element if it is hidden by removing the\n   * 'vjs-hidden' class name from it.\n   */\n  show() {\n    this.removeClass('vjs-hidden');\n  }\n\n  /**\n   * Hide the `Component`s element if it is currently showing by adding the\n   * 'vjs-hidden` class name to it.\n   */\n  hide() {\n    this.addClass('vjs-hidden');\n  }\n\n  /**\n   * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\n   * class name to it. Used during fadeIn/fadeOut.\n   *\n   * @private\n   */\n  lockShowing() {\n    this.addClass('vjs-lock-showing');\n  }\n\n  /**\n   * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\n   * class name from it. Used during fadeIn/fadeOut.\n   *\n   * @private\n   */\n  unlockShowing() {\n    this.removeClass('vjs-lock-showing');\n  }\n\n  /**\n   * Get the value of an attribute on the `Component`s element.\n   *\n   * @param {string} attribute\n   *        Name of the attribute to get the value from.\n   *\n   * @return {string|null}\n   *         - The value of the attribute that was asked for.\n   *         - Can be an empty string on some browsers if the attribute does not exist\n   *           or has no value\n   *         - Most browsers will return null if the attribute does not exist or has\n   *           no value.\n   *\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\n   */\n  getAttribute(attribute) {\n    return getAttribute(this.el_, attribute);\n  }\n\n  /**\n   * Set the value of an attribute on the `Component`'s element\n   *\n   * @param {string} attribute\n   *        Name of the attribute to set.\n   *\n   * @param {string} value\n   *        Value to set the attribute to.\n   *\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\n   */\n  setAttribute(attribute, value) {\n    setAttribute(this.el_, attribute, value);\n  }\n\n  /**\n   * Remove an attribute from the `Component`s element.\n   *\n   * @param {string} attribute\n   *        Name of the attribute to remove.\n   *\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\n   */\n  removeAttribute(attribute) {\n    removeAttribute(this.el_, attribute);\n  }\n\n  /**\n   * Get or set the width of the component based upon the CSS styles.\n   * See {@link Component#dimension} for more detailed information.\n   *\n   * @param {number|string} [num]\n   *        The width that you want to set postfixed with '%', 'px' or nothing.\n   *\n   * @param {boolean} [skipListeners]\n   *        Skip the componentresize event trigger\n   *\n   * @return {number|undefined}\n   *         The width when getting, zero if there is no width\n   */\n  width(num, skipListeners) {\n    return this.dimension('width', num, skipListeners);\n  }\n\n  /**\n   * Get or set the height of the component based upon the CSS styles.\n   * See {@link Component#dimension} for more detailed information.\n   *\n   * @param {number|string} [num]\n   *        The height that you want to set postfixed with '%', 'px' or nothing.\n   *\n   * @param {boolean} [skipListeners]\n   *        Skip the componentresize event trigger\n   *\n   * @return {number|undefined}\n   *         The height when getting, zero if there is no height\n   */\n  height(num, skipListeners) {\n    return this.dimension('height', num, skipListeners);\n  }\n\n  /**\n   * Set both the width and height of the `Component` element at the same time.\n   *\n   * @param  {number|string} width\n   *         Width to set the `Component`s element to.\n   *\n   * @param  {number|string} height\n   *         Height to set the `Component`s element to.\n   */\n  dimensions(width, height) {\n    // Skip componentresize listeners on width for optimization\n    this.width(width, true);\n    this.height(height);\n  }\n\n  /**\n   * Get or set width or height of the `Component` element. This is the shared code\n   * for the {@link Component#width} and {@link Component#height}.\n   *\n   * Things to know:\n   * - If the width or height in an number this will return the number postfixed with 'px'.\n   * - If the width/height is a percent this will return the percent postfixed with '%'\n   * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\n   *   defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\n   *   See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\n   *   for more information\n   * - If you want the computed style of the component, use {@link Component#currentWidth}\n   *   and {@link {Component#currentHeight}\n   *\n   * @fires Component#componentresize\n   *\n   * @param {string} widthOrHeight\n   8        'width' or 'height'\n   *\n   * @param  {number|string} [num]\n   8         New dimension\n   *\n   * @param  {boolean} [skipListeners]\n   *         Skip componentresize event trigger\n   *\n   * @return {number|undefined}\n   *         The dimension when getting or 0 if unset\n   */\n  dimension(widthOrHeight, num, skipListeners) {\n    if (num !== undefined) {\n      // Set to zero if null or literally NaN (NaN !== NaN)\n      if (num === null || num !== num) {\n        num = 0;\n      }\n\n      // Check if using css width/height (% or px) and adjust\n      if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n        this.el_.style[widthOrHeight] = num;\n      } else if (num === 'auto') {\n        this.el_.style[widthOrHeight] = '';\n      } else {\n        this.el_.style[widthOrHeight] = num + 'px';\n      }\n\n      // skipListeners allows us to avoid triggering the resize event when setting both width and height\n      if (!skipListeners) {\n        /**\n         * Triggered when a component is resized.\n         *\n         * @event Component#componentresize\n         * @type {Event}\n         */\n        this.trigger('componentresize');\n      }\n      return;\n    }\n\n    // Not setting a value, so getting it\n    // Make sure element exists\n    if (!this.el_) {\n      return 0;\n    }\n\n    // Get dimension value from style\n    const val = this.el_.style[widthOrHeight];\n    const pxIndex = val.indexOf('px');\n    if (pxIndex !== -1) {\n      // Return the pixel value with no 'px'\n      return parseInt(val.slice(0, pxIndex), 10);\n    }\n\n    // No px so using % or no style was set, so falling back to offsetWidth/height\n    // If component has display:none, offset will return 0\n    // TODO: handle display:none and no dimension style using px\n    return parseInt(this.el_['offset' + toTitleCase$1(widthOrHeight)], 10);\n  }\n\n  /**\n   * Get the computed width or the height of the component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @param {string} widthOrHeight\n   *        A string containing 'width' or 'height'. Whichever one you want to get.\n   *\n   * @return {number}\n   *         The dimension that gets asked for or 0 if nothing was set\n   *         for that dimension.\n   */\n  currentDimension(widthOrHeight) {\n    let computedWidthOrHeight = 0;\n    if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n      throw new Error('currentDimension only accepts width or height value');\n    }\n    computedWidthOrHeight = computedStyle(this.el_, widthOrHeight);\n\n    // remove 'px' from variable and parse as integer\n    computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n\n    // if the computed value is still 0, it's possible that the browser is lying\n    // and we want to check the offset values.\n    // This code also runs wherever getComputedStyle doesn't exist.\n    if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\n      const rule = `offset${toTitleCase$1(widthOrHeight)}`;\n      computedWidthOrHeight = this.el_[rule];\n    }\n    return computedWidthOrHeight;\n  }\n\n  /**\n   * An object that contains width and height values of the `Component`s\n   * computed style. Uses `window.getComputedStyle`.\n   *\n   * @typedef {Object} Component~DimensionObject\n   *\n   * @property {number} width\n   *           The width of the `Component`s computed style.\n   *\n   * @property {number} height\n   *           The height of the `Component`s computed style.\n   */\n\n  /**\n   * Get an object that contains computed width and height values of the\n   * component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @return {Component~DimensionObject}\n   *         The computed dimensions of the component's element.\n   */\n  currentDimensions() {\n    return {\n      width: this.currentDimension('width'),\n      height: this.currentDimension('height')\n    };\n  }\n\n  /**\n   * Get the computed width of the component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @return {number}\n   *         The computed width of the component's element.\n   */\n  currentWidth() {\n    return this.currentDimension('width');\n  }\n\n  /**\n   * Get the computed height of the component's element.\n   *\n   * Uses `window.getComputedStyle`.\n   *\n   * @return {number}\n   *         The computed height of the component's element.\n   */\n  currentHeight() {\n    return this.currentDimension('height');\n  }\n\n  /**\n   * Retrieves the position and size information of the component's element.\n   *\n   * @return {Object} An object with `boundingClientRect` and `center` properties.\n   *         - `boundingClientRect`: An object with properties `x`, `y`, `width`,\n   *           `height`, `top`, `right`, `bottom`, and `left`, representing\n   *           the bounding rectangle of the element.\n   *         - `center`: An object with properties `x` and `y`, representing\n   *           the center point of the element. `width` and `height` are set to 0.\n   */\n  getPositions() {\n    const rect = this.el_.getBoundingClientRect();\n\n    // Creating objects that mirror DOMRectReadOnly for boundingClientRect and center\n    const boundingClientRect = {\n      x: rect.x,\n      y: rect.y,\n      width: rect.width,\n      height: rect.height,\n      top: rect.top,\n      right: rect.right,\n      bottom: rect.bottom,\n      left: rect.left\n    };\n\n    // Calculating the center position\n    const center = {\n      x: rect.left + rect.width / 2,\n      y: rect.top + rect.height / 2,\n      width: 0,\n      height: 0,\n      top: rect.top + rect.height / 2,\n      right: rect.left + rect.width / 2,\n      bottom: rect.top + rect.height / 2,\n      left: rect.left + rect.width / 2\n    };\n    return {\n      boundingClientRect,\n      center\n    };\n  }\n\n  /**\n   * Set the focus to this component\n   */\n  focus() {\n    this.el_.focus();\n  }\n\n  /**\n   * Remove the focus from this component\n   */\n  blur() {\n    this.el_.blur();\n  }\n\n  /**\n   * When this Component receives a `keydown` event which it does not process,\n   *  it passes the event to the Player for handling.\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   */\n  handleKeyDown(event) {\n    if (this.player_) {\n      // We only stop propagation here because we want unhandled events to fall\n      // back to the browser. Exclude Tab for focus trapping, exclude also when spatialNavigation is enabled.\n      if (event.key !== 'Tab' && !(this.player_.options_.playerOptions.spatialNavigation && this.player_.options_.playerOptions.spatialNavigation.enabled)) {\n        event.stopPropagation();\n      }\n      this.player_.handleKeyDown(event);\n    }\n  }\n\n  /**\n   * Many components used to have a `handleKeyPress` method, which was poorly\n   * named because it listened to a `keydown` event. This method name now\n   * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\n   * will not see their method calls stop working.\n   *\n   * @param {KeyboardEvent} event\n   *        The event that caused this function to be called.\n   */\n  handleKeyPress(event) {\n    this.handleKeyDown(event);\n  }\n\n  /**\n   * Emit a 'tap' events when touch event support gets detected. This gets used to\n   * support toggling the controls through a tap on the video. They get enabled\n   * because every sub-component would have extra overhead otherwise.\n   *\n   * @protected\n   * @fires Component#tap\n   * @listens Component#touchstart\n   * @listens Component#touchmove\n   * @listens Component#touchleave\n   * @listens Component#touchcancel\n   * @listens Component#touchend\n    */\n  emitTapEvents() {\n    // Track the start time so we can determine how long the touch lasted\n    let touchStart = 0;\n    let firstTouch = null;\n\n    // Maximum movement allowed during a touch event to still be considered a tap\n    // Other popular libs use anywhere from 2 (hammer.js) to 15,\n    // so 10 seems like a nice, round number.\n    const tapMovementThreshold = 10;\n\n    // The maximum length a touch can be while still being considered a tap\n    const touchTimeThreshold = 200;\n    let couldBeTap;\n    this.on('touchstart', function (event) {\n      // If more than one finger, don't consider treating this as a click\n      if (event.touches.length === 1) {\n        // Copy pageX/pageY from the object\n        firstTouch = {\n          pageX: event.touches[0].pageX,\n          pageY: event.touches[0].pageY\n        };\n        // Record start time so we can detect a tap vs. \"touch and hold\"\n        touchStart = window$1.performance.now();\n        // Reset couldBeTap tracking\n        couldBeTap = true;\n      }\n    });\n    this.on('touchmove', function (event) {\n      // If more than one finger, don't consider treating this as a click\n      if (event.touches.length > 1) {\n        couldBeTap = false;\n      } else if (firstTouch) {\n        // Some devices will throw touchmoves for all but the slightest of taps.\n        // So, if we moved only a small distance, this could still be a tap\n        const xdiff = event.touches[0].pageX - firstTouch.pageX;\n        const ydiff = event.touches[0].pageY - firstTouch.pageY;\n        const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n        if (touchDistance > tapMovementThreshold) {\n          couldBeTap = false;\n        }\n      }\n    });\n    const noTap = function () {\n      couldBeTap = false;\n    };\n\n    // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n    this.on('touchleave', noTap);\n    this.on('touchcancel', noTap);\n\n    // When the touch ends, measure how long it took and trigger the appropriate\n    // event\n    this.on('touchend', function (event) {\n      firstTouch = null;\n      // Proceed only if the touchmove/leave/cancel event didn't happen\n      if (couldBeTap === true) {\n        // Measure how long the touch lasted\n        const touchTime = window$1.performance.now() - touchStart;\n\n        // Make sure the touch was less than the threshold to be considered a tap\n        if (touchTime < touchTimeThreshold) {\n          // Don't let browser turn this into a click\n          event.preventDefault();\n          /**\n           * Triggered when a `Component` is tapped.\n           *\n           * @event Component#tap\n           * @type {MouseEvent}\n           */\n          this.trigger('tap');\n          // It may be good to copy the touchend event object and change the\n          // type to tap, if the other event properties aren't exact after\n          // Events.fixEvent runs (e.g. event.target)\n        }\n      }\n    });\n  }\n\n  /**\n   * This function reports user activity whenever touch events happen. This can get\n   * turned off by any sub-components that wants touch events to act another way.\n   *\n   * Report user touch activity when touch events occur. User activity gets used to\n   * determine when controls should show/hide. It is simple when it comes to mouse\n   * events, because any mouse event should show the controls. So we capture mouse\n   * events that bubble up to the player and report activity when that happens.\n   * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\n   * controls. So touch events can't help us at the player level either.\n   *\n   * User activity gets checked asynchronously. So what could happen is a tap event\n   * on the video turns the controls off. Then the `touchend` event bubbles up to\n   * the player. Which, if it reported user activity, would turn the controls right\n   * back on. We also don't want to completely block touch events from bubbling up.\n   * Furthermore a `touchmove` event and anything other than a tap, should not turn\n   * controls back on.\n   *\n   * @listens Component#touchstart\n   * @listens Component#touchmove\n   * @listens Component#touchend\n   * @listens Component#touchcancel\n   */\n  enableTouchActivity() {\n    // Don't continue if the root player doesn't support reporting user activity\n    if (!this.player() || !this.player().reportUserActivity) {\n      return;\n    }\n\n    // listener for reporting that the user is active\n    const report = bind_(this.player(), this.player().reportUserActivity);\n    let touchHolding;\n    this.on('touchstart', function () {\n      report();\n      // For as long as the they are touching the device or have their mouse down,\n      // we consider them active even if they're not moving their finger or mouse.\n      // So we want to continue to update that they are active\n      this.clearInterval(touchHolding);\n      // report at the same interval as activityCheck\n      touchHolding = this.setInterval(report, 250);\n    });\n    const touchEnd = function (event) {\n      report();\n      // stop the interval that maintains activity if the touch is holding\n      this.clearInterval(touchHolding);\n    };\n    this.on('touchmove', report);\n    this.on('touchend', touchEnd);\n    this.on('touchcancel', touchEnd);\n  }\n\n  /**\n   * A callback that has no parameters and is bound into `Component`s context.\n   *\n   * @callback Component~GenericCallback\n   * @this Component\n   */\n\n  /**\n   * Creates a function that runs after an `x` millisecond timeout. This function is a\n   * wrapper around `window.setTimeout`. There are a few reasons to use this one\n   * instead though:\n   * 1. It gets cleared via  {@link Component#clearTimeout} when\n   *    {@link Component#dispose} gets called.\n   * 2. The function callback will gets turned into a {@link Component~GenericCallback}\n   *\n   * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\n   *         will cause its dispose listener not to get cleaned up! Please use\n   *         {@link Component#clearTimeout} or {@link Component#dispose} instead.\n   *\n   * @param {Component~GenericCallback} fn\n   *        The function that will be run after `timeout`.\n   *\n   * @param {number} timeout\n   *        Timeout in milliseconds to delay before executing the specified function.\n   *\n   * @return {number}\n   *         Returns a timeout ID that gets used to identify the timeout. It can also\n   *         get used in {@link Component#clearTimeout} to clear the timeout that\n   *         was set.\n   *\n   * @listens Component#dispose\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\n   */\n  setTimeout(fn, timeout) {\n    // declare as variables so they are properly available in timeout function\n    // eslint-disable-next-line\n    var timeoutId;\n    fn = bind_(this, fn);\n    this.clearTimersOnDispose_();\n    timeoutId = window$1.setTimeout(() => {\n      if (this.setTimeoutIds_.has(timeoutId)) {\n        this.setTimeoutIds_.delete(timeoutId);\n      }\n      fn();\n    }, timeout);\n    this.setTimeoutIds_.add(timeoutId);\n    return timeoutId;\n  }\n\n  /**\n   * Clears a timeout that gets created via `window.setTimeout` or\n   * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\n   * use this function instead of `window.clearTimout`. If you don't your dispose\n   * listener will not get cleaned up until {@link Component#dispose}!\n   *\n   * @param {number} timeoutId\n   *        The id of the timeout to clear. The return value of\n   *        {@link Component#setTimeout} or `window.setTimeout`.\n   *\n   * @return {number}\n   *         Returns the timeout id that was cleared.\n   *\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\n   */\n  clearTimeout(timeoutId) {\n    if (this.setTimeoutIds_.has(timeoutId)) {\n      this.setTimeoutIds_.delete(timeoutId);\n      window$1.clearTimeout(timeoutId);\n    }\n    return timeoutId;\n  }\n\n  /**\n   * Creates a function that gets run every `x` milliseconds. This function is a wrapper\n   * around `window.setInterval`. There are a few reasons to use this one instead though.\n   * 1. It gets cleared via  {@link Component#clearInterval} when\n   *    {@link Component#dispose} gets called.\n   * 2. The function callback will be a {@link Component~GenericCallback}\n   *\n   * @param {Component~GenericCallback} fn\n   *        The function to run every `x` seconds.\n   *\n   * @param {number} interval\n   *        Execute the specified function every `x` milliseconds.\n   *\n   * @return {number}\n   *         Returns an id that can be used to identify the interval. It can also be be used in\n   *         {@link Component#clearInterval} to clear the interval.\n   *\n   * @listens Component#dispose\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\n   */\n  setInterval(fn, interval) {\n    fn = bind_(this, fn);\n    this.clearTimersOnDispose_();\n    const intervalId = window$1.setInterval(fn, interval);\n    this.setIntervalIds_.add(intervalId);\n    return intervalId;\n  }\n\n  /**\n   * Clears an interval that gets created via `window.setInterval` or\n   * {@link Component#setInterval}. If you set an interval via {@link Component#setInterval}\n   * use this function instead of `window.clearInterval`. If you don't your dispose\n   * listener will not get cleaned up until {@link Component#dispose}!\n   *\n   * @param {number} intervalId\n   *        The id of the interval to clear. The return value of\n   *        {@link Component#setInterval} or `window.setInterval`.\n   *\n   * @return {number}\n   *         Returns the interval id that was cleared.\n   *\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\n   */\n  clearInterval(intervalId) {\n    if (this.setIntervalIds_.has(intervalId)) {\n      this.setIntervalIds_.delete(intervalId);\n      window$1.clearInterval(intervalId);\n    }\n    return intervalId;\n  }\n\n  /**\n   * Queues up a callback to be passed to requestAnimationFrame (rAF), but\n   * with a few extra bonuses:\n   *\n   * - Supports browsers that do not support rAF by falling back to\n   *   {@link Component#setTimeout}.\n   *\n   * - The callback is turned into a {@link Component~GenericCallback} (i.e.\n   *   bound to the component).\n   *\n   * - Automatic cancellation of the rAF callback is handled if the component\n   *   is disposed before it is called.\n   *\n   * @param  {Component~GenericCallback} fn\n   *         A function that will be bound to this component and executed just\n   *         before the browser's next repaint.\n   *\n   * @return {number}\n   *         Returns an rAF ID that gets used to identify the timeout. It can\n   *         also be used in {@link Component#cancelAnimationFrame} to cancel\n   *         the animation frame callback.\n   *\n   * @listens Component#dispose\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\n   */\n  requestAnimationFrame(fn) {\n    this.clearTimersOnDispose_();\n\n    // declare as variables so they are properly available in rAF function\n    // eslint-disable-next-line\n    var id;\n    fn = bind_(this, fn);\n    id = window$1.requestAnimationFrame(() => {\n      if (this.rafIds_.has(id)) {\n        this.rafIds_.delete(id);\n      }\n      fn();\n    });\n    this.rafIds_.add(id);\n    return id;\n  }\n\n  /**\n   * Request an animation frame, but only one named animation\n   * frame will be queued. Another will never be added until\n   * the previous one finishes.\n   *\n   * @param {string} name\n   *        The name to give this requestAnimationFrame\n   *\n   * @param  {Component~GenericCallback} fn\n   *         A function that will be bound to this component and executed just\n   *         before the browser's next repaint.\n   */\n  requestNamedAnimationFrame(name, fn) {\n    if (this.namedRafs_.has(name)) {\n      this.cancelNamedAnimationFrame(name);\n    }\n    this.clearTimersOnDispose_();\n    fn = bind_(this, fn);\n    const id = this.requestAnimationFrame(() => {\n      fn();\n      if (this.namedRafs_.has(name)) {\n        this.namedRafs_.delete(name);\n      }\n    });\n    this.namedRafs_.set(name, id);\n    return name;\n  }\n\n  /**\n   * Cancels a current named animation frame if it exists.\n   *\n   * @param {string} name\n   *        The name of the requestAnimationFrame to cancel.\n   */\n  cancelNamedAnimationFrame(name) {\n    if (!this.namedRafs_.has(name)) {\n      return;\n    }\n    this.cancelAnimationFrame(this.namedRafs_.get(name));\n    this.namedRafs_.delete(name);\n  }\n\n  /**\n   * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\n   * (rAF).\n   *\n   * If you queue an rAF callback via {@link Component#requestAnimationFrame},\n   * use this function instead of `window.cancelAnimationFrame`. If you don't,\n   * your dispose listener will not get cleaned up until {@link Component#dispose}!\n   *\n   * @param {number} id\n   *        The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\n   *\n   * @return {number}\n   *         Returns the rAF ID that was cleared.\n   *\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\n   */\n  cancelAnimationFrame(id) {\n    if (this.rafIds_.has(id)) {\n      this.rafIds_.delete(id);\n      window$1.cancelAnimationFrame(id);\n    }\n    return id;\n  }\n\n  /**\n   * A function to setup `requestAnimationFrame`, `setTimeout`,\n   * and `setInterval`, clearing on dispose.\n   *\n   * > Previously each timer added and removed dispose listeners on it's own.\n   * For better performance it was decided to batch them all, and use `Set`s\n   * to track outstanding timer ids.\n   *\n   * @private\n   */\n  clearTimersOnDispose_() {\n    if (this.clearingTimersOnDispose_) {\n      return;\n    }\n    this.clearingTimersOnDispose_ = true;\n    this.one('dispose', () => {\n      [['namedRafs_', 'cancelNamedAnimationFrame'], ['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(([idName, cancelName]) => {\n        // for a `Set` key will actually be the value again\n        // so forEach((val, val) =>` but for maps we want to use\n        // the key.\n        this[idName].forEach((val, key) => this[cancelName](key));\n      });\n      this.clearingTimersOnDispose_ = false;\n    });\n  }\n\n  /**\n    * Decide whether an element is actually disabled or not.\n    *\n    * @function isActuallyDisabled\n    * @param element {Node}\n    * @return {boolean}\n    *\n    * @see {@link https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled}\n    */\n  getIsDisabled() {\n    return Boolean(this.el_.disabled);\n  }\n\n  /**\n    * Decide whether the element is expressly inert or not.\n    *\n    * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#expressly-inert}\n    * @function isExpresslyInert\n    * @param element {Node}\n    * @return {boolean}\n    */\n  getIsExpresslyInert() {\n    return this.el_.inert && !this.el_.ownerDocument.documentElement.inert;\n  }\n\n  /**\n   * Determine whether or not this component can be considered as focusable component.\n   *\n   * @param {HTMLElement} el - The HTML element representing the component.\n   * @return {boolean}\n   *         If the component can be focused, will be `true`. Otherwise, `false`.\n   */\n  getIsFocusable(el) {\n    const element = el || this.el_;\n    return element.tabIndex >= 0 && !(this.getIsDisabled() || this.getIsExpresslyInert());\n  }\n\n  /**\n   * Determine whether or not this component is currently visible/enabled/etc...\n   *\n   * @param {HTMLElement} el - The HTML element representing the component.\n   * @return {boolean}\n   *         If the component can is currently visible & enabled, will be `true`. Otherwise, `false`.\n   */\n  getIsAvailableToBeFocused(el) {\n    /**\n     * Decide the style property of this element is specified whether it's visible or not.\n     *\n     * @function isVisibleStyleProperty\n     * @param element {CSSStyleDeclaration}\n     * @return {boolean}\n     */\n    function isVisibleStyleProperty(element) {\n      const elementStyle = window$1.getComputedStyle(element, null);\n      const thisVisibility = elementStyle.getPropertyValue('visibility');\n      const thisDisplay = elementStyle.getPropertyValue('display');\n      const invisibleStyle = ['hidden', 'collapse'];\n      return thisDisplay !== 'none' && !invisibleStyle.includes(thisVisibility);\n    }\n\n    /**\n     * Decide whether the element is being rendered or not.\n     * 1. If an element has the style as \"visibility: hidden | collapse\" or \"display: none\", it is not being rendered.\n     * 2. If an element has the style as \"opacity: 0\", it is not being rendered.(that is, invisible).\n     * 3. If width and height of an element are explicitly set to 0, it is not being rendered.\n     * 4. If a parent element is hidden, an element itself is not being rendered.\n     * (CSS visibility property and display property are inherited.)\n     *\n     * @see {@link https://html.spec.whatwg.org/multipage/rendering.html#being-rendered}\n     * @function isBeingRendered\n     * @param element {Node}\n     * @return {boolean}\n     */\n    function isBeingRendered(element) {\n      if (!isVisibleStyleProperty(element.parentElement)) {\n        return false;\n      }\n      if (!isVisibleStyleProperty(element) || element.style.opacity === '0' || window$1.getComputedStyle(element).height === '0px' || window$1.getComputedStyle(element).width === '0px') {\n        return false;\n      }\n      return true;\n    }\n\n    /**\n     * Determine if the element is visible for the user or not.\n     * 1. If an element sum of its offsetWidth, offsetHeight, height and width is less than 1 is not visible.\n     * 2. If elementCenter.x is less than is not visible.\n     * 3. If elementCenter.x is more than the document's width is not visible.\n     * 4. If elementCenter.y is less than 0 is not visible.\n     * 5. If elementCenter.y is the document's height is not visible.\n     *\n     * @function isVisible\n     * @param element {Node}\n     * @return {boolean}\n     */\n    function isVisible(element) {\n      if (element.offsetWidth + element.offsetHeight + element.getBoundingClientRect().height + element.getBoundingClientRect().width === 0) {\n        return false;\n      }\n\n      // Define elementCenter object with props of x and y\n      // x: Left position relative to the viewport plus element's width (no margin) divided between 2.\n      // y: Top position relative to the viewport plus element's height (no margin) divided between 2.\n      const elementCenter = {\n        x: element.getBoundingClientRect().left + element.offsetWidth / 2,\n        y: element.getBoundingClientRect().top + element.offsetHeight / 2\n      };\n      if (elementCenter.x < 0) {\n        return false;\n      }\n      if (elementCenter.x > (document$1.documentElement.clientWidth || window$1.innerWidth)) {\n        return false;\n      }\n      if (elementCenter.y < 0) {\n        return false;\n      }\n      if (elementCenter.y > (document$1.documentElement.clientHeight || window$1.innerHeight)) {\n        return false;\n      }\n      let pointContainer = document$1.elementFromPoint(elementCenter.x, elementCenter.y);\n      while (pointContainer) {\n        if (pointContainer === element) {\n          return true;\n        }\n        if (pointContainer.parentNode) {\n          pointContainer = pointContainer.parentNode;\n        } else {\n          return false;\n        }\n      }\n    }\n\n    // If no DOM element was passed as argument use this component's element.\n    if (!el) {\n      el = this.el();\n    }\n\n    // If element is visible, is being rendered & either does not have a parent element or its tabIndex is not negative.\n    if (isVisible(el) && isBeingRendered(el) && (!el.parentElement || el.tabIndex >= 0)) {\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Register a `Component` with `videojs` given the name and the component.\n   *\n   * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\n   *         should be registered using {@link Tech.registerTech} or\n   *         {@link videojs:videojs.registerTech}.\n   *\n   * > NOTE: This function can also be seen on videojs as\n   *         {@link videojs:videojs.registerComponent}.\n   *\n   * @param {string} name\n   *        The name of the `Component` to register.\n   *\n   * @param {Component} ComponentToRegister\n   *        The `Component` class to register.\n   *\n   * @return {Component}\n   *         The `Component` that was registered.\n   */\n  static registerComponent(name, ComponentToRegister) {\n    if (typeof name !== 'string' || !name) {\n      throw new Error(`Illegal component name, \"${name}\"; must be a non-empty string.`);\n    }\n    const Tech = Component$1.getComponent('Tech');\n\n    // We need to make sure this check is only done if Tech has been registered.\n    const isTech = Tech && Tech.isTech(ComponentToRegister);\n    const isComp = Component$1 === ComponentToRegister || Component$1.prototype.isPrototypeOf(ComponentToRegister.prototype);\n    if (isTech || !isComp) {\n      let reason;\n      if (isTech) {\n        reason = 'techs must be registered using Tech.registerTech()';\n      } else {\n        reason = 'must be a Component subclass';\n      }\n      throw new Error(`Illegal component, \"${name}\"; ${reason}.`);\n    }\n    name = toTitleCase$1(name);\n    if (!Component$1.components_) {\n      Component$1.components_ = {};\n    }\n    const Player = Component$1.getComponent('Player');\n    if (name === 'Player' && Player && Player.players) {\n      const players = Player.players;\n      const playerNames = Object.keys(players);\n\n      // If we have players that were disposed, then their name will still be\n      // in Players.players. So, we must loop through and verify that the value\n      // for each item is null. This allows registration of the Player component\n      // after all players have been disposed or before any were created.\n      if (players && playerNames.length > 0) {\n        for (let i = 0; i < playerNames.length; i++) {\n          if (players[playerNames[i]] !== null) {\n            throw new Error('Can not register Player component after player has been created.');\n          }\n        }\n      }\n    }\n    Component$1.components_[name] = ComponentToRegister;\n    Component$1.components_[toLowerCase(name)] = ComponentToRegister;\n    return ComponentToRegister;\n  }\n\n  /**\n   * Get a `Component` based on the name it was registered with.\n   *\n   * @param {string} name\n   *        The Name of the component to get.\n   *\n   * @return {typeof Component}\n   *         The `Component` that got registered under the given name.\n   */\n  static getComponent(name) {\n    if (!name || !Component$1.components_) {\n      return;\n    }\n    return Component$1.components_[name];\n  }\n}\nComponent$1.registerComponent('Component', Component$1);\n\n/**\n * @file time.js\n * @module time\n */\n\n/**\n * Returns the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @typedef    {Function} TimeRangeIndex\n *\n * @param      {number} [index=0]\n *             The range number to return the time for.\n *\n * @return     {number}\n *             The time offset at the specified index.\n *\n * @deprecated The index argument must be provided.\n *             In the future, leaving it out will throw an error.\n */\n\n/**\n * An object that contains ranges of time, which mimics {@link TimeRanges}.\n *\n * @typedef  {Object} TimeRange\n *\n * @property {number} length\n *           The number of time ranges represented by this object.\n *\n * @property {module:time~TimeRangeIndex} start\n *           Returns the time offset at which a specified time range begins.\n *\n * @property {module:time~TimeRangeIndex} end\n *           Returns the time offset at which a specified time range ends.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\n */\n\n/**\n * Check if any of the time ranges are over the maximum index.\n *\n * @private\n * @param   {string} fnName\n *          The function name to use for logging\n *\n * @param   {number} index\n *          The index to check\n *\n * @param   {number} maxIndex\n *          The maximum possible index\n *\n * @throws  {Error} if the timeRanges provided are over the maxIndex\n */\nfunction rangeCheck(fnName, index, maxIndex) {\n  if (typeof index !== 'number' || index < 0 || index > maxIndex) {\n    throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is non-numeric or out of bounds (0-${maxIndex}).`);\n  }\n}\n\n/**\n * Get the time for the specified index at the start or end\n * of a TimeRange object.\n *\n * @private\n * @param      {string} fnName\n *             The function name to use for logging\n *\n * @param      {string} valueIndex\n *             The property that should be used to get the time. should be\n *             'start' or 'end'\n *\n * @param      {Array} ranges\n *             An array of time ranges\n *\n * @param      {Array} [rangeIndex=0]\n *             The index to start the search at\n *\n * @return     {number}\n *             The time that offset at the specified index.\n *\n * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\n * @throws     {Error} if rangeIndex is more than the length of ranges\n */\nfunction getRange(fnName, valueIndex, ranges, rangeIndex) {\n  rangeCheck(fnName, rangeIndex, ranges.length - 1);\n  return ranges[rangeIndex][valueIndex];\n}\n\n/**\n * Create a time range object given ranges of time.\n *\n * @private\n * @param   {Array} [ranges]\n *          An array of time ranges.\n *\n * @return  {TimeRange}\n */\nfunction createTimeRangesObj(ranges) {\n  let timeRangesObj;\n  if (ranges === undefined || ranges.length === 0) {\n    timeRangesObj = {\n      length: 0,\n      start() {\n        throw new Error('This TimeRanges object is empty');\n      },\n      end() {\n        throw new Error('This TimeRanges object is empty');\n      }\n    };\n  } else {\n    timeRangesObj = {\n      length: ranges.length,\n      start: getRange.bind(null, 'start', 0, ranges),\n      end: getRange.bind(null, 'end', 1, ranges)\n    };\n  }\n  if (window$1.Symbol && window$1.Symbol.iterator) {\n    timeRangesObj[window$1.Symbol.iterator] = () => (ranges || []).values();\n  }\n  return timeRangesObj;\n}\n\n/**\n * Create a `TimeRange` object which mimics an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\n *\n * @param {number|Array[]} start\n *        The start of a single range (a number) or an array of ranges (an\n *        array of arrays of two numbers each).\n *\n * @param {number} end\n *        The end of a single range. Cannot be used with the array form of\n *        the `start` argument.\n *\n * @return {TimeRange}\n */\nfunction createTimeRanges$1(start, end) {\n  if (Array.isArray(start)) {\n    return createTimeRangesObj(start);\n  } else if (start === undefined || end === undefined) {\n    return createTimeRangesObj();\n  }\n  return createTimeRangesObj([[start, end]]);\n}\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\n * seconds) will force a number of leading zeros to cover the length of the\n * guide.\n *\n * @private\n * @param  {number} seconds\n *         Number of seconds to be turned into a string\n *\n * @param  {number} guide\n *         Number (in seconds) to model the string after\n *\n * @return {string}\n *         Time formatted as H:MM:SS or M:SS\n */\nconst defaultImplementation = function (seconds, guide) {\n  seconds = seconds < 0 ? 0 : seconds;\n  let s = Math.floor(seconds % 60);\n  let m = Math.floor(seconds / 60 % 60);\n  let h = Math.floor(seconds / 3600);\n  const gm = Math.floor(guide / 60 % 60);\n  const gh = Math.floor(guide / 3600);\n\n  // handle invalid times\n  if (isNaN(seconds) || seconds === Infinity) {\n    // '-' is false for all relational operators (e.g. <, >=) so this setting\n    // will add the minimum number of fields specified by the guide\n    h = m = s = '-';\n  }\n\n  // Check if we need to show hours\n  h = h > 0 || gh > 0 ? h + ':' : '';\n\n  // If hours are showing, we may need to add a leading zero.\n  // Always show at least one digit of minutes.\n  m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':';\n\n  // Check if leading zero is need for seconds\n  s = s < 10 ? '0' + s : s;\n  return h + m + s;\n};\n\n// Internal pointer to the current implementation.\nlet implementation = defaultImplementation;\n\n/**\n * Replaces the default formatTime implementation with a custom implementation.\n *\n * @param {Function} customImplementation\n *        A function which will be used in place of the default formatTime\n *        implementation. Will receive the current time in seconds and the\n *        guide (in seconds) as arguments.\n */\nfunction setFormatTime(customImplementation) {\n  implementation = customImplementation;\n}\n\n/**\n * Resets formatTime to the default implementation.\n */\nfunction resetFormatTime() {\n  implementation = defaultImplementation;\n}\n\n/**\n * Delegates to either the default time formatting function or a custom\n * function supplied via `setFormatTime`.\n *\n * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\n * guide (in seconds) will force a number of leading zeros to cover the\n * length of the guide.\n *\n * @example  formatTime(125, 600) === \"02:05\"\n * @param    {number} seconds\n *           Number of seconds to be turned into a string\n *\n * @param    {number} guide\n *           Number (in seconds) to model the string after\n *\n * @return   {string}\n *           Time formatted as H:MM:SS or M:SS\n */\nfunction formatTime(seconds, guide = seconds) {\n  return implementation(seconds, guide);\n}\n\nvar Time = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createTimeRanges: createTimeRanges$1,\n  createTimeRange: createTimeRanges$1,\n  setFormatTime: setFormatTime,\n  resetFormatTime: resetFormatTime,\n  formatTime: formatTime\n});\n\n/**\n * @file buffer.js\n * @module buffer\n */\n\n/** @import { TimeRange } from './time' */\n\n/**\n * Compute the percentage of the media that has been buffered.\n *\n * @param {TimeRange} buffered\n *        The current `TimeRanges` object representing buffered time ranges\n *\n * @param {number} duration\n *        Total duration of the media\n *\n * @return {number}\n *         Percent buffered of the total duration in decimal form.\n */\nfunction bufferedPercent(buffered, duration) {\n  let bufferedDuration = 0;\n  let start;\n  let end;\n  if (!duration) {\n    return 0;\n  }\n  if (!buffered || !buffered.length) {\n    buffered = createTimeRanges$1(0, 0);\n  }\n  for (let i = 0; i < buffered.length; i++) {\n    start = buffered.start(i);\n    end = buffered.end(i);\n\n    // buffered end can be bigger than duration by a very small fraction\n    if (end > duration) {\n      end = duration;\n    }\n    bufferedDuration += end - start;\n  }\n  return bufferedDuration / duration;\n}\n\n/**\n * @file media-error.js\n */\n\n/**\n * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\n *\n * @param {number|string|Object|MediaError} value\n *        This can be of multiple types:\n *        - number: should be a standard error code\n *        - string: an error message (the code will be 0)\n *        - Object: arbitrary properties\n *        - `MediaError` (native): used to populate a video.js `MediaError` object\n *        - `MediaError` (video.js): will return itself if it's already a\n *          video.js `MediaError` object.\n *\n * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\n * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\n *\n * @class MediaError\n */\nfunction MediaError(value) {\n  // Allow redundant calls to this constructor to avoid having `instanceof`\n  // checks peppered around the code.\n  if (value instanceof MediaError) {\n    return value;\n  }\n  if (typeof value === 'number') {\n    this.code = value;\n  } else if (typeof value === 'string') {\n    // default code is zero, so this is a custom error\n    this.message = value;\n  } else if (isObject(value)) {\n    // We assign the `code` property manually because native `MediaError` objects\n    // do not expose it as an own/enumerable property of the object.\n    if (typeof value.code === 'number') {\n      this.code = value.code;\n    }\n    Object.assign(this, value);\n  }\n  if (!this.message) {\n    this.message = MediaError.defaultMessages[this.code] || '';\n  }\n}\n\n/**\n * The error code that refers two one of the defined `MediaError` types\n *\n * @type {Number}\n */\nMediaError.prototype.code = 0;\n\n/**\n * An optional message that to show with the error. Message is not part of the HTML5\n * video spec but allows for more informative custom errors.\n *\n * @type {String}\n */\nMediaError.prototype.message = '';\n\n/**\n * An optional status code that can be set by plugins to allow even more detail about\n * the error. For example a plugin might provide a specific HTTP status code and an\n * error message for that code. Then when the plugin gets that error this class will\n * know how to display an error message for it. This allows a custom message to show\n * up on the `Player` error overlay.\n *\n * @type {Array}\n */\nMediaError.prototype.status = null;\n\n/**\n * An object containing an error type, as well as other information regarding the error.\n *\n * @typedef {{errorType: string, [key: string]: any}} ErrorMetadata\n */\n\n/**\n * An optional object to give more detail about the error. This can be used to give\n * a higher level of specificity to an error versus the more generic MediaError codes.\n * `metadata` expects an `errorType` string that should align with the values from videojs.Error.\n *\n * @type {ErrorMetadata}\n */\nMediaError.prototype.metadata = null;\n\n/**\n * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\n * specification listed under {@link MediaError} for more information.\n *\n * @enum {array}\n * @readonly\n * @property {string} 0 - MEDIA_ERR_CUSTOM\n * @property {string} 1 - MEDIA_ERR_ABORTED\n * @property {string} 2 - MEDIA_ERR_NETWORK\n * @property {string} 3 - MEDIA_ERR_DECODE\n * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\n * @property {string} 5 - MEDIA_ERR_ENCRYPTED\n */\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\n\n/**\n * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\n *\n * @type {Array}\n * @constant\n */\nMediaError.defaultMessages = {\n  1: 'You aborted the media playback',\n  2: 'A network error caused the media download to fail part-way.',\n  3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\n  4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\n  5: 'The media is encrypted and we do not have the keys to decrypt it.'\n};\n\n/**\n * W3C error code for any custom error.\n *\n * @member MediaError#MEDIA_ERR_CUSTOM\n * @constant {number}\n * @default 0\n */\nMediaError.MEDIA_ERR_CUSTOM = 0;\n\n/**\n * W3C error code for any custom error.\n *\n * @member MediaError.MEDIA_ERR_CUSTOM\n * @constant {number}\n * @default 0\n */\nMediaError.prototype.MEDIA_ERR_CUSTOM = 0;\n\n/**\n * W3C error code for media error aborted.\n *\n * @member MediaError#MEDIA_ERR_ABORTED\n * @constant {number}\n * @default 1\n */\nMediaError.MEDIA_ERR_ABORTED = 1;\n\n/**\n * W3C error code for media error aborted.\n *\n * @member MediaError.MEDIA_ERR_ABORTED\n * @constant {number}\n * @default 1\n */\nMediaError.prototype.MEDIA_ERR_ABORTED = 1;\n\n/**\n * W3C error code for any network error.\n *\n * @member MediaError#MEDIA_ERR_NETWORK\n * @constant {number}\n * @default 2\n */\nMediaError.MEDIA_ERR_NETWORK = 2;\n\n/**\n * W3C error code for any network error.\n *\n * @member MediaError.MEDIA_ERR_NETWORK\n * @constant {number}\n * @default 2\n */\nMediaError.prototype.MEDIA_ERR_NETWORK = 2;\n\n/**\n * W3C error code for any decoding error.\n *\n * @member MediaError#MEDIA_ERR_DECODE\n * @constant {number}\n * @default 3\n */\nMediaError.MEDIA_ERR_DECODE = 3;\n\n/**\n * W3C error code for any decoding error.\n *\n * @member MediaError.MEDIA_ERR_DECODE\n * @constant {number}\n * @default 3\n */\nMediaError.prototype.MEDIA_ERR_DECODE = 3;\n\n/**\n * W3C error code for any time that a source is not supported.\n *\n * @member MediaError#MEDIA_ERR_SRC_NOT_SUPPORTED\n * @constant {number}\n * @default 4\n */\nMediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\n/**\n * W3C error code for any time that a source is not supported.\n *\n * @member MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED\n * @constant {number}\n * @default 4\n */\nMediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\n\n/**\n * W3C error code for any time that a source is encrypted.\n *\n * @member MediaError#MEDIA_ERR_ENCRYPTED\n * @constant {number}\n * @default 5\n */\nMediaError.MEDIA_ERR_ENCRYPTED = 5;\n\n/**\n * W3C error code for any time that a source is encrypted.\n *\n * @member MediaError.MEDIA_ERR_ENCRYPTED\n * @constant {number}\n * @default 5\n */\nMediaError.prototype.MEDIA_ERR_ENCRYPTED = 5;\n\n/**\n * Returns whether an object is `Promise`-like (i.e. has a `then` method).\n *\n * @param  {Object}  value\n *         An object that may or may not be `Promise`-like.\n *\n * @return {boolean}\n *         Whether or not the object is `Promise`-like.\n */\nfunction isPromise(value) {\n  return value !== undefined && value !== null && typeof value.then === 'function';\n}\n\n/**\n * Silence a Promise-like object.\n *\n * This is useful for avoiding non-harmful, but potentially confusing \"uncaught\n * play promise\" rejection error messages.\n *\n * @param  {Object} value\n *         An object that may or may not be `Promise`-like.\n */\nfunction silencePromise(value) {\n  if (isPromise(value)) {\n    value.then(null, e => {});\n  }\n}\n\n/**\n * @file text-track-list-converter.js Utilities for capturing text track state and\n * re-creating tracks based on a capture.\n *\n * @module text-track-list-converter\n */\n\n/** @import Tech from '../tech/tech' */\n\n/**\n * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\n * represents the {@link TextTrack}'s state.\n *\n * @param {TextTrack} track\n *        The text track to query.\n *\n * @return {Object}\n *         A serializable javascript representation of the TextTrack.\n * @private\n */\nconst trackToJson_ = function (track) {\n  const ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce((acc, prop, i) => {\n    if (track[prop]) {\n      acc[prop] = track[prop];\n    }\n    return acc;\n  }, {\n    cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\n      return {\n        startTime: cue.startTime,\n        endTime: cue.endTime,\n        text: cue.text,\n        id: cue.id\n      };\n    })\n  });\n  return ret;\n};\n\n/**\n * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\n * state of all {@link TextTrack}s currently configured. The return array is compatible with\n * {@link text-track-list-converter:jsonToTextTracks}.\n *\n * @param {Tech} tech\n *        The tech object to query\n *\n * @return {Array}\n *         A serializable javascript representation of the {@link Tech}s\n *         {@link TextTrackList}.\n */\nconst textTracksToJson = function (tech) {\n  const trackEls = tech.$$('track');\n  const trackObjs = Array.prototype.map.call(trackEls, t => t.track);\n  const tracks = Array.prototype.map.call(trackEls, function (trackEl) {\n    const json = trackToJson_(trackEl.track);\n    if (trackEl.src) {\n      json.src = trackEl.src;\n    }\n    return json;\n  });\n  return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\n    return trackObjs.indexOf(track) === -1;\n  }).map(trackToJson_));\n};\n\n/**\n * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\n * object {@link TextTrack} representations.\n *\n * @param {Array} json\n *        An array of `TextTrack` representation objects, like those that would be\n *        produced by `textTracksToJson`.\n *\n * @param {Tech} tech\n *        The `Tech` to create the `TextTrack`s on.\n */\nconst jsonToTextTracks = function (json, tech) {\n  json.forEach(function (track) {\n    const addedTrack = tech.addRemoteTextTrack(track).track;\n    if (!track.src && track.cues) {\n      track.cues.forEach(cue => addedTrack.addCue(cue));\n    }\n  });\n  return tech.textTracks();\n};\nvar textTrackConverter = {\n  textTracksToJson,\n  jsonToTextTracks,\n  trackToJson_\n};\n\n/**\n * @file modal-dialog.js\n */\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from './utils/dom' */\n\nconst MODAL_CLASS_NAME = 'vjs-modal-dialog';\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n */\nclass ModalDialog extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {string} [options.description]\n   *        A text description for the modal, primarily for accessibility.\n   *\n   * @param {boolean} [options.fillAlways=false]\n   *        Normally, modals are automatically filled only the first time\n   *        they open. This tells the modal to refresh its content\n   *        every time it opens.\n   *\n   * @param {string} [options.label]\n   *        A text label for the modal, primarily for accessibility.\n   *\n   * @param {boolean} [options.pauseOnOpen=true]\n   *        If `true`, playback will will be paused if playing when\n   *        the modal opens, and resumed when it closes.\n   *\n   * @param {boolean} [options.temporary=true]\n   *        If `true`, the modal can only be opened once; it will be\n   *        disposed as soon as it's closed.\n   *\n   * @param {boolean} [options.uncloseable=false]\n   *        If `true`, the user will not be able to close the modal\n   *        through the UI in the normal ways. Programmatic closing is\n   *        still possible.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.close_ = e => this.close(e);\n    this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n    this.closeable(!this.options_.uncloseable);\n    this.content(this.options_.content);\n\n    // Make sure the contentEl is defined AFTER any children are initialized\n    // because we only want the contents of the modal in the contentEl\n    // (not the UI elements like the close button).\n    this.contentEl_ = createEl('div', {\n      className: `${MODAL_CLASS_NAME}-content`\n    }, {\n      role: 'document'\n    });\n    this.descEl_ = createEl('p', {\n      className: `${MODAL_CLASS_NAME}-description vjs-control-text`,\n      id: this.el().getAttribute('aria-describedby')\n    });\n    textContent(this.descEl_, this.description());\n    this.el_.appendChild(this.descEl_);\n    this.el_.appendChild(this.contentEl_);\n  }\n\n  /**\n   * Create the `ModalDialog`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: this.buildCSSClass(),\n      tabIndex: -1\n    }, {\n      'aria-describedby': `${this.id()}_description`,\n      'aria-hidden': 'true',\n      'aria-label': this.label(),\n      'role': 'dialog',\n      'aria-live': 'polite'\n    });\n  }\n  dispose() {\n    this.contentEl_ = null;\n    this.descEl_ = null;\n    this.previouslyActiveEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Returns the label string for this modal. Primarily used for accessibility.\n   *\n   * @return {string}\n   *         the localized or raw label of this modal.\n   */\n  label() {\n    return this.localize(this.options_.label || 'Modal Window');\n  }\n\n  /**\n   * Returns the description string for this modal. Primarily used for\n   * accessibility.\n   *\n   * @return {string}\n   *         The localized or raw description of this modal.\n   */\n  description() {\n    let desc = this.options_.description || this.localize('This is a modal window.');\n\n    // Append a universal closeability message if the modal is closeable.\n    if (this.closeable()) {\n      desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n    }\n    return desc;\n  }\n\n  /**\n   * Opens the modal.\n   *\n   * @fires ModalDialog#beforemodalopen\n   * @fires ModalDialog#modalopen\n   */\n  open() {\n    if (this.opened_) {\n      if (this.options_.fillAlways) {\n        this.fill();\n      }\n      return;\n    }\n    const player = this.player();\n\n    /**\n      * Fired just before a `ModalDialog` is opened.\n      *\n      * @event ModalDialog#beforemodalopen\n      * @type {Event}\n      */\n    this.trigger('beforemodalopen');\n    this.opened_ = true;\n\n    // Fill content if the modal has never opened before and\n    // never been filled.\n    if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n      this.fill();\n    }\n\n    // If the player was playing, pause it and take note of its previously\n    // playing state.\n    this.wasPlaying_ = !player.paused();\n    if (this.options_.pauseOnOpen && this.wasPlaying_) {\n      player.pause();\n    }\n    this.on('keydown', this.handleKeyDown_);\n\n    // Hide controls and note if they were enabled.\n    this.hadControls_ = player.controls();\n    player.controls(false);\n    this.show();\n    this.conditionalFocus_();\n    this.el().setAttribute('aria-hidden', 'false');\n\n    /**\n      * Fired just after a `ModalDialog` is opened.\n      *\n      * @event ModalDialog#modalopen\n      * @type {Event}\n      */\n    this.trigger('modalopen');\n    this.hasBeenOpened_ = true;\n  }\n\n  /**\n   * If the `ModalDialog` is currently open or closed.\n   *\n   * @param  {boolean} [value]\n   *         If given, it will open (`true`) or close (`false`) the modal.\n   *\n   * @return {boolean}\n   *         the current open state of the modaldialog\n   */\n  opened(value) {\n    if (typeof value === 'boolean') {\n      this[value ? 'open' : 'close']();\n    }\n    return this.opened_;\n  }\n\n  /**\n   * Closes the modal, does nothing if the `ModalDialog` is\n   * not open.\n   *\n   * @fires ModalDialog#beforemodalclose\n   * @fires ModalDialog#modalclose\n   */\n  close() {\n    if (!this.opened_) {\n      return;\n    }\n    const player = this.player();\n\n    /**\n      * Fired just before a `ModalDialog` is closed.\n      *\n      * @event ModalDialog#beforemodalclose\n      * @type {Event}\n      */\n    this.trigger('beforemodalclose');\n    this.opened_ = false;\n    if (this.wasPlaying_ && this.options_.pauseOnOpen) {\n      player.play();\n    }\n    this.off('keydown', this.handleKeyDown_);\n    if (this.hadControls_) {\n      player.controls(true);\n    }\n    this.hide();\n    this.el().setAttribute('aria-hidden', 'true');\n\n    /**\n      * Fired just after a `ModalDialog` is closed.\n      *\n      * @event ModalDialog#modalclose\n      * @type {Event}\n      *\n      * @property {boolean} [bubbles=true]\n      */\n    this.trigger({\n      type: 'modalclose',\n      bubbles: true\n    });\n    this.conditionalBlur_();\n    if (this.options_.temporary) {\n      this.dispose();\n    }\n  }\n\n  /**\n   * Check to see if the `ModalDialog` is closeable via the UI.\n   *\n   * @param  {boolean} [value]\n   *         If given as a boolean, it will set the `closeable` option.\n   *\n   * @return {boolean}\n   *         Returns the final value of the closable option.\n   */\n  closeable(value) {\n    if (typeof value === 'boolean') {\n      const closeable = this.closeable_ = !!value;\n      let close = this.getChild('closeButton');\n\n      // If this is being made closeable and has no close button, add one.\n      if (closeable && !close) {\n        // The close button should be a child of the modal - not its\n        // content element, so temporarily change the content element.\n        const temp = this.contentEl_;\n        this.contentEl_ = this.el_;\n        close = this.addChild('closeButton', {\n          controlText: 'Close Modal Dialog'\n        });\n        this.contentEl_ = temp;\n        this.on(close, 'close', this.close_);\n      }\n\n      // If this is being made uncloseable and has a close button, remove it.\n      if (!closeable && close) {\n        this.off(close, 'close', this.close_);\n        this.removeChild(close);\n        close.dispose();\n      }\n    }\n    return this.closeable_;\n  }\n\n  /**\n   * Fill the modal's content element with the modal's \"content\" option.\n   * The content element will be emptied before this change takes place.\n   */\n  fill() {\n    this.fillWith(this.content());\n  }\n\n  /**\n   * Fill the modal's content element with arbitrary content.\n   * The content element will be emptied before this change takes place.\n   *\n   * @fires ModalDialog#beforemodalfill\n   * @fires ModalDialog#modalfill\n   *\n   * @param {ContentDescriptor} [content]\n   *        The same rules apply to this as apply to the `content` option.\n   */\n  fillWith(content) {\n    const contentEl = this.contentEl();\n    const parentEl = contentEl.parentNode;\n    const nextSiblingEl = contentEl.nextSibling;\n\n    /**\n      * Fired just before a `ModalDialog` is filled with content.\n      *\n      * @event ModalDialog#beforemodalfill\n      * @type {Event}\n      */\n    this.trigger('beforemodalfill');\n    this.hasBeenFilled_ = true;\n\n    // Detach the content element from the DOM before performing\n    // manipulation to avoid modifying the live DOM multiple times.\n    parentEl.removeChild(contentEl);\n    this.empty();\n    insertContent(contentEl, content);\n    /**\n     * Fired just after a `ModalDialog` is filled with content.\n     *\n     * @event ModalDialog#modalfill\n     * @type {Event}\n     */\n    this.trigger('modalfill');\n\n    // Re-inject the re-filled content element.\n    if (nextSiblingEl) {\n      parentEl.insertBefore(contentEl, nextSiblingEl);\n    } else {\n      parentEl.appendChild(contentEl);\n    }\n\n    // make sure that the close button is last in the dialog DOM\n    const closeButton = this.getChild('closeButton');\n    if (closeButton) {\n      parentEl.appendChild(closeButton.el_);\n    }\n\n    /**\n     * Fired after `ModalDialog` is re-filled with content & close button is appended.\n     *\n     * @event ModalDialog#aftermodalfill\n     * @type {Event}\n     */\n    this.trigger('aftermodalfill');\n  }\n\n  /**\n   * Empties the content element. This happens anytime the modal is filled.\n   *\n   * @fires ModalDialog#beforemodalempty\n   * @fires ModalDialog#modalempty\n   */\n  empty() {\n    /**\n    * Fired just before a `ModalDialog` is emptied.\n    *\n    * @event ModalDialog#beforemodalempty\n    * @type {Event}\n    */\n    this.trigger('beforemodalempty');\n    emptyEl(this.contentEl());\n\n    /**\n    * Fired just after a `ModalDialog` is emptied.\n    *\n    * @event ModalDialog#modalempty\n    * @type {Event}\n    */\n    this.trigger('modalempty');\n  }\n\n  /**\n   * Gets or sets the modal content, which gets normalized before being\n   * rendered into the DOM.\n   *\n   * This does not update the DOM or fill the modal, but it is called during\n   * that process.\n   *\n   * @param  {ContentDescriptor} [value]\n   *         If defined, sets the internal content value to be used on the\n   *         next call(s) to `fill`. This value is normalized before being\n   *         inserted. To \"clear\" the internal content value, pass `null`.\n   *\n   * @return {ContentDescriptor}\n   *         The current content of the modal dialog\n   */\n  content(value) {\n    if (typeof value !== 'undefined') {\n      this.content_ = value;\n    }\n    return this.content_;\n  }\n\n  /**\n   * conditionally focus the modal dialog if focus was previously on the player.\n   *\n   * @private\n   */\n  conditionalFocus_() {\n    const activeEl = document$1.activeElement;\n    const playerEl = this.player_.el_;\n    this.previouslyActiveEl_ = null;\n    if (playerEl.contains(activeEl) || playerEl === activeEl) {\n      this.previouslyActiveEl_ = activeEl;\n      this.focus();\n    }\n  }\n\n  /**\n   * conditionally blur the element and refocus the last focused element\n   *\n   * @private\n   */\n  conditionalBlur_() {\n    if (this.previouslyActiveEl_) {\n      this.previouslyActiveEl_.focus();\n      this.previouslyActiveEl_ = null;\n    }\n  }\n\n  /**\n   * Keydown handler. Attached when modal is focused.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    /**\n     * Fired a custom keyDown event that bubbles.\n     *\n     * @event ModalDialog#modalKeydown\n     * @type {Event}\n     */\n    this.trigger({\n      type: 'modalKeydown',\n      originalEvent: event,\n      target: this,\n      bubbles: true\n    });\n    // Do not allow keydowns to reach out of the modal dialog.\n    event.stopPropagation();\n    if (event.key === 'Escape' && this.closeable()) {\n      event.preventDefault();\n      this.close();\n      return;\n    }\n\n    // exit early if it isn't a tab key\n    if (event.key !== 'Tab') {\n      return;\n    }\n    const focusableEls = this.focusableEls_();\n    const activeEl = this.el_.querySelector(':focus');\n    let focusIndex;\n    for (let i = 0; i < focusableEls.length; i++) {\n      if (activeEl === focusableEls[i]) {\n        focusIndex = i;\n        break;\n      }\n    }\n    if (document$1.activeElement === this.el_) {\n      focusIndex = 0;\n    }\n    if (event.shiftKey && focusIndex === 0) {\n      focusableEls[focusableEls.length - 1].focus();\n      event.preventDefault();\n    } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\n      focusableEls[0].focus();\n      event.preventDefault();\n    }\n  }\n\n  /**\n   * get all focusable elements\n   *\n   * @private\n   */\n  focusableEls_() {\n    const allChildren = this.el_.querySelectorAll('*');\n    return Array.prototype.filter.call(allChildren, child => {\n      return (child instanceof window$1.HTMLAnchorElement || child instanceof window$1.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof window$1.HTMLInputElement || child instanceof window$1.HTMLSelectElement || child instanceof window$1.HTMLTextAreaElement || child instanceof window$1.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof window$1.HTMLIFrameElement || child instanceof window$1.HTMLObjectElement || child instanceof window$1.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\n    });\n  }\n}\n\n/**\n * Default options for `ModalDialog` default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n  pauseOnOpen: true,\n  temporary: true\n};\nComponent$1.registerComponent('ModalDialog', ModalDialog);\n\n/**\n * @file track-list.js\n */\n\n/** @import Track from './track' */\n\n/**\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\n * {@link VideoTrackList}\n *\n * @extends EventTarget\n */\nclass TrackList extends EventTarget$2 {\n  /**\n   * Create an instance of this class\n   *\n   * @param { Track[] } tracks\n   *        A list of tracks to initialize the list with.\n   *\n   * @abstract\n   */\n  constructor(tracks = []) {\n    super();\n    this.tracks_ = [];\n\n    /**\n     * @memberof TrackList\n     * @member {number} length\n     *         The current number of `Track`s in the this Trackist.\n     * @instance\n     */\n    Object.defineProperty(this, 'length', {\n      get() {\n        return this.tracks_.length;\n      }\n    });\n    for (let i = 0; i < tracks.length; i++) {\n      this.addTrack(tracks[i]);\n    }\n  }\n\n  /**\n   * Add a {@link Track} to the `TrackList`\n   *\n   * @param {Track} track\n   *        The audio, video, or text track to add to the list.\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    const index = this.tracks_.length;\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get() {\n          return this.tracks_[index];\n        }\n      });\n    }\n\n    // Do not add duplicate tracks\n    if (this.tracks_.indexOf(track) === -1) {\n      this.tracks_.push(track);\n      /**\n       * Triggered when a track is added to a track list.\n       *\n       * @event TrackList#addtrack\n       * @type {Event}\n       * @property {Track} track\n       *           A reference to track that was added.\n       */\n      this.trigger({\n        track,\n        type: 'addtrack',\n        target: this\n      });\n    }\n\n    /**\n     * Triggered when a track label is changed.\n     *\n     * @event TrackList#addtrack\n     * @type {Event}\n     * @property {Track} track\n     *           A reference to track that was added.\n     */\n    track.labelchange_ = () => {\n      this.trigger({\n        track,\n        type: 'labelchange',\n        target: this\n      });\n    };\n    if (isEvented(track)) {\n      track.addEventListener('labelchange', track.labelchange_);\n    }\n  }\n\n  /**\n   * Remove a {@link Track} from the `TrackList`\n   *\n   * @param {Track} rtrack\n   *        The audio, video, or text track to remove from the list.\n   *\n   * @fires TrackList#removetrack\n   */\n  removeTrack(rtrack) {\n    let track;\n    for (let i = 0, l = this.length; i < l; i++) {\n      if (this[i] === rtrack) {\n        track = this[i];\n        if (track.off) {\n          track.off();\n        }\n        this.tracks_.splice(i, 1);\n        break;\n      }\n    }\n    if (!track) {\n      return;\n    }\n\n    /**\n     * Triggered when a track is removed from track list.\n     *\n     * @event TrackList#removetrack\n     * @type {Event}\n     * @property {Track} track\n     *           A reference to track that was removed.\n     */\n    this.trigger({\n      track,\n      type: 'removetrack',\n      target: this\n    });\n  }\n\n  /**\n   * Get a Track from the TrackList by a tracks id\n   *\n   * @param {string} id - the id of the track to get\n   * @method getTrackById\n   * @return {Track}\n   * @private\n   */\n  getTrackById(id) {\n    let result = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      const track = this[i];\n      if (track.id === id) {\n        result = track;\n        break;\n      }\n    }\n    return result;\n  }\n}\n\n/**\n * Triggered when a different track is selected/enabled.\n *\n * @event TrackList#change\n * @type {Event}\n */\n\n/**\n * Events that can be called with on + eventName. See {@link EventHandler}.\n *\n * @property {Object} TrackList#allowedEvents_\n * @protected\n */\nTrackList.prototype.allowedEvents_ = {\n  change: 'change',\n  addtrack: 'addtrack',\n  removetrack: 'removetrack',\n  labelchange: 'labelchange'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (const event in TrackList.prototype.allowedEvents_) {\n  TrackList.prototype['on' + event] = null;\n}\n\n/**\n * @file audio-track-list.js\n */\n\n/** @import AudioTrack from './audio-track' */\n\n/**\n * Anywhere we call this function we diverge from the spec\n * as we only support one enabled audiotrack at a time\n *\n * @param {AudioTrackList} list\n *        list to work on\n *\n * @param {AudioTrack} track\n *        The track to skip\n *\n * @private\n */\nconst disableOthers$1 = function (list, track) {\n  for (let i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    }\n    // another audio track is enabled, disable it\n    list[i].enabled = false;\n  }\n};\n\n/**\n * The current list of {@link AudioTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\n * @extends TrackList\n */\nclass AudioTrackList extends TrackList {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {AudioTrack[]} [tracks=[]]\n   *        A list of `AudioTrack` to instantiate the list with.\n   */\n  constructor(tracks = []) {\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].enabled) {\n        disableOthers$1(tracks, tracks[i]);\n        break;\n      }\n    }\n    super(tracks);\n    this.changing_ = false;\n  }\n\n  /**\n   * Add an {@link AudioTrack} to the `AudioTrackList`.\n   *\n   * @param {AudioTrack} track\n   *        The AudioTrack to add to the list\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    if (track.enabled) {\n      disableOthers$1(this, track);\n    }\n    super.addTrack(track);\n    // native tracks don't have this\n    if (!track.addEventListener) {\n      return;\n    }\n    track.enabledChange_ = () => {\n      // when we are disabling other tracks (since we don't support\n      // more than one track at a time) we will set changing_\n      // to true so that we don't trigger additional change events\n      if (this.changing_) {\n        return;\n      }\n      this.changing_ = true;\n      disableOthers$1(this, track);\n      this.changing_ = false;\n      this.trigger('change');\n    };\n\n    /**\n     * @listens AudioTrack#enabledchange\n     * @fires TrackList#change\n     */\n    track.addEventListener('enabledchange', track.enabledChange_);\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n    if (rtrack.removeEventListener && rtrack.enabledChange_) {\n      rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\n      rtrack.enabledChange_ = null;\n    }\n  }\n}\n\n/**\n * @file video-track-list.js\n */\n\n/** @import VideoTrack from './video-track' */\n\n/**\n * Un-select all other {@link VideoTrack}s that are selected.\n *\n * @param {VideoTrackList} list\n *        list to work on\n *\n * @param {VideoTrack} track\n *        The track to skip\n *\n * @private\n */\nconst disableOthers = function (list, track) {\n  for (let i = 0; i < list.length; i++) {\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\n      continue;\n    }\n    // another video track is enabled, disable it\n    list[i].selected = false;\n  }\n};\n\n/**\n * The current list of {@link VideoTrack} for a video.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\n * @extends TrackList\n */\nclass VideoTrackList extends TrackList {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {VideoTrack[]} [tracks=[]]\n   *        A list of `VideoTrack` to instantiate the list with.\n   */\n  constructor(tracks = []) {\n    // make sure only 1 track is enabled\n    // sorted from last index to first index\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      if (tracks[i].selected) {\n        disableOthers(tracks, tracks[i]);\n        break;\n      }\n    }\n    super(tracks);\n    this.changing_ = false;\n\n    /**\n     * @member {number} VideoTrackList#selectedIndex\n     *         The current index of the selected {@link VideoTrack`}.\n     */\n    Object.defineProperty(this, 'selectedIndex', {\n      get() {\n        for (let i = 0; i < this.length; i++) {\n          if (this[i].selected) {\n            return i;\n          }\n        }\n        return -1;\n      },\n      set() {}\n    });\n  }\n\n  /**\n   * Add a {@link VideoTrack} to the `VideoTrackList`.\n   *\n   * @param {VideoTrack} track\n   *        The VideoTrack to add to the list\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    if (track.selected) {\n      disableOthers(this, track);\n    }\n    super.addTrack(track);\n    // native tracks don't have this\n    if (!track.addEventListener) {\n      return;\n    }\n    track.selectedChange_ = () => {\n      if (this.changing_) {\n        return;\n      }\n      this.changing_ = true;\n      disableOthers(this, track);\n      this.changing_ = false;\n      this.trigger('change');\n    };\n\n    /**\n     * @listens VideoTrack#selectedchange\n     * @fires TrackList#change\n     */\n    track.addEventListener('selectedchange', track.selectedChange_);\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n    if (rtrack.removeEventListener && rtrack.selectedChange_) {\n      rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\n      rtrack.selectedChange_ = null;\n    }\n  }\n}\n\n/**\n * @file text-track-list.js\n */\n\n/** @import TextTrack from './text-track' */\n\n/**\n * The current list of {@link TextTrack} for a media file.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\n * @extends TrackList\n */\nclass TextTrackList extends TrackList {\n  /**\n   * Add a {@link TextTrack} to the `TextTrackList`\n   *\n   * @param {TextTrack} track\n   *        The text track to add to the list.\n   *\n   * @fires TrackList#addtrack\n   */\n  addTrack(track) {\n    super.addTrack(track);\n    if (!this.queueChange_) {\n      this.queueChange_ = () => this.queueTrigger('change');\n    }\n    if (!this.triggerSelectedlanguagechange) {\n      this.triggerSelectedlanguagechange_ = () => this.trigger('selectedlanguagechange');\n    }\n\n    /**\n     * @listens TextTrack#modechange\n     * @fires TrackList#change\n     */\n    track.addEventListener('modechange', this.queueChange_);\n    const nonLanguageTextTrackKind = ['metadata', 'chapters'];\n    if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\n      track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\n    }\n  }\n  removeTrack(rtrack) {\n    super.removeTrack(rtrack);\n\n    // manually remove the event handlers we added\n    if (rtrack.removeEventListener) {\n      if (this.queueChange_) {\n        rtrack.removeEventListener('modechange', this.queueChange_);\n      }\n      if (this.selectedlanguagechange_) {\n        rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\n      }\n    }\n  }\n}\n\n/**\n * @file html-track-element-list.js\n */\n\n/**\n * The current list of {@link HtmlTrackElement}s.\n */\nclass HtmlTrackElementList {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {HtmlTrackElement[]} [tracks=[]]\n   *        A list of `HtmlTrackElement` to instantiate the list with.\n   */\n  constructor(trackElements = []) {\n    this.trackElements_ = [];\n\n    /**\n     * @memberof HtmlTrackElementList\n     * @member {number} length\n     *         The current number of `Track`s in the this Trackist.\n     * @instance\n     */\n    Object.defineProperty(this, 'length', {\n      get() {\n        return this.trackElements_.length;\n      }\n    });\n    for (let i = 0, length = trackElements.length; i < length; i++) {\n      this.addTrackElement_(trackElements[i]);\n    }\n  }\n\n  /**\n   * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\n   *\n   * @param {HtmlTrackElement} trackElement\n   *        The track element to add to the list.\n   *\n   * @private\n   */\n  addTrackElement_(trackElement) {\n    const index = this.trackElements_.length;\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get() {\n          return this.trackElements_[index];\n        }\n      });\n    }\n\n    // Do not add duplicate elements\n    if (this.trackElements_.indexOf(trackElement) === -1) {\n      this.trackElements_.push(trackElement);\n    }\n  }\n\n  /**\n   * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\n   * {@link TextTrack}.\n   *\n   * @param {TextTrack} track\n   *        The track associated with a track element.\n   *\n   * @return {HtmlTrackElement|undefined}\n   *         The track element that was found or undefined.\n   *\n   * @private\n   */\n  getTrackElementByTrack_(track) {\n    let trackElement_;\n    for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (track === this.trackElements_[i].track) {\n        trackElement_ = this.trackElements_[i];\n        break;\n      }\n    }\n    return trackElement_;\n  }\n\n  /**\n   * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\n   *\n   * @param {HtmlTrackElement} trackElement\n   *        The track element to remove from the list.\n   *\n   * @private\n   */\n  removeTrackElement_(trackElement) {\n    for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n      if (trackElement === this.trackElements_[i]) {\n        if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\n          this.trackElements_[i].track.off();\n        }\n        if (typeof this.trackElements_[i].off === 'function') {\n          this.trackElements_[i].off();\n        }\n        this.trackElements_.splice(i, 1);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * @file text-track-cue-list.js\n */\n\n/**\n * @typedef {Object} TextTrackCueList~TextTrackCue\n *\n * @property {string} id\n *           The unique id for this text track cue\n *\n * @property {number} startTime\n *           The start time for this text track cue\n *\n * @property {number} endTime\n *           The end time for this text track cue\n *\n * @property {boolean} pauseOnExit\n *           Pause when the end time is reached if true.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\n */\n\n/**\n * A List of TextTrackCues.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\n */\nclass TextTrackCueList {\n  /**\n   * Create an instance of this class..\n   *\n   * @param {Array} cues\n   *        A list of cues to be initialized with\n   */\n  constructor(cues) {\n    TextTrackCueList.prototype.setCues_.call(this, cues);\n\n    /**\n     * @memberof TextTrackCueList\n     * @member {number} length\n     *         The current number of `TextTrackCue`s in the TextTrackCueList.\n     * @instance\n     */\n    Object.defineProperty(this, 'length', {\n      get() {\n        return this.length_;\n      }\n    });\n  }\n\n  /**\n   * A setter for cues in this list. Creates getters\n   * an an index for the cues.\n   *\n   * @param {Array} cues\n   *        An array of cues to set\n   *\n   * @private\n   */\n  setCues_(cues) {\n    const oldLength = this.length || 0;\n    let i = 0;\n    const l = cues.length;\n    this.cues_ = cues;\n    this.length_ = cues.length;\n    const defineProp = function (index) {\n      if (!('' + index in this)) {\n        Object.defineProperty(this, '' + index, {\n          get() {\n            return this.cues_[index];\n          }\n        });\n      }\n    };\n    if (oldLength < l) {\n      i = oldLength;\n      for (; i < l; i++) {\n        defineProp.call(this, i);\n      }\n    }\n  }\n\n  /**\n   * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\n   *\n   * @param {string} id\n   *        The id of the cue that should be searched for.\n   *\n   * @return {TextTrackCueList~TextTrackCue|null}\n   *         A single cue or null if none was found.\n   */\n  getCueById(id) {\n    let result = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      const cue = this[i];\n      if (cue.id === id) {\n        result = cue;\n        break;\n      }\n    }\n    return result;\n  }\n}\n\n/**\n * @file track-kinds.js\n */\n\n/**\n * All possible `VideoTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\n * @typedef VideoTrack~Kind\n * @enum\n */\nconst VideoTrackKind = {\n  alternative: 'alternative',\n  captions: 'captions',\n  main: 'main',\n  sign: 'sign',\n  subtitles: 'subtitles',\n  commentary: 'commentary'\n};\n\n/**\n * All possible `AudioTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\n * @typedef AudioTrack~Kind\n * @enum\n */\nconst AudioTrackKind = {\n  'alternative': 'alternative',\n  'descriptions': 'descriptions',\n  'main': 'main',\n  'main-desc': 'main-desc',\n  'translation': 'translation',\n  'commentary': 'commentary'\n};\n\n/**\n * All possible `TextTrackKind`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\n * @typedef TextTrack~Kind\n * @enum\n */\nconst TextTrackKind = {\n  subtitles: 'subtitles',\n  captions: 'captions',\n  descriptions: 'descriptions',\n  chapters: 'chapters',\n  metadata: 'metadata'\n};\n\n/**\n * All possible `TextTrackMode`s\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n * @typedef TextTrack~Mode\n * @enum\n */\nconst TextTrackMode = {\n  disabled: 'disabled',\n  hidden: 'hidden',\n  showing: 'showing'\n};\n\n/**\n * @file track.js\n */\n\n/**\n * A Track class that contains all of the common functionality for {@link AudioTrack},\n * {@link VideoTrack}, and {@link TextTrack}.\n *\n * > Note: This class should not be used directly\n *\n * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\n * @extends EventTarget\n * @abstract\n */\nclass Track extends EventTarget$2 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} [options={}]\n   *        Object of option names and values\n   *\n   * @param {string} [options.kind='']\n   *        A valid kind for the track type you are creating.\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this AudioTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @abstract\n   */\n  constructor(options = {}) {\n    super();\n    const trackProps = {\n      id: options.id || 'vjs_track_' + newGUID(),\n      kind: options.kind || '',\n      language: options.language || ''\n    };\n    let label = options.label || '';\n\n    /**\n     * @memberof Track\n     * @member {string} id\n     *         The id of this track. Cannot be changed after creation.\n     * @instance\n     *\n     * @readonly\n     */\n\n    /**\n     * @memberof Track\n     * @member {string} kind\n     *         The kind of track that this is. Cannot be changed after creation.\n     * @instance\n     *\n     * @readonly\n     */\n\n    /**\n     * @memberof Track\n     * @member {string} language\n     *         The two letter language code for this track. Cannot be changed after\n     *         creation.\n     * @instance\n     *\n     * @readonly\n     */\n\n    for (const key in trackProps) {\n      Object.defineProperty(this, key, {\n        get() {\n          return trackProps[key];\n        },\n        set() {}\n      });\n    }\n\n    /**\n     * @memberof Track\n     * @member {string} label\n     *         The label of this track. Cannot be changed after creation.\n     * @instance\n     *\n     * @fires Track#labelchange\n     */\n    Object.defineProperty(this, 'label', {\n      get() {\n        return label;\n      },\n      set(newLabel) {\n        if (newLabel !== label) {\n          label = newLabel;\n\n          /**\n           * An event that fires when label changes on this track.\n           *\n           * > Note: This is not part of the spec!\n           *\n           * @event Track#labelchange\n           * @type {Event}\n           */\n          this.trigger('labelchange');\n        }\n      }\n    });\n  }\n}\n\n/**\n * @file url.js\n * @module url\n */\n\n/**\n * Resolve and parse the elements of a URL.\n *\n * @function\n * @param    {string} url\n *           The url to parse\n *\n * @return   {URL}\n *           An object of url details\n */\nconst parseUrl = function (url) {\n  return new URL(url, document$1.baseURI);\n};\n\n/**\n * Get absolute version of relative URL.\n *\n * @function\n * @param    {string} url\n *           URL to make absolute\n *\n * @return   {string}\n *           Absolute URL\n */\nconst getAbsoluteURL = function (url) {\n  return new URL(url, document$1.baseURI).href;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string\n * if passed an invalid path.\n *\n * @function\n * @param    {string} path\n *           The fileName path like '/path/to/file.mp4'\n *\n * @return  {string}\n *           The extension in lower case or an empty string if no\n *           extension could be found.\n */\nconst getFileExtension = function (path) {\n  if (typeof path === 'string') {\n    const splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/;\n    const pathParts = splitPathRe.exec(path);\n    if (pathParts) {\n      return pathParts.pop().toLowerCase();\n    }\n  }\n  return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @function\n * @param    {string} url\n *           The url to check.\n *\n * @param    {URL} [winLoc]\n *           the domain to check the url against, defaults to window.location\n *\n * @return   {boolean}\n *           Whether it is a cross domain request or not.\n */\nconst isCrossOrigin = function (url, winLoc = window$1.location) {\n  return parseUrl(url).origin !== winLoc.origin;\n};\n\nvar Url = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  parseUrl: parseUrl,\n  getAbsoluteURL: getAbsoluteURL,\n  getFileExtension: getFileExtension,\n  isCrossOrigin: isCrossOrigin\n});\n\n/**\n * @file text-track.js\n */\n\n/** @import Tech from '../tech/tech' */\n\n/**\n * Takes a webvtt file contents and parses it into cues\n *\n * @param {string} srcContent\n *        webVTT file contents\n *\n * @param {TextTrack} track\n *        TextTrack to add cues to. Cues come from the srcContent.\n *\n * @private\n */\nconst parseCues = function (srcContent, track) {\n  const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, window$1.WebVTT.StringDecoder());\n  const errors = [];\n  parser.oncue = function (cue) {\n    track.addCue(cue);\n  };\n  parser.onparsingerror = function (error) {\n    errors.push(error);\n  };\n  parser.onflush = function () {\n    track.trigger({\n      type: 'loadeddata',\n      target: track\n    });\n  };\n  parser.parse(srcContent);\n  if (errors.length > 0) {\n    if (window$1.console && window$1.console.groupCollapsed) {\n      window$1.console.groupCollapsed(`Text Track parsing errors for ${track.src}`);\n    }\n    errors.forEach(error => log$1.error(error));\n    if (window$1.console && window$1.console.groupEnd) {\n      window$1.console.groupEnd();\n    }\n  }\n  parser.flush();\n};\n\n/**\n * Load a `TextTrack` from a specified url.\n *\n * @param {string} src\n *        Url to load track from.\n *\n * @param {TextTrack} track\n *        Track to add cues to. Comes from the content at the end of `url`.\n *\n * @private\n */\nconst loadTrack = function (src, track) {\n  const opts = {\n    uri: src\n  };\n  const crossOrigin = isCrossOrigin(src);\n  if (crossOrigin) {\n    opts.cors = crossOrigin;\n  }\n  const withCredentials = track.tech_.crossOrigin() === 'use-credentials';\n  if (withCredentials) {\n    opts.withCredentials = withCredentials;\n  }\n  XHR(opts, bind_(this, function (err, response, responseBody) {\n    if (err) {\n      return log$1.error(err, response);\n    }\n    track.loaded_ = true;\n\n    // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n    // NOTE: this is only used for the alt/video.novtt.js build\n    if (typeof window$1.WebVTT !== 'function') {\n      if (track.tech_) {\n        // to prevent use before define eslint error, we define loadHandler\n        // as a let here\n        track.tech_.any(['vttjsloaded', 'vttjserror'], event => {\n          if (event.type === 'vttjserror') {\n            log$1.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n            return;\n          }\n          return parseCues(responseBody, track);\n        });\n      }\n    } else {\n      parseCues(responseBody, track);\n    }\n  }));\n};\n\n/**\n * A representation of a single `TextTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\n * @extends Track\n */\nclass TextTrack extends Track {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} options={}\n   *        Object of option names and values\n   *\n   * @param {Tech} options.tech\n   *        A reference to the tech that owns this TextTrack.\n   *\n   * @param {TextTrack~Kind} [options.kind='subtitles']\n   *        A valid text track kind.\n   *\n   * @param {TextTrack~Mode} [options.mode='disabled']\n   *        A valid text track mode.\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this TextTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {string} [options.srclang='']\n   *        A valid two character language code. An alternative, but deprioritized\n   *        version of `options.language`\n   *\n   * @param {string} [options.src]\n   *        A url to TextTrack cues.\n   *\n   * @param {boolean} [options.default]\n   *        If this track should default to on or off.\n   */\n  constructor(options = {}) {\n    if (!options.tech) {\n      throw new Error('A tech was not provided.');\n    }\n    const settings = merge$1(options, {\n      kind: TextTrackKind[options.kind] || 'subtitles',\n      language: options.language || options.srclang || ''\n    });\n    let mode = TextTrackMode[settings.mode] || 'disabled';\n    const default_ = settings.default;\n    if (settings.kind === 'metadata' || settings.kind === 'chapters') {\n      mode = 'hidden';\n    }\n    super(settings);\n    this.tech_ = settings.tech;\n    this.cues_ = [];\n    this.activeCues_ = [];\n    this.preload_ = this.tech_.preloadTextTracks !== false;\n    const cues = new TextTrackCueList(this.cues_);\n    const activeCues = new TextTrackCueList(this.activeCues_);\n    let changed = false;\n    this.timeupdateHandler = bind_(this, function (event = {}) {\n      if (this.tech_.isDisposed()) {\n        return;\n      }\n      if (!this.tech_.isReady_) {\n        if (event.type !== 'timeupdate') {\n          this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n        }\n        return;\n      }\n\n      // Accessing this.activeCues for the side-effects of updating itself\n      // due to its nature as a getter function. Do not remove or cues will\n      // stop updating!\n      // Use the setter to prevent deletion from uglify (pure_getters rule)\n      this.activeCues = this.activeCues;\n      if (changed) {\n        this.trigger('cuechange');\n        changed = false;\n      }\n      if (event.type !== 'timeupdate') {\n        this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n      }\n    });\n    const disposeHandler = () => {\n      this.stopTracking();\n    };\n    this.tech_.one('dispose', disposeHandler);\n    if (mode !== 'disabled') {\n      this.startTracking();\n    }\n    Object.defineProperties(this, {\n      /**\n       * @memberof TextTrack\n       * @member {boolean} default\n       *         If this track was set to be on or off by default. Cannot be changed after\n       *         creation.\n       * @instance\n       *\n       * @readonly\n       */\n      default: {\n        get() {\n          return default_;\n        },\n        set() {}\n      },\n      /**\n       * @memberof TextTrack\n       * @member {string} mode\n       *         Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\n       *         not be set if setting to an invalid mode.\n       * @instance\n       *\n       * @fires TextTrack#modechange\n       */\n      mode: {\n        get() {\n          return mode;\n        },\n        set(newMode) {\n          if (!TextTrackMode[newMode]) {\n            return;\n          }\n          if (mode === newMode) {\n            return;\n          }\n          mode = newMode;\n          if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) {\n            // On-demand load.\n            loadTrack(this.src, this);\n          }\n          this.stopTracking();\n          if (mode !== 'disabled') {\n            this.startTracking();\n          }\n          /**\n           * An event that fires when mode changes on this track. This allows\n           * the TextTrackList that holds this track to act accordingly.\n           *\n           * > Note: This is not part of the spec!\n           *\n           * @event TextTrack#modechange\n           * @type {Event}\n           */\n          this.trigger('modechange');\n        }\n      },\n      /**\n       * @memberof TextTrack\n       * @member {TextTrackCueList} cues\n       *         The text track cue list for this TextTrack.\n       * @instance\n       */\n      cues: {\n        get() {\n          if (!this.loaded_) {\n            return null;\n          }\n          return cues;\n        },\n        set() {}\n      },\n      /**\n       * @memberof TextTrack\n       * @member {TextTrackCueList} activeCues\n       *         The list text track cues that are currently active for this TextTrack.\n       * @instance\n       */\n      activeCues: {\n        get() {\n          if (!this.loaded_) {\n            return null;\n          }\n\n          // nothing to do\n          if (this.cues.length === 0) {\n            return activeCues;\n          }\n          const ct = this.tech_.currentTime();\n          const active = [];\n          for (let i = 0, l = this.cues.length; i < l; i++) {\n            const cue = this.cues[i];\n            if (cue.startTime <= ct && cue.endTime >= ct) {\n              active.push(cue);\n            }\n          }\n          changed = false;\n          if (active.length !== this.activeCues_.length) {\n            changed = true;\n          } else {\n            for (let i = 0; i < active.length; i++) {\n              if (this.activeCues_.indexOf(active[i]) === -1) {\n                changed = true;\n              }\n            }\n          }\n          this.activeCues_ = active;\n          activeCues.setCues_(this.activeCues_);\n          return activeCues;\n        },\n        // /!\\ Keep this setter empty (see the timeupdate handler above)\n        set() {}\n      }\n    });\n    if (settings.src) {\n      this.src = settings.src;\n      if (!this.preload_) {\n        // Tracks will load on-demand.\n        // Act like we're loaded for other purposes.\n        this.loaded_ = true;\n      }\n      if (this.preload_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\n        loadTrack(this.src, this);\n      }\n    } else {\n      this.loaded_ = true;\n    }\n  }\n  startTracking() {\n    // More precise cues based on requestVideoFrameCallback with a requestAnimationFram fallback\n    this.rvf_ = this.tech_.requestVideoFrameCallback(this.timeupdateHandler);\n    // Also listen to timeupdate in case rVFC/rAF stops (window in background, audio in video el)\n    this.tech_.on('timeupdate', this.timeupdateHandler);\n  }\n  stopTracking() {\n    if (this.rvf_) {\n      this.tech_.cancelVideoFrameCallback(this.rvf_);\n      this.rvf_ = undefined;\n    }\n    this.tech_.off('timeupdate', this.timeupdateHandler);\n  }\n\n  /**\n   * Add a cue to the internal list of cues.\n   *\n   * @param {TextTrack~Cue} cue\n   *        The cue to add to our internal list\n   */\n  addCue(originalCue) {\n    let cue = originalCue;\n\n    // Testing if the cue is a VTTCue in a way that survives minification\n    if (!('getCueAsHTML' in cue)) {\n      cue = new window$1.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\n      for (const prop in originalCue) {\n        if (!(prop in cue)) {\n          cue[prop] = originalCue[prop];\n        }\n      }\n\n      // make sure that `id` is copied over\n      cue.id = originalCue.id;\n      cue.originalCue_ = originalCue;\n    }\n    const tracks = this.tech_.textTracks();\n    for (let i = 0; i < tracks.length; i++) {\n      if (tracks[i] !== this) {\n        tracks[i].removeCue(cue);\n      }\n    }\n    this.cues_.push(cue);\n    this.cues.setCues_(this.cues_);\n  }\n\n  /**\n   * Remove a cue from our internal list\n   *\n   * @param {TextTrack~Cue} removeCue\n   *        The cue to remove from our internal list\n   */\n  removeCue(removeCue) {\n    let i = this.cues_.length;\n    while (i--) {\n      const cue = this.cues_[i];\n      if (cue === removeCue || cue.originalCue_ && cue.originalCue_ === removeCue) {\n        this.cues_.splice(i, 1);\n        this.cues.setCues_(this.cues_);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n *\n * @protected\n */\nTextTrack.prototype.allowedEvents_ = {\n  cuechange: 'cuechange'\n};\n\n/**\n * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\n * only one `AudioTrack` in the list will be enabled at a time.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\n * @extends Track\n */\nclass AudioTrack extends Track {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} [options={}]\n   *        Object of option names and values\n   *\n   * @param {AudioTrack~Kind} [options.kind='']\n   *        A valid audio track kind\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this AudioTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {boolean} [options.enabled]\n   *        If this track is the one that is currently playing. If this track is part of\n   *        an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\n   */\n  constructor(options = {}) {\n    const settings = merge$1(options, {\n      kind: AudioTrackKind[options.kind] || ''\n    });\n    super(settings);\n    let enabled = false;\n\n    /**\n     * @memberof AudioTrack\n     * @member {boolean} enabled\n     *         If this `AudioTrack` is enabled or not. When setting this will\n     *         fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\n     * @instance\n     *\n     * @fires VideoTrack#selectedchange\n     */\n    Object.defineProperty(this, 'enabled', {\n      get() {\n        return enabled;\n      },\n      set(newEnabled) {\n        // an invalid or unchanged value\n        if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\n          return;\n        }\n        enabled = newEnabled;\n\n        /**\n         * An event that fires when enabled changes on this track. This allows\n         * the AudioTrackList that holds this track to act accordingly.\n         *\n         * > Note: This is not part of the spec! Native tracks will do\n         *         this internally without an event.\n         *\n         * @event AudioTrack#enabledchange\n         * @type {Event}\n         */\n        this.trigger('enabledchange');\n      }\n    });\n\n    // if the user sets this track to selected then\n    // set selected to that true value otherwise\n    // we keep it false\n    if (settings.enabled) {\n      this.enabled = settings.enabled;\n    }\n    this.loaded_ = true;\n  }\n}\n\n/**\n * A representation of a single `VideoTrack`.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\n * @extends Track\n */\nclass VideoTrack extends Track {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} [options={}]\n   *        Object of option names and values\n   *\n   * @param {string} [options.kind='']\n   *        A valid {@link VideoTrack~Kind}\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this AudioTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {boolean} [options.selected]\n   *        If this track is the one that is currently playing.\n   */\n  constructor(options = {}) {\n    const settings = merge$1(options, {\n      kind: VideoTrackKind[options.kind] || ''\n    });\n    super(settings);\n    let selected = false;\n\n    /**\n     * @memberof VideoTrack\n     * @member {boolean} selected\n     *         If this `VideoTrack` is selected or not. When setting this will\n     *         fire {@link VideoTrack#selectedchange} if the state of selected changed.\n     * @instance\n     *\n     * @fires VideoTrack#selectedchange\n     */\n    Object.defineProperty(this, 'selected', {\n      get() {\n        return selected;\n      },\n      set(newSelected) {\n        // an invalid or unchanged value\n        if (typeof newSelected !== 'boolean' || newSelected === selected) {\n          return;\n        }\n        selected = newSelected;\n\n        /**\n         * An event that fires when selected changes on this track. This allows\n         * the VideoTrackList that holds this track to act accordingly.\n         *\n         * > Note: This is not part of the spec! Native tracks will do\n         *         this internally without an event.\n         *\n         * @event VideoTrack#selectedchange\n         * @type {Event}\n         */\n        this.trigger('selectedchange');\n      }\n    });\n\n    // if the user sets this track to selected then\n    // set selected to that true value otherwise\n    // we keep it false\n    if (settings.selected) {\n      this.selected = settings.selected;\n    }\n  }\n}\n\n/**\n * @file html-track-element.js\n */\n\n/** @import Tech from '../tech/tech' */\n\n/**\n * A single track represented in the DOM.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\n * @extends EventTarget\n */\nclass HTMLTrackElement extends EventTarget$2 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Object} options={}\n   *        Object of option names and values\n   *\n   * @param {Tech} options.tech\n   *        A reference to the tech that owns this HTMLTrackElement.\n   *\n   * @param {TextTrack~Kind} [options.kind='subtitles']\n   *        A valid text track kind.\n   *\n   * @param {TextTrack~Mode} [options.mode='disabled']\n   *        A valid text track mode.\n   *\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\n   *        A unique id for this TextTrack.\n   *\n   * @param {string} [options.label='']\n   *        The menu label for this track.\n   *\n   * @param {string} [options.language='']\n   *        A valid two character language code.\n   *\n   * @param {string} [options.srclang='']\n   *        A valid two character language code. An alternative, but deprioritized\n   *        version of `options.language`\n   *\n   * @param {string} [options.src]\n   *        A url to TextTrack cues.\n   *\n   * @param {boolean} [options.default]\n   *        If this track should default to on or off.\n   */\n  constructor(options = {}) {\n    super();\n    let readyState;\n    const track = new TextTrack(options);\n    this.kind = track.kind;\n    this.src = track.src;\n    this.srclang = track.language;\n    this.label = track.label;\n    this.default = track.default;\n    Object.defineProperties(this, {\n      /**\n       * @memberof HTMLTrackElement\n       * @member {HTMLTrackElement~ReadyState} readyState\n       *         The current ready state of the track element.\n       * @instance\n       */\n      readyState: {\n        get() {\n          return readyState;\n        }\n      },\n      /**\n       * @memberof HTMLTrackElement\n       * @member {TextTrack} track\n       *         The underlying TextTrack object.\n       * @instance\n       *\n       */\n      track: {\n        get() {\n          return track;\n        }\n      }\n    });\n    readyState = HTMLTrackElement.NONE;\n\n    /**\n     * @listens TextTrack#loadeddata\n     * @fires HTMLTrackElement#load\n     */\n    track.addEventListener('loadeddata', () => {\n      readyState = HTMLTrackElement.LOADED;\n      this.trigger({\n        type: 'load',\n        target: this\n      });\n    });\n  }\n}\n\n/**\n * @protected\n */\nHTMLTrackElement.prototype.allowedEvents_ = {\n  load: 'load'\n};\n\n/**\n * The text track not loaded state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.NONE = 0;\n\n/**\n * The text track loading state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.LOADING = 1;\n\n/**\n * The text track loaded state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.LOADED = 2;\n\n/**\n * The text track failed to load state.\n *\n * @type {number}\n * @static\n */\nHTMLTrackElement.ERROR = 3;\n\n/*\n * This file contains all track properties that are used in\n * player.js, tech.js, html5.js and possibly other techs in the future.\n */\n\nconst NORMAL = {\n  audio: {\n    ListClass: AudioTrackList,\n    TrackClass: AudioTrack,\n    capitalName: 'Audio'\n  },\n  video: {\n    ListClass: VideoTrackList,\n    TrackClass: VideoTrack,\n    capitalName: 'Video'\n  },\n  text: {\n    ListClass: TextTrackList,\n    TrackClass: TextTrack,\n    capitalName: 'Text'\n  }\n};\nObject.keys(NORMAL).forEach(function (type) {\n  NORMAL[type].getterName = `${type}Tracks`;\n  NORMAL[type].privateName = `${type}Tracks_`;\n});\nconst REMOTE = {\n  remoteText: {\n    ListClass: TextTrackList,\n    TrackClass: TextTrack,\n    capitalName: 'RemoteText',\n    getterName: 'remoteTextTracks',\n    privateName: 'remoteTextTracks_'\n  },\n  remoteTextEl: {\n    ListClass: HtmlTrackElementList,\n    TrackClass: HTMLTrackElement,\n    capitalName: 'RemoteTextTrackEls',\n    getterName: 'remoteTextTrackEls',\n    privateName: 'remoteTextTrackEls_'\n  }\n};\nconst ALL = Object.assign({}, NORMAL, REMOTE);\nREMOTE.names = Object.keys(REMOTE);\nNORMAL.names = Object.keys(NORMAL);\nALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\n\n/**\n * @file tech.js\n */\n\n/** @import { TimeRange } from '../utils/time' */\n\n/**\n * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\n * that just contains the src url alone.\n * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\n   * `var SourceString = 'http://example.com/some-video.mp4';`\n *\n * @typedef {Object|string} SourceObject\n *\n * @property {string} src\n *           The url to the source\n *\n * @property {string} type\n *           The mime type of the source\n */\n\n/**\n * A function used by {@link Tech} to create a new {@link TextTrack}.\n *\n * @private\n *\n * @param {Tech} self\n *        An instance of the Tech class.\n *\n * @param {string} kind\n *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n *\n * @param {string} [label]\n *        Label to identify the text track\n *\n * @param {string} [language]\n *        Two letter language abbreviation\n *\n * @param {Object} [options={}]\n *        An object with additional text track options\n *\n * @return {TextTrack}\n *          The text track that was created.\n */\nfunction createTrackHelper(self, kind, label, language, options = {}) {\n  const tracks = self.textTracks();\n  options.kind = kind;\n  if (label) {\n    options.label = label;\n  }\n  if (language) {\n    options.language = language;\n  }\n  options.tech = self;\n  const track = new ALL.text.TrackClass(options);\n  tracks.addTrack(track);\n  return track;\n}\n\n/**\n * This is the base class for media playback technology controllers, such as\n * {@link HTML5}\n *\n * @extends Component\n */\nclass Tech extends Component$1 {\n  /**\n  * Create an instance of this Tech.\n  *\n  * @param {Object} [options]\n  *        The key/value store of player options.\n  *\n  * @param {Function} [ready]\n  *        Callback function to call when the `HTML5` Tech is ready.\n  */\n  constructor(options = {}, ready = function () {}) {\n    // we don't want the tech to report user activity automatically.\n    // This is done manually in addControlsListeners\n    options.reportTouchActivity = false;\n    super(null, options, ready);\n    this.onDurationChange_ = e => this.onDurationChange(e);\n    this.trackProgress_ = e => this.trackProgress(e);\n    this.trackCurrentTime_ = e => this.trackCurrentTime(e);\n    this.stopTrackingCurrentTime_ = e => this.stopTrackingCurrentTime(e);\n    this.disposeSourceHandler_ = e => this.disposeSourceHandler(e);\n    this.queuedHanders_ = new Set();\n\n    // keep track of whether the current source has played at all to\n    // implement a very limited played()\n    this.hasStarted_ = false;\n    this.on('playing', function () {\n      this.hasStarted_ = true;\n    });\n    this.on('loadstart', function () {\n      this.hasStarted_ = false;\n    });\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      if (options && options[props.getterName]) {\n        this[props.privateName] = options[props.getterName];\n      }\n    });\n\n    // Manually track progress in cases where the browser/tech doesn't report it.\n    if (!this.featuresProgressEvents) {\n      this.manualProgressOn();\n    }\n\n    // Manually track timeupdates in cases where the browser/tech doesn't report it.\n    if (!this.featuresTimeupdateEvents) {\n      this.manualTimeUpdatesOn();\n    }\n    ['Text', 'Audio', 'Video'].forEach(track => {\n      if (options[`native${track}Tracks`] === false) {\n        this[`featuresNative${track}Tracks`] = false;\n      }\n    });\n    if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n      this.featuresNativeTextTracks = false;\n    } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\n      this.featuresNativeTextTracks = true;\n    }\n    if (!this.featuresNativeTextTracks) {\n      this.emulateTextTracks();\n    }\n    this.preloadTextTracks = options.preloadTextTracks !== false;\n    this.autoRemoteTextTracks_ = new ALL.text.ListClass();\n    this.initTrackListeners();\n\n    // Turn on component tap events only if not using native controls\n    if (!options.nativeControlsForTouch) {\n      this.emitTapEvents();\n    }\n    if (this.constructor) {\n      this.name_ = this.constructor.name || 'Unknown Tech';\n    }\n  }\n\n  /**\n   * A special function to trigger source set in a way that will allow player\n   * to re-trigger if the player or tech are not ready yet.\n   *\n   * @fires Tech#sourceset\n   * @param {string} src The source string at the time of the source changing.\n   */\n  triggerSourceset(src) {\n    if (!this.isReady_) {\n      // on initial ready we have to trigger source set\n      // 1ms after ready so that player can watch for it.\n      this.one('ready', () => this.setTimeout(() => this.triggerSourceset(src), 1));\n    }\n\n    /**\n     * Fired when the source is set on the tech causing the media element\n     * to reload.\n     *\n     * @see {@link Player#event:sourceset}\n     * @event Tech#sourceset\n     * @type {Event}\n     */\n    this.trigger({\n      src,\n      type: 'sourceset'\n    });\n  }\n\n  /* Fallbacks for unsupported event types\n  ================================================================================ */\n\n  /**\n   * Polyfill the `progress` event for browsers that don't support it natively.\n   *\n   * @see {@link Tech#trackProgress}\n   */\n  manualProgressOn() {\n    this.on('durationchange', this.onDurationChange_);\n    this.manualProgress = true;\n\n    // Trigger progress watching when a source begins loading\n    this.one('ready', this.trackProgress_);\n  }\n\n  /**\n   * Turn off the polyfill for `progress` events that was created in\n   * {@link Tech#manualProgressOn}\n   */\n  manualProgressOff() {\n    this.manualProgress = false;\n    this.stopTrackingProgress();\n    this.off('durationchange', this.onDurationChange_);\n  }\n\n  /**\n   * This is used to trigger a `progress` event when the buffered percent changes. It\n   * sets an interval function that will be called every 500 milliseconds to check if the\n   * buffer end percent has changed.\n   *\n   * > This function is called by {@link Tech#manualProgressOn}\n   *\n   * @param {Event} event\n   *        The `ready` event that caused this to run.\n   *\n   * @listens Tech#ready\n   * @fires Tech#progress\n   */\n  trackProgress(event) {\n    this.stopTrackingProgress();\n    this.progressInterval = this.setInterval(bind_(this, function () {\n      // Don't trigger unless buffered amount is greater than last time\n\n      const numBufferedPercent = this.bufferedPercent();\n      if (this.bufferedPercent_ !== numBufferedPercent) {\n        /**\n         * See {@link Player#progress}\n         *\n         * @event Tech#progress\n         * @type {Event}\n         */\n        this.trigger('progress');\n      }\n      this.bufferedPercent_ = numBufferedPercent;\n      if (numBufferedPercent === 1) {\n        this.stopTrackingProgress();\n      }\n    }), 500);\n  }\n\n  /**\n   * Update our internal duration on a `durationchange` event by calling\n   * {@link Tech#duration}.\n   *\n   * @param {Event} event\n   *        The `durationchange` event that caused this to run.\n   *\n   * @listens Tech#durationchange\n   */\n  onDurationChange(event) {\n    this.duration_ = this.duration();\n  }\n\n  /**\n   * Get and create a `TimeRange` object for buffering.\n   *\n   * @return {TimeRange}\n   *         The time range object that was created.\n   */\n  buffered() {\n    return createTimeRanges$1(0, 0);\n  }\n\n  /**\n   * Get the percentage of the current video that is currently buffered.\n   *\n   * @return {number}\n   *         A number from 0 to 1 that represents the decimal percentage of the\n   *         video that is buffered.\n   *\n   */\n  bufferedPercent() {\n    return bufferedPercent(this.buffered(), this.duration_);\n  }\n\n  /**\n   * Turn off the polyfill for `progress` events that was created in\n   * {@link Tech#manualProgressOn}\n   * Stop manually tracking progress events by clearing the interval that was set in\n   * {@link Tech#trackProgress}.\n   */\n  stopTrackingProgress() {\n    this.clearInterval(this.progressInterval);\n  }\n\n  /**\n   * Polyfill the `timeupdate` event for browsers that don't support it.\n   *\n   * @see {@link Tech#trackCurrentTime}\n   */\n  manualTimeUpdatesOn() {\n    this.manualTimeUpdates = true;\n    this.on('play', this.trackCurrentTime_);\n    this.on('pause', this.stopTrackingCurrentTime_);\n  }\n\n  /**\n   * Turn off the polyfill for `timeupdate` events that was created in\n   * {@link Tech#manualTimeUpdatesOn}\n   */\n  manualTimeUpdatesOff() {\n    this.manualTimeUpdates = false;\n    this.stopTrackingCurrentTime();\n    this.off('play', this.trackCurrentTime_);\n    this.off('pause', this.stopTrackingCurrentTime_);\n  }\n\n  /**\n   * Sets up an interval function to track current time and trigger `timeupdate` every\n   * 250 milliseconds.\n   *\n   * @listens Tech#play\n   * @triggers Tech#timeupdate\n   */\n  trackCurrentTime() {\n    if (this.currentTimeInterval) {\n      this.stopTrackingCurrentTime();\n    }\n    this.currentTimeInterval = this.setInterval(function () {\n      /**\n       * Triggered at an interval of 250ms to indicated that time is passing in the video.\n       *\n       * @event Tech#timeupdate\n       * @type {Event}\n       */\n      this.trigger({\n        type: 'timeupdate',\n        target: this,\n        manuallyTriggered: true\n      });\n\n      // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n    }, 250);\n  }\n\n  /**\n   * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\n   * `timeupdate` event is no longer triggered.\n   *\n   * @listens {Tech#pause}\n   */\n  stopTrackingCurrentTime() {\n    this.clearInterval(this.currentTimeInterval);\n\n    // #1002 - if the video ends right before the next timeupdate would happen,\n    // the progress bar won't make it all the way to the end\n    this.trigger({\n      type: 'timeupdate',\n      target: this,\n      manuallyTriggered: true\n    });\n  }\n\n  /**\n   * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\n   * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\n   *\n   * @fires Component#dispose\n   */\n  dispose() {\n    // clear out all tracks because we can't reuse them between techs\n    this.clearTracks(NORMAL.names);\n\n    // Turn off any manual progress or timeupdate tracking\n    if (this.manualProgress) {\n      this.manualProgressOff();\n    }\n    if (this.manualTimeUpdates) {\n      this.manualTimeUpdatesOff();\n    }\n    super.dispose();\n  }\n\n  /**\n   * Clear out a single `TrackList` or an array of `TrackLists` given their names.\n   *\n   * > Note: Techs without source handlers should call this between sources for `video`\n   *         & `audio` tracks. You don't want to use them between tracks!\n   *\n   * @param {string[]|string} types\n   *        TrackList names to clear, valid names are `video`, `audio`, and\n   *        `text`.\n   */\n  clearTracks(types) {\n    types = [].concat(types);\n    // clear out all tracks because we can't reuse them between techs\n    types.forEach(type => {\n      const list = this[`${type}Tracks`]() || [];\n      let i = list.length;\n      while (i--) {\n        const track = list[i];\n        if (type === 'text') {\n          this.removeRemoteTextTrack(track);\n        }\n        list.removeTrack(track);\n      }\n    });\n  }\n\n  /**\n   * Remove any TextTracks added via addRemoteTextTrack that are\n   * flagged for automatic garbage collection\n   */\n  cleanupAutoTextTracks() {\n    const list = this.autoRemoteTextTracks_ || [];\n    let i = list.length;\n    while (i--) {\n      const track = list[i];\n      this.removeRemoteTextTrack(track);\n    }\n  }\n\n  /**\n   * Reset the tech, which will removes all sources and reset the internal readyState.\n   *\n   * @abstract\n   */\n  reset() {}\n\n  /**\n   * Get the value of `crossOrigin` from the tech.\n   *\n   * @abstract\n   *\n   * @see {Html5#crossOrigin}\n   */\n  crossOrigin() {}\n\n  /**\n   * Set the value of `crossOrigin` on the tech.\n   *\n   * @abstract\n   *\n   * @param {string} crossOrigin the crossOrigin value\n   * @see {Html5#setCrossOrigin}\n   */\n  setCrossOrigin() {}\n\n  /**\n   * Get or set an error on the Tech.\n   *\n   * @param {MediaError} [err]\n   *        Error to set on the Tech\n   *\n   * @return {MediaError|null}\n   *         The current error object on the tech, or null if there isn't one.\n   */\n  error(err) {\n    if (err !== undefined) {\n      this.error_ = new MediaError(err);\n      this.trigger('error');\n    }\n    return this.error_;\n  }\n\n  /**\n   * Returns the `TimeRange`s that have been played through for the current source.\n   *\n   * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\n   *         It only checks whether the source has played at all or not.\n   *\n   * @return {TimeRange}\n   *         - A single time range if this video has played\n   *         - An empty set of ranges if not.\n   */\n  played() {\n    if (this.hasStarted_) {\n      return createTimeRanges$1(0, 0);\n    }\n    return createTimeRanges$1();\n  }\n\n  /**\n   * Start playback\n   *\n   * @abstract\n   *\n   * @see {Html5#play}\n   */\n  play() {}\n\n  /**\n   * Set whether we are scrubbing or not\n   *\n   * @abstract\n   * @param {boolean} _isScrubbing\n   *                  - true for we are currently scrubbing\n   *                  - false for we are no longer scrubbing\n   *\n   * @see {Html5#setScrubbing}\n   */\n  setScrubbing(_isScrubbing) {}\n\n  /**\n   * Get whether we are scrubbing or not\n   *\n   * @abstract\n   *\n   * @see {Html5#scrubbing}\n   */\n  scrubbing() {}\n\n  /**\n   * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\n   * previously called.\n   *\n   * @param {number} _seconds\n   *        Set the current time of the media to this.\n   * @fires Tech#timeupdate\n   */\n  setCurrentTime(_seconds) {\n    // improve the accuracy of manual timeupdates\n    if (this.manualTimeUpdates) {\n      /**\n       * A manual `timeupdate` event.\n       *\n       * @event Tech#timeupdate\n       * @type {Event}\n       */\n      this.trigger({\n        type: 'timeupdate',\n        target: this,\n        manuallyTriggered: true\n      });\n    }\n  }\n\n  /**\n   * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\n   * {@link TextTrackList} events.\n   *\n   * This adds {@link EventTarget~EventListeners} for `addtrack`, and  `removetrack`.\n   *\n   * @fires Tech#audiotrackchange\n   * @fires Tech#videotrackchange\n   * @fires Tech#texttrackchange\n   */\n  initTrackListeners() {\n    /**\n      * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\n      *\n      * @event Tech#audiotrackchange\n      * @type {Event}\n      */\n\n    /**\n      * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\n      *\n      * @event Tech#videotrackchange\n      * @type {Event}\n      */\n\n    /**\n      * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\n      *\n      * @event Tech#texttrackchange\n      * @type {Event}\n      */\n    NORMAL.names.forEach(name => {\n      const props = NORMAL[name];\n      const trackListChanges = () => {\n        this.trigger(`${name}trackchange`);\n      };\n      const tracks = this[props.getterName]();\n      tracks.addEventListener('removetrack', trackListChanges);\n      tracks.addEventListener('addtrack', trackListChanges);\n      this.on('dispose', () => {\n        tracks.removeEventListener('removetrack', trackListChanges);\n        tracks.removeEventListener('addtrack', trackListChanges);\n      });\n    });\n  }\n\n  /**\n   * Emulate TextTracks using vtt.js if necessary\n   *\n   * @fires Tech#vttjsloaded\n   * @fires Tech#vttjserror\n   */\n  addWebVttScript_() {\n    if (window$1.WebVTT) {\n      return;\n    }\n\n    // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\n    // signals that the Tech is ready at which point Tech.el_ is part of the DOM\n    // before inserting the WebVTT script\n    if (document$1.body.contains(this.el())) {\n      // load via require if available and vtt.js script location was not passed in\n      // as an option. novtt builds will turn the above require call into an empty object\n      // which will cause this if check to always fail.\n      if (!this.options_['vtt.js'] && isPlain(vtt) && Object.keys(vtt).length > 0) {\n        this.trigger('vttjsloaded');\n        return;\n      }\n\n      // load vtt.js via the script location option or the cdn of no location was\n      // passed in\n      const script = document$1.createElement('script');\n      script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\n      script.onload = () => {\n        /**\n         * Fired when vtt.js is loaded.\n         *\n         * @event Tech#vttjsloaded\n         * @type {Event}\n         */\n        this.trigger('vttjsloaded');\n      };\n      script.onerror = () => {\n        /**\n         * Fired when vtt.js was not loaded due to an error\n         *\n         * @event Tech#vttjsloaded\n         * @type {Event}\n         */\n        this.trigger('vttjserror');\n      };\n      this.on('dispose', () => {\n        script.onload = null;\n        script.onerror = null;\n      });\n      // but have not loaded yet and we set it to true before the inject so that\n      // we don't overwrite the injected window.WebVTT if it loads right away\n      window$1.WebVTT = true;\n      this.el().parentNode.appendChild(script);\n    } else {\n      this.ready(this.addWebVttScript_);\n    }\n  }\n\n  /**\n   * Emulate texttracks\n   *\n   */\n  emulateTextTracks() {\n    const tracks = this.textTracks();\n    const remoteTracks = this.remoteTextTracks();\n    const handleAddTrack = e => tracks.addTrack(e.track);\n    const handleRemoveTrack = e => tracks.removeTrack(e.track);\n    remoteTracks.on('addtrack', handleAddTrack);\n    remoteTracks.on('removetrack', handleRemoveTrack);\n    this.addWebVttScript_();\n    const updateDisplay = () => this.trigger('texttrackchange');\n    const textTracksChanges = () => {\n      updateDisplay();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\n        track.removeEventListener('cuechange', updateDisplay);\n        if (track.mode === 'showing') {\n          track.addEventListener('cuechange', updateDisplay);\n        }\n      }\n    };\n    textTracksChanges();\n    tracks.addEventListener('change', textTracksChanges);\n    tracks.addEventListener('addtrack', textTracksChanges);\n    tracks.addEventListener('removetrack', textTracksChanges);\n    this.on('dispose', function () {\n      remoteTracks.off('addtrack', handleAddTrack);\n      remoteTracks.off('removetrack', handleRemoveTrack);\n      tracks.removeEventListener('change', textTracksChanges);\n      tracks.removeEventListener('addtrack', textTracksChanges);\n      tracks.removeEventListener('removetrack', textTracksChanges);\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\n        track.removeEventListener('cuechange', updateDisplay);\n      }\n    });\n  }\n\n  /**\n   * Create and returns a remote {@link TextTrack} object.\n   *\n   * @param {string} kind\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n   *\n   * @param {string} [label]\n   *        Label to identify the text track\n   *\n   * @param {string} [language]\n   *        Two letter language abbreviation\n   *\n   * @return {TextTrack}\n   *         The TextTrack that gets created.\n   */\n  addTextTrack(kind, label, language) {\n    if (!kind) {\n      throw new Error('TextTrack kind is required but was not provided');\n    }\n    return createTrackHelper(this, kind, label, language);\n  }\n\n  /**\n   * Create an emulated TextTrack for use by addRemoteTextTrack\n   *\n   * This is intended to be overridden by classes that inherit from\n   * Tech in order to create native or custom TextTracks.\n   *\n   * @param {Object} options\n   *        The object should contain the options to initialize the TextTrack with.\n   *\n   * @param {string} [options.kind]\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n   *\n   * @param {string} [options.label].\n   *        Label to identify the text track\n   *\n   * @param {string} [options.language]\n   *        Two letter language abbreviation.\n   *\n   * @return {HTMLTrackElement}\n   *         The track element that gets created.\n   */\n  createRemoteTextTrack(options) {\n    const track = merge$1(options, {\n      tech: this\n    });\n    return new REMOTE.remoteTextEl.TrackClass(track);\n  }\n\n  /**\n   * Creates a remote text track object and returns an html track element.\n   *\n   * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\n   *\n   * @param {Object} options\n   *        See {@link Tech#createRemoteTextTrack} for more detailed properties.\n   *\n   * @param {boolean} [manualCleanup=false]\n   *        - When false: the TextTrack will be automatically removed from the video\n   *          element whenever the source changes\n   *        - When True: The TextTrack will have to be cleaned up manually\n   *\n   * @return {HTMLTrackElement}\n   *         An Html Track Element.\n   *\n   */\n  addRemoteTextTrack(options = {}, manualCleanup) {\n    const htmlTrackElement = this.createRemoteTextTrack(options);\n    if (typeof manualCleanup !== 'boolean') {\n      manualCleanup = false;\n    }\n\n    // store HTMLTrackElement and TextTrack to remote list\n    this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n    this.remoteTextTracks().addTrack(htmlTrackElement.track);\n    if (manualCleanup === false) {\n      // create the TextTrackList if it doesn't exist\n      this.ready(() => this.autoRemoteTextTracks_.addTrack(htmlTrackElement.track));\n    }\n    return htmlTrackElement;\n  }\n\n  /**\n   * Remove a remote text track from the remote `TextTrackList`.\n   *\n   * @param {TextTrack} track\n   *        `TextTrack` to remove from the `TextTrackList`\n   */\n  removeRemoteTextTrack(track) {\n    const trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n    // remove HTMLTrackElement and TextTrack from remote list\n    this.remoteTextTrackEls().removeTrackElement_(trackElement);\n    this.remoteTextTracks().removeTrack(track);\n    this.autoRemoteTextTracks_.removeTrack(track);\n  }\n\n  /**\n   * Gets available media playback quality metrics as specified by the W3C's Media\n   * Playback Quality API.\n   *\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n   *\n   * @return {Object}\n   *         An object with supported media playback quality metrics\n   *\n   * @abstract\n   */\n  getVideoPlaybackQuality() {\n    return {};\n  }\n\n  /**\n   * Attempt to create a floating video window always on top of other windows\n   * so that users may continue consuming media while they interact with other\n   * content sites, or applications on their device.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @return {Promise|undefined}\n   *         A promise with a Picture-in-Picture window if the browser supports\n   *         Promises (or one was passed in as an option). It returns undefined\n   *         otherwise.\n   *\n   * @abstract\n   */\n  requestPictureInPicture() {\n    return Promise.reject();\n  }\n\n  /**\n   * A method to check for the value of the 'disablePictureInPicture' <video> property.\n   * Defaults to true, as it should be considered disabled if the tech does not support pip\n   *\n   * @abstract\n   */\n  disablePictureInPicture() {\n    return true;\n  }\n\n  /**\n   * A method to set or unset the 'disablePictureInPicture' <video> property.\n   *\n   * @abstract\n   */\n  setDisablePictureInPicture() {}\n\n  /**\n   * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame\n   *\n   * @param {function} cb\n   * @return {number} request id\n   */\n  requestVideoFrameCallback(cb) {\n    const id = newGUID();\n    if (!this.isReady_ || this.paused()) {\n      this.queuedHanders_.add(id);\n      this.one('playing', () => {\n        if (this.queuedHanders_.has(id)) {\n          this.queuedHanders_.delete(id);\n          cb();\n        }\n      });\n    } else {\n      this.requestNamedAnimationFrame(id, cb);\n    }\n    return id;\n  }\n\n  /**\n   * A fallback implementation of cancelVideoFrameCallback\n   *\n   * @param {number} id id of callback to be cancelled\n   */\n  cancelVideoFrameCallback(id) {\n    if (this.queuedHanders_.has(id)) {\n      this.queuedHanders_.delete(id);\n    } else {\n      this.cancelNamedAnimationFrame(id);\n    }\n  }\n\n  /**\n   * A method to set a poster from a `Tech`.\n   *\n   * @abstract\n   */\n  setPoster() {}\n\n  /**\n   * A method to check for the presence of the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  playsinline() {}\n\n  /**\n   * A method to set or unset the 'playsinline' <video> attribute.\n   *\n   * @abstract\n   */\n  setPlaysinline() {}\n\n  /**\n   * Attempt to force override of native audio tracks.\n   *\n   * @param {boolean} override - If set to true native audio will be overridden,\n   * otherwise native audio will potentially be used.\n   *\n   * @abstract\n   */\n  overrideNativeAudioTracks(override) {}\n\n  /**\n   * Attempt to force override of native video tracks.\n   *\n   * @param {boolean} override - If set to true native video will be overridden,\n   * otherwise native video will potentially be used.\n   *\n   * @abstract\n   */\n  overrideNativeVideoTracks(override) {}\n\n  /**\n   * Check if the tech can support the given mime-type.\n   *\n   * The base tech does not support any type, but source handlers might\n   * overwrite this.\n   *\n   * @param  {string} _type\n   *         The mimetype to check for support\n   *\n   * @return {string}\n   *         'probably', 'maybe', or empty string\n   *\n   * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\n   *\n   * @abstract\n   */\n  canPlayType(_type) {\n    return '';\n  }\n\n  /**\n   * Check if the type is supported by this tech.\n   *\n   * The base tech does not support any type, but source handlers might\n   * overwrite this.\n   *\n   * @param {string} _type\n   *        The media type to check\n   * @return {string} Returns the native video element's response\n   */\n  static canPlayType(_type) {\n    return '';\n  }\n\n  /**\n   * Check if the tech can support the given source\n   *\n   * @param {Object} srcObj\n   *        The source object\n   * @param {Object} options\n   *        The options passed to the tech\n   * @return {string} 'probably', 'maybe', or '' (empty string)\n   */\n  static canPlaySource(srcObj, options) {\n    return Tech.canPlayType(srcObj.type);\n  }\n\n  /*\n   * Return whether the argument is a Tech or not.\n   * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n   *\n   * @param {Object} component\n   *        The item to check\n   *\n   * @return {boolean}\n   *         Whether it is a tech or not\n   *         - True if it is a tech\n   *         - False if it is not\n   */\n  static isTech(component) {\n    return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\n  }\n\n  /**\n   * Registers a `Tech` into a shared list for videojs.\n   *\n   * @param {string} name\n   *        Name of the `Tech` to register.\n   *\n   * @param {Object} tech\n   *        The `Tech` class to register.\n   */\n  static registerTech(name, tech) {\n    if (!Tech.techs_) {\n      Tech.techs_ = {};\n    }\n    if (!Tech.isTech(tech)) {\n      throw new Error(`Tech ${name} must be a Tech`);\n    }\n    if (!Tech.canPlayType) {\n      throw new Error('Techs must have a static canPlayType method on them');\n    }\n    if (!Tech.canPlaySource) {\n      throw new Error('Techs must have a static canPlaySource method on them');\n    }\n    name = toTitleCase$1(name);\n    Tech.techs_[name] = tech;\n    Tech.techs_[toLowerCase(name)] = tech;\n    if (name !== 'Tech') {\n      // camel case the techName for use in techOrder\n      Tech.defaultTechOrder_.push(name);\n    }\n    return tech;\n  }\n\n  /**\n   * Get a `Tech` from the shared list by name.\n   *\n   * @param {string} name\n   *        `camelCase` or `TitleCase` name of the Tech to get\n   *\n   * @return {Tech|undefined}\n   *         The `Tech` or undefined if there was no tech with the name requested.\n   */\n  static getTech(name) {\n    if (!name) {\n      return;\n    }\n    if (Tech.techs_ && Tech.techs_[name]) {\n      return Tech.techs_[name];\n    }\n    name = toTitleCase$1(name);\n    if (window$1 && window$1.videojs && window$1.videojs[name]) {\n      log$1.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n      return window$1.videojs[name];\n    }\n  }\n}\n\n/**\n * Get the {@link VideoTrackList}\n *\n * @returns {VideoTrackList}\n * @method Tech.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n *\n * @returns {AudioTrackList}\n * @method Tech.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.textTracks\n */\n\n/**\n * Get the remote element {@link TextTrackList}\n *\n * @returns {TextTrackList}\n * @method Tech.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote element {@link HtmlTrackElementList}\n *\n * @returns {HtmlTrackElementList}\n * @method Tech.prototype.remoteTextTrackEls\n */\n\nALL.names.forEach(function (name) {\n  const props = ALL[name];\n  Tech.prototype[props.getterName] = function () {\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\n    return this[props.privateName];\n  };\n});\n\n/**\n * List of associated text tracks\n *\n * @type {TextTrackList}\n * @private\n * @property Tech#textTracks_\n */\n\n/**\n * List of associated audio tracks.\n *\n * @type {AudioTrackList}\n * @private\n * @property Tech#audioTracks_\n */\n\n/**\n * List of associated video tracks.\n *\n * @type {VideoTrackList}\n * @private\n * @property Tech#videoTracks_\n */\n\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresVolumeControl = true;\n\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresMuteControl = true;\n\n/**\n * Boolean indicating whether the `Tech` supports fullscreen resize control.\n * Resizing plugins using request fullscreen reloads the plugin\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresFullscreenResize = false;\n\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the video\n * plays. Examples:\n *   - Set player to play 2x (twice) as fast\n *   - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresPlaybackRate = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the `progress` event.\n * This will be used to determine if {@link Tech#manualProgressOn} should be called.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresProgressEvents = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\n * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\n * a new source.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresSourceset = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the `timeupdate` event.\n * This will be used to determine if {@link Tech#manualTimeUpdates} should be called.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresTimeupdateEvents = false;\n\n/**\n * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\n * This will help us integrate with native `TextTrack`s if the browser supports them.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresNativeTextTracks = false;\n\n/**\n * Boolean indicating whether the `Tech` supports `requestVideoFrameCallback`.\n *\n * @type {boolean}\n * @default\n */\nTech.prototype.featuresVideoFrameCallback = false;\n\n/**\n * A functional mixin for techs that want to use the Source Handler pattern.\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * Example: `Tech.withSourceHandlers.call(MyTech);`\n *\n * @param {Tech} _Tech\n *        The tech to add source handler functions to.\n *\n * @mixes Tech~SourceHandlerAdditions\n */\nTech.withSourceHandlers = function (_Tech) {\n  /**\n   * Register a source handler\n   *\n   * @param {Function} handler\n   *        The source handler class\n   *\n   * @param {number} [index]\n   *        Register it at the following index\n   */\n  _Tech.registerSourceHandler = function (handler, index) {\n    let handlers = _Tech.sourceHandlers;\n    if (!handlers) {\n      handlers = _Tech.sourceHandlers = [];\n    }\n    if (index === undefined) {\n      // add to the end of the list\n      index = handlers.length;\n    }\n    handlers.splice(index, 0, handler);\n  };\n\n  /**\n   * Check if the tech can support the given type. Also checks the\n   * Techs sourceHandlers.\n   *\n   * @param {string} type\n   *         The mimetype to check.\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n  _Tech.canPlayType = function (type) {\n    const handlers = _Tech.sourceHandlers || [];\n    let can;\n    for (let i = 0; i < handlers.length; i++) {\n      can = handlers[i].canPlayType(type);\n      if (can) {\n        return can;\n      }\n    }\n    return '';\n  };\n\n  /**\n   * Returns the first source handler that supports the source.\n   *\n   * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n   *\n   * @param {SourceObject} source\n   *        The source object\n   *\n   * @param {Object} options\n   *        The options passed to the tech\n   *\n   * @return {SourceHandler|null}\n   *          The first source handler that supports the source or null if\n   *          no SourceHandler supports the source\n   */\n  _Tech.selectSourceHandler = function (source, options) {\n    const handlers = _Tech.sourceHandlers || [];\n    let can;\n    for (let i = 0; i < handlers.length; i++) {\n      can = handlers[i].canHandleSource(source, options);\n      if (can) {\n        return handlers[i];\n      }\n    }\n    return null;\n  };\n\n  /**\n   * Check if the tech can support the given source.\n   *\n   * @param {SourceObject} srcObj\n   *        The source object\n   *\n   * @param {Object} options\n   *        The options passed to the tech\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n  _Tech.canPlaySource = function (srcObj, options) {\n    const sh = _Tech.selectSourceHandler(srcObj, options);\n    if (sh) {\n      return sh.canHandleSource(srcObj, options);\n    }\n    return '';\n  };\n\n  /**\n   * When using a source handler, prefer its implementation of\n   * any function normally provided by the tech.\n   */\n  const deferrable = ['seekable', 'seeking', 'duration'];\n\n  /**\n   * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\n   * function if it exists, with a fallback to the Techs seekable function.\n   *\n   * @method _Tech.seekable\n   */\n\n  /**\n   * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\n   * function if it exists, otherwise it will fallback to the techs duration function.\n   *\n   * @method _Tech.duration\n   */\n\n  deferrable.forEach(function (fnName) {\n    const originalFn = this[fnName];\n    if (typeof originalFn !== 'function') {\n      return;\n    }\n    this[fnName] = function () {\n      if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n        return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n      }\n      return originalFn.apply(this, arguments);\n    };\n  }, _Tech.prototype);\n\n  /**\n   * Create a function for setting the source using a source object\n   * and source handlers.\n   * Should never be called unless a source handler was found.\n   *\n   * @param {SourceObject} source\n   *        A source object with src and type keys\n   */\n  _Tech.prototype.setSource = function (source) {\n    let sh = _Tech.selectSourceHandler(source, this.options_);\n    if (!sh) {\n      // Fall back to a native source handler when unsupported sources are\n      // deliberately set\n      if (_Tech.nativeSourceHandler) {\n        sh = _Tech.nativeSourceHandler;\n      } else {\n        log$1.error('No source handler found for the current source.');\n      }\n    }\n\n    // Dispose any existing source handler\n    this.disposeSourceHandler();\n    this.off('dispose', this.disposeSourceHandler_);\n    if (sh !== _Tech.nativeSourceHandler) {\n      this.currentSource_ = source;\n    }\n    this.sourceHandler_ = sh.handleSource(source, this, this.options_);\n    this.one('dispose', this.disposeSourceHandler_);\n  };\n\n  /**\n   * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\n   *\n   * @listens Tech#dispose\n   */\n  _Tech.prototype.disposeSourceHandler = function () {\n    // if we have a source and get another one\n    // then we are loading something new\n    // than clear all of our current tracks\n    if (this.currentSource_) {\n      this.clearTracks(['audio', 'video']);\n      this.currentSource_ = null;\n    }\n\n    // always clean up auto-text tracks\n    this.cleanupAutoTextTracks();\n    if (this.sourceHandler_) {\n      if (this.sourceHandler_.dispose) {\n        this.sourceHandler_.dispose();\n      }\n      this.sourceHandler_ = null;\n    }\n  };\n};\n\n// The base Tech class needs to be registered as a Component. It is the only\n// Tech that can be registered as a Component.\nComponent$1.registerComponent('Tech', Tech);\nTech.registerTech('Tech', Tech);\n\n/**\n * A list of techs that should be added to techOrder on Players\n *\n * @private\n */\nTech.defaultTechOrder_ = [];\n\n/**\n * @file middleware.js\n * @module middleware\n */\n\n/** @import Player from '../player' */\n/** @import Tech from '../tech/tech' */\n\nconst middlewares = {};\nconst middlewareInstances = {};\nconst TERMINATOR = {};\n\n/**\n * A middleware object is a plain JavaScript object that has methods that\n * match the {@link Tech} methods found in the lists of allowed\n * {@link module:middleware.allowedGetters|getters},\n * {@link module:middleware.allowedSetters|setters}, and\n * {@link module:middleware.allowedMediators|mediators}.\n *\n * @typedef {Object} MiddlewareObject\n */\n\n/**\n * A middleware factory function that should return a\n * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\n *\n * This factory will be called for each player when needed, with the player\n * passed in as an argument.\n *\n * @callback MiddlewareFactory\n * @param {Player} player\n *        A Video.js player.\n */\n\n/**\n * Define a middleware that the player should use by way of a factory function\n * that returns a middleware object.\n *\n * @param  {string} type\n *         The MIME type to match or `\"*\"` for all MIME types.\n *\n * @param  {MiddlewareFactory} middleware\n *         A middleware factory function that will be executed for\n *         matching types.\n */\nfunction use(type, middleware) {\n  middlewares[type] = middlewares[type] || [];\n  middlewares[type].push(middleware);\n}\n\n/**\n * Asynchronously sets a source using middleware by recursing through any\n * matching middlewares and calling `setSource` on each, passing along the\n * previous returned value each time.\n *\n * @param  {Player} player\n *         A {@link Player} instance.\n *\n * @param  {Tech~SourceObject} src\n *         A source object.\n *\n * @param  {Function}\n *         The next middleware to run.\n */\nfunction setSource(player, src, next) {\n  player.setTimeout(() => setSourceHelper(src, middlewares[src.type], next, player), 1);\n}\n\n/**\n * When the tech is set, passes the tech to each middleware's `setTech` method.\n *\n * @param {Object[]} middleware\n *        An array of middleware instances.\n *\n * @param {Tech} tech\n *        A Video.js tech.\n */\nfunction setTech(middleware, tech) {\n  middleware.forEach(mw => mw.setTech && mw.setTech(tech));\n}\n\n/**\n * Calls a getter on the tech first, through each middleware\n * from right to left to the player.\n *\n * @param  {Object[]} middleware\n *         An array of middleware instances.\n *\n * @param  {Tech} tech\n *         The current tech.\n *\n * @param  {string} method\n *         A method name.\n *\n * @return {*}\n *         The final value from the tech after middleware has intercepted it.\n */\nfunction get(middleware, tech, method) {\n  return middleware.reduceRight(middlewareIterator(method), tech[method]());\n}\n\n/**\n * Takes the argument given to the player and calls the setter method on each\n * middleware from left to right to the tech.\n *\n * @param  {Object[]} middleware\n *         An array of middleware instances.\n *\n * @param  {Tech} tech\n *         The current tech.\n *\n * @param  {string} method\n *         A method name.\n *\n * @param  {*} arg\n *         The value to set on the tech.\n *\n * @return {*}\n *         The return value of the `method` of the `tech`.\n */\nfunction set(middleware, tech, method, arg) {\n  return tech[method](middleware.reduce(middlewareIterator(method), arg));\n}\n\n/**\n * Takes the argument given to the player and calls the `call` version of the\n * method on each middleware from left to right.\n *\n * Then, call the passed in method on the tech and return the result unchanged\n * back to the player, through middleware, this time from right to left.\n *\n * @param  {Object[]} middleware\n *         An array of middleware instances.\n *\n * @param  {Tech} tech\n *         The current tech.\n *\n * @param  {string} method\n *         A method name.\n *\n * @param  {*} arg\n *         The value to set on the tech.\n *\n * @return {*}\n *         The return value of the `method` of the `tech`, regardless of the\n *         return values of middlewares.\n */\nfunction mediate(middleware, tech, method, arg = null) {\n  const callMethod = 'call' + toTitleCase$1(method);\n  const middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\n  const terminated = middlewareValue === TERMINATOR;\n  // deprecated. The `null` return value should instead return TERMINATOR to\n  // prevent confusion if a techs method actually returns null.\n  const returnValue = terminated ? null : tech[method](middlewareValue);\n  executeRight(middleware, method, returnValue, terminated);\n  return returnValue;\n}\n\n/**\n * Enumeration of allowed getters where the keys are method names.\n *\n * @type {Object}\n */\nconst allowedGetters = {\n  buffered: 1,\n  currentTime: 1,\n  duration: 1,\n  muted: 1,\n  played: 1,\n  paused: 1,\n  seekable: 1,\n  volume: 1,\n  ended: 1\n};\n\n/**\n * Enumeration of allowed setters where the keys are method names.\n *\n * @type {Object}\n */\nconst allowedSetters = {\n  setCurrentTime: 1,\n  setMuted: 1,\n  setVolume: 1\n};\n\n/**\n * Enumeration of allowed mediators where the keys are method names.\n *\n * @type {Object}\n */\nconst allowedMediators = {\n  play: 1,\n  pause: 1\n};\nfunction middlewareIterator(method) {\n  return (value, mw) => {\n    // if the previous middleware terminated, pass along the termination\n    if (value === TERMINATOR) {\n      return TERMINATOR;\n    }\n    if (mw[method]) {\n      return mw[method](value);\n    }\n    return value;\n  };\n}\nfunction executeRight(mws, method, value, terminated) {\n  for (let i = mws.length - 1; i >= 0; i--) {\n    const mw = mws[i];\n    if (mw[method]) {\n      mw[method](terminated, value);\n    }\n  }\n}\n\n/**\n * Clear the middleware cache for a player.\n *\n * @param  {Player} player\n *         A {@link Player} instance.\n */\nfunction clearCacheForPlayer(player) {\n  if (middlewareInstances.hasOwnProperty(player.id())) {\n    delete middlewareInstances[player.id()];\n  }\n}\n\n/**\n * {\n *  [playerId]: [[mwFactory, mwInstance], ...]\n * }\n *\n * @private\n */\nfunction getOrCreateFactory(player, mwFactory) {\n  const mws = middlewareInstances[player.id()];\n  let mw = null;\n  if (mws === undefined || mws === null) {\n    mw = mwFactory(player);\n    middlewareInstances[player.id()] = [[mwFactory, mw]];\n    return mw;\n  }\n  for (let i = 0; i < mws.length; i++) {\n    const [mwf, mwi] = mws[i];\n    if (mwf !== mwFactory) {\n      continue;\n    }\n    mw = mwi;\n  }\n  if (mw === null) {\n    mw = mwFactory(player);\n    mws.push([mwFactory, mw]);\n  }\n  return mw;\n}\nfunction setSourceHelper(src = {}, middleware = [], next, player, acc = [], lastRun = false) {\n  const [mwFactory, ...mwrest] = middleware;\n\n  // if mwFactory is a string, then we're at a fork in the road\n  if (typeof mwFactory === 'string') {\n    setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun);\n\n    // if we have an mwFactory, call it with the player to get the mw,\n    // then call the mw's setSource method\n  } else if (mwFactory) {\n    const mw = getOrCreateFactory(player, mwFactory);\n\n    // if setSource isn't present, implicitly select this middleware\n    if (!mw.setSource) {\n      acc.push(mw);\n      return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n    }\n    mw.setSource(Object.assign({}, src), function (err, _src) {\n      // something happened, try the next middleware on the current level\n      // make sure to use the old src\n      if (err) {\n        return setSourceHelper(src, mwrest, next, player, acc, lastRun);\n      }\n\n      // we've succeeded, now we need to go deeper\n      acc.push(mw);\n\n      // if it's the same type, continue down the current chain\n      // otherwise, we want to go down the new chain\n      setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\n    });\n  } else if (mwrest.length) {\n    setSourceHelper(src, mwrest, next, player, acc, lastRun);\n  } else if (lastRun) {\n    next(src, acc);\n  } else {\n    setSourceHelper(src, middlewares['*'], next, player, acc, true);\n  }\n}\n\n/** @import Player from '../player' */\n\n/**\n * Mimetypes\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml\n * @typedef Mimetypes~Kind\n * @enum\n */\nconst MimetypesKind = {\n  opus: 'video/ogg',\n  ogv: 'video/ogg',\n  mp4: 'video/mp4',\n  mov: 'video/mp4',\n  m4v: 'video/mp4',\n  mkv: 'video/x-matroska',\n  m4a: 'audio/mp4',\n  mp3: 'audio/mpeg',\n  aac: 'audio/aac',\n  caf: 'audio/x-caf',\n  flac: 'audio/flac',\n  oga: 'audio/ogg',\n  wav: 'audio/wav',\n  m3u8: 'application/x-mpegURL',\n  mpd: 'application/dash+xml',\n  jpg: 'image/jpeg',\n  jpeg: 'image/jpeg',\n  gif: 'image/gif',\n  png: 'image/png',\n  svg: 'image/svg+xml',\n  webp: 'image/webp'\n};\n\n/**\n * Get the mimetype of a given src url if possible\n *\n * @param {string} src\n *        The url to the src\n *\n * @return {string}\n *         return the mimetype if it was known or empty string otherwise\n */\nconst getMimetype = function (src = '') {\n  const ext = getFileExtension(src);\n  const mimetype = MimetypesKind[ext.toLowerCase()];\n  return mimetype || '';\n};\n\n/**\n * Find the mime type of a given source string if possible. Uses the player\n * source cache.\n *\n * @param {Player} player\n *        The player object\n *\n * @param {string} src\n *        The source string\n *\n * @return {string}\n *         The type that was found\n */\nconst findMimetype = (player, src) => {\n  if (!src) {\n    return '';\n  }\n\n  // 1. check for the type in the `source` cache\n  if (player.cache_.source.src === src && player.cache_.source.type) {\n    return player.cache_.source.type;\n  }\n\n  // 2. see if we have this source in our `currentSources` cache\n  const matchingSources = player.cache_.sources.filter(s => s.src === src);\n  if (matchingSources.length) {\n    return matchingSources[0].type;\n  }\n\n  // 3. look for the src url in source elements and use the type there\n  const sources = player.$$('source');\n  for (let i = 0; i < sources.length; i++) {\n    const s = sources[i];\n    if (s.type && s.src && s.src === src) {\n      return s.type;\n    }\n  }\n\n  // 4. finally fallback to our list of mime types based on src url extension\n  return getMimetype(src);\n};\n\n/**\n * @module filter-source\n */\n\n/**\n * Filter out single bad source objects or multiple source objects in an\n * array. Also flattens nested source object arrays into a 1 dimensional\n * array of source objects.\n *\n * @param {Tech~SourceObject|Tech~SourceObject[]} src\n *        The src object to filter\n *\n * @return {Tech~SourceObject[]}\n *         An array of sourceobjects containing only valid sources\n *\n * @private\n */\nconst filterSource = function (src) {\n  // traverse array\n  if (Array.isArray(src)) {\n    let newsrc = [];\n    src.forEach(function (srcobj) {\n      srcobj = filterSource(srcobj);\n      if (Array.isArray(srcobj)) {\n        newsrc = newsrc.concat(srcobj);\n      } else if (isObject(srcobj)) {\n        newsrc.push(srcobj);\n      }\n    });\n    src = newsrc;\n  } else if (typeof src === 'string' && src.trim()) {\n    // convert string into object\n    src = [fixSource({\n      src\n    })];\n  } else if (isObject(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\n    // src is already valid\n    src = [fixSource(src)];\n  } else {\n    // invalid source, turn it into an empty array\n    src = [];\n  }\n  return src;\n};\n\n/**\n * Checks src mimetype, adding it when possible\n *\n * @param {Tech~SourceObject} src\n *        The src object to check\n * @return {Tech~SourceObject}\n *        src Object with known type\n */\nfunction fixSource(src) {\n  if (!src.type) {\n    const mimetype = getMimetype(src.src);\n    if (mimetype) {\n      src.type = mimetype;\n    }\n  }\n  return src;\n}\n\nvar icons = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n  <defs>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play\\\">\\n      <path d=\\\"M16 10v28l22-14z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-pause\\\">\\n      <path d=\\\"M12 38h8V10h-8v28zm16-28v28h8V10h-8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-audio\\\">\\n      <path d=\\\"M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-captions\\\">\\n      <path d=\\\"M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-subtitles\\\">\\n      <path d=\\\"M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-enter\\\">\\n      <path d=\\\"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-fullscreen-exit\\\">\\n      <path d=\\\"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-play-circle\\\">\\n      <path d=\\\"M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-mute\\\">\\n      <path d=\\\"M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-low\\\">\\n      <path d=\\\"M14 18v12h8l10 10V8L22 18h-8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-medium\\\">\\n      <path d=\\\"M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-volume-high\\\">\\n      <path d=\\\"M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-spinner\\\">\\n      <path d=\\\"M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 24 24\\\" id=\\\"vjs-icon-hd\\\">\\n      <path d=\\\"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-chapters\\\">\\n      <path d=\\\"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 40 40\\\" id=\\\"vjs-icon-downloading\\\">\\n      <path d=\\\"M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download\\\">\\n      <path d=\\\"M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-done\\\">\\n      <path d=\\\"M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-file-download-off\\\">\\n      <path d=\\\"M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-share\\\">\\n      <path d=\\\"M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cog\\\">\\n      <path d=\\\"M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-square\\\">\\n      <path d=\\\"M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle\\\">\\n      <circle cx=\\\"24\\\" cy=\\\"24\\\" r=\\\"20\\\"></circle>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-outline\\\">\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-circle-inner-circle\\\">\\n      <path d=\\\"M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cancel\\\">\\n      <path d=\\\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-replay\\\">\\n      <path d=\\\"M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-repeat\\\">\\n      <path d=\\\"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-5\\\">\\n      <path d=\\\"M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-10\\\">\\n      <path d=\\\"M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-replay-30\\\">\\n      <path d=\\\"M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-5\\\">\\n      <path d=\\\"M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-10\\\">\\n      <path d=\\\"M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 96 48 48\\\" id=\\\"vjs-icon-forward-30\\\">\\n      <path d=\\\"M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 512 512\\\" id=\\\"vjs-icon-audio-description\\\">\\n      <g fill-rule=\\\"evenodd\\\"><path d=\\\"M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57\\\"></path><path d=\\\"M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894\\\"></path><path d=\\\"M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z\\\"></path></g>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-next-item\\\">\\n      <path d=\\\"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-previous-item\\\">\\n      <path d=\\\"M12 12h4v24h-4zm7 12l17 12V12z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-shuffle\\\">\\n      <path d=\\\"M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-cast\\\">\\n      <path d=\\\"M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 48 48\\\" id=\\\"vjs-icon-picture-in-picture-enter\\\">\\n      <path d=\\\"M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 22 18\\\" id=\\\"vjs-icon-picture-in-picture-exit\\\">\\n      <path d=\\\"M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z\\\"></path>\\n      <path fill=\\\"none\\\" d=\\\"M-1-3h24v24H-1z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-facebook\\\">\\n      <path d=\\\"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-linkedin\\\">\\n      <path d=\\\"M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1200 1227\\\" id=\\\"vjs-icon-twitter\\\">\\n      <path d=\\\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\\\"/>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-tumblr\\\">\\n      <path d=\\\"M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z\\\"></path>\\n    </symbol>\\n    <symbol viewBox=\\\"0 0 1792 1792\\\" id=\\\"vjs-icon-pinterest\\\">\\n      <path d=\\\"M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z\\\"></path>\\n    </symbol>\\n  </defs>\\n</svg>\";\n\n// /**\n\n// Determine the keycode for the 'back' key based on the platform\nconst backKeyCode = IS_TIZEN ? 10009 : IS_WEBOS ? 461 : 8;\nconst SpatialNavKeyCodes = {\n  codes: {\n    play: 415,\n    pause: 19,\n    ff: 417,\n    rw: 412,\n    back: backKeyCode\n  },\n  names: {\n    415: 'play',\n    19: 'pause',\n    417: 'ff',\n    412: 'rw',\n    [backKeyCode]: 'back'\n  },\n  isEventKey(event, keyName) {\n    keyName = keyName.toLowerCase();\n    if (this.names[event.keyCode] && this.names[event.keyCode] === keyName) {\n      return true;\n    }\n    return false;\n  },\n  getEventName(event) {\n    if (this.names[event.keyCode]) {\n      return this.names[event.keyCode];\n    } else if (this.codes[event.code]) {\n      const code = this.codes[event.code];\n      return this.names[code];\n    }\n    return null;\n  }\n};\n\n/**\n * @file spatial-navigation.js\n */\n\n/** @import Component from './component' */\n/** @import Player from './player' */\n\n// The number of seconds the `step*` functions move the timeline.\nconst STEP_SECONDS = 5;\n\n/**\n * Spatial Navigation in Video.js enhances user experience and accessibility on smartTV devices,\n * enabling seamless navigation through interactive elements within the player using remote control arrow keys.\n * This functionality allows users to effortlessly navigate through focusable components.\n *\n * @extends EventTarget\n */\nclass SpatialNavigation extends EventTarget$2 {\n  /**\n   * Constructs a SpatialNavigation instance with initial settings.\n   * Sets up the player instance, and prepares the spatial navigation system.\n   *\n   * @class\n   * @param {Player} player - The Video.js player instance to which the spatial navigation is attached.\n   */\n  constructor(player) {\n    super();\n    this.player_ = player;\n    this.focusableComponents = [];\n    this.isListening_ = false;\n    this.isPaused_ = false;\n    this.onKeyDown_ = this.onKeyDown_.bind(this);\n    this.lastFocusedComponent_ = null;\n  }\n\n  /**\n   * Starts the spatial navigation by adding a keydown event listener to the video container.\n   * This method ensures that the event listener is added only once.\n   */\n  start() {\n    // If the listener is already active, exit early.\n    if (this.isListening_) {\n      return;\n    }\n\n    // Add the event listener since the listener is not yet active.\n    this.player_.on('keydown', this.onKeyDown_);\n    this.player_.on('modalKeydown', this.onKeyDown_);\n    // Listen for source change events\n    this.player_.on('loadedmetadata', () => {\n      this.focus(this.updateFocusableComponents()[0]);\n    });\n    this.player_.on('modalclose', () => {\n      this.refocusComponent();\n    });\n    this.player_.on('focusin', this.handlePlayerFocus_.bind(this));\n    this.player_.on('focusout', this.handlePlayerBlur_.bind(this));\n    this.isListening_ = true;\n    if (this.player_.errorDisplay) {\n      this.player_.errorDisplay.on('aftermodalfill', () => {\n        this.updateFocusableComponents();\n        if (this.focusableComponents.length) {\n          // The modal has focusable components:\n\n          if (this.focusableComponents.length > 1) {\n            // The modal has close button + some additional buttons.\n            // Focusing first additional button:\n\n            this.focusableComponents[1].focus();\n          } else {\n            // The modal has only close button,\n            // Focusing it:\n\n            this.focusableComponents[0].focus();\n          }\n        }\n      });\n    }\n  }\n\n  /**\n   * Stops the spatial navigation by removing the keydown event listener from the video container.\n   * Also sets the `isListening_` flag to false.\n   */\n  stop() {\n    this.player_.off('keydown', this.onKeyDown_);\n    this.isListening_ = false;\n  }\n\n  /**\n   * Responds to keydown events for spatial navigation and media control.\n   *\n   * Determines if spatial navigation or media control is active and handles key inputs accordingly.\n   *\n   * @param {KeyboardEvent} event - The keydown event to be handled.\n   */\n  onKeyDown_(event) {\n    // Determine if the event is a custom modalKeydown event\n    const actualEvent = event.originalEvent ? event.originalEvent : event;\n    if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(actualEvent.key)) {\n      // Handle directional navigation\n      if (this.isPaused_) {\n        return;\n      }\n      actualEvent.preventDefault();\n\n      // \"ArrowLeft\" => \"left\" etc\n      const direction = actualEvent.key.substring(5).toLowerCase();\n      this.move(direction);\n    } else if (SpatialNavKeyCodes.isEventKey(actualEvent, 'play') || SpatialNavKeyCodes.isEventKey(actualEvent, 'pause') || SpatialNavKeyCodes.isEventKey(actualEvent, 'ff') || SpatialNavKeyCodes.isEventKey(actualEvent, 'rw')) {\n      // Handle media actions\n      actualEvent.preventDefault();\n      const action = SpatialNavKeyCodes.getEventName(actualEvent);\n      this.performMediaAction_(action);\n    } else if (SpatialNavKeyCodes.isEventKey(actualEvent, 'Back') && event.target && typeof event.target.closeable === 'function' && event.target.closeable()) {\n      actualEvent.preventDefault();\n      event.target.close();\n    }\n  }\n\n  /**\n   * Performs media control actions based on the given key input.\n   *\n   * Controls the playback and seeking functionalities of the media player.\n   *\n   * @param {string} key - The key representing the media action to be performed.\n   *   Accepted keys: 'play', 'pause', 'ff' (fast-forward), 'rw' (rewind).\n   */\n  performMediaAction_(key) {\n    if (this.player_) {\n      switch (key) {\n        case 'play':\n          if (this.player_.paused()) {\n            this.player_.play();\n          }\n          break;\n        case 'pause':\n          if (!this.player_.paused()) {\n            this.player_.pause();\n          }\n          break;\n        case 'ff':\n          this.userSeek_(this.player_.currentTime() + STEP_SECONDS);\n          break;\n        case 'rw':\n          this.userSeek_(this.player_.currentTime() - STEP_SECONDS);\n          break;\n      }\n    }\n  }\n\n  /**\n   * Prevent liveThreshold from causing seeks to seem like they\n   * are not happening from a user perspective.\n   *\n   * @param {number} ct\n   *        current time to seek to\n   */\n  userSeek_(ct) {\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n      this.player_.liveTracker.nextSeekedFromUser();\n    }\n    this.player_.currentTime(ct);\n  }\n\n  /**\n   * Pauses the spatial navigation functionality.\n   * This method sets a flag that can be used to temporarily disable the navigation logic.\n   */\n  pause() {\n    this.isPaused_ = true;\n  }\n\n  /**\n   * Resumes the spatial navigation functionality if it has been paused.\n   * This method resets the pause flag, re-enabling the navigation logic.\n   */\n  resume() {\n    this.isPaused_ = false;\n  }\n\n  /**\n   * Handles Player Blur.\n   *\n   * @param {string|Event|Object} event\n   *        The name of the event, an `Event`, or an object with a key of type set to\n   *        an event name.\n   *\n   * Calls for handling of the Player Blur if:\n   * *The next focused element is not a child of current focused element &\n   * The next focused element is not a child of the Player.\n   * *There is no next focused element\n   */\n  handlePlayerBlur_(event) {\n    const nextFocusedElement = event.relatedTarget;\n    let isChildrenOfPlayer = null;\n    const currentComponent = this.getCurrentComponent(event.target);\n    if (nextFocusedElement) {\n      isChildrenOfPlayer = Boolean(nextFocusedElement.closest('.video-js'));\n\n      // If nextFocusedElement is the 'TextTrackSettings' component\n      if (nextFocusedElement.classList.contains('vjs-text-track-settings') && !this.isPaused_) {\n        this.searchForTrackSelect_();\n      }\n    }\n    if (!event.currentTarget.contains(event.relatedTarget) && !isChildrenOfPlayer || !nextFocusedElement) {\n      if (currentComponent && currentComponent.name() === 'CloseButton') {\n        this.refocusComponent();\n      } else {\n        this.pause();\n        if (currentComponent && currentComponent.el()) {\n          // Store last focused component\n          this.lastFocusedComponent_ = currentComponent;\n        }\n      }\n    }\n  }\n\n  /**\n   * Handles the Player focus event.\n   *\n   * Calls for handling of the Player Focus if current element is focusable.\n   */\n  handlePlayerFocus_() {\n    if (this.getCurrentComponent() && this.getCurrentComponent().getIsFocusable()) {\n      this.resume();\n    }\n  }\n\n  /**\n   * Gets a set of focusable components.\n   *\n   * @return {Array}\n   *         Returns an array of focusable components.\n   */\n  updateFocusableComponents() {\n    const player = this.player_;\n    const focusableComponents = [];\n\n    /**\n     * Searches for children candidates.\n     *\n     * Pushes Components to array of 'focusableComponents'.\n     * Calls itself if there is children elements inside iterated component.\n     *\n     * @param {Array} componentsArray - The array of components to search for focusable children.\n     */\n    function searchForChildrenCandidates(componentsArray) {\n      for (const i of componentsArray) {\n        if (i.hasOwnProperty('el_') && i.getIsFocusable() && i.getIsAvailableToBeFocused(i.el())) {\n          focusableComponents.push(i);\n        }\n        if (i.hasOwnProperty('children_') && i.children_.length > 0) {\n          searchForChildrenCandidates(i.children_);\n        }\n      }\n    }\n\n    // Iterate inside all children components of the player.\n    player.children_.forEach(value => {\n      if (value.hasOwnProperty('el_')) {\n        // If component has required functions 'getIsFocusable' & 'getIsAvailableToBeFocused', is focusable & available to be focused.\n        if (value.getIsFocusable && value.getIsAvailableToBeFocused && value.getIsFocusable() && value.getIsAvailableToBeFocused(value.el())) {\n          focusableComponents.push(value);\n          return;\n          // If component has posible children components as candidates.\n        } else if (value.hasOwnProperty('children_') && value.children_.length > 0) {\n          searchForChildrenCandidates(value.children_);\n          // If component has posible item components as candidates.\n        } else if (value.hasOwnProperty('items') && value.items.length > 0) {\n          searchForChildrenCandidates(value.items);\n          // If there is a suitable child element within the component's DOM element.\n        } else if (this.findSuitableDOMChild(value)) {\n          focusableComponents.push(value);\n        }\n      }\n\n      // TODO - Refactor the following logic after refactor of videojs-errors elements to be components is done.\n      if (value.name_ === 'ErrorDisplay' && value.opened_) {\n        const buttonContainer = value.el_.querySelector('.vjs-errors-ok-button-container');\n        if (buttonContainer) {\n          const modalButtons = buttonContainer.querySelectorAll('button');\n          modalButtons.forEach((element, index) => {\n            // Add elements as objects to be handled by the spatial navigation\n            focusableComponents.push({\n              name: () => {\n                return 'ModalButton' + (index + 1);\n              },\n              el: () => element,\n              getPositions: () => {\n                const rect = element.getBoundingClientRect();\n\n                // Creating objects that mirror DOMRectReadOnly for boundingClientRect and center\n                const boundingClientRect = {\n                  x: rect.x,\n                  y: rect.y,\n                  width: rect.width,\n                  height: rect.height,\n                  top: rect.top,\n                  right: rect.right,\n                  bottom: rect.bottom,\n                  left: rect.left\n                };\n\n                // Calculating the center position\n                const center = {\n                  x: rect.left + rect.width / 2,\n                  y: rect.top + rect.height / 2,\n                  width: 0,\n                  height: 0,\n                  top: rect.top + rect.height / 2,\n                  right: rect.left + rect.width / 2,\n                  bottom: rect.top + rect.height / 2,\n                  left: rect.left + rect.width / 2\n                };\n                return {\n                  boundingClientRect,\n                  center\n                };\n              },\n              // Asume that the following are always focusable\n              getIsAvailableToBeFocused: () => true,\n              getIsFocusable: el => true,\n              focus: () => element.focus()\n            });\n          });\n        }\n      }\n    });\n    this.focusableComponents = focusableComponents;\n    return this.focusableComponents;\n  }\n\n  /**\n   * Finds a suitable child element within the provided component's DOM element.\n   *\n   * @param {Object} component - The component containing the DOM element to search within.\n   * @return {HTMLElement|null} Returns the suitable child element if found, or null if not found.\n   */\n  findSuitableDOMChild(component) {\n    /**\n     * Recursively searches for a suitable child node that can be focused within a given component.\n     * It first checks if the provided node itself can be focused according to the component's\n     * `getIsFocusable` and `getIsAvailableToBeFocused` methods. If not, it recursively searches\n     * through the node's children to find a suitable child node that meets the focusability criteria.\n     *\n     * @param {HTMLElement} node - The DOM node to start the search from.\n     * @return {HTMLElement|null} The first child node that is focusable and available to be focused,\n     * or `null` if no suitable child is found.\n     */\n    function searchForSuitableChild(node) {\n      if (component.getIsFocusable(node) && component.getIsAvailableToBeFocused(node)) {\n        return node;\n      }\n      for (let i = 0; i < node.children.length; i++) {\n        const child = node.children[i];\n        const suitableChild = searchForSuitableChild(child);\n        if (suitableChild) {\n          return suitableChild;\n        }\n      }\n      return null;\n    }\n    if (component.el()) {\n      return searchForSuitableChild(component.el());\n    }\n    return null;\n  }\n\n  /**\n   * Gets the currently focused component from the list of focusable components.\n   * If a target element is provided, it uses that element to find the corresponding\n   * component. If no target is provided, it defaults to using the document's currently\n   * active element.\n   *\n   * @param {HTMLElement} [target] - The DOM element to check against the focusable components.\n   *                                 If not provided, `document.activeElement` is used.\n   * @return {Component|null} - Returns the focused component if found among the focusable components,\n   *                            otherwise returns null if no matching component is found.\n   */\n  getCurrentComponent(target) {\n    this.updateFocusableComponents();\n    // eslint-disable-next-line\n    const curComp = target || document.activeElement;\n    if (this.focusableComponents.length) {\n      for (const i of this.focusableComponents) {\n        // If component Node is equal to the current active element.\n        if (i.el() === curComp) {\n          return i;\n        }\n      }\n    }\n  }\n\n  /**\n   * Adds a component to the array of focusable components.\n   *\n   * @param {Component} component\n   *        The `Component` to be added.\n   */\n  add(component) {\n    const focusableComponents = [...this.focusableComponents];\n    if (component.hasOwnProperty('el_') && component.getIsFocusable() && component.getIsAvailableToBeFocused(component.el())) {\n      focusableComponents.push(component);\n    }\n    this.focusableComponents = focusableComponents;\n    // Trigger the notification manually\n    this.trigger({\n      type: 'focusableComponentsChanged',\n      focusableComponents: this.focusableComponents\n    });\n  }\n\n  /**\n   * Removes component from the array of focusable components.\n   *\n   * @param {Component} component - The component to be removed from the focusable components array.\n   */\n  remove(component) {\n    for (let i = 0; i < this.focusableComponents.length; i++) {\n      if (this.focusableComponents[i].name() === component.name()) {\n        this.focusableComponents.splice(i, 1);\n        // Trigger the notification manually\n        this.trigger({\n          type: 'focusableComponentsChanged',\n          focusableComponents: this.focusableComponents\n        });\n        return;\n      }\n    }\n  }\n\n  /**\n   * Clears array of focusable components.\n   */\n  clear() {\n    // Check if the array is already empty to avoid unnecessary event triggering\n    if (this.focusableComponents.length > 0) {\n      // Clear the array\n      this.focusableComponents = [];\n\n      // Trigger the notification manually\n      this.trigger({\n        type: 'focusableComponentsChanged',\n        focusableComponents: this.focusableComponents\n      });\n    }\n  }\n\n  /**\n   * Navigates to the next focusable component based on the specified direction.\n   *\n   * @param {string} direction 'up', 'down', 'left', 'right'\n   */\n  move(direction) {\n    const currentFocusedComponent = this.getCurrentComponent();\n    if (!currentFocusedComponent) {\n      return;\n    }\n    const currentPositions = currentFocusedComponent.getPositions();\n    const candidates = this.focusableComponents.filter(component => component !== currentFocusedComponent && this.isInDirection_(currentPositions.boundingClientRect, component.getPositions().boundingClientRect, direction));\n    const bestCandidate = this.findBestCandidate_(currentPositions.center, candidates, direction);\n    if (bestCandidate) {\n      this.focus(bestCandidate);\n    } else {\n      this.trigger({\n        type: 'endOfFocusableComponents',\n        direction,\n        focusedComponent: currentFocusedComponent\n      });\n    }\n  }\n\n  /**\n   * Finds the best candidate on the current center position,\n   * the list of candidates, and the specified navigation direction.\n   *\n   * @param {Object} currentCenter The center position of the current focused component element.\n   * @param {Array} candidates An array of candidate components to receive focus.\n   * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').\n   * @return {Object|null} The component that is the best candidate for receiving focus.\n   */\n  findBestCandidate_(currentCenter, candidates, direction) {\n    let minDistance = Infinity;\n    let bestCandidate = null;\n    for (const candidate of candidates) {\n      const candidateCenter = candidate.getPositions().center;\n      const distance = this.calculateDistance_(currentCenter, candidateCenter, direction);\n      if (distance < minDistance) {\n        minDistance = distance;\n        bestCandidate = candidate;\n      }\n    }\n    return bestCandidate;\n  }\n\n  /**\n   * Determines if a target rectangle is in the specified navigation direction\n   * relative to a source rectangle.\n   *\n   * @param {Object} srcRect The bounding rectangle of the source element.\n   * @param {Object} targetRect The bounding rectangle of the target element.\n   * @param {string} direction The navigation direction ('up', 'down', 'left', 'right').\n   * @return {boolean} True if the target is in the specified direction relative to the source.\n   */\n  isInDirection_(srcRect, targetRect, direction) {\n    switch (direction) {\n      case 'right':\n        return targetRect.left >= srcRect.right;\n      case 'left':\n        return targetRect.right <= srcRect.left;\n      case 'down':\n        return targetRect.top >= srcRect.bottom;\n      case 'up':\n        return targetRect.bottom <= srcRect.top;\n      default:\n        return false;\n    }\n  }\n\n  /**\n   * Focus the last focused component saved before blur on player.\n   */\n  refocusComponent() {\n    if (this.lastFocusedComponent_) {\n      // If user is not active, set it to active.\n      if (!this.player_.userActive()) {\n        this.player_.userActive(true);\n      }\n      this.updateFocusableComponents();\n\n      // Search inside array of 'focusableComponents' for a match of name of\n      // the last focused component.\n      for (let i = 0; i < this.focusableComponents.length; i++) {\n        if (this.focusableComponents[i].name() === this.lastFocusedComponent_.name()) {\n          this.focus(this.focusableComponents[i]);\n          return;\n        }\n      }\n    } else {\n      this.focus(this.updateFocusableComponents()[0]);\n    }\n  }\n\n  /**\n   * Focuses on a given component.\n   * If the component is available to be focused, it focuses on the component.\n   * If not, it attempts to find a suitable DOM child within the component and focuses on it.\n   *\n   * @param {Component} component - The component to be focused.\n   */\n  focus(component) {\n    if (typeof component !== 'object') {\n      return;\n    }\n    if (component.getIsAvailableToBeFocused(component.el())) {\n      component.focus();\n    } else if (this.findSuitableDOMChild(component)) {\n      this.findSuitableDOMChild(component).focus();\n    }\n  }\n\n  /**\n   * Calculates the distance between two points, adjusting the calculation based on\n   * the specified navigation direction.\n   *\n   * @param {Object} center1 The center point of the first element.\n   * @param {Object} center2 The center point of the second element.\n   * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').\n   * @return {number} The calculated distance between the two centers.\n   */\n  calculateDistance_(center1, center2, direction) {\n    const dx = Math.abs(center1.x - center2.x);\n    const dy = Math.abs(center1.y - center2.y);\n    let distance;\n    switch (direction) {\n      case 'right':\n      case 'left':\n        // Higher weight for vertical distance in horizontal navigation.\n        distance = dx + dy * 100;\n        break;\n      case 'up':\n        // Strongly prioritize vertical proximity for UP navigation.\n        // Adjust the weight to ensure that elements directly above are favored.\n        distance = dy * 2 + dx * 0.5;\n        break;\n      case 'down':\n        // More balanced weight for vertical and horizontal distances.\n        // Adjust the weights here to find the best balance.\n        distance = dy * 5 + dx;\n        break;\n      default:\n        distance = dx + dy;\n    }\n    return distance;\n  }\n\n  /**\n   * This gets called by 'handlePlayerBlur_' if 'spatialNavigation' is enabled.\n   * Searches for the first 'TextTrackSelect' inside of modal to focus.\n   *\n   * @private\n   */\n  searchForTrackSelect_() {\n    const spatialNavigation = this;\n    for (const component of spatialNavigation.updateFocusableComponents()) {\n      if (component.constructor.name === 'TextTrackSelect') {\n        spatialNavigation.focus(component);\n        break;\n      }\n    }\n  }\n}\n\n/**\n * @file loader.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * The `MediaLoader` is the `Component` that decides which playback technology to load\n * when a player is initialized.\n *\n * @extends Component\n */\nclass MediaLoader extends Component$1 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should attach to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function that is run when this component is ready.\n   */\n  constructor(player, options, ready) {\n    // MediaLoader has no element\n    const options_ = merge$1({\n      createEl: false\n    }, options);\n    super(player, options_, ready);\n\n    // If there are no sources when the player is initialized,\n    // load the first supported playback technology.\n\n    if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\n      for (let i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\n        const techName = toTitleCase$1(j[i]);\n        let tech = Tech.getTech(techName);\n\n        // Support old behavior of techs being registered as components.\n        // Remove once that deprecated behavior is removed.\n        if (!techName) {\n          tech = Component$1.getComponent(techName);\n        }\n\n        // Check if the browser supports this technology\n        if (tech && tech.isSupported()) {\n          player.loadTech_(techName);\n          break;\n        }\n      }\n    } else {\n      // Loop through playback technologies (e.g. HTML5) and check for support.\n      // Then load the best source.\n      // A few assumptions here:\n      //   All playback technologies respect preload false.\n      player.src(options.playerOptions.sources);\n    }\n  }\n}\nComponent$1.registerComponent('MediaLoader', MediaLoader);\n\n/**\n * @file clickable-component.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Component which is clickable or keyboard actionable, but is not a\n * native HTML button.\n *\n * @extends Component\n */\nclass ClickableComponent extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param  {Player} player\n   *         The `Player` that this class should be attached to.\n   *\n   * @param  {Object} [options]\n   *         The key/value store of component options.\n   *\n   * @param  {function} [options.clickHandler]\n   *         The function to call when the button is clicked / activated\n   *\n   * @param  {string} [options.controlText]\n   *         The text to set on the button\n   *\n   * @param  {string} [options.className]\n   *         A class or space separated list of classes to add the component\n   *\n   */\n  constructor(player, options) {\n    super(player, options);\n    if (this.options_.controlText) {\n      this.controlText(this.options_.controlText);\n    }\n    this.handleMouseOver_ = e => this.handleMouseOver(e);\n    this.handleMouseOut_ = e => this.handleMouseOut(e);\n    this.handleClick_ = e => this.handleClick(e);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.emitTapEvents();\n    this.enable();\n  }\n\n  /**\n   * Create the `ClickableComponent`s DOM element.\n   *\n   * @param {string} [tag=div]\n   *        The element's node type.\n   *\n   * @param {Object} [props={}]\n   *        An object of properties that should be set on the element.\n   *\n   * @param {Object} [attributes={}]\n   *        An object of attributes that should be set on the element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl(tag = 'div', props = {}, attributes = {}) {\n    props = Object.assign({\n      className: this.buildCSSClass(),\n      tabIndex: 0\n    }, props);\n    if (tag === 'button') {\n      log$1.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n    }\n\n    // Add ARIA attributes for clickable element which is not a native HTML button\n    attributes = Object.assign({\n      role: 'button'\n    }, attributes);\n    this.tabIndex_ = props.tabIndex;\n    const el = createEl(tag, props, attributes);\n    if (!this.player_.options_.experimentalSvgIcons) {\n      el.appendChild(createEl('span', {\n        className: 'vjs-icon-placeholder'\n      }, {\n        'aria-hidden': true\n      }));\n    }\n    this.createControlTextEl(el);\n    return el;\n  }\n  dispose() {\n    // remove controlTextEl_ on dispose\n    this.controlTextEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Create a control text element on this `ClickableComponent`\n   *\n   * @param {Element} [el]\n   *        Parent element for the control text.\n   *\n   * @return {Element}\n   *         The control text element that gets created.\n   */\n  createControlTextEl(el) {\n    this.controlTextEl_ = createEl('span', {\n      className: 'vjs-control-text'\n    }, {\n      // let the screen reader user know that the text of the element may change\n      'aria-live': 'polite'\n    });\n    if (el) {\n      el.appendChild(this.controlTextEl_);\n    }\n    this.controlText(this.controlText_, el);\n    return this.controlTextEl_;\n  }\n\n  /**\n   * Get or set the localize text to use for the controls on the `ClickableComponent`.\n   *\n   * @param {string} [text]\n   *        Control text for element.\n   *\n   * @param {Element} [el=this.el()]\n   *        Element to set the title on.\n   *\n   * @return {string}\n   *         - The control text when getting\n   */\n  controlText(text, el = this.el()) {\n    if (text === undefined) {\n      return this.controlText_ || 'Need Text';\n    }\n    const localizedText = this.localize(text);\n\n    /** @protected */\n    this.controlText_ = text;\n    textContent(this.controlTextEl_, localizedText);\n    if (!this.nonIconControl && !this.player_.options_.noUITitleAttributes) {\n      // Set title attribute if only an icon is shown\n      el.setAttribute('title', localizedText);\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-control vjs-button ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Enable this `ClickableComponent`\n   */\n  enable() {\n    if (!this.enabled_) {\n      this.enabled_ = true;\n      this.removeClass('vjs-disabled');\n      this.el_.setAttribute('aria-disabled', 'false');\n      if (typeof this.tabIndex_ !== 'undefined') {\n        this.el_.setAttribute('tabIndex', this.tabIndex_);\n      }\n      this.on(['tap', 'click'], this.handleClick_);\n      this.on('keydown', this.handleKeyDown_);\n    }\n  }\n\n  /**\n   * Disable this `ClickableComponent`\n   */\n  disable() {\n    this.enabled_ = false;\n    this.addClass('vjs-disabled');\n    this.el_.setAttribute('aria-disabled', 'true');\n    if (typeof this.tabIndex_ !== 'undefined') {\n      this.el_.removeAttribute('tabIndex');\n    }\n    this.off('mouseover', this.handleMouseOver_);\n    this.off('mouseout', this.handleMouseOut_);\n    this.off(['tap', 'click'], this.handleClick_);\n    this.off('keydown', this.handleKeyDown_);\n  }\n\n  /**\n   * Handles language change in ClickableComponent for the player in components\n   *\n   *\n   */\n  handleLanguagechange() {\n    this.controlText(this.controlText_);\n  }\n\n  /**\n   * Event handler that is called when a `ClickableComponent` receives a\n   * `click` or `tap` event.\n   *\n   * @param {Event} event\n   *        The `tap` or `click` event that caused this function to be called.\n   *\n   * @listens tap\n   * @listens click\n   * @abstract\n   */\n  handleClick(event) {\n    if (this.options_.clickHandler) {\n      this.options_.clickHandler.call(this, arguments);\n    }\n  }\n\n  /**\n   * Event handler that is called when a `ClickableComponent` receives a\n   * `keydown` event.\n   *\n   * By default, if the key is Space or Enter, it will trigger a `click` event.\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    // Support Space or Enter key operation to fire a click event. Also,\n    // prevent the event from propagating through the DOM and triggering\n    // Player hotkeys.\n    if (event.key === ' ' || event.key === 'Enter') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n}\nComponent$1.registerComponent('ClickableComponent', ClickableComponent);\n\n/**\n * @file poster-image.js\n */\n\n/** @import Player from './player' */\n\n/**\n * A `ClickableComponent` that handles showing the poster image for the player.\n *\n * @extends ClickableComponent\n */\nclass PosterImage extends ClickableComponent {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should attach to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.update();\n    this.update_ = e => this.update(e);\n    player.on('posterchange', this.update_);\n  }\n\n  /**\n   * Clean up and dispose of the `PosterImage`.\n   */\n  dispose() {\n    this.player().off('posterchange', this.update_);\n    super.dispose();\n  }\n\n  /**\n   * Create the `PosterImage`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl() {\n    // The el is an empty div to keep position in the DOM\n    // A picture and img el will be inserted when a source is set\n    return createEl('div', {\n      className: 'vjs-poster'\n    });\n  }\n\n  /**\n   * Get or set the `PosterImage`'s crossOrigin option.\n   *\n   * @param {string|null} [value]\n   *        The value to set the crossOrigin to. If an argument is\n   *        given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.\n   *\n   * @return {string|null}\n   *         - The current crossOrigin value of the `Player` when getting.\n   *         - undefined when setting\n   */\n  crossOrigin(value) {\n    // `null` can be set to unset a value\n    if (typeof value === 'undefined') {\n      if (this.$('img')) {\n        // If the poster's element exists, give its value\n        return this.$('img').crossOrigin;\n      } else if (this.player_.tech_ && this.player_.tech_.isReady_) {\n        // If not but the tech is ready, query the tech\n        return this.player_.crossOrigin();\n      }\n      // Otherwise check options as the  poster is usually set before the state of crossorigin\n      // can be retrieved by the getter\n      return this.player_.options_.crossOrigin || this.player_.options_.crossorigin || null;\n    }\n    if (value !== null && value !== 'anonymous' && value !== 'use-credentials') {\n      this.player_.log.warn(`crossOrigin must be null,  \"anonymous\" or \"use-credentials\", given \"${value}\"`);\n      return;\n    }\n    if (this.$('img')) {\n      this.$('img').crossOrigin = value;\n    }\n    return;\n  }\n\n  /**\n   * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\n   *\n   * @listens Player#posterchange\n   *\n   * @param {Event} [event]\n   *        The `Player#posterchange` event that triggered this function.\n   */\n  update(event) {\n    const url = this.player().poster();\n    this.setSrc(url);\n\n    // If there's no poster source we should display:none on this component\n    // so it's not still clickable or right-clickable\n    if (url) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Set the source of the `PosterImage` depending on the display method. (Re)creates\n   * the inner picture and img elementss when needed.\n   *\n   * @param {string} [url]\n   *        The URL to the source for the `PosterImage`. If not specified or falsy,\n   *        any source and ant inner picture/img are removed.\n   */\n  setSrc(url) {\n    if (!url) {\n      this.el_.textContent = '';\n      return;\n    }\n    if (!this.$('img')) {\n      this.el_.appendChild(createEl('picture', {\n        className: 'vjs-poster',\n        // Don't want poster to be tabbable.\n        tabIndex: -1\n      }, {}, createEl('img', {\n        loading: 'lazy',\n        crossOrigin: this.crossOrigin()\n      }, {\n        alt: ''\n      })));\n    }\n    this.$('img').src = url;\n  }\n\n  /**\n   * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\n   * {@link ClickableComponent#handleClick} for instances where this will be triggered.\n   *\n   * @listens tap\n   * @listens click\n   * @listens keydown\n   *\n   * @param {Event} event\n   +        The `click`, `tap` or `keydown` event that caused this function to be called.\n   */\n  handleClick(event) {\n    // We don't want a click to trigger playback when controls are disabled\n    if (!this.player_.controls()) {\n      return;\n    }\n    if (this.player_.tech(true)) {\n      this.player_.tech(true).focus();\n    }\n    if (this.player_.paused()) {\n      silencePromise(this.player_.play());\n    } else {\n      this.player_.pause();\n    }\n  }\n}\n\n/**\n * Get or set the `PosterImage`'s crossorigin option. For the HTML5 player, this\n * sets the `crossOrigin` property on the `<img>` tag to control the CORS\n * behavior.\n *\n * @param {string|null} [value]\n *        The value to set the `PosterImages`'s crossorigin to. If an argument is\n *        given, must be one of `anonymous` or `use-credentials`.\n *\n * @return {string|null|undefined}\n *         - The current crossorigin value of the `Player` when getting.\n *         - undefined when setting\n */\nPosterImage.prototype.crossorigin = PosterImage.prototype.crossOrigin;\nComponent$1.registerComponent('PosterImage', PosterImage);\n\n/**\n * @file text-track-display.js\n */\n\n/** @import Player from '../player' */\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst fontMap = {\n  monospace: 'monospace',\n  sansSerif: 'sans-serif',\n  serif: 'serif',\n  monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n  monospaceSerif: '\"Courier New\", monospace',\n  proportionalSansSerif: 'sans-serif',\n  proportionalSerif: 'serif',\n  casual: '\"Comic Sans MS\", Impact, fantasy',\n  script: '\"Monotype Corsiva\", cursive',\n  smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * Construct an rgba color from a given hex color code.\n *\n * @param {number} color\n *        Hex number for color, like #f0e or #f604e2.\n *\n * @param {number} opacity\n *        Value for opacity, 0.0 - 1.0.\n *\n * @return {string}\n *         The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\n */\nfunction constructColor(color, opacity) {\n  let hex;\n  if (color.length === 4) {\n    // color looks like \"#f0e\"\n    hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\n  } else if (color.length === 7) {\n    // color looks like \"#f604e2\"\n    hex = color.slice(1);\n  } else {\n    throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\n  }\n  return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\n}\n\n/**\n * Try to update the style of a DOM element. Some style changes will throw an error,\n * particularly in IE8. Those should be noops.\n *\n * @param {Element} el\n *        The DOM element to be styled.\n *\n * @param {string} style\n *        The CSS property on the element that should be styled.\n *\n * @param {string} rule\n *        The style rule that should be applied to the property.\n *\n * @private\n */\nfunction tryUpdateStyle(el, style, rule) {\n  try {\n    el.style[style] = rule;\n  } catch (e) {\n    // Satisfies linter.\n    return;\n  }\n}\n\n/**\n * Converts the CSS top/right/bottom/left property numeric value to string in pixels.\n *\n * @param {number} position\n *        The CSS top/right/bottom/left property value.\n *\n * @return {string}\n *          The CSS property value that was created, like '10px'.\n *\n * @private\n */\nfunction getCSSPositionValue(position) {\n  return position ? `${position}px` : '';\n}\n\n/**\n * The component for displaying text track cues.\n *\n * @extends Component\n */\nclass TextTrackDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function to call when `TextTrackDisplay` is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    const updateDisplayTextHandler = e => this.updateDisplay(e);\n    const updateDisplayHandler = e => {\n      this.updateDisplayOverlay();\n      this.updateDisplay(e);\n    };\n    player.on('loadstart', e => this.toggleDisplay(e));\n    player.on('texttrackchange', updateDisplayTextHandler);\n    player.on('loadedmetadata', e => {\n      this.updateDisplayOverlay();\n      this.preselectTrack(e);\n    });\n\n    // This used to be called during player init, but was causing an error\n    // if a track should show by default and the display hadn't loaded yet.\n    // Should probably be moved to an external track loader when we support\n    // tracks that don't need a display.\n    player.ready(bind_(this, function () {\n      if (player.tech_ && player.tech_.featuresNativeTextTracks) {\n        this.hide();\n        return;\n      }\n      player.on('fullscreenchange', updateDisplayHandler);\n      player.on('playerresize', updateDisplayHandler);\n      const screenOrientation = window$1.screen.orientation || window$1;\n      const changeOrientationEvent = window$1.screen.orientation ? 'change' : 'orientationchange';\n      screenOrientation.addEventListener(changeOrientationEvent, updateDisplayHandler);\n      player.on('dispose', () => screenOrientation.removeEventListener(changeOrientationEvent, updateDisplayHandler));\n      const tracks = this.options_.playerOptions.tracks || [];\n      for (let i = 0; i < tracks.length; i++) {\n        this.player_.addRemoteTextTrack(tracks[i], true);\n      }\n      this.preselectTrack();\n    }));\n  }\n\n  /**\n  * Preselect a track following this precedence:\n  * - matches the previously selected {@link TextTrack}'s language and kind\n  * - matches the previously selected {@link TextTrack}'s language only\n  * - is the first default captions track\n  * - is the first default descriptions track\n  *\n  * @listens Player#loadstart\n  */\n  preselectTrack() {\n    const modes = {\n      captions: 1,\n      subtitles: 1\n    };\n    const trackList = this.player_.textTracks();\n    const userPref = this.player_.cache_.selectedLanguage;\n    let firstDesc;\n    let firstCaptions;\n    let preferredTrack;\n    for (let i = 0; i < trackList.length; i++) {\n      const track = trackList[i];\n      if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\n        // Always choose the track that matches both language and kind\n        if (track.kind === userPref.kind) {\n          preferredTrack = track;\n          // or choose the first track that matches language\n        } else if (!preferredTrack) {\n          preferredTrack = track;\n        }\n\n        // clear everything if offTextTrackMenuItem was clicked\n      } else if (userPref && !userPref.enabled) {\n        preferredTrack = null;\n        firstDesc = null;\n        firstCaptions = null;\n      } else if (track.default) {\n        if (track.kind === 'descriptions' && !firstDesc) {\n          firstDesc = track;\n        } else if (track.kind in modes && !firstCaptions) {\n          firstCaptions = track;\n        }\n      }\n    }\n\n    // The preferredTrack matches the user preference and takes\n    // precedence over all the other tracks.\n    // So, display the preferredTrack before the first default track\n    // and the subtitles/captions track before the descriptions track\n    if (preferredTrack) {\n      preferredTrack.mode = 'showing';\n    } else if (firstCaptions) {\n      firstCaptions.mode = 'showing';\n    } else if (firstDesc) {\n      firstDesc.mode = 'showing';\n    }\n  }\n\n  /**\n   * Turn display of {@link TextTrack}'s from the current state into the other state.\n   * There are only two states:\n   * - 'shown'\n   * - 'hidden'\n   *\n   * @listens Player#loadstart\n   */\n  toggleDisplay() {\n    if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\n      this.hide();\n    } else {\n      this.show();\n    }\n  }\n\n  /**\n   * Create the {@link Component}'s DOM element.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-text-track-display'\n    }, {\n      'translate': 'yes',\n      'aria-live': 'off',\n      'aria-atomic': 'true'\n    });\n  }\n\n  /**\n   * Clear all displayed {@link TextTrack}s.\n   */\n  clearDisplay() {\n    if (typeof window$1.WebVTT === 'function') {\n      window$1.WebVTT.processCues(window$1, [], this.el_);\n    }\n  }\n\n  /**\n   * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\n   * a {@link Player#fullscreenchange} is fired.\n   *\n   * @listens Player#texttrackchange\n   * @listens Player#fullscreenchange\n   */\n  updateDisplay() {\n    const tracks = this.player_.textTracks();\n    const allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\n    this.clearDisplay();\n    if (allowMultipleShowingTracks) {\n      const showingTracks = [];\n      for (let i = 0; i < tracks.length; ++i) {\n        const track = tracks[i];\n        if (track.mode !== 'showing') {\n          continue;\n        }\n        showingTracks.push(track);\n      }\n      this.updateForTrack(showingTracks);\n      return;\n    }\n\n    //  Track display prioritization model: if multiple tracks are 'showing',\n    //  display the first 'subtitles' or 'captions' track which is 'showing',\n    //  otherwise display the first 'descriptions' track which is 'showing'\n\n    let descriptionsTrack = null;\n    let captionsSubtitlesTrack = null;\n    let i = tracks.length;\n    while (i--) {\n      const track = tracks[i];\n      if (track.mode === 'showing') {\n        if (track.kind === 'descriptions') {\n          descriptionsTrack = track;\n        } else {\n          captionsSubtitlesTrack = track;\n        }\n      }\n    }\n    if (captionsSubtitlesTrack) {\n      if (this.getAttribute('aria-live') !== 'off') {\n        this.setAttribute('aria-live', 'off');\n      }\n      this.updateForTrack(captionsSubtitlesTrack);\n    } else if (descriptionsTrack) {\n      if (this.getAttribute('aria-live') !== 'assertive') {\n        this.setAttribute('aria-live', 'assertive');\n      }\n      this.updateForTrack(descriptionsTrack);\n    }\n    if (!window$1.CSS.supports('inset', '10px')) {\n      const textTrackDisplay = this.el_;\n      const vjsTextTrackCues = textTrackDisplay.querySelectorAll('.vjs-text-track-cue');\n      const controlBarHeight = this.player_.controlBar.el_.getBoundingClientRect().height;\n      const playerHeight = this.player_.el_.getBoundingClientRect().height;\n\n      // Clear inline style before getting actual height of textTrackDisplay\n      textTrackDisplay.style = '';\n\n      // textrack style updates, this styles are required to be inline\n      tryUpdateStyle(textTrackDisplay, 'position', 'relative');\n      tryUpdateStyle(textTrackDisplay, 'height', playerHeight - controlBarHeight + 'px');\n      tryUpdateStyle(textTrackDisplay, 'top', 'unset');\n      if (IS_SMART_TV) {\n        tryUpdateStyle(textTrackDisplay, 'bottom', playerHeight + 'px');\n      } else {\n        tryUpdateStyle(textTrackDisplay, 'bottom', '0px');\n      }\n\n      // vjsTextTrackCue style updates\n      if (vjsTextTrackCues.length > 0) {\n        vjsTextTrackCues.forEach(vjsTextTrackCue => {\n          // verify if inset styles are inline\n          if (vjsTextTrackCue.style.inset) {\n            const insetStyles = vjsTextTrackCue.style.inset.split(' ');\n\n            // expected value is always 3\n            if (insetStyles.length === 3) {\n              Object.assign(vjsTextTrackCue.style, {\n                top: insetStyles[0],\n                right: insetStyles[1],\n                bottom: insetStyles[2],\n                left: 'unset'\n              });\n            }\n          }\n        });\n      }\n    }\n  }\n\n  /**\n   * Updates the displayed TextTrack to be sure it overlays the video when a either\n   * a {@link Player#texttrackchange} or a {@link Player#fullscreenchange} is fired.\n   */\n  updateDisplayOverlay() {\n    // inset-inline and inset-block are not supprted on old chrome, but these are\n    // only likely to be used on TV devices\n    if (!this.player_.videoHeight() || !window$1.CSS.supports('inset-inline: 10px')) {\n      return;\n    }\n    const playerWidth = this.player_.currentWidth();\n    const playerHeight = this.player_.currentHeight();\n    const playerAspectRatio = playerWidth / playerHeight;\n    const videoAspectRatio = this.player_.videoWidth() / this.player_.videoHeight();\n    let insetInlineMatch = 0;\n    let insetBlockMatch = 0;\n    if (Math.abs(playerAspectRatio - videoAspectRatio) > 0.1) {\n      if (playerAspectRatio > videoAspectRatio) {\n        insetInlineMatch = Math.round((playerWidth - playerHeight * videoAspectRatio) / 2);\n      } else {\n        insetBlockMatch = Math.round((playerHeight - playerWidth / videoAspectRatio) / 2);\n      }\n    }\n    tryUpdateStyle(this.el_, 'insetInline', getCSSPositionValue(insetInlineMatch));\n    tryUpdateStyle(this.el_, 'insetBlock', getCSSPositionValue(insetBlockMatch));\n  }\n\n  /**\n   * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\n   *\n   * @param {TextTrack} track\n   *        Text track object containing active cues to style.\n   */\n  updateDisplayState(track) {\n    const overrides = this.player_.textTrackSettings.getValues();\n    const cues = track.activeCues;\n    let i = cues.length;\n    while (i--) {\n      const cue = cues[i];\n      if (!cue) {\n        continue;\n      }\n      const cueDiv = cue.displayState;\n      if (overrides.color) {\n        cueDiv.firstChild.style.color = overrides.color;\n      }\n      if (overrides.textOpacity) {\n        tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\n      }\n      if (overrides.backgroundColor) {\n        cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n      }\n      if (overrides.backgroundOpacity) {\n        tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\n      }\n      if (overrides.windowColor) {\n        if (overrides.windowOpacity) {\n          tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\n        } else {\n          cueDiv.style.backgroundColor = overrides.windowColor;\n        }\n      }\n      if (overrides.edgeStyle) {\n        if (overrides.edgeStyle === 'dropshadow') {\n          cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'raised') {\n          cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'depressed') {\n          cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n        } else if (overrides.edgeStyle === 'uniform') {\n          cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n        }\n      }\n      if (overrides.fontPercent && overrides.fontPercent !== 1) {\n        const fontSize = window$1.parseFloat(cueDiv.style.fontSize);\n        cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\n        cueDiv.style.height = 'auto';\n        cueDiv.style.top = 'auto';\n      }\n      if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n        if (overrides.fontFamily === 'small-caps') {\n          cueDiv.firstChild.style.fontVariant = 'small-caps';\n        } else {\n          cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n        }\n      }\n    }\n  }\n\n  /**\n   * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\n   *\n   * @param {TextTrack|TextTrack[]} tracks\n   *        Text track object or text track array to be added to the list.\n   */\n  updateForTrack(tracks) {\n    if (!Array.isArray(tracks)) {\n      tracks = [tracks];\n    }\n    if (typeof window$1.WebVTT !== 'function' || tracks.every(track => {\n      return !track.activeCues;\n    })) {\n      return;\n    }\n    const cues = [];\n\n    // push all active track cues\n    for (let i = 0; i < tracks.length; ++i) {\n      const track = tracks[i];\n      for (let j = 0; j < track.activeCues.length; ++j) {\n        cues.push(track.activeCues[j]);\n      }\n    }\n\n    // removes all cues before it processes new ones\n    window$1.WebVTT.processCues(window$1, cues, this.el_);\n\n    // add unique class to each language text track & add settings styling if necessary\n    for (let i = 0; i < tracks.length; ++i) {\n      const track = tracks[i];\n      for (let j = 0; j < track.activeCues.length; ++j) {\n        const cueEl = track.activeCues[j].displayState;\n        addClass(cueEl, 'vjs-text-track-cue', 'vjs-text-track-cue-' + (track.language ? track.language : i));\n        if (track.language) {\n          setAttribute(cueEl, 'lang', track.language);\n        }\n      }\n      if (this.player_.textTrackSettings) {\n        this.updateDisplayState(track);\n      }\n    }\n  }\n}\nComponent$1.registerComponent('TextTrackDisplay', TextTrackDisplay);\n\n/**\n * @file loading-spinner.js\n */\n\n/**\n * A loading spinner for use during waiting/loading events.\n *\n * @extends Component\n */\nclass LoadingSpinner extends Component$1 {\n  /**\n   * Create the `LoadingSpinner`s DOM element.\n   *\n   * @return {Element}\n   *         The dom element that gets created.\n   */\n  createEl() {\n    const isAudio = this.player_.isAudio();\n    const playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\n    const controlText = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: this.localize('{1} is loading.', [playerType])\n    });\n    const el = super.createEl('div', {\n      className: 'vjs-loading-spinner',\n      dir: 'ltr'\n    });\n    el.appendChild(controlText);\n    return el;\n  }\n\n  /**\n   * Update control text on languagechange\n   */\n  handleLanguagechange() {\n    this.$('.vjs-control-text').textContent = this.localize('{1} is loading.', [this.player_.isAudio() ? 'Audio Player' : 'Video Player']);\n  }\n}\nComponent$1.registerComponent('LoadingSpinner', LoadingSpinner);\n\n/**\n * @file button.js\n */\n\n/**\n * Base class for all buttons.\n *\n * @extends ClickableComponent\n */\nclass Button extends ClickableComponent {\n  /**\n   * Create the `Button`s DOM element.\n   *\n   * @param {string} [tag=\"button\"]\n   *        The element's node type. This argument is IGNORED: no matter what\n   *        is passed, it will always create a `button` element.\n   *\n   * @param {Object} [props={}]\n   *        An object of properties that should be set on the element.\n   *\n   * @param {Object} [attributes={}]\n   *        An object of attributes that should be set on the element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl(tag, props = {}, attributes = {}) {\n    tag = 'button';\n    props = Object.assign({\n      className: this.buildCSSClass()\n    }, props);\n\n    // Add attributes for button element\n    attributes = Object.assign({\n      // Necessary since the default button type is \"submit\"\n      type: 'button'\n    }, attributes);\n    const el = createEl(tag, props, attributes);\n    if (!this.player_.options_.experimentalSvgIcons) {\n      el.appendChild(createEl('span', {\n        className: 'vjs-icon-placeholder'\n      }, {\n        'aria-hidden': true\n      }));\n    }\n    this.createControlTextEl(el);\n    return el;\n  }\n\n  /**\n   * Add a child `Component` inside of this `Button`.\n   *\n   * @param {string|Component} child\n   *        The name or instance of a child to add.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of options that will get passed to children of\n   *        the child.\n   *\n   * @return {Component}\n   *         The `Component` that gets added as a child. When using a string the\n   *         `Component` will get created by this process.\n   *\n   * @deprecated since version 5\n   */\n  addChild(child, options = {}) {\n    const className = this.constructor.name;\n    log$1.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n    // Avoid the error message generated by ClickableComponent's addChild method\n    return Component$1.prototype.addChild.call(this, child, options);\n  }\n\n  /**\n   * Enable the `Button` element so that it can be activated or clicked. Use this with\n   * {@link Button#disable}.\n   */\n  enable() {\n    super.enable();\n    this.el_.removeAttribute('disabled');\n  }\n\n  /**\n   * Disable the `Button` element so that it cannot be activated or clicked. Use this with\n   * {@link Button#enable}.\n   */\n  disable() {\n    super.disable();\n    this.el_.setAttribute('disabled', 'disabled');\n  }\n\n  /**\n   * This gets called when a `Button` has focus and `keydown` is triggered via a key\n   * press.\n   *\n   * @param {KeyboardEvent} event\n   *        The event that caused this function to get called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    // Ignore Space or Enter key operation, which is handled by the browser for\n    // a button - though not for its super class, ClickableComponent. Also,\n    // prevent the event from propagating through the DOM and triggering Player\n    // hotkeys. We do not preventDefault here because we _want_ the browser to\n    // handle it.\n    if (event.key === ' ' || event.key === 'Enter') {\n      event.stopPropagation();\n      return;\n    }\n\n    // Pass keypress handling up for unsupported keys\n    super.handleKeyDown(event);\n  }\n}\nComponent$1.registerComponent('Button', Button);\n\n/**\n * @file big-play-button.js\n */\n\n/**\n * The initial play button that shows before the video has played. The hiding of the\n * `BigPlayButton` get done via CSS and `Player` states.\n *\n * @extends Button\n */\nclass BigPlayButton extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.mouseused_ = false;\n    this.setIcon('play');\n    this.on('mousedown', e => this.handleMouseDown(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object. Always returns 'vjs-big-play-button'.\n   */\n  buildCSSClass() {\n    return 'vjs-big-play-button';\n  }\n\n  /**\n   * This gets called when a `BigPlayButton` \"clicked\". See {@link ClickableComponent}\n   * for more detailed information on what a click can be.\n   *\n   * @param {KeyboardEvent|MouseEvent|TouchEvent} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    const playPromise = this.player_.play();\n\n    // exit early if clicked via the mouse\n    if (this.mouseused_ && 'clientX' in event && 'clientY' in event) {\n      silencePromise(playPromise);\n      if (this.player_.tech(true)) {\n        this.player_.tech(true).focus();\n      }\n      return;\n    }\n    const cb = this.player_.getChild('controlBar');\n    const playToggle = cb && cb.getChild('playToggle');\n    if (!playToggle) {\n      this.player_.tech(true).focus();\n      return;\n    }\n    const playFocus = () => playToggle.focus();\n    if (isPromise(playPromise)) {\n      playPromise.then(playFocus, () => {});\n    } else {\n      this.setTimeout(playFocus, 1);\n    }\n  }\n\n  /**\n   * Event handler that is called when a `BigPlayButton` receives a\n   * `keydown` event.\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    this.mouseused_ = false;\n    super.handleKeyDown(event);\n  }\n\n  /**\n   * Handle `mousedown` events on the `BigPlayButton`.\n   *\n   * @param {MouseEvent} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   */\n  handleMouseDown(event) {\n    this.mouseused_ = true;\n  }\n}\n\n/**\n * The text that should display over the `BigPlayButton`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n */\nBigPlayButton.prototype.controlText_ = 'Play Video';\nComponent$1.registerComponent('BigPlayButton', BigPlayButton);\n\n/**\n * @file close-button.js\n */\n\n/** @import Player from './player' */\n\n/**\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\n * it gets clicked.\n *\n * @extends Button\n */\nclass CloseButton extends Button {\n  /**\n  * Creates an instance of the this class.\n  *\n  * @param  {Player} player\n  *         The `Player` that this class should be attached to.\n  *\n  * @param  {Object} [options]\n  *         The key/value store of player options.\n  */\n  constructor(player, options) {\n    super(player, options);\n    this.setIcon('cancel');\n    this.controlText(options && options.controlText || this.localize('Close'));\n  }\n\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  buildCSSClass() {\n    return `vjs-close-button ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * This gets called when a `CloseButton` gets clicked. See\n   * {@link ClickableComponent#handleClick} for more information on when\n   * this will be triggered\n   *\n   * @param {Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   * @fires CloseButton#close\n   */\n  handleClick(event) {\n    /**\n     * Triggered when the a `CloseButton` is clicked.\n     *\n     * @event CloseButton#close\n     * @type {Event}\n     *\n     * @property {boolean} [bubbles=false]\n     *           set to false so that the close event does not\n     *           bubble up to parents if there is no listener\n     */\n    this.trigger({\n      type: 'close',\n      bubbles: false\n    });\n  }\n  /**\n   * Event handler that is called when a `CloseButton` receives a\n   * `keydown` event.\n   *\n   * By default, if the key is Esc, it will trigger a `click` event.\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    // Esc button will trigger `click` event\n    if (event.key === 'Escape') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.trigger('click');\n    } else {\n      // Pass keypress handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n}\nComponent$1.registerComponent('CloseButton', CloseButton);\n\n/**\n * @file play-toggle.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Button to toggle between play and pause.\n *\n * @extends Button\n */\nclass PlayToggle extends Button {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // show or hide replay icon\n    options.replay = options.replay === undefined || options.replay;\n    this.setIcon('play');\n    this.on(player, 'play', e => this.handlePlay(e));\n    this.on(player, 'pause', e => this.handlePause(e));\n    if (options.replay) {\n      this.on(player, 'ended', e => this.handleEnded(e));\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-play-control ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * This gets called when an `PlayToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    if (this.player_.paused()) {\n      silencePromise(this.player_.play());\n    } else {\n      this.player_.pause();\n    }\n  }\n\n  /**\n   * This gets called once after the video has ended and the user seeks so that\n   * we can change the replay button back to a play button.\n   *\n   * @param {Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#seeked\n   */\n  handleSeeked(event) {\n    this.removeClass('vjs-ended');\n    if (this.player_.paused()) {\n      this.handlePause(event);\n    } else {\n      this.handlePlay(event);\n    }\n  }\n\n  /**\n   * Add the vjs-playing class to the element so it can change appearance.\n   *\n   * @param {Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#play\n   */\n  handlePlay(event) {\n    this.removeClass('vjs-ended', 'vjs-paused');\n    this.addClass('vjs-playing');\n    // change the button text to \"Pause\"\n    this.setIcon('pause');\n    this.controlText('Pause');\n  }\n\n  /**\n   * Add the vjs-paused class to the element so it can change appearance.\n   *\n   * @param {Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#pause\n   */\n  handlePause(event) {\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused');\n    // change the button text to \"Play\"\n    this.setIcon('play');\n    this.controlText('Play');\n  }\n\n  /**\n   * Add the vjs-ended class to the element so it can change appearance\n   *\n   * @param {Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#ended\n   */\n  handleEnded(event) {\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-ended');\n    // change the button text to \"Replay\"\n    this.setIcon('replay');\n    this.controlText('Replay');\n\n    // on the next seek remove the replay button\n    this.one(this.player_, 'seeked', e => this.handleSeeked(e));\n  }\n}\n\n/**\n * The text that should display over the `PlayToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nPlayToggle.prototype.controlText_ = 'Play';\nComponent$1.registerComponent('PlayToggle', PlayToggle);\n\n/**\n * @file time-display.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Displays time information about the video\n *\n * @extends Component\n */\nclass TimeDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.on(player, ['timeupdate', 'ended', 'seeking'], e => this.update(e));\n    this.updateTextNode_();\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const className = this.buildCSSClass();\n    const el = super.createEl('div', {\n      className: `${className} vjs-time-control vjs-control`\n    });\n    const span = createEl('span', {\n      className: 'vjs-control-text',\n      textContent: `${this.localize(this.labelText_)}\\u00a0`\n    }, {\n      role: 'presentation'\n    });\n    el.appendChild(span);\n    this.contentEl_ = createEl('span', {\n      className: `${className}-display`\n    }, {\n      // span elements have no implicit role, but some screen readers (notably VoiceOver)\n      // treat them as a break between items in the DOM when using arrow keys\n      // (or left-to-right swipes on iOS) to read contents of a page. Using\n      // role='presentation' causes VoiceOver to NOT treat this span as a break.\n      role: 'presentation'\n    });\n    el.appendChild(this.contentEl_);\n    return el;\n  }\n  dispose() {\n    this.contentEl_ = null;\n    this.textNode_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Updates the displayed time according to the `updateContent` function which is defined in the child class.\n   *\n   * @param {Event} [event]\n   *          The `timeupdate`, `ended` or `seeking` (if enableSmoothSeeking is true) event that caused this function to be called.\n   */\n  update(event) {\n    if (!this.player_.options_.enableSmoothSeeking && event.type === 'seeking') {\n      return;\n    }\n    this.updateContent(event);\n  }\n\n  /**\n   * Updates the time display text node with a new time\n   *\n   * @param {number} [time=0] the time to update to\n   *\n   * @private\n   */\n  updateTextNode_(time = 0) {\n    time = formatTime(time);\n    if (this.formattedTime_ === time) {\n      return;\n    }\n    this.formattedTime_ = time;\n    this.requestNamedAnimationFrame('TimeDisplay#updateTextNode_', () => {\n      if (!this.contentEl_) {\n        return;\n      }\n      let oldNode = this.textNode_;\n      if (oldNode && this.contentEl_.firstChild !== oldNode) {\n        oldNode = null;\n        log$1.warn('TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.');\n      }\n      this.textNode_ = document$1.createTextNode(this.formattedTime_);\n      if (!this.textNode_) {\n        return;\n      }\n      if (oldNode) {\n        this.contentEl_.replaceChild(this.textNode_, oldNode);\n      } else {\n        this.contentEl_.appendChild(this.textNode_);\n      }\n    });\n  }\n\n  /**\n   * To be filled out in the child class, should update the displayed time\n   * in accordance with the fact that the current time has changed.\n   *\n   * @param {Event} [event]\n   *        The `timeupdate`  event that caused this to run.\n   *\n   * @listens Player#timeupdate\n   */\n  updateContent(event) {}\n}\n\n/**\n * The text that is added to the `TimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nTimeDisplay.prototype.labelText_ = 'Time';\n\n/**\n * The text that should display over the `TimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nTimeDisplay.prototype.controlText_ = 'Time';\nComponent$1.registerComponent('TimeDisplay', TimeDisplay);\n\n/**\n * @file current-time-display.js\n */\n\n/**\n * Displays the current time\n *\n * @extends Component\n */\nclass CurrentTimeDisplay extends TimeDisplay {\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return 'vjs-current-time';\n  }\n\n  /**\n   * Update current time display\n   *\n   * @param {Event} [event]\n   *        The `timeupdate` event that caused this function to run.\n   *\n   * @listens Player#timeupdate\n   */\n  updateContent(event) {\n    // Allows for smooth scrubbing, when player can't keep up.\n    let time;\n    if (this.player_.ended()) {\n      time = this.player_.duration();\n    } else {\n      time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    }\n    this.updateTextNode_(time);\n  }\n}\n\n/**\n * The text that is added to the `CurrentTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nCurrentTimeDisplay.prototype.labelText_ = 'Current Time';\n\n/**\n * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nCurrentTimeDisplay.prototype.controlText_ = 'Current Time';\nComponent$1.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\n\n/**\n * @file duration-display.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Displays the duration\n *\n * @extends Component\n */\nclass DurationDisplay extends TimeDisplay {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    const updateContent = e => this.updateContent(e);\n\n    // we do not want to/need to throttle duration changes,\n    // as they should always display the changed duration as\n    // it has changed\n    this.on(player, 'durationchange', updateContent);\n\n    // Listen to loadstart because the player duration is reset when a new media element is loaded,\n    // but the durationchange on the user agent will not fire.\n    // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n    this.on(player, 'loadstart', updateContent);\n\n    // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\n    // listeners could have broken dependent applications/libraries. These\n    // can likely be removed for 7.0.\n    this.on(player, 'loadedmetadata', updateContent);\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return 'vjs-duration';\n  }\n\n  /**\n   * Update duration time display.\n   *\n   * @param {Event} [event]\n   *        The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\n   *        this function to be called.\n   *\n   * @listens Player#durationchange\n   * @listens Player#timeupdate\n   * @listens Player#loadedmetadata\n   */\n  updateContent(event) {\n    const duration = this.player_.duration();\n    this.updateTextNode_(duration);\n  }\n}\n\n/**\n * The text that is added to the `DurationDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nDurationDisplay.prototype.labelText_ = 'Duration';\n\n/**\n * The text that should display over the `DurationDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nDurationDisplay.prototype.controlText_ = 'Duration';\nComponent$1.registerComponent('DurationDisplay', DurationDisplay);\n\n/**\n * @file time-divider.js\n */\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @extends Component\n */\nclass TimeDivider extends Component$1 {\n  /**\n   * Create the component's DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-time-control vjs-time-divider'\n    }, {\n      // this element and its contents can be hidden from assistive techs since\n      // it is made extraneous by the announcement of the control text\n      // for the current time and duration displays\n      'aria-hidden': true\n    });\n    const div = super.createEl('div');\n    const span = super.createEl('span', {\n      textContent: '/'\n    });\n    div.appendChild(span);\n    el.appendChild(div);\n    return el;\n  }\n}\nComponent$1.registerComponent('TimeDivider', TimeDivider);\n\n/**\n * @file remaining-time-display.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Displays the time left in the video\n *\n * @extends Component\n */\nclass RemainingTimeDisplay extends TimeDisplay {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.on(player, 'durationchange', e => this.updateContent(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return 'vjs-remaining-time';\n  }\n\n  /**\n   * Create the `Component`'s DOM element with the \"minus\" character prepend to the time\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl();\n    if (this.options_.displayNegative !== false) {\n      el.insertBefore(createEl('span', {}, {\n        'aria-hidden': true\n      }, '-'), this.contentEl_);\n    }\n    return el;\n  }\n\n  /**\n   * Update remaining time display.\n   *\n   * @param {Event} [event]\n   *        The `timeupdate` or `durationchange` event that caused this to run.\n   *\n   * @listens Player#timeupdate\n   * @listens Player#durationchange\n   */\n  updateContent(event) {\n    if (typeof this.player_.duration() !== 'number') {\n      return;\n    }\n    let time;\n\n    // @deprecated We should only use remainingTimeDisplay\n    // as of video.js 7\n    if (this.player_.ended()) {\n      time = 0;\n    } else if (this.player_.remainingTimeDisplay) {\n      time = this.player_.remainingTimeDisplay();\n    } else {\n      time = this.player_.remainingTime();\n    }\n    this.updateTextNode_(time);\n  }\n}\n\n/**\n * The text that is added to the `RemainingTimeDisplay` for screen reader users.\n *\n * @type {string}\n * @private\n */\nRemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\n\n/**\n * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\n *\n * @type {string}\n * @protected\n *\n * @deprecated in v7; controlText_ is not used in non-active display Components\n */\nRemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\nComponent$1.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\n\n/**\n * @file live-display.js\n */\n\n/** @import Player from './player' */\n\n// TODO - Future make it click to snap to live\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\nclass LiveDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.updateShowing();\n    this.on(this.player(), 'durationchange', e => this.updateShowing(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-live-control vjs-control'\n    });\n    this.contentEl_ = createEl('div', {\n      className: 'vjs-live-display'\n    }, {\n      'aria-live': 'off'\n    });\n    this.contentEl_.appendChild(createEl('span', {\n      className: 'vjs-control-text',\n      textContent: `${this.localize('Stream Type')}\\u00a0`\n    }));\n    this.contentEl_.appendChild(document$1.createTextNode(this.localize('LIVE')));\n    el.appendChild(this.contentEl_);\n    return el;\n  }\n  dispose() {\n    this.contentEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\n   * it accordingly\n   *\n   * @param {Event} [event]\n   *        The {@link Player#durationchange} event that caused this function to run.\n   *\n   * @listens Player#durationchange\n   */\n  updateShowing(event) {\n    if (this.player().duration() === Infinity) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n}\nComponent$1.registerComponent('LiveDisplay', LiveDisplay);\n\n/**\n * @file seek-to-live.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Displays the live indicator when duration is Infinity.\n *\n * @extends Component\n */\nclass SeekToLive extends Button {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.updateLiveEdgeStatus();\n    if (this.player_.liveTracker) {\n      this.updateLiveEdgeStatusHandler_ = e => this.updateLiveEdgeStatus(e);\n      this.on(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('button', {\n      className: 'vjs-seek-to-live-control vjs-control'\n    });\n    this.setIcon('circle', el);\n    this.textEl_ = createEl('span', {\n      className: 'vjs-seek-to-live-text',\n      textContent: this.localize('LIVE')\n    }, {\n      'aria-hidden': 'true'\n    });\n    el.appendChild(this.textEl_);\n    return el;\n  }\n\n  /**\n   * Update the state of this button if we are at the live edge\n   * or not\n   */\n  updateLiveEdgeStatus() {\n    // default to live edge\n    if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\n      this.setAttribute('aria-disabled', true);\n      this.addClass('vjs-at-live-edge');\n      this.controlText('Seek to live, currently playing live');\n    } else {\n      this.setAttribute('aria-disabled', false);\n      this.removeClass('vjs-at-live-edge');\n      this.controlText('Seek to live, currently behind live');\n    }\n  }\n\n  /**\n   * On click bring us as near to the live point as possible.\n   * This requires that we wait for the next `live-seekable-change`\n   * event which will happen every segment length seconds.\n   */\n  handleClick() {\n    this.player_.liveTracker.seekToLiveEdge();\n  }\n\n  /**\n   * Dispose of the element and stop tracking\n   */\n  dispose() {\n    if (this.player_.liveTracker) {\n      this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatusHandler_);\n    }\n    this.textEl_ = null;\n    super.dispose();\n  }\n}\n/**\n * The text that should display over the `SeekToLive`s control. Added for localization.\n *\n * @type {string}\n * @protected\n */\nSeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\nComponent$1.registerComponent('SeekToLive', SeekToLive);\n\n/**\n * @file num.js\n * @module num\n */\n\n/**\n * Keep a number between a min and a max value\n *\n * @param {number} number\n *        The number to clamp\n *\n * @param {number} min\n *        The minimum value\n * @param {number} max\n *        The maximum value\n *\n * @return {number}\n *         the clamped number\n */\nfunction clamp(number, min, max) {\n  number = Number(number);\n  return Math.min(max, Math.max(min, isNaN(number) ? min : number));\n}\n\nvar Num = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  clamp: clamp\n});\n\n/**\n * @file slider.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * The base functionality for a slider. Can be vertical or horizontal.\n * For instance the volume bar or the seek bar on a video is a slider.\n *\n * @extends Component\n */\nclass Slider extends Component$1 {\n  /**\n  * Create an instance of this class\n  *\n  * @param {Player} player\n  *        The `Player` that this class should be attached to.\n  *\n  * @param {Object} [options]\n  *        The key/value store of player options.\n  */\n  constructor(player, options) {\n    super(player, options);\n    this.handleMouseDown_ = e => this.handleMouseDown(e);\n    this.handleMouseUp_ = e => this.handleMouseUp(e);\n    this.handleKeyDown_ = e => this.handleKeyDown(e);\n    this.handleClick_ = e => this.handleClick(e);\n    this.handleMouseMove_ = e => this.handleMouseMove(e);\n    this.update_ = e => this.update(e);\n\n    // Set property names to bar to match with the child Slider class is looking for\n    this.bar = this.getChild(this.options_.barName);\n\n    // Set a horizontal or vertical class on the slider depending on the slider type\n    this.vertical(!!this.options_.vertical);\n    this.enable();\n  }\n\n  /**\n   * Are controls are currently enabled for this slider or not.\n   *\n   * @return {boolean}\n   *         true if controls are enabled, false otherwise\n   */\n  enabled() {\n    return this.enabled_;\n  }\n\n  /**\n   * Enable controls for this slider if they are disabled\n   */\n  enable() {\n    if (this.enabled()) {\n      return;\n    }\n    this.on('mousedown', this.handleMouseDown_);\n    this.on('touchstart', this.handleMouseDown_);\n    this.on('keydown', this.handleKeyDown_);\n    this.on('click', this.handleClick_);\n\n    // TODO: deprecated, controlsvisible does not seem to be fired\n    this.on(this.player_, 'controlsvisible', this.update);\n    if (this.playerEvent) {\n      this.on(this.player_, this.playerEvent, this.update);\n    }\n    this.removeClass('disabled');\n    this.setAttribute('tabindex', 0);\n    this.enabled_ = true;\n  }\n\n  /**\n   * Disable controls for this slider if they are enabled\n   */\n  disable() {\n    if (!this.enabled()) {\n      return;\n    }\n    const doc = this.bar.el_.ownerDocument;\n    this.off('mousedown', this.handleMouseDown_);\n    this.off('touchstart', this.handleMouseDown_);\n    this.off('keydown', this.handleKeyDown_);\n    this.off('click', this.handleClick_);\n    this.off(this.player_, 'controlsvisible', this.update_);\n    this.off(doc, 'mousemove', this.handleMouseMove_);\n    this.off(doc, 'mouseup', this.handleMouseUp_);\n    this.off(doc, 'touchmove', this.handleMouseMove_);\n    this.off(doc, 'touchend', this.handleMouseUp_);\n    this.removeAttribute('tabindex');\n    this.addClass('disabled');\n    if (this.playerEvent) {\n      this.off(this.player_, this.playerEvent, this.update);\n    }\n    this.enabled_ = false;\n  }\n\n  /**\n   * Create the `Slider`s DOM element.\n   *\n   * @param {string} type\n   *        Type of element to create.\n   *\n   * @param {Object} [props={}]\n   *        List of properties in Object form.\n   *\n   * @param {Object} [attributes={}]\n   *        list of attributes in Object form.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl(type, props = {}, attributes = {}) {\n    // Add the slider element class to all sub classes\n    props.className = props.className + ' vjs-slider';\n    props = Object.assign({\n      tabIndex: 0\n    }, props);\n    attributes = Object.assign({\n      'role': 'slider',\n      'aria-valuenow': 0,\n      'aria-valuemin': 0,\n      'aria-valuemax': 100\n    }, attributes);\n    return super.createEl(type, props, attributes);\n  }\n\n  /**\n   * Handle `mousedown` or `touchstart` events on the `Slider`.\n   *\n   * @param {MouseEvent} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   * @fires Slider#slideractive\n   */\n  handleMouseDown(event) {\n    const doc = this.bar.el_.ownerDocument;\n    if (event.type === 'mousedown') {\n      event.preventDefault();\n    }\n    // Do not call preventDefault() on touchstart in Chrome\n    // to avoid console warnings. Use a 'touch-action: none' style\n    // instead to prevent unintended scrolling.\n    // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n    if (event.type === 'touchstart' && !IS_CHROME) {\n      event.preventDefault();\n    }\n    blockTextSelection();\n    this.addClass('vjs-sliding');\n    /**\n     * Triggered when the slider is in an active state\n     *\n     * @event Slider#slideractive\n     * @type {MouseEvent}\n     */\n    this.trigger('slideractive');\n    this.on(doc, 'mousemove', this.handleMouseMove_);\n    this.on(doc, 'mouseup', this.handleMouseUp_);\n    this.on(doc, 'touchmove', this.handleMouseMove_);\n    this.on(doc, 'touchend', this.handleMouseUp_);\n    this.handleMouseMove(event, true);\n  }\n\n  /**\n   * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\n   * The `mousemove` and `touchmove` events will only only trigger this function during\n   * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\n   * {@link Slider#handleMouseUp}.\n   *\n   * @param {MouseEvent} event\n   *        `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\n   *        this function\n   * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false.\n   *\n   * @listens mousemove\n   * @listens touchmove\n   */\n  handleMouseMove(event) {}\n\n  /**\n   * Handle `mouseup` or `touchend` events on the `Slider`.\n   *\n   * @param {MouseEvent} event\n   *        `mouseup` or `touchend` event that triggered this function.\n   *\n   * @listens touchend\n   * @listens mouseup\n   * @fires Slider#sliderinactive\n   */\n  handleMouseUp(event) {\n    const doc = this.bar.el_.ownerDocument;\n    unblockTextSelection();\n    this.removeClass('vjs-sliding');\n    /**\n     * Triggered when the slider is no longer in an active state.\n     *\n     * @event Slider#sliderinactive\n     * @type {Event}\n     */\n    this.trigger('sliderinactive');\n    this.off(doc, 'mousemove', this.handleMouseMove_);\n    this.off(doc, 'mouseup', this.handleMouseUp_);\n    this.off(doc, 'touchmove', this.handleMouseMove_);\n    this.off(doc, 'touchend', this.handleMouseUp_);\n    this.update();\n  }\n\n  /**\n   * Update the progress bar of the `Slider`.\n   *\n   * @return {number}\n   *          The percentage of progress the progress bar represents as a\n   *          number from 0 to 1.\n   */\n  update() {\n    // In VolumeBar init we have a setTimeout for update that pops and update\n    // to the end of the execution stack. The player is destroyed before then\n    // update will cause an error\n    // If there's no bar...\n    if (!this.el_ || !this.bar) {\n      return;\n    }\n\n    // clamp progress between 0 and 1\n    // and only round to four decimal places, as we round to two below\n    const progress = this.getProgress();\n    if (progress === this.progress_) {\n      return progress;\n    }\n    this.progress_ = progress;\n    this.requestNamedAnimationFrame('Slider#update', () => {\n      // Set the new bar width or height\n      const sizeKey = this.vertical() ? 'height' : 'width';\n\n      // Convert to a percentage for css value\n      this.bar.el().style[sizeKey] = (progress * 100).toFixed(2) + '%';\n    });\n    return progress;\n  }\n\n  /**\n   * Get the percentage of the bar that should be filled\n   * but clamped and rounded.\n   *\n   * @return {number}\n   *         percentage filled that the slider is\n   */\n  getProgress() {\n    return Number(clamp(this.getPercent(), 0, 1).toFixed(4));\n  }\n\n  /**\n   * Calculate distance for slider\n   *\n   * @param {Event} event\n   *        The event that caused this function to run.\n   *\n   * @return {number}\n   *         The current position of the Slider.\n   *         - position.x for vertical `Slider`s\n   *         - position.y for horizontal `Slider`s\n   */\n  calculateDistance(event) {\n    const position = getPointerPosition(this.el_, event);\n    if (this.vertical()) {\n      return position.y;\n    }\n    return position.x;\n  }\n\n  /**\n   * Handle a `keydown` event on the `Slider`. Watches for left, right, up, and down\n   * arrow keys. This function will only be called when the slider has focus. See\n   * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\n   *\n   * @param {KeyboardEvent} event\n   *        the `keydown` event that caused this function to run.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    const spatialNavOptions = this.options_.playerOptions.spatialNavigation;\n    const spatialNavEnabled = spatialNavOptions && spatialNavOptions.enabled;\n    const horizontalSeek = spatialNavOptions && spatialNavOptions.horizontalSeek;\n    if (spatialNavEnabled) {\n      if (horizontalSeek && event.key === 'ArrowLeft' || !horizontalSeek && event.key === 'ArrowDown') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepBack();\n      } else if (horizontalSeek && event.key === 'ArrowRight' || !horizontalSeek && event.key === 'ArrowUp') {\n        event.preventDefault();\n        event.stopPropagation();\n        this.stepForward();\n      } else {\n        super.handleKeyDown(event);\n      }\n\n      // Left and Down Arrows\n    } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepBack();\n\n      // Up and Right Arrows\n    } else if (event.key === 'ArrowUp' || event.key === 'ArrowRight') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n    } else {\n      // Pass keydown handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n\n  /**\n   * Listener for click events on slider, used to prevent clicks\n   *   from bubbling up to parent elements like button menus.\n   *\n   * @param {Object} event\n   *        Event that caused this object to run\n   */\n  handleClick(event) {\n    event.stopPropagation();\n    event.preventDefault();\n  }\n\n  /**\n   * Get/set if slider is horizontal for vertical\n   *\n   * @param {boolean} [bool]\n   *        - true if slider is vertical,\n   *        - false is horizontal\n   *\n   * @return {boolean}\n   *         - true if slider is vertical, and getting\n   *         - false if the slider is horizontal, and getting\n   */\n  vertical(bool) {\n    if (bool === undefined) {\n      return this.vertical_ || false;\n    }\n    this.vertical_ = !!bool;\n    if (this.vertical_) {\n      this.addClass('vjs-slider-vertical');\n    } else {\n      this.addClass('vjs-slider-horizontal');\n    }\n  }\n}\nComponent$1.registerComponent('Slider', Slider);\n\n/**\n * @file load-progress-bar.js\n */\n\n/** @import Player from '../../player' */\n\n// get the percent width of a time compared to the total end\nconst percentify = (time, end) => clamp(time / end * 100, 0, 100).toFixed(2) + '%';\n\n/**\n * Shows loading progress\n *\n * @extends Component\n */\nclass LoadProgressBar extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.partEls_ = [];\n    this.on(player, 'progress', e => this.update(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-load-progress'\n    });\n    const wrapper = createEl('span', {\n      className: 'vjs-control-text'\n    });\n    const loadedText = createEl('span', {\n      textContent: this.localize('Loaded')\n    });\n    const separator = document$1.createTextNode(': ');\n    this.percentageEl_ = createEl('span', {\n      className: 'vjs-control-text-loaded-percentage',\n      textContent: '0%'\n    });\n    el.appendChild(wrapper);\n    wrapper.appendChild(loadedText);\n    wrapper.appendChild(separator);\n    wrapper.appendChild(this.percentageEl_);\n    return el;\n  }\n  dispose() {\n    this.partEls_ = null;\n    this.percentageEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Update progress bar\n   *\n   * @param {Event} [event]\n   *        The `progress` event that caused this function to run.\n   *\n   * @listens Player#progress\n   */\n  update(event) {\n    this.requestNamedAnimationFrame('LoadProgressBar#update', () => {\n      const liveTracker = this.player_.liveTracker;\n      const buffered = this.player_.buffered();\n      const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n      const bufferedEnd = this.player_.bufferedEnd();\n      const children = this.partEls_;\n      const percent = percentify(bufferedEnd, duration);\n      if (this.percent_ !== percent) {\n        // update the width of the progress bar\n        this.el_.style.width = percent;\n        // update the control-text\n        textContent(this.percentageEl_, percent);\n        this.percent_ = percent;\n      }\n\n      // add child elements to represent the individual buffered time ranges\n      for (let i = 0; i < buffered.length; i++) {\n        const start = buffered.start(i);\n        const end = buffered.end(i);\n        let part = children[i];\n        if (!part) {\n          part = this.el_.appendChild(createEl());\n          children[i] = part;\n        }\n\n        //  only update if changed\n        if (part.dataset.start === start && part.dataset.end === end) {\n          continue;\n        }\n        part.dataset.start = start;\n        part.dataset.end = end;\n\n        // set the percent based on the width of the progress bar (bufferedEnd)\n        part.style.left = percentify(start, bufferedEnd);\n        part.style.width = percentify(end - start, bufferedEnd);\n      }\n\n      // remove unused buffered range elements\n      for (let i = children.length; i > buffered.length; i--) {\n        this.el_.removeChild(children[i - 1]);\n      }\n      children.length = buffered.length;\n    });\n  }\n}\nComponent$1.registerComponent('LoadProgressBar', LoadProgressBar);\n\n/**\n * @file time-tooltip.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Time tooltips display a time above the progress bar.\n *\n * @extends Component\n */\nclass TimeTooltip extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the time tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-time-tooltip'\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n\n  /**\n   * Updates the position of the time tooltip relative to the `SeekBar`.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   */\n  update(seekBarRect, seekBarPoint, content) {\n    const tooltipRect = findPosition(this.el_);\n    const playerRect = getBoundingClientRect(this.player_.el());\n    const seekBarPointPx = seekBarRect.width * seekBarPoint;\n\n    // do nothing if either rect isn't available\n    // for example, if the player isn't in the DOM for testing\n    if (!playerRect || !tooltipRect) {\n      return;\n    }\n\n    // This is the space left of the `seekBarPoint` available within the bounds\n    // of the player. We calculate any gap between the left edge of the player\n    // and the left edge of the `SeekBar` and add the number of pixels in the\n    // `SeekBar` before hitting the `seekBarPoint`\n    let spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx;\n\n    // This is the space right of the `seekBarPoint` available within the bounds\n    // of the player. We calculate the number of pixels from the `seekBarPoint`\n    // to the right edge of the `SeekBar` and add to that any gap between the\n    // right edge of the `SeekBar` and the player.\n    let spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right);\n\n    // spaceRightOfPoint is always NaN for mouse time display\n    // because the seekbarRect does not have a right property. This causes\n    // the mouse tool tip to be truncated when it's close to the right edge of the player.\n    // In such cases, we ignore the `playerRect.right - seekBarRect.right` value when calculating.\n    // For the sake of consistency, we ignore seekBarRect.left - playerRect.left for the left edge.\n    if (!spaceRightOfPoint) {\n      spaceRightOfPoint = seekBarRect.width - seekBarPointPx;\n      spaceLeftOfPoint = seekBarPointPx;\n    }\n    // This is the number of pixels by which the tooltip will need to be pulled\n    // further to the right to center it over the `seekBarPoint`.\n    let pullTooltipBy = tooltipRect.width / 2;\n\n    // Adjust the `pullTooltipBy` distance to the left or right depending on\n    // the results of the space calculations above.\n    if (spaceLeftOfPoint < pullTooltipBy) {\n      pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n    } else if (spaceRightOfPoint < pullTooltipBy) {\n      pullTooltipBy = spaceRightOfPoint;\n    }\n\n    // Due to the imprecision of decimal/ratio based calculations and varying\n    // rounding behaviors, there are cases where the spacing adjustment is off\n    // by a pixel or two. This adds insurance to these calculations.\n    if (pullTooltipBy < 0) {\n      pullTooltipBy = 0;\n    } else if (pullTooltipBy > tooltipRect.width) {\n      pullTooltipBy = tooltipRect.width;\n    }\n\n    // prevent small width fluctuations within 0.4px from\n    // changing the value below.\n    // This really helps for live to prevent the play\n    // progress time tooltip from jittering\n    pullTooltipBy = Math.round(pullTooltipBy);\n    this.el_.style.right = `-${pullTooltipBy}px`;\n    this.write(content);\n  }\n\n  /**\n   * Write the time to the tooltip DOM element.\n   *\n   * @param {string} content\n   *        The formatted time for the tooltip.\n   */\n  write(content) {\n    textContent(this.el_, content);\n  }\n\n  /**\n   * Updates the position of the time tooltip relative to the `SeekBar`.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   *\n   * @param {number} time\n   *        The time to update the tooltip to, not used during live playback\n   *\n   * @param {Function} cb\n   *        A function that will be called during the request animation frame\n   *        for tooltips that need to do additional animations from the default\n   */\n  updateTime(seekBarRect, seekBarPoint, time, cb) {\n    this.requestNamedAnimationFrame('TimeTooltip#updateTime', () => {\n      let content;\n      const duration = this.player_.duration();\n      if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n        const liveWindow = this.player_.liveTracker.liveWindow();\n        const secondsBehind = liveWindow - seekBarPoint * liveWindow;\n        content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\n      } else {\n        content = formatTime(time, duration);\n      }\n      this.update(seekBarRect, seekBarPoint, content);\n      if (cb) {\n        cb();\n      }\n    });\n  }\n}\nComponent$1.registerComponent('TimeTooltip', TimeTooltip);\n\n/**\n * @file play-progress-bar.js\n */\n\n/**\n * Used by {@link SeekBar} to display media playback progress as part of the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\nclass PlayProgressBar extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.setIcon('circle');\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-play-progress vjs-slider-bar'\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n\n  /**\n   * Enqueues updates to its own DOM as well as the DOM of its\n   * {@link TimeTooltip} child.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   */\n  update(seekBarRect, seekBarPoint) {\n    const timeTooltip = this.getChild('timeTooltip');\n    if (!timeTooltip) {\n      return;\n    }\n    const time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n    timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\n  }\n}\n\n/**\n * Default options for {@link PlayProgressBar}.\n *\n * @type {Object}\n * @private\n */\nPlayProgressBar.prototype.options_ = {\n  children: []\n};\n\n// Time tooltips should not be added to a player on mobile devices\nif (!IS_IOS && !IS_ANDROID) {\n  PlayProgressBar.prototype.options_.children.push('timeTooltip');\n}\nComponent$1.registerComponent('PlayProgressBar', PlayProgressBar);\n\n/**\n * @file mouse-time-display.js\n */\n\n/**\n * The {@link MouseTimeDisplay} component tracks mouse movement over the\n * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\n * indicating the time which is represented by a given point in the\n * {@link ProgressControl}.\n *\n * @extends Component\n */\nclass MouseTimeDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-mouse-display'\n    });\n  }\n\n  /**\n   * Enqueues updates to its own DOM as well as the DOM of its\n   * {@link TimeTooltip} child.\n   *\n   * @param {Object} seekBarRect\n   *        The `ClientRect` for the {@link SeekBar} element.\n   *\n   * @param {number} seekBarPoint\n   *        A number from 0 to 1, representing a horizontal reference point\n   *        from the left edge of the {@link SeekBar}\n   */\n  update(seekBarRect, seekBarPoint) {\n    const time = seekBarPoint * this.player_.duration();\n    this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, () => {\n      this.el_.style.left = `${seekBarRect.width * seekBarPoint}px`;\n    });\n  }\n}\n\n/**\n * Default options for `MouseTimeDisplay`\n *\n * @type {Object}\n * @private\n */\nMouseTimeDisplay.prototype.options_ = {\n  children: ['timeTooltip']\n};\nComponent$1.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\n\n/**\n * @file seek-bar.js\n */\n\n/**\n * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\n * as its `bar`.\n *\n * @extends Slider\n */\nclass SeekBar extends Slider {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   * @param {number} [options.stepSeconds=5]\n   *        The number of seconds to increment on keyboard control\n   * @param {number} [options.pageMultiplier=12]\n   *        The multiplier of stepSeconds that PgUp/PgDown move the timeline.\n   */\n  constructor(player, options) {\n    options = merge$1(SeekBar.prototype.options_, options);\n\n    // Avoid mutating the prototype's `children` array by creating a copy\n    options.children = [...options.children];\n    const shouldDisableSeekWhileScrubbingOnMobile = player.options_.disableSeekWhileScrubbingOnMobile && (IS_IOS || IS_ANDROID);\n\n    // Add the TimeTooltip as a child if we are on desktop, or on mobile with `disableSeekWhileScrubbingOnMobile: true`\n    if (!IS_IOS && !IS_ANDROID || shouldDisableSeekWhileScrubbingOnMobile) {\n      options.children.splice(1, 0, 'mouseTimeDisplay');\n    }\n    super(player, options);\n    this.shouldDisableSeekWhileScrubbingOnMobile_ = shouldDisableSeekWhileScrubbingOnMobile;\n    this.pendingSeekTime_ = null;\n    this.setEventHandlers_();\n  }\n\n  /**\n   * Sets the event handlers\n   *\n   * @private\n   */\n  setEventHandlers_() {\n    this.update_ = bind_(this, this.update);\n    this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\n    this.on(this.player_, ['durationchange', 'timeupdate'], this.update);\n    this.on(this.player_, ['ended'], this.update_);\n    if (this.player_.liveTracker) {\n      this.on(this.player_.liveTracker, 'liveedgechange', this.update);\n    }\n\n    // when playing, let's ensure we smoothly update the play progress bar\n    // via an interval\n    this.updateInterval = null;\n    this.enableIntervalHandler_ = e => this.enableInterval_(e);\n    this.disableIntervalHandler_ = e => this.disableInterval_(e);\n    this.on(this.player_, ['playing'], this.enableIntervalHandler_);\n    this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_);\n\n    // we don't need to update the play progress if the document is hidden,\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\n    if ('hidden' in document$1 && 'visibilityState' in document$1) {\n      this.on(document$1, 'visibilitychange', this.toggleVisibility_);\n    }\n  }\n  toggleVisibility_(e) {\n    if (document$1.visibilityState === 'hidden') {\n      this.cancelNamedAnimationFrame('SeekBar#update');\n      this.cancelNamedAnimationFrame('Slider#update');\n      this.disableInterval_(e);\n    } else {\n      if (!this.player_.ended() && !this.player_.paused()) {\n        this.enableInterval_();\n      }\n\n      // we just switched back to the page and someone may be looking, so, update ASAP\n      this.update();\n    }\n  }\n  enableInterval_() {\n    if (this.updateInterval) {\n      return;\n    }\n    this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\n  }\n  disableInterval_(e) {\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e && e.type !== 'ended') {\n      return;\n    }\n    if (!this.updateInterval) {\n      return;\n    }\n    this.clearInterval(this.updateInterval);\n    this.updateInterval = null;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-progress-holder'\n    }, {\n      'aria-label': this.localize('Progress Bar')\n    });\n  }\n\n  /**\n   * This function updates the play progress bar and accessibility\n   * attributes to whatever is passed in.\n   *\n   * @param {Event} [event]\n   *        The `timeupdate` or `ended` event that caused this to run.\n   *\n   * @listens Player#timeupdate\n   *\n   * @return {number}\n   *          The current percent at a number from 0-1\n   */\n  update(event) {\n    // ignore updates while the tab is hidden\n    if (document$1.visibilityState === 'hidden') {\n      return;\n    }\n    const percent = super.update();\n    this.requestNamedAnimationFrame('SeekBar#update', () => {\n      const currentTime = this.player_.ended() ? this.player_.duration() : this.getCurrentTime_();\n      const liveTracker = this.player_.liveTracker;\n      let duration = this.player_.duration();\n      if (liveTracker && liveTracker.isLive()) {\n        duration = this.player_.liveTracker.liveCurrentTime();\n      }\n      if (this.percent_ !== percent) {\n        // machine readable value of progress bar (percentage complete)\n        this.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\n        this.percent_ = percent;\n      }\n      if (this.currentTime_ !== currentTime || this.duration_ !== duration) {\n        // human readable value of progress bar (time complete)\n        this.el_.setAttribute('aria-valuetext', this.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\n        this.currentTime_ = currentTime;\n        this.duration_ = duration;\n      }\n\n      // update the progress bar time tooltip with the current time\n      if (this.bar) {\n        this.bar.update(getBoundingClientRect(this.el()), this.getProgress());\n      }\n    });\n    return percent;\n  }\n\n  /**\n   * Prevent liveThreshold from causing seeks to seem like they\n   * are not happening from a user perspective.\n   *\n   * @param {number} ct\n   *        current time to seek to\n   */\n  userSeek_(ct) {\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive()) {\n      this.player_.liveTracker.nextSeekedFromUser();\n    }\n    this.player_.currentTime(ct);\n  }\n\n  /**\n   * Get the value of current time but allows for smooth scrubbing,\n   * when player can't keep up.\n   *\n   * @return {number}\n   *         The current time value to display\n   *\n   * @private\n   */\n  getCurrentTime_() {\n    return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\n  }\n\n  /**\n   * Get the percentage of media played so far.\n   *\n   * @return {number}\n   *         The percentage of media played so far (0 to 1).\n   */\n  getPercent() {\n    // If we have a pending seek time, we are scrubbing on mobile and should set the slider percent\n    // to reflect the current scrub location.\n    if (this.pendingSeekTime_) {\n      return this.pendingSeekTime_ / this.player_.duration();\n    }\n    const currentTime = this.getCurrentTime_();\n    let percent;\n    const liveTracker = this.player_.liveTracker;\n    if (liveTracker && liveTracker.isLive()) {\n      percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow();\n\n      // prevent the percent from changing at the live edge\n      if (liveTracker.atLiveEdge()) {\n        percent = 1;\n      }\n    } else {\n      percent = currentTime / this.player_.duration();\n    }\n    return percent;\n  }\n\n  /**\n   * Handle mouse down on seek bar\n   *\n   * @param {MouseEvent} event\n   *        The `mousedown` event that caused this to run.\n   *\n   * @listens mousedown\n   */\n  handleMouseDown(event) {\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n\n    // Stop event propagation to prevent double fire in progress-control.js\n    event.stopPropagation();\n    this.videoWasPlaying = !this.player_.paused();\n\n    // Don't pause if we are on mobile and `disableSeekWhileScrubbingOnMobile: true`.\n    // In that case, playback should continue while the player scrubs to a new location.\n    if (!this.shouldDisableSeekWhileScrubbingOnMobile_) {\n      this.player_.pause();\n    }\n    super.handleMouseDown(event);\n  }\n\n  /**\n   * Handle mouse move on seek bar\n   *\n   * @param {MouseEvent} event\n   *        The `mousemove` event that caused this to run.\n   * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false\n   *\n   * @listens mousemove\n   */\n  handleMouseMove(event, mouseDown = false) {\n    if (!isSingleLeftClick(event) || isNaN(this.player_.duration())) {\n      return;\n    }\n    if (!mouseDown && !this.player_.scrubbing()) {\n      this.player_.scrubbing(true);\n    }\n    let newTime;\n    const distance = this.calculateDistance(event);\n    const liveTracker = this.player_.liveTracker;\n    if (!liveTracker || !liveTracker.isLive()) {\n      newTime = distance * this.player_.duration();\n\n      // Don't let video end while scrubbing.\n      if (newTime === this.player_.duration()) {\n        newTime = newTime - 0.1;\n      }\n    } else {\n      if (distance >= 0.99) {\n        liveTracker.seekToLiveEdge();\n        return;\n      }\n      const seekableStart = liveTracker.seekableStart();\n      const seekableEnd = liveTracker.liveCurrentTime();\n      newTime = seekableStart + distance * liveTracker.liveWindow();\n\n      // Don't let video end while scrubbing.\n      if (newTime >= seekableEnd) {\n        newTime = seekableEnd;\n      }\n\n      // Compensate for precision differences so that currentTime is not less\n      // than seekable start\n      if (newTime <= seekableStart) {\n        newTime = seekableStart + 0.1;\n      }\n\n      // On android seekableEnd can be Infinity sometimes,\n      // this will cause newTime to be Infinity, which is\n      // not a valid currentTime.\n      if (newTime === Infinity) {\n        return;\n      }\n    }\n\n    // if on mobile and `disableSeekWhileScrubbingOnMobile: true`, keep track of the desired seek point but we won't initiate the seek until 'touchend'\n    if (this.shouldDisableSeekWhileScrubbingOnMobile_) {\n      this.pendingSeekTime_ = newTime;\n    } else {\n      this.userSeek_(newTime);\n    }\n    if (this.player_.options_.enableSmoothSeeking) {\n      this.update();\n    }\n  }\n  enable() {\n    super.enable();\n    const mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n    if (!mouseTimeDisplay) {\n      return;\n    }\n    mouseTimeDisplay.show();\n  }\n  disable() {\n    super.disable();\n    const mouseTimeDisplay = this.getChild('mouseTimeDisplay');\n    if (!mouseTimeDisplay) {\n      return;\n    }\n    mouseTimeDisplay.hide();\n  }\n\n  /**\n   * Handle mouse up on seek bar\n   *\n   * @param {MouseEvent} event\n   *        The `mouseup` event that caused this to run.\n   *\n   * @listens mouseup\n   */\n  handleMouseUp(event) {\n    super.handleMouseUp(event);\n\n    // Stop event propagation to prevent double fire in progress-control.js\n    if (event) {\n      event.stopPropagation();\n    }\n    this.player_.scrubbing(false);\n\n    // If we have a pending seek time, then we have finished scrubbing on mobile and should initiate a seek.\n    if (this.pendingSeekTime_) {\n      this.userSeek_(this.pendingSeekTime_);\n      this.pendingSeekTime_ = null;\n    }\n\n    /**\n     * Trigger timeupdate because we're done seeking and the time has changed.\n     * This is particularly useful for if the player is paused to time the time displays.\n     *\n     * @event Tech#timeupdate\n     * @type {Event}\n     */\n    this.player_.trigger({\n      type: 'timeupdate',\n      target: this,\n      manuallyTriggered: true\n    });\n    if (this.videoWasPlaying) {\n      silencePromise(this.player_.play());\n    } else {\n      // We're done seeking and the time has changed.\n      // If the player is paused, make sure we display the correct time on the seek bar.\n      this.update_();\n    }\n  }\n\n  /**\n   * Move more quickly fast forward for keyboard-only users\n   */\n  stepForward() {\n    this.userSeek_(this.player_.currentTime() + this.options().stepSeconds);\n  }\n\n  /**\n   * Move more quickly rewind for keyboard-only users\n   */\n  stepBack() {\n    this.userSeek_(this.player_.currentTime() - this.options().stepSeconds);\n  }\n\n  /**\n   * Toggles the playback state of the player\n   * This gets called when enter or space is used on the seekbar\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called\n   *\n   */\n  handleAction(event) {\n    if (this.player_.paused()) {\n      this.player_.play();\n    } else {\n      this.player_.pause();\n    }\n  }\n\n  /**\n   * Called when this SeekBar has focus and a key gets pressed down.\n   * Supports the following keys:\n   *\n   *   Space or Enter key fire a click event\n   *   Home key moves to start of the timeline\n   *   End key moves to end of the timeline\n   *   Digit \"0\" through \"9\" keys move to 0%, 10% ... 80%, 90% of the timeline\n   *   PageDown key moves back a larger step than ArrowDown\n   *   PageUp key moves forward a large step\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    const liveTracker = this.player_.liveTracker;\n    if (event.key === ' ' || event.key === 'Enter') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.handleAction(event);\n    } else if (event.key === 'Home') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(0);\n    } else if (event.key === 'End') {\n      event.preventDefault();\n      event.stopPropagation();\n      if (liveTracker && liveTracker.isLive()) {\n        this.userSeek_(liveTracker.liveCurrentTime());\n      } else {\n        this.userSeek_(this.player_.duration());\n      }\n    } else if (/^[0-9]$/.test(event.key)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const gotoFraction = parseInt(event.key, 10) * 0.1;\n      if (liveTracker && liveTracker.isLive()) {\n        this.userSeek_(liveTracker.seekableStart() + liveTracker.liveWindow() * gotoFraction);\n      } else {\n        this.userSeek_(this.player_.duration() * gotoFraction);\n      }\n    } else if (event.key === 'PageDown') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(this.player_.currentTime() - this.options().stepSeconds * this.options().pageMultiplier);\n    } else if (event.key === 'PageUp') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.userSeek_(this.player_.currentTime() + this.options().stepSeconds * this.options().pageMultiplier);\n    } else {\n      // Pass keydown handling up for unsupported keys\n      super.handleKeyDown(event);\n    }\n  }\n  dispose() {\n    this.disableInterval_();\n    this.off(this.player_, ['durationchange', 'timeupdate'], this.update);\n    this.off(this.player_, ['ended'], this.update_);\n    if (this.player_.liveTracker) {\n      this.off(this.player_.liveTracker, 'liveedgechange', this.update);\n    }\n    this.off(this.player_, ['playing'], this.enableIntervalHandler_);\n    this.off(this.player_, ['ended', 'pause', 'waiting'], this.disableIntervalHandler_);\n\n    // we don't need to update the play progress if the document is hidden,\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\n    if ('hidden' in document$1 && 'visibilityState' in document$1) {\n      this.off(document$1, 'visibilitychange', this.toggleVisibility_);\n    }\n    super.dispose();\n  }\n}\n\n/**\n * Default options for the `SeekBar`\n *\n * @type {Object}\n * @private\n */\nSeekBar.prototype.options_ = {\n  children: ['loadProgressBar', 'playProgressBar'],\n  barName: 'playProgressBar',\n  stepSeconds: 5,\n  pageMultiplier: 12\n};\nComponent$1.registerComponent('SeekBar', SeekBar);\n\n/**\n * @file progress-control.js\n */\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress.\n *\n * @extends Component\n */\nclass ProgressControl extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.handleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    this.throttledHandleMouseSeek = throttle(bind_(this, this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\n    this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n    this.handleMouseDownHandler_ = e => this.handleMouseDown(e);\n    this.enable();\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-progress-control vjs-control'\n    });\n  }\n\n  /**\n   * When the mouse moves over the `ProgressControl`, the pointer position\n   * gets passed down to the `MouseTimeDisplay` component.\n   *\n   * @param {Event} event\n   *        The `mousemove` event that caused this function to run.\n   *\n   * @listen mousemove\n   */\n  handleMouseMove(event) {\n    const seekBar = this.getChild('seekBar');\n    if (!seekBar) {\n      return;\n    }\n    const playProgressBar = seekBar.getChild('playProgressBar');\n    const mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\n    if (!playProgressBar && !mouseTimeDisplay) {\n      return;\n    }\n    const seekBarEl = seekBar.el();\n    const seekBarRect = findPosition(seekBarEl);\n    let seekBarPoint = getPointerPosition(seekBarEl, event).x;\n\n    // The default skin has a gap on either side of the `SeekBar`. This means\n    // that it's possible to trigger this behavior outside the boundaries of\n    // the `SeekBar`. This ensures we stay within it at all times.\n    seekBarPoint = clamp(seekBarPoint, 0, 1);\n    if (mouseTimeDisplay) {\n      mouseTimeDisplay.update(seekBarRect, seekBarPoint);\n    }\n    if (playProgressBar) {\n      playProgressBar.update(seekBarRect, seekBar.getProgress());\n    }\n  }\n\n  /**\n   * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\n   *\n   * @method ProgressControl#throttledHandleMouseSeek\n   * @param {Event} event\n   *        The `mousemove` event that caused this function to run.\n   *\n   * @listen mousemove\n   * @listen touchmove\n   */\n\n  /**\n   * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\n   *\n   * @param {Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousemove\n   * @listens touchmove\n   */\n  handleMouseSeek(event) {\n    const seekBar = this.getChild('seekBar');\n    if (seekBar) {\n      seekBar.handleMouseMove(event);\n    }\n  }\n\n  /**\n   * Are controls are currently enabled for this progress control.\n   *\n   * @return {boolean}\n   *         true if controls are enabled, false otherwise\n   */\n  enabled() {\n    return this.enabled_;\n  }\n\n  /**\n   * Disable all controls on the progress control and its children\n   */\n  disable() {\n    this.children().forEach(child => child.disable && child.disable());\n    if (!this.enabled()) {\n      return;\n    }\n    this.off(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n    this.off(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);\n    this.removeListenersAddedOnMousedownAndTouchstart();\n    this.addClass('disabled');\n    this.enabled_ = false;\n\n    // Restore normal playback state if controls are disabled while scrubbing\n    if (this.player_.scrubbing()) {\n      const seekBar = this.getChild('seekBar');\n      this.player_.scrubbing(false);\n      if (seekBar.videoWasPlaying) {\n        silencePromise(this.player_.play());\n      }\n    }\n  }\n\n  /**\n   * Enable all controls on the progress control and its children\n   */\n  enable() {\n    this.children().forEach(child => child.enable && child.enable());\n    if (this.enabled()) {\n      return;\n    }\n    this.on(['mousedown', 'touchstart'], this.handleMouseDownHandler_);\n    this.on(this.el_, ['mousemove', 'touchmove'], this.handleMouseMove);\n    this.removeClass('disabled');\n    this.enabled_ = true;\n  }\n\n  /**\n   * Cleanup listeners after the user finishes interacting with the progress controls\n   */\n  removeListenersAddedOnMousedownAndTouchstart() {\n    const doc = this.el_.ownerDocument;\n    this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\n    this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\n    this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.off(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n\n  /**\n   * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\n   *\n   * @param {Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   */\n  handleMouseDown(event) {\n    const doc = this.el_.ownerDocument;\n    const seekBar = this.getChild('seekBar');\n    if (seekBar) {\n      seekBar.handleMouseDown(event);\n    }\n    this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\n    this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\n    this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.on(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n\n  /**\n   * Handle `mouseup` or `touchend` events on the `ProgressControl`.\n   *\n   * @param {Event} event\n   *        `mouseup` or `touchend` event that triggered this function.\n   *\n   * @listens touchend\n   * @listens mouseup\n   */\n  handleMouseUp(event) {\n    const seekBar = this.getChild('seekBar');\n    if (seekBar) {\n      seekBar.handleMouseUp(event);\n    }\n    this.removeListenersAddedOnMousedownAndTouchstart();\n  }\n}\n\n/**\n * Default options for `ProgressControl`\n *\n * @type {Object}\n * @private\n */\nProgressControl.prototype.options_ = {\n  children: ['seekBar']\n};\nComponent$1.registerComponent('ProgressControl', ProgressControl);\n\n/**\n * @file picture-in-picture-toggle.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Toggle Picture-in-Picture mode\n *\n * @extends Button\n */\nclass PictureInPictureToggle extends Button {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @listens Player#enterpictureinpicture\n   * @listens Player#leavepictureinpicture\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.setIcon('picture-in-picture-enter');\n    this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], e => this.handlePictureInPictureChange(e));\n    this.on(player, ['disablepictureinpicturechanged', 'loadedmetadata'], e => this.handlePictureInPictureEnabledChange(e));\n    this.on(player, ['loadedmetadata', 'audioonlymodechange', 'audiopostermodechange'], () => this.handlePictureInPictureAudioModeChange());\n\n    // TODO: Deactivate button on player emptied event.\n    this.disable();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Displays or hides the button depending on the audio mode detection.\n   * Exits picture-in-picture if it is enabled when switching to audio mode.\n   */\n  handlePictureInPictureAudioModeChange() {\n    // This audio detection will not detect HLS or DASH audio-only streams because there was no reliable way to detect them at the time\n    const isSourceAudio = this.player_.currentType().substring(0, 5) === 'audio';\n    const isAudioMode = isSourceAudio || this.player_.audioPosterMode() || this.player_.audioOnlyMode();\n    if (!isAudioMode) {\n      this.show();\n      return;\n    }\n    if (this.player_.isInPictureInPicture()) {\n      this.player_.exitPictureInPicture();\n    }\n    this.hide();\n  }\n\n  /**\n   * Enables or disables button based on availability of a Picture-In-Picture mode.\n   *\n   * Enabled if\n   * - `player.options().enableDocumentPictureInPicture` is true and\n   *   window.documentPictureInPicture is available; or\n   * - `player.disablePictureInPicture()` is false and\n   *   element.requestPictureInPicture is available\n   */\n  handlePictureInPictureEnabledChange() {\n    if (document$1.pictureInPictureEnabled && this.player_.disablePictureInPicture() === false || this.player_.options_.enableDocumentPictureInPicture && 'documentPictureInPicture' in window$1) {\n      this.enable();\n    } else {\n      this.disable();\n    }\n  }\n\n  /**\n   * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\n   *\n   * @param {Event} [event]\n   *        The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\n   *        called.\n   *\n   * @listens Player#enterpictureinpicture\n   * @listens Player#leavepictureinpicture\n   */\n  handlePictureInPictureChange(event) {\n    if (this.player_.isInPictureInPicture()) {\n      this.setIcon('picture-in-picture-exit');\n      this.controlText('Exit Picture-in-Picture');\n    } else {\n      this.setIcon('picture-in-picture-enter');\n      this.controlText('Picture-in-Picture');\n    }\n    this.handlePictureInPictureEnabledChange();\n  }\n\n  /**\n   * This gets called when an `PictureInPictureToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    if (!this.player_.isInPictureInPicture()) {\n      this.player_.requestPictureInPicture();\n    } else {\n      this.player_.exitPictureInPicture();\n    }\n  }\n\n  /**\n   * Show the `Component`s element if it is hidden by removing the\n   * 'vjs-hidden' class name from it only in browsers that support the Picture-in-Picture API.\n   */\n  show() {\n    // Does not allow to display the pictureInPictureToggle in browsers that do not support the Picture-in-Picture API, e.g. Firefox.\n    if (typeof document$1.exitPictureInPicture !== 'function') {\n      return;\n    }\n    super.show();\n  }\n}\n\n/**\n * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nPictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\nComponent$1.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\n\n/**\n * @file fullscreen-toggle.js\n */\n\n/** @import Player from './player' */\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n */\nclass FullscreenToggle extends Button {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.setIcon('fullscreen-enter');\n    this.on(player, 'fullscreenchange', e => this.handleFullscreenChange(e));\n    if (document$1[player.fsApi_.fullscreenEnabled] === false) {\n      this.disable();\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Handles fullscreenchange on the player and change control text accordingly.\n   *\n   * @param {Event} [event]\n   *        The {@link Player#fullscreenchange} event that caused this function to be\n   *        called.\n   *\n   * @listens Player#fullscreenchange\n   */\n  handleFullscreenChange(event) {\n    if (this.player_.isFullscreen()) {\n      this.controlText('Exit Fullscreen');\n      this.setIcon('fullscreen-exit');\n    } else {\n      this.controlText('Fullscreen');\n      this.setIcon('fullscreen-enter');\n    }\n  }\n\n  /**\n   * This gets called when an `FullscreenToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    if (!this.player_.isFullscreen()) {\n      this.player_.requestFullscreen();\n    } else {\n      this.player_.exitFullscreen();\n    }\n  }\n}\n\n/**\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\nComponent$1.registerComponent('FullscreenToggle', FullscreenToggle);\n\n/** @import Component from '../../component' */\n/** @import Player from '../../player' */\n\n/**\n * Check if volume control is supported and if it isn't hide the\n * `Component` that was passed  using the `vjs-hidden` class.\n *\n * @param {Component} self\n *        The component that should be hidden if volume is unsupported\n *\n * @param {Player} player\n *        A reference to the player\n *\n * @private\n */\nconst checkVolumeSupport = function (self, player) {\n  // hide volume controls when they're not supported by the current tech\n  if (player.tech_ && !player.tech_.featuresVolumeControl) {\n    self.addClass('vjs-hidden');\n  }\n  self.on(player, 'loadstart', function () {\n    if (!player.tech_.featuresVolumeControl) {\n      self.addClass('vjs-hidden');\n    } else {\n      self.removeClass('vjs-hidden');\n    }\n  });\n};\n\n/**\n * @file volume-level.js\n */\n\n/**\n * Shows volume level\n *\n * @extends Component\n */\nclass VolumeLevel extends Component$1 {\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl('div', {\n      className: 'vjs-volume-level'\n    });\n    this.setIcon('circle', el);\n    el.appendChild(super.createEl('span', {\n      className: 'vjs-control-text'\n    }));\n    return el;\n  }\n}\nComponent$1.registerComponent('VolumeLevel', VolumeLevel);\n\n/**\n * @file volume-level-tooltip.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * Volume level tooltips display a volume above or side by side the volume bar.\n *\n * @extends Component\n */\nclass VolumeLevelTooltip extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the volume tooltip DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-volume-tooltip'\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n\n  /**\n   * Updates the position of the tooltip relative to the `VolumeBar` and\n   * its content text.\n   *\n   * @param {Object} rangeBarRect\n   *        The `ClientRect` for the {@link VolumeBar} element.\n   *\n   * @param {number} rangeBarPoint\n   *        A number from 0 to 1, representing a horizontal/vertical reference point\n   *        from the left edge of the {@link VolumeBar}\n   *\n   * @param {boolean} vertical\n   *        Referees to the Volume control position\n   *        in the control bar{@link VolumeControl}\n   *\n   */\n  update(rangeBarRect, rangeBarPoint, vertical, content) {\n    if (!vertical) {\n      const tooltipRect = getBoundingClientRect(this.el_);\n      const playerRect = getBoundingClientRect(this.player_.el());\n      const volumeBarPointPx = rangeBarRect.width * rangeBarPoint;\n      if (!playerRect || !tooltipRect) {\n        return;\n      }\n      const spaceLeftOfPoint = rangeBarRect.left - playerRect.left + volumeBarPointPx;\n      const spaceRightOfPoint = rangeBarRect.width - volumeBarPointPx + (playerRect.right - rangeBarRect.right);\n      let pullTooltipBy = tooltipRect.width / 2;\n      if (spaceLeftOfPoint < pullTooltipBy) {\n        pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\n      } else if (spaceRightOfPoint < pullTooltipBy) {\n        pullTooltipBy = spaceRightOfPoint;\n      }\n      if (pullTooltipBy < 0) {\n        pullTooltipBy = 0;\n      } else if (pullTooltipBy > tooltipRect.width) {\n        pullTooltipBy = tooltipRect.width;\n      }\n      this.el_.style.right = `-${pullTooltipBy}px`;\n    }\n    this.write(`${content}%`);\n  }\n\n  /**\n   * Write the volume to the tooltip DOM element.\n   *\n   * @param {string} content\n   *        The formatted volume for the tooltip.\n   */\n  write(content) {\n    textContent(this.el_, content);\n  }\n\n  /**\n   * Updates the position of the volume tooltip relative to the `VolumeBar`.\n   *\n   * @param {Object} rangeBarRect\n   *        The `ClientRect` for the {@link VolumeBar} element.\n   *\n   * @param {number} rangeBarPoint\n   *        A number from 0 to 1, representing a horizontal/vertical reference point\n   *        from the left edge of the {@link VolumeBar}\n   *\n   * @param {boolean} vertical\n   *        Referees to the Volume control position\n   *        in the control bar{@link VolumeControl}\n   *\n   * @param {number} volume\n   *        The volume level to update the tooltip to\n   *\n   * @param {Function} cb\n   *        A function that will be called during the request animation frame\n   *        for tooltips that need to do additional animations from the default\n   */\n  updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) {\n    this.requestNamedAnimationFrame('VolumeLevelTooltip#updateVolume', () => {\n      this.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0));\n      if (cb) {\n        cb();\n      }\n    });\n  }\n}\nComponent$1.registerComponent('VolumeLevelTooltip', VolumeLevelTooltip);\n\n/**\n * @file mouse-volume-level-display.js\n */\n\n/**\n * The {@link MouseVolumeLevelDisplay} component tracks mouse movement over the\n * {@link VolumeControl}. It displays an indicator and a {@link VolumeLevelTooltip}\n * indicating the volume level which is represented by a given point in the\n * {@link VolumeBar}.\n *\n * @extends Component\n */\nclass MouseVolumeLevelDisplay extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The {@link Player} that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.update = throttle(bind_(this, this.update), UPDATE_REFRESH_INTERVAL);\n  }\n\n  /**\n   * Create the DOM element for this class.\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-mouse-display'\n    });\n  }\n\n  /**\n   * Enquires updates to its own DOM as well as the DOM of its\n   * {@link VolumeLevelTooltip} child.\n   *\n   * @param {Object} rangeBarRect\n   *        The `ClientRect` for the {@link VolumeBar} element.\n   *\n   * @param {number} rangeBarPoint\n   *        A number from 0 to 1, representing a horizontal/vertical reference point\n   *        from the left edge of the {@link VolumeBar}\n   *\n   * @param {boolean} vertical\n   *        Referees to the Volume control position\n   *        in the control bar{@link VolumeControl}\n   *\n   */\n  update(rangeBarRect, rangeBarPoint, vertical) {\n    const volume = 100 * rangeBarPoint;\n    this.getChild('volumeLevelTooltip').updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, () => {\n      if (vertical) {\n        this.el_.style.bottom = `${rangeBarRect.height * rangeBarPoint}px`;\n      } else {\n        this.el_.style.left = `${rangeBarRect.width * rangeBarPoint}px`;\n      }\n    });\n  }\n}\n\n/**\n * Default options for `MouseVolumeLevelDisplay`\n *\n * @type {Object}\n * @private\n */\nMouseVolumeLevelDisplay.prototype.options_ = {\n  children: ['volumeLevelTooltip']\n};\nComponent$1.registerComponent('MouseVolumeLevelDisplay', MouseVolumeLevelDisplay);\n\n/**\n * @file volume-bar.js\n */\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @extends Slider\n */\nclass VolumeBar extends Slider {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.on('slideractive', e => this.updateLastVolume_(e));\n    this.on(player, 'volumechange', e => this.updateARIAAttributes(e));\n    player.ready(() => this.updateARIAAttributes());\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-volume-bar vjs-slider-bar'\n    }, {\n      'aria-label': this.localize('Volume Level'),\n      'aria-live': 'polite'\n    });\n  }\n\n  /**\n   * Handle mouse down on volume bar\n   *\n   * @param {Event} event\n   *        The `mousedown` event that caused this to run.\n   *\n   * @listens mousedown\n   */\n  handleMouseDown(event) {\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n    super.handleMouseDown(event);\n  }\n\n  /**\n   * Handle movement events on the {@link VolumeMenuButton}.\n   *\n   * @param {Event} event\n   *        The event that caused this function to run.\n   *\n   * @listens mousemove\n   */\n  handleMouseMove(event) {\n    const mouseVolumeLevelDisplay = this.getChild('mouseVolumeLevelDisplay');\n    if (mouseVolumeLevelDisplay) {\n      const volumeBarEl = this.el();\n      const volumeBarRect = getBoundingClientRect(volumeBarEl);\n      const vertical = this.vertical();\n      let volumeBarPoint = getPointerPosition(volumeBarEl, event);\n      volumeBarPoint = vertical ? volumeBarPoint.y : volumeBarPoint.x;\n      // The default skin has a gap on either side of the `VolumeBar`. This means\n      // that it's possible to trigger this behavior outside the boundaries of\n      // the `VolumeBar`. This ensures we stay within it at all times.\n      volumeBarPoint = clamp(volumeBarPoint, 0, 1);\n      mouseVolumeLevelDisplay.update(volumeBarRect, volumeBarPoint, vertical);\n    }\n    if (!isSingleLeftClick(event)) {\n      return;\n    }\n    this.checkMuted();\n    this.player_.volume(this.calculateDistance(event));\n  }\n\n  /**\n   * If the player is muted unmute it.\n   */\n  checkMuted() {\n    if (this.player_.muted()) {\n      this.player_.muted(false);\n    }\n  }\n\n  /**\n   * Get percent of volume level\n   *\n   * @return {number}\n   *         Volume level percent as a decimal number.\n   */\n  getPercent() {\n    if (this.player_.muted()) {\n      return 0;\n    }\n    return this.player_.volume();\n  }\n\n  /**\n   * Increase volume level for keyboard users\n   */\n  stepForward() {\n    this.checkMuted();\n    this.player_.volume(this.player_.volume() + 0.1);\n  }\n\n  /**\n   * Decrease volume level for keyboard users\n   */\n  stepBack() {\n    this.checkMuted();\n    this.player_.volume(this.player_.volume() - 0.1);\n  }\n\n  /**\n   * Update ARIA accessibility attributes\n   *\n   * @param {Event} [event]\n   *        The `volumechange` event that caused this function to run.\n   *\n   * @listens Player#volumechange\n   */\n  updateARIAAttributes(event) {\n    const ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\n    this.el_.setAttribute('aria-valuenow', ariaValue);\n    this.el_.setAttribute('aria-valuetext', ariaValue + '%');\n  }\n\n  /**\n   * Returns the current value of the player volume as a percentage\n   *\n   * @private\n   */\n  volumeAsPercentage_() {\n    return Math.round(this.player_.volume() * 100);\n  }\n\n  /**\n   * When user starts dragging the VolumeBar, store the volume and listen for\n   * the end of the drag. When the drag ends, if the volume was set to zero,\n   * set lastVolume to the stored volume.\n   *\n   * @listens slideractive\n   * @private\n   */\n  updateLastVolume_() {\n    const volumeBeforeDrag = this.player_.volume();\n    this.one('sliderinactive', () => {\n      if (this.player_.volume() === 0) {\n        this.player_.lastVolume_(volumeBeforeDrag);\n      }\n    });\n  }\n}\n\n/**\n * Default options for the `VolumeBar`\n *\n * @type {Object}\n * @private\n */\nVolumeBar.prototype.options_ = {\n  children: ['volumeLevel'],\n  barName: 'volumeLevel'\n};\n\n// MouseVolumeLevelDisplay tooltip should not be added to a player on mobile devices\nif (!IS_IOS && !IS_ANDROID) {\n  VolumeBar.prototype.options_.children.splice(0, 0, 'mouseVolumeLevelDisplay');\n}\n\n/**\n * Call the update event for this Slider when this event happens on the player.\n *\n * @type {string}\n */\nVolumeBar.prototype.playerEvent = 'volumechange';\nComponent$1.registerComponent('VolumeBar', VolumeBar);\n\n/**\n * @file volume-control.js\n */\n\n/**\n * The component for controlling the volume level\n *\n * @extends Component\n */\nclass VolumeControl extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  constructor(player, options = {}) {\n    options.vertical = options.vertical || false;\n\n    // Pass the vertical option down to the VolumeBar if\n    // the VolumeBar is turned on.\n    if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\n      options.volumeBar = options.volumeBar || {};\n      options.volumeBar.vertical = options.vertical;\n    }\n    super(player, options);\n\n    // hide this control if volume support is missing\n    checkVolumeSupport(this, player);\n    this.throttledHandleMouseMove = throttle(bind_(this, this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\n    this.handleMouseUpHandler_ = e => this.handleMouseUp(e);\n    this.on('mousedown', e => this.handleMouseDown(e));\n    this.on('touchstart', e => this.handleMouseDown(e));\n    this.on('mousemove', e => this.handleMouseMove(e));\n\n    // while the slider is active (the mouse has been pressed down and\n    // is dragging) or in focus we do not want to hide the VolumeBar\n    this.on(this.volumeBar, ['focus', 'slideractive'], () => {\n      this.volumeBar.addClass('vjs-slider-active');\n      this.addClass('vjs-slider-active');\n      this.trigger('slideractive');\n    });\n    this.on(this.volumeBar, ['blur', 'sliderinactive'], () => {\n      this.volumeBar.removeClass('vjs-slider-active');\n      this.removeClass('vjs-slider-active');\n      this.trigger('sliderinactive');\n    });\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    let orientationClass = 'vjs-volume-horizontal';\n    if (this.options_.vertical) {\n      orientationClass = 'vjs-volume-vertical';\n    }\n    return super.createEl('div', {\n      className: `vjs-volume-control vjs-control ${orientationClass}`\n    });\n  }\n\n  /**\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n   *\n   * @param {Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   */\n  handleMouseDown(event) {\n    const doc = this.el_.ownerDocument;\n    this.on(doc, 'mousemove', this.throttledHandleMouseMove);\n    this.on(doc, 'touchmove', this.throttledHandleMouseMove);\n    this.on(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.on(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n\n  /**\n   * Handle `mouseup` or `touchend` events on the `VolumeControl`.\n   *\n   * @param {Event} event\n   *        `mouseup` or `touchend` event that triggered this function.\n   *\n   * @listens touchend\n   * @listens mouseup\n   */\n  handleMouseUp(event) {\n    const doc = this.el_.ownerDocument;\n    this.off(doc, 'mousemove', this.throttledHandleMouseMove);\n    this.off(doc, 'touchmove', this.throttledHandleMouseMove);\n    this.off(doc, 'mouseup', this.handleMouseUpHandler_);\n    this.off(doc, 'touchend', this.handleMouseUpHandler_);\n  }\n\n  /**\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\n   *\n   * @param {Event} event\n   *        `mousedown` or `touchstart` event that triggered this function\n   *\n   * @listens mousedown\n   * @listens touchstart\n   */\n  handleMouseMove(event) {\n    this.volumeBar.handleMouseMove(event);\n  }\n}\n\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\nVolumeControl.prototype.options_ = {\n  children: ['volumeBar']\n};\nComponent$1.registerComponent('VolumeControl', VolumeControl);\n\n/** @import Component from '../../component' */\n/** @import Player from '../../player' */\n\n/**\n * Check if muting volume is supported and if it isn't hide the mute toggle\n * button.\n *\n * @param {Component} self\n *        A reference to the mute toggle button\n *\n * @param {Player} player\n *        A reference to the player\n *\n * @private\n */\nconst checkMuteSupport = function (self, player) {\n  // hide mute toggle button if it's not supported by the current tech\n  if (player.tech_ && !player.tech_.featuresMuteControl) {\n    self.addClass('vjs-hidden');\n  }\n  self.on(player, 'loadstart', function () {\n    if (!player.tech_.featuresMuteControl) {\n      self.addClass('vjs-hidden');\n    } else {\n      self.removeClass('vjs-hidden');\n    }\n  });\n};\n\n/**\n * @file mute-toggle.js\n */\n\n/** @import Player from './player' */\n\n/**\n * A button component for muting the audio.\n *\n * @extends Button\n */\nclass MuteToggle extends Button {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n\n    // hide this control if volume support is missing\n    checkMuteSupport(this, player);\n    this.on(player, ['loadstart', 'volumechange'], e => this.update(e));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-mute-control ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * This gets called when an `MuteToggle` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    const vol = this.player_.volume();\n    const lastVolume = this.player_.lastVolume_();\n    if (vol === 0) {\n      const volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\n      this.player_.volume(volumeToSet);\n      this.player_.muted(false);\n    } else {\n      this.player_.muted(this.player_.muted() ? false : true);\n    }\n  }\n\n  /**\n   * Update the `MuteToggle` button based on the state of `volume` and `muted`\n   * on the player.\n   *\n   * @param {Event} [event]\n   *        The {@link Player#loadstart} event if this function was called\n   *        through an event.\n   *\n   * @listens Player#loadstart\n   * @listens Player#volumechange\n   */\n  update(event) {\n    this.updateIcon_();\n    this.updateControlText_();\n  }\n\n  /**\n   * Update the appearance of the `MuteToggle` icon.\n   *\n   * Possible states (given `level` variable below):\n   * - 0: crossed out\n   * - 1: zero bars of volume\n   * - 2: one bar of volume\n   * - 3: two bars of volume\n   *\n   * @private\n   */\n  updateIcon_() {\n    const vol = this.player_.volume();\n    let level = 3;\n    this.setIcon('volume-high');\n\n    // in iOS when a player is loaded with muted attribute\n    // and volume is changed with a native mute button\n    // we want to make sure muted state is updated\n    if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\n      this.player_.muted(this.player_.tech_.el_.muted);\n    }\n    if (vol === 0 || this.player_.muted()) {\n      this.setIcon('volume-mute');\n      level = 0;\n    } else if (vol < 0.33) {\n      this.setIcon('volume-low');\n      level = 1;\n    } else if (vol < 0.67) {\n      this.setIcon('volume-medium');\n      level = 2;\n    }\n    removeClass(this.el_, [0, 1, 2, 3].reduce((str, i) => str + `${i ? ' ' : ''}vjs-vol-${i}`, ''));\n    addClass(this.el_, `vjs-vol-${level}`);\n  }\n\n  /**\n   * If `muted` has changed on the player, update the control text\n   * (`title` attribute on `vjs-mute-control` element and content of\n   * `vjs-control-text` element).\n   *\n   * @private\n   */\n  updateControlText_() {\n    const soundOff = this.player_.muted() || this.player_.volume() === 0;\n    const text = soundOff ? 'Unmute' : 'Mute';\n    if (this.controlText() !== text) {\n      this.controlText(text);\n    }\n  }\n}\n\n/**\n * The text that should display over the `MuteToggle`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nMuteToggle.prototype.controlText_ = 'Mute';\nComponent$1.registerComponent('MuteToggle', MuteToggle);\n\n/**\n * @file volume-control.js\n */\n\n/**\n * A Component to contain the MuteToggle and VolumeControl so that\n * they can work together.\n *\n * @extends Component\n */\nclass VolumePanel extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  constructor(player, options = {}) {\n    if (typeof options.inline !== 'undefined') {\n      options.inline = options.inline;\n    } else {\n      options.inline = true;\n    }\n\n    // pass the inline option down to the VolumeControl as vertical if\n    // the VolumeControl is on.\n    if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\n      options.volumeControl = options.volumeControl || {};\n      options.volumeControl.vertical = !options.inline;\n    }\n    super(player, options);\n\n    // this handler is used by mouse handler methods below\n    this.handleKeyPressHandler_ = e => this.handleKeyPress(e);\n    this.on(player, ['loadstart'], e => this.volumePanelState_(e));\n    this.on(this.muteToggle, 'keyup', e => this.handleKeyPress(e));\n    this.on(this.volumeControl, 'keyup', e => this.handleVolumeControlKeyUp(e));\n    this.on('keydown', e => this.handleKeyPress(e));\n    this.on('mouseover', e => this.handleMouseOver(e));\n    this.on('mouseout', e => this.handleMouseOut(e));\n\n    // while the slider is active (the mouse has been pressed down and\n    // is dragging) we do not want to hide the VolumeBar\n    this.on(this.volumeControl, ['slideractive'], this.sliderActive_);\n    this.on(this.volumeControl, ['sliderinactive'], this.sliderInactive_);\n  }\n\n  /**\n   * Add vjs-slider-active class to the VolumePanel\n   *\n   * @listens VolumeControl#slideractive\n   * @private\n   */\n  sliderActive_() {\n    this.addClass('vjs-slider-active');\n  }\n\n  /**\n   * Removes vjs-slider-active class to the VolumePanel\n   *\n   * @listens VolumeControl#sliderinactive\n   * @private\n   */\n  sliderInactive_() {\n    this.removeClass('vjs-slider-active');\n  }\n\n  /**\n   * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\n   * depending on MuteToggle and VolumeControl state\n   *\n   * @listens Player#loadstart\n   * @private\n   */\n  volumePanelState_() {\n    // hide volume panel if neither volume control or mute toggle\n    // are displayed\n    if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\n      this.addClass('vjs-hidden');\n    }\n\n    // if only mute toggle is visible we don't want\n    // volume panel expanding when hovered or active\n    if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\n      this.addClass('vjs-mute-toggle-only');\n    }\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    let orientationClass = 'vjs-volume-panel-horizontal';\n    if (!this.options_.inline) {\n      orientationClass = 'vjs-volume-panel-vertical';\n    }\n    return super.createEl('div', {\n      className: `vjs-volume-panel vjs-control ${orientationClass}`\n    });\n  }\n\n  /**\n   * Dispose of the `volume-panel` and all child components.\n   */\n  dispose() {\n    this.handleMouseOut();\n    super.dispose();\n  }\n\n  /**\n   * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\n   * the volume panel and sets focus on `MuteToggle`.\n   *\n   * @param {Event} event\n   *        The `keyup` event that caused this function to be called.\n   *\n   * @listens keyup\n   */\n  handleVolumeControlKeyUp(event) {\n    if (event.key === 'Escape') {\n      this.muteToggle.focus();\n    }\n  }\n\n  /**\n   * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\n   * Turns on listening for `mouseover` event. When they happen it\n   * calls `this.handleMouseOver`.\n   *\n   * @param {Event} event\n   *        The `mouseover` event that caused this function to be called.\n   *\n   * @listens mouseover\n   */\n  handleMouseOver(event) {\n    this.addClass('vjs-hover');\n    on(document$1, 'keyup', this.handleKeyPressHandler_);\n  }\n\n  /**\n   * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\n   * Turns on listening for `mouseout` event. When they happen it\n   * calls `this.handleMouseOut`.\n   *\n   * @param {Event} event\n   *        The `mouseout` event that caused this function to be called.\n   *\n   * @listens mouseout\n   */\n  handleMouseOut(event) {\n    this.removeClass('vjs-hover');\n    off(document$1, 'keyup', this.handleKeyPressHandler_);\n  }\n\n  /**\n   * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\n   * looking for ESC, which hides the `VolumeControl`.\n   *\n   * @param {Event} event\n   *        The keypress that triggered this event.\n   *\n   * @listens keydown | keyup\n   */\n  handleKeyPress(event) {\n    if (event.key === 'Escape') {\n      this.handleMouseOut();\n    }\n  }\n}\n\n/**\n * Default options for the `VolumeControl`\n *\n * @type {Object}\n * @private\n */\nVolumePanel.prototype.options_ = {\n  children: ['muteToggle', 'volumeControl']\n};\nComponent$1.registerComponent('VolumePanel', VolumePanel);\n\n/**\n * Button to skip forward a configurable amount of time\n * through a video. Renders in the control bar.\n *\n * e.g. options: {controlBar: {skipButtons: forward: 5}}\n *\n * @extends Button\n */\nclass SkipForward extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.validOptions = [5, 10, 30];\n    this.skipTime = this.getSkipForwardTime();\n    if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n      this.setIcon(`forward-${this.skipTime}`);\n      this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime.toLocaleString(player.language())]));\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  getSkipForwardTime() {\n    const playerOptions = this.options_.playerOptions;\n    return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.forward;\n  }\n  buildCSSClass() {\n    return `vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * On click, skips forward in the duration/seekable range by a configurable amount of seconds.\n   * If the time left in the duration/seekable range is less than the configured 'skip forward' time,\n   * skips to end of duration/seekable range.\n   *\n   * Handle a click on a `SkipForward` button\n   *\n   * @param {EventTarget~Event} event\n   *        The `click` event that caused this function\n   *        to be called\n   */\n  handleClick(event) {\n    if (isNaN(this.player_.duration())) {\n      return;\n    }\n    const currentVideoTime = this.player_.currentTime();\n    const liveTracker = this.player_.liveTracker;\n    const duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : this.player_.duration();\n    let newTime;\n    if (currentVideoTime + this.skipTime <= duration) {\n      newTime = currentVideoTime + this.skipTime;\n    } else {\n      newTime = duration;\n    }\n    this.player_.currentTime(newTime);\n  }\n\n  /**\n   * Update control text on languagechange\n   */\n  handleLanguagechange() {\n    this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));\n  }\n}\nSkipForward.prototype.controlText_ = 'Skip Forward';\nComponent$1.registerComponent('SkipForward', SkipForward);\n\n/**\n * Button to skip backward a configurable amount of time\n * through a video. Renders in the control bar.\n *\n *  * e.g. options: {controlBar: {skipButtons: backward: 5}}\n *\n * @extends Button\n */\nclass SkipBackward extends Button {\n  constructor(player, options) {\n    super(player, options);\n    this.validOptions = [5, 10, 30];\n    this.skipTime = this.getSkipBackwardTime();\n    if (this.skipTime && this.validOptions.includes(this.skipTime)) {\n      this.setIcon(`replay-${this.skipTime}`);\n      this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime.toLocaleString(player.language())]));\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n  getSkipBackwardTime() {\n    const playerOptions = this.options_.playerOptions;\n    return playerOptions.controlBar && playerOptions.controlBar.skipButtons && playerOptions.controlBar.skipButtons.backward;\n  }\n  buildCSSClass() {\n    return `vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * On click, skips backward in the video by a configurable amount of seconds.\n   * If the current time in the video is less than the configured 'skip backward' time,\n   * skips to beginning of video or seekable range.\n   *\n   * Handle a click on a `SkipBackward` button\n   *\n   * @param {EventTarget~Event} event\n   *        The `click` event that caused this function\n   *        to be called\n   */\n  handleClick(event) {\n    const currentVideoTime = this.player_.currentTime();\n    const liveTracker = this.player_.liveTracker;\n    const seekableStart = liveTracker && liveTracker.isLive() && liveTracker.seekableStart();\n    let newTime;\n    if (seekableStart && currentVideoTime - this.skipTime <= seekableStart) {\n      newTime = seekableStart;\n    } else if (currentVideoTime >= this.skipTime) {\n      newTime = currentVideoTime - this.skipTime;\n    } else {\n      newTime = 0;\n    }\n    this.player_.currentTime(newTime);\n  }\n\n  /**\n   * Update control text on languagechange\n   */\n  handleLanguagechange() {\n    this.controlText(this.localize('Skip backward {1} seconds', [this.skipTime]));\n  }\n}\nSkipBackward.prototype.controlText_ = 'Skip Backward';\nComponent$1.registerComponent('SkipBackward', SkipBackward);\n\n/**\n * @file menu.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * The Menu component is used to build popup menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n */\nclass Menu extends Component$1 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Player} player\n   *        the player that this component should attach to\n   *\n   * @param {Object} [options]\n   *        Object of option names and values\n   *\n   */\n  constructor(player, options) {\n    super(player, options);\n    if (options) {\n      this.menuButton_ = options.menuButton;\n    }\n    this.focusedChild_ = -1;\n    this.on('keydown', e => this.handleKeyDown(e));\n\n    // All the menu item instances share the same blur handler provided by the menu container.\n    this.boundHandleBlur_ = e => this.handleBlur(e);\n    this.boundHandleTapClick_ = e => this.handleTapClick(e);\n  }\n\n  /**\n   * Add event listeners to the {@link MenuItem}.\n   *\n   * @param {Object} component\n   *        The instance of the `MenuItem` to add listeners to.\n   *\n   */\n  addEventListenerForItem(component) {\n    if (!(component instanceof Component$1)) {\n      return;\n    }\n    this.on(component, 'blur', this.boundHandleBlur_);\n    this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\n  }\n\n  /**\n   * Remove event listeners from the {@link MenuItem}.\n   *\n   * @param {Object} component\n   *        The instance of the `MenuItem` to remove listeners.\n   *\n   */\n  removeEventListenerForItem(component) {\n    if (!(component instanceof Component$1)) {\n      return;\n    }\n    this.off(component, 'blur', this.boundHandleBlur_);\n    this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\n  }\n\n  /**\n   * This method will be called indirectly when the component has been added\n   * before the component adds to the new menu instance by `addItem`.\n   * In this case, the original menu instance will remove the component\n   * by calling `removeChild`.\n   *\n   * @param {Object} component\n   *        The instance of the `MenuItem`\n   */\n  removeChild(component) {\n    if (typeof component === 'string') {\n      component = this.getChild(component);\n    }\n    this.removeEventListenerForItem(component);\n    super.removeChild(component);\n  }\n\n  /**\n   * Add a {@link MenuItem} to the menu.\n   *\n   * @param {Object|string} component\n   *        The name or instance of the `MenuItem` to add.\n   *\n   */\n  addItem(component) {\n    const childComponent = this.addChild(component);\n    if (childComponent) {\n      this.addEventListenerForItem(childComponent);\n    }\n  }\n\n  /**\n   * Create the `Menu`s DOM element.\n   *\n   * @return {Element}\n   *         the element that was created\n   */\n  createEl() {\n    const contentElType = this.options_.contentElType || 'ul';\n    this.contentEl_ = createEl(contentElType, {\n      className: 'vjs-menu-content'\n    });\n    this.contentEl_.setAttribute('role', 'menu');\n    const el = super.createEl('div', {\n      append: this.contentEl_,\n      className: 'vjs-menu'\n    });\n    el.appendChild(this.contentEl_);\n\n    // Prevent clicks from bubbling up. Needed for Menu Buttons,\n    // where a click on the parent is significant\n    on(el, 'click', function (event) {\n      event.preventDefault();\n      event.stopImmediatePropagation();\n    });\n    return el;\n  }\n  dispose() {\n    this.contentEl_ = null;\n    this.boundHandleBlur_ = null;\n    this.boundHandleTapClick_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Called when a `MenuItem` loses focus.\n   *\n   * @param {Event} event\n   *        The `blur` event that caused this function to be called.\n   *\n   * @listens blur\n   */\n  handleBlur(event) {\n    const relatedTarget = event.relatedTarget || document$1.activeElement;\n\n    // Close menu popup when a user clicks outside the menu\n    if (!this.children().some(element => {\n      return element.el() === relatedTarget;\n    })) {\n      const btn = this.menuButton_;\n      if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\n        btn.unpressButton();\n      }\n    }\n  }\n\n  /**\n   * Called when a `MenuItem` gets clicked or tapped.\n   *\n   * @param {Event} event\n   *        The `click` or `tap` event that caused this function to be called.\n   *\n   * @listens click,tap\n   */\n  handleTapClick(event) {\n    // Unpress the associated MenuButton, and move focus back to it\n    if (this.menuButton_) {\n      this.menuButton_.unpressButton();\n      const childComponents = this.children();\n      if (!Array.isArray(childComponents)) {\n        return;\n      }\n      const foundComponent = childComponents.filter(component => component.el() === event.target)[0];\n      if (!foundComponent) {\n        return;\n      }\n\n      // don't focus menu button if item is a caption settings item\n      // because focus will move elsewhere\n      if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\n        this.menuButton_.focus();\n      }\n    }\n  }\n\n  /**\n   * Handle a `keydown` event on this menu. This listener is added in the constructor.\n   *\n   * @param {KeyboardEvent} event\n   *        A `keydown` event that happened on the menu.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    // Left and Down Arrows\n    if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepForward();\n\n      // Up and Right Arrows\n    } else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n      event.preventDefault();\n      event.stopPropagation();\n      this.stepBack();\n    }\n  }\n\n  /**\n   * Move to next (lower) menu item for keyboard users.\n   */\n  stepForward() {\n    let stepChild = 0;\n    if (this.focusedChild_ !== undefined) {\n      stepChild = this.focusedChild_ + 1;\n    }\n    this.focus(stepChild);\n  }\n\n  /**\n   * Move to previous (higher) menu item for keyboard users.\n   */\n  stepBack() {\n    let stepChild = 0;\n    if (this.focusedChild_ !== undefined) {\n      stepChild = this.focusedChild_ - 1;\n    }\n    this.focus(stepChild);\n  }\n\n  /**\n   * Set focus on a {@link MenuItem} in the `Menu`.\n   *\n   * @param {Object|string} [item=0]\n   *        Index of child item set focus on.\n   */\n  focus(item = 0) {\n    const children = this.children().slice();\n    const haveTitle = children.length && children[0].hasClass('vjs-menu-title');\n    if (haveTitle) {\n      children.shift();\n    }\n    if (children.length > 0) {\n      if (item < 0) {\n        item = 0;\n      } else if (item >= children.length) {\n        item = children.length - 1;\n      }\n      this.focusedChild_ = item;\n      children[item].el_.focus();\n    }\n  }\n}\nComponent$1.registerComponent('Menu', Menu);\n\n/**\n * @file menu-button.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * A `MenuButton` class for any popup {@link Menu}.\n *\n * @extends Component\n */\nclass MenuButton extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    this.menuButton_ = new Button(player, options);\n    this.menuButton_.controlText(this.controlText_);\n    this.menuButton_.el_.setAttribute('aria-haspopup', 'true');\n\n    // Add buildCSSClass values to the button, not the wrapper\n    const buttonClass = Button.prototype.buildCSSClass();\n    this.menuButton_.el_.className = this.buildCSSClass() + ' ' + buttonClass;\n    this.menuButton_.removeClass('vjs-control');\n    this.addChild(this.menuButton_);\n    this.update();\n    this.enabled_ = true;\n    const handleClick = e => this.handleClick(e);\n    this.handleMenuKeyUp_ = e => this.handleMenuKeyUp(e);\n    this.on(this.menuButton_, 'tap', handleClick);\n    this.on(this.menuButton_, 'click', handleClick);\n    this.on(this.menuButton_, 'keydown', e => this.handleKeyDown(e));\n    this.on(this.menuButton_, 'mouseenter', () => {\n      this.addClass('vjs-hover');\n      this.menu.show();\n      on(document$1, 'keyup', this.handleMenuKeyUp_);\n    });\n    this.on('mouseleave', e => this.handleMouseLeave(e));\n    this.on('keydown', e => this.handleSubmenuKeyDown(e));\n  }\n\n  /**\n   * Update the menu based on the current state of its items.\n   */\n  update() {\n    const menu = this.createMenu();\n    if (this.menu) {\n      this.menu.dispose();\n      this.removeChild(this.menu);\n    }\n    this.menu = menu;\n    this.addChild(menu);\n\n    /**\n     * Track the state of the menu button\n     *\n     * @type {Boolean}\n     * @private\n     */\n    this.buttonPressed_ = false;\n    this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n    if (this.items && this.items.length <= this.hideThreshold_) {\n      this.hide();\n      this.menu.contentEl_.removeAttribute('role');\n    } else {\n      this.show();\n      this.menu.contentEl_.setAttribute('role', 'menu');\n    }\n  }\n\n  /**\n   * Create the menu and add all items to it.\n   *\n   * @return {Menu}\n   *         The constructed menu\n   */\n  createMenu() {\n    const menu = new Menu(this.player_, {\n      menuButton: this\n    });\n\n    /**\n     * Hide the menu if the number of items is less than or equal to this threshold. This defaults\n     * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\n     * it here because every time we run `createMenu` we need to reset the value.\n     *\n     * @protected\n     * @type {Number}\n     */\n    this.hideThreshold_ = 0;\n\n    // Add a title list item to the top\n    if (this.options_.title) {\n      const titleEl = createEl('li', {\n        className: 'vjs-menu-title',\n        textContent: toTitleCase$1(this.options_.title),\n        tabIndex: -1\n      });\n      const titleComponent = new Component$1(this.player_, {\n        el: titleEl\n      });\n      menu.addItem(titleComponent);\n    }\n    this.items = this.createItems();\n    if (this.items) {\n      // Add menu items to the menu\n      for (let i = 0; i < this.items.length; i++) {\n        menu.addItem(this.items[i]);\n      }\n    }\n    return menu;\n  }\n\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   * @abstract\n   */\n  createItems() {}\n\n  /**\n   * Create the `MenuButtons`s DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: this.buildWrapperCSSClass()\n    }, {});\n  }\n\n  /**\n   * Overwrites the `setIcon` method from `Component`.\n   * In this case, we want the icon to be appended to the menuButton.\n   *\n   * @param {string} name\n   *         The icon name to be added.\n   */\n  setIcon(name) {\n    super.setIcon(name, this.menuButton_.el_);\n  }\n\n  /**\n   * Allow sub components to stack CSS class names for the wrapper element\n   *\n   * @return {string}\n   *         The constructed wrapper DOM `className`\n   */\n  buildWrapperCSSClass() {\n    let menuButtonClass = 'vjs-menu-button';\n\n    // If the inline option is passed, we want to use different styles altogether.\n    if (this.options_.inline === true) {\n      menuButtonClass += '-inline';\n    } else {\n      menuButtonClass += '-popup';\n    }\n\n    // TODO: Fix the CSS so that this isn't necessary\n    const buttonClass = Button.prototype.buildCSSClass();\n    return `vjs-menu-button ${menuButtonClass} ${buttonClass} ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    let menuButtonClass = 'vjs-menu-button';\n\n    // If the inline option is passed, we want to use different styles altogether.\n    if (this.options_.inline === true) {\n      menuButtonClass += '-inline';\n    } else {\n      menuButtonClass += '-popup';\n    }\n    return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Get or set the localized control text that will be used for accessibility.\n   *\n   * > NOTE: This will come from the internal `menuButton_` element.\n   *\n   * @param {string} [text]\n   *        Control text for element.\n   *\n   * @param {Element} [el=this.menuButton_.el()]\n   *        Element to set the title on.\n   *\n   * @return {string}\n   *         - The control text when getting\n   */\n  controlText(text, el = this.menuButton_.el()) {\n    return this.menuButton_.controlText(text, el);\n  }\n\n  /**\n   * Dispose of the `menu-button` and all child components.\n   */\n  dispose() {\n    this.handleMouseLeave();\n    super.dispose();\n  }\n\n  /**\n   * Handle a click on a `MenuButton`.\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\n   *\n   * @param {Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    if (this.buttonPressed_) {\n      this.unpressButton();\n    } else {\n      this.pressButton();\n    }\n  }\n\n  /**\n   * Handle `mouseleave` for `MenuButton`.\n   *\n   * @param {Event} event\n   *        The `mouseleave` event that caused this function to be called.\n   *\n   * @listens mouseleave\n   */\n  handleMouseLeave(event) {\n    this.removeClass('vjs-hover');\n    off(document$1, 'keyup', this.handleMenuKeyUp_);\n  }\n\n  /**\n   * Set the focus to the actual button, not to this element\n   */\n  focus() {\n    this.menuButton_.focus();\n  }\n\n  /**\n   * Remove the focus from the actual button, not this element\n   */\n  blur() {\n    this.menuButton_.blur();\n  }\n\n  /**\n   * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n   *\n   * @param {Event} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (event.key === 'Escape' || event.key === 'Tab') {\n      if (this.buttonPressed_) {\n        this.unpressButton();\n      }\n\n      // Don't preventDefault for Tab key - we still want to lose focus\n      if (!event.key === 'Tab') {\n        event.preventDefault();\n        // Set focus back to the menu button's button\n        this.menuButton_.focus();\n      }\n      // Up Arrow or Down Arrow also 'press' the button to open the menu\n    } else if (event.key === 'Up' || event.key === 'Down' && !(this.player_.options_.playerOptions.spatialNavigation && this.player_.options_.playerOptions.spatialNavigation.enabled)) {\n      if (!this.buttonPressed_) {\n        event.preventDefault();\n        this.pressButton();\n      }\n    }\n  }\n\n  /**\n   * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\n   * the constructor.\n   *\n   * @param {Event} event\n   *        Key press event\n   *\n   * @listens keyup\n   */\n  handleMenuKeyUp(event) {\n    // Escape hides popup menu\n    if (event.key === 'Escape' || event.key === 'Tab') {\n      this.removeClass('vjs-hover');\n    }\n  }\n\n  /**\n   * This method name now delegates to `handleSubmenuKeyDown`. This means\n   * anyone calling `handleSubmenuKeyPress` will not see their method calls\n   * stop working.\n   *\n   * @param {Event} event\n   *        The event that caused this function to be called.\n   */\n  handleSubmenuKeyPress(event) {\n    this.handleSubmenuKeyDown(event);\n  }\n\n  /**\n   * Handle a `keydown` event on a sub-menu. The listener for this is added in\n   * the constructor.\n   *\n   * @param {Event} event\n   *        Key press event\n   *\n   * @listens keydown\n   */\n  handleSubmenuKeyDown(event) {\n    // Escape or Tab unpress the 'button'\n    if (event.key === 'Escape' || event.key === 'Tab') {\n      if (this.buttonPressed_) {\n        this.unpressButton();\n      }\n      // Don't preventDefault for Tab key - we still want to lose focus\n      if (!event.key === 'Tab') {\n        event.preventDefault();\n        // Set focus back to the menu button's button\n        this.menuButton_.focus();\n      }\n    }\n  }\n\n  /**\n   * Put the current `MenuButton` into a pressed state.\n   */\n  pressButton() {\n    if (this.enabled_) {\n      this.buttonPressed_ = true;\n      this.menu.show();\n      this.menu.lockShowing();\n      this.menuButton_.el_.setAttribute('aria-expanded', 'true');\n\n      // set the focus into the submenu, except on iOS where it is resulting in\n      // undesired scrolling behavior when the player is in an iframe\n      if (IS_IOS && isInFrame()) {\n        // Return early so that the menu isn't focused\n        return;\n      }\n      this.menu.focus();\n    }\n  }\n\n  /**\n   * Take the current `MenuButton` out of a pressed state.\n   */\n  unpressButton() {\n    if (this.enabled_) {\n      this.buttonPressed_ = false;\n      this.menu.unlockShowing();\n      this.menu.hide();\n      this.menuButton_.el_.setAttribute('aria-expanded', 'false');\n    }\n  }\n\n  /**\n   * Disable the `MenuButton`. Don't allow it to be clicked.\n   */\n  disable() {\n    this.unpressButton();\n    this.enabled_ = false;\n    this.addClass('vjs-disabled');\n    this.menuButton_.disable();\n  }\n\n  /**\n   * Enable the `MenuButton`. Allow it to be clicked.\n   */\n  enable() {\n    this.enabled_ = true;\n    this.removeClass('vjs-disabled');\n    this.menuButton_.enable();\n  }\n}\nComponent$1.registerComponent('MenuButton', MenuButton);\n\n/**\n * @file track-button.js\n */\n\n/** @import Player from './player' */\n\n/**\n * The base class for buttons that toggle specific  track types (e.g. subtitles).\n *\n * @extends MenuButton\n */\nclass TrackButton extends MenuButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    const tracks = options.tracks;\n    super(player, options);\n    if (this.items.length <= 1) {\n      this.hide();\n    }\n    if (!tracks) {\n      return;\n    }\n    const updateHandler = bind_(this, this.update);\n    tracks.addEventListener('removetrack', updateHandler);\n    tracks.addEventListener('addtrack', updateHandler);\n    tracks.addEventListener('labelchange', updateHandler);\n    this.player_.on('ready', updateHandler);\n    this.player_.on('dispose', function () {\n      tracks.removeEventListener('removetrack', updateHandler);\n      tracks.removeEventListener('addtrack', updateHandler);\n      tracks.removeEventListener('labelchange', updateHandler);\n    });\n  }\n}\nComponent$1.registerComponent('TrackButton', TrackButton);\n\n/**\n * @file menu-item.js\n */\n\n/** @import Player from '../player' */\n\n/**\n * The component for a menu item. `<li>`\n *\n * @extends ClickableComponent\n */\nclass MenuItem extends ClickableComponent {\n  /**\n   * Creates an instance of the this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   *\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.selectable = options.selectable;\n    this.isSelected_ = options.selected || false;\n    this.multiSelectable = options.multiSelectable;\n    this.selected(this.isSelected_);\n    if (this.selectable) {\n      if (this.multiSelectable) {\n        this.el_.setAttribute('role', 'menuitemcheckbox');\n      } else {\n        this.el_.setAttribute('role', 'menuitemradio');\n      }\n    } else {\n      this.el_.setAttribute('role', 'menuitem');\n    }\n  }\n\n  /**\n   * Create the `MenuItem's DOM element\n   *\n   * @param {string} [type=li]\n   *        Element's node type, not actually used, always set to `li`.\n   *\n   * @param {Object} [props={}]\n   *        An object of properties that should be set on the element\n   *\n   * @param {Object} [attrs={}]\n   *        An object of attributes that should be set on the element\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl(type, props, attrs) {\n    // The control is textual, not just an icon\n    this.nonIconControl = true;\n    const el = super.createEl('li', Object.assign({\n      className: 'vjs-menu-item',\n      tabIndex: -1\n    }, props), attrs);\n\n    // swap icon with menu item text.\n    const menuItemEl = createEl('span', {\n      className: 'vjs-menu-item-text',\n      textContent: this.localize(this.options_.label)\n    });\n\n    // If using SVG icons, the element with vjs-icon-placeholder will be added separately.\n    if (this.player_.options_.experimentalSvgIcons) {\n      el.appendChild(menuItemEl);\n    } else {\n      el.replaceChild(menuItemEl, el.querySelector('.vjs-icon-placeholder'));\n    }\n    return el;\n  }\n\n  /**\n   * Ignore keys which are used by the menu, but pass any other ones up. See\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    if (!['Tab', 'Escape', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'].includes(event.key)) {\n      // Pass keydown handling up for unused keys\n      super.handleKeyDown(event);\n    }\n  }\n\n  /**\n   * Any click on a `MenuItem` puts it into the selected state.\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\n   *\n   * @param {Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    this.selected(true);\n  }\n\n  /**\n   * Set the state for this menu item as selected or not.\n   *\n   * @param {boolean} selected\n   *        if the menu item is selected or not\n   */\n  selected(selected) {\n    if (this.selectable) {\n      if (selected) {\n        this.addClass('vjs-selected');\n        this.el_.setAttribute('aria-checked', 'true');\n        // aria-checked isn't fully supported by browsers/screen readers,\n        // so indicate selected state to screen reader in the control text.\n        this.controlText(', selected');\n        this.isSelected_ = true;\n      } else {\n        this.removeClass('vjs-selected');\n        this.el_.setAttribute('aria-checked', 'false');\n        // Indicate un-selected state to screen reader\n        this.controlText('');\n        this.isSelected_ = false;\n      }\n    }\n  }\n}\nComponent$1.registerComponent('MenuItem', MenuItem);\n\n/**\n * @file text-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @extends MenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    const track = options.track;\n    const tracks = player.textTracks();\n\n    // Modify options for parent MenuItem class's init.\n    options.label = track.label || track.language || 'Unknown';\n    options.selected = track.mode === 'showing';\n    super(player, options);\n    this.track = track;\n    // Determine the relevant kind(s) of tracks for this component and filter\n    // out empty kinds.\n    this.kinds = (options.kinds || [options.kind || this.track.kind]).filter(Boolean);\n    const changeHandler = (...args) => {\n      this.handleTracksChange.apply(this, args);\n    };\n    const selectedLanguageChangeHandler = (...args) => {\n      this.handleSelectedLanguageChange.apply(this, args);\n    };\n    player.on(['loadstart', 'texttrackchange'], changeHandler);\n    tracks.addEventListener('change', changeHandler);\n    tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n    this.on('dispose', function () {\n      player.off(['loadstart', 'texttrackchange'], changeHandler);\n      tracks.removeEventListener('change', changeHandler);\n      tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\n    });\n\n    // iOS7 doesn't dispatch change events to TextTrackLists when an\n    // associated track's mode changes. Without something like\n    // Object.observe() (also not present on iOS7), it's not\n    // possible to detect changes to the mode attribute and polyfill\n    // the change event. As a poor substitute, we manually dispatch\n    // change events whenever the controls modify the mode.\n    if (tracks.onchange === undefined) {\n      let event;\n      this.on(['tap', 'click'], function () {\n        if (typeof window$1.Event !== 'object') {\n          // Android 2.3 throws an Illegal Constructor error for window.Event\n          try {\n            event = new window$1.Event('change');\n          } catch (err) {\n            // continue regardless of error\n          }\n        }\n        if (!event) {\n          event = document$1.createEvent('Event');\n          event.initEvent('change', true, true);\n        }\n        tracks.dispatchEvent(event);\n      });\n    }\n\n    // set the default state based on current tracks\n    this.handleTracksChange();\n  }\n\n  /**\n   * This gets called when an `TextTrackMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} event\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    const referenceTrack = this.track;\n    const tracks = this.player_.textTracks();\n    super.handleClick(event);\n    if (!tracks) {\n      return;\n    }\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n\n      // If the track from the text tracks list is not of the right kind,\n      // skip it. We do not want to affect tracks of incompatible kind(s).\n      if (this.kinds.indexOf(track.kind) === -1) {\n        continue;\n      }\n\n      // If this text track is the component's track and it is not showing,\n      // set it to showing.\n      if (track === referenceTrack) {\n        if (track.mode !== 'showing') {\n          track.mode = 'showing';\n        }\n\n        // If this text track is not the component's track and it is not\n        // disabled, set it to disabled.\n      } else if (track.mode !== 'disabled') {\n        track.mode = 'disabled';\n      }\n    }\n  }\n\n  /**\n   * Handle text track list change\n   *\n   * @param {Event} event\n   *        The `change` event that caused this function to be called.\n   *\n   * @listens TextTrackList#change\n   */\n  handleTracksChange(event) {\n    const shouldBeSelected = this.track.mode === 'showing';\n\n    // Prevent redundant selected() calls because they may cause\n    // screen readers to read the appended control text unnecessarily\n    if (shouldBeSelected !== this.isSelected_) {\n      this.selected(shouldBeSelected);\n    }\n  }\n  handleSelectedLanguageChange(event) {\n    if (this.track.mode === 'showing') {\n      const selectedLanguage = this.player_.cache_.selectedLanguage;\n\n      // Don't replace the kind of track across the same language\n      if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\n        return;\n      }\n      this.player_.cache_.selectedLanguage = {\n        enabled: true,\n        language: this.track.language,\n        kind: this.track.kind\n      };\n    }\n  }\n  dispose() {\n    // remove reference to track object on dispose\n    this.track = null;\n    super.dispose();\n  }\n}\nComponent$1.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\n\n/**\n * @file off-text-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * A special menu item for turning off a specific type of text track\n *\n * @extends TextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    // Create pseudo track info\n    // Requires options['kind']\n    options.track = {\n      player,\n      // it is no longer necessary to store `kind` or `kinds` on the track itself\n      // since they are now stored in the `kinds` property of all instances of\n      // TextTrackMenuItem, but this will remain for backwards compatibility\n      kind: options.kind,\n      kinds: options.kinds,\n      default: false,\n      mode: 'disabled'\n    };\n    if (!options.kinds) {\n      options.kinds = [options.kind];\n    }\n    if (options.label) {\n      options.track.label = options.label;\n    } else {\n      options.track.label = options.kinds.join(' and ') + ' off';\n    }\n\n    // MenuItem is selectable\n    options.selectable = true;\n    // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n    options.multiSelectable = false;\n    super(player, options);\n  }\n\n  /**\n   * Handle text track change\n   *\n   * @param {Event} event\n   *        The event that caused this function to run\n   */\n  handleTracksChange(event) {\n    const tracks = this.player().textTracks();\n    let shouldBeSelected = true;\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\n      if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\n        shouldBeSelected = false;\n        break;\n      }\n    }\n\n    // Prevent redundant selected() calls because they may cause\n    // screen readers to read the appended control text unnecessarily\n    if (shouldBeSelected !== this.isSelected_) {\n      this.selected(shouldBeSelected);\n    }\n  }\n  handleSelectedLanguageChange(event) {\n    const tracks = this.player().textTracks();\n    let allHidden = true;\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\n      if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\n        allHidden = false;\n        break;\n      }\n    }\n    if (allHidden) {\n      this.player_.cache_.selectedLanguage = {\n        enabled: false\n      };\n    }\n  }\n\n  /**\n   * Update control text and label on languagechange\n   */\n  handleLanguagechange() {\n    this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.label);\n    super.handleLanguagechange();\n  }\n}\nComponent$1.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\n\n/**\n * @file text-track-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @extends MenuButton\n */\nclass TextTrackButton extends TrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  constructor(player, options = {}) {\n    options.tracks = player.textTracks();\n    super(player, options);\n  }\n\n  /**\n   * Create a menu item for each text track\n   *\n   * @param {TextTrackMenuItem[]} [items=[]]\n   *        Existing array of items to use during creation\n   *\n   * @return {TextTrackMenuItem[]}\n   *         Array of menu items that were created\n   */\n  createItems(items = [], TrackMenuItem = TextTrackMenuItem) {\n    // Label is an override for the [track] off label\n    // USed to localise captions/subtitles\n    let label;\n    if (this.label_) {\n      label = `${this.label_} off`;\n    }\n    // Add an OFF menu item to turn all tracks off\n    items.push(new OffTextTrackMenuItem(this.player_, {\n      kinds: this.kinds_,\n      kind: this.kind_,\n      label\n    }));\n    this.hideThreshold_ += 1;\n    const tracks = this.player_.textTracks();\n    if (!Array.isArray(this.kinds_)) {\n      this.kinds_ = [this.kind_];\n    }\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n\n      // only add tracks that are of an appropriate kind and have a label\n      if (this.kinds_.indexOf(track.kind) > -1) {\n        const item = new TrackMenuItem(this.player_, {\n          track,\n          kinds: this.kinds_,\n          kind: this.kind_,\n          // MenuItem is selectable\n          selectable: true,\n          // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n          multiSelectable: false\n        });\n        item.addClass(`vjs-${track.kind}-menu-item`);\n        items.push(item);\n      }\n    }\n    return items;\n  }\n}\nComponent$1.registerComponent('TextTrackButton', TextTrackButton);\n\n/**\n * @file chapters-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The chapter track menu item\n *\n * @extends MenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    const track = options.track;\n    const cue = options.cue;\n    const currentTime = player.currentTime();\n\n    // Modify options for parent MenuItem class's init.\n    options.selectable = true;\n    options.multiSelectable = false;\n    options.label = cue.text;\n    options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\n    super(player, options);\n    this.track = track;\n    this.cue = cue;\n  }\n\n  /**\n   * This gets called when an `ChaptersTrackMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    super.handleClick();\n    this.player_.currentTime(this.cue.startTime);\n  }\n}\nComponent$1.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\n\n/**\n * @file chapters-button.js\n */\n\n/** @import Player from '../../player' */\n/** @import Menu from '../../menu/menu' */\n/** @import TextTrack from '../../tracks/text-track' */\n/** @import TextTrackMenuItem from '../text-track-controls/text-track-menu-item' */\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @extends TextTrackButton\n */\nclass ChaptersButton extends TextTrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function to call when this function is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('chapters');\n    this.selectCurrentItem_ = () => {\n      this.items.forEach(item => {\n        item.selected(this.track_.activeCues[0] === item.cue);\n      });\n    };\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-chapters-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-chapters-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Update the menu based on the current state of its items.\n   *\n   * @param {Event} [event]\n   *        An event that triggered this function to run.\n   *\n   * @listens TextTrackList#addtrack\n   * @listens TextTrackList#removetrack\n   * @listens TextTrackList#change\n   */\n  update(event) {\n    if (event && event.track && event.track.kind !== 'chapters') {\n      return;\n    }\n    const track = this.findChaptersTrack();\n    if (track !== this.track_) {\n      this.setTrack(track);\n      super.update();\n    } else if (!this.items || track && track.cues && track.cues.length !== this.items.length) {\n      // Update the menu initially or if the number of cues has changed since set\n      super.update();\n    }\n  }\n\n  /**\n   * Set the currently selected track for the chapters button.\n   *\n   * @param {TextTrack} track\n   *        The new track to select. Nothing will change if this is the currently selected\n   *        track.\n   */\n  setTrack(track) {\n    if (this.track_ === track) {\n      return;\n    }\n    if (!this.updateHandler_) {\n      this.updateHandler_ = this.update.bind(this);\n    }\n\n    // here this.track_ refers to the old track instance\n    if (this.track_) {\n      const remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n      if (remoteTextTrackEl) {\n        remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\n      }\n      this.track_.removeEventListener('cuechange', this.selectCurrentItem_);\n      this.track_ = null;\n    }\n    this.track_ = track;\n\n    // here this.track_ refers to the new track instance\n    if (this.track_) {\n      this.track_.mode = 'hidden';\n      const remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\n      if (remoteTextTrackEl) {\n        remoteTextTrackEl.addEventListener('load', this.updateHandler_);\n      }\n      this.track_.addEventListener('cuechange', this.selectCurrentItem_);\n    }\n  }\n\n  /**\n   * Find the track object that is currently in use by this ChaptersButton\n   *\n   * @return {TextTrack|undefined}\n   *         The current track or undefined if none was found.\n   */\n  findChaptersTrack() {\n    const tracks = this.player_.textTracks() || [];\n    for (let i = tracks.length - 1; i >= 0; i--) {\n      // We will always choose the last track as our chaptersTrack\n      const track = tracks[i];\n      if (track.kind === this.kind_) {\n        return track;\n      }\n    }\n  }\n\n  /**\n   * Get the caption for the ChaptersButton based on the track label. This will also\n   * use the current tracks localized kind as a fallback if a label does not exist.\n   *\n   * @return {string}\n   *         The tracks current label or the localized track kind.\n   */\n  getMenuCaption() {\n    if (this.track_ && this.track_.label) {\n      return this.track_.label;\n    }\n    return this.localize(toTitleCase$1(this.kind_));\n  }\n\n  /**\n   * Create menu from chapter track\n   *\n   * @return {Menu}\n   *         New menu for the chapter buttons\n   */\n  createMenu() {\n    this.options_.title = this.getMenuCaption();\n    return super.createMenu();\n  }\n\n  /**\n   * Create a menu item for each text track\n   *\n   * @return  {TextTrackMenuItem[]}\n   *         Array of menu items\n   */\n  createItems() {\n    const items = [];\n    if (!this.track_) {\n      return items;\n    }\n    const cues = this.track_.cues;\n    if (!cues) {\n      return items;\n    }\n    for (let i = 0, l = cues.length; i < l; i++) {\n      const cue = cues[i];\n      const mi = new ChaptersTrackMenuItem(this.player_, {\n        track: this.track_,\n        cue\n      });\n      items.push(mi);\n    }\n    return items;\n  }\n}\n\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nChaptersButton.prototype.kind_ = 'chapters';\n\n/**\n * The text that should display over the `ChaptersButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nChaptersButton.prototype.controlText_ = 'Chapters';\nComponent$1.registerComponent('ChaptersButton', ChaptersButton);\n\n/**\n * @file descriptions-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @extends TextTrackButton\n */\nclass DescriptionsButton extends TextTrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('audio-description');\n    const tracks = player.textTracks();\n    const changeHandler = bind_(this, this.handleTracksChange);\n    tracks.addEventListener('change', changeHandler);\n    this.on('dispose', function () {\n      tracks.removeEventListener('change', changeHandler);\n    });\n  }\n\n  /**\n   * Handle text track change\n   *\n   * @param {Event} event\n   *        The event that caused this function to run\n   *\n   * @listens TextTrackList#change\n   */\n  handleTracksChange(event) {\n    const tracks = this.player().textTracks();\n    let disabled = false;\n\n    // Check whether a track of a different kind is showing\n    for (let i = 0, l = tracks.length; i < l; i++) {\n      const track = tracks[i];\n      if (track.kind !== this.kind_ && track.mode === 'showing') {\n        disabled = true;\n        break;\n      }\n    }\n\n    // If another track is showing, disable this menu button\n    if (disabled) {\n      this.disable();\n    } else {\n      this.enable();\n    }\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-descriptions-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-descriptions-button ${super.buildWrapperCSSClass()}`;\n  }\n}\n\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nDescriptionsButton.prototype.kind_ = 'descriptions';\n\n/**\n * The text that should display over the `DescriptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\nComponent$1.registerComponent('DescriptionsButton', DescriptionsButton);\n\n/**\n * @file subtitles-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @extends TextTrackButton\n */\nclass SubtitlesButton extends TextTrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('subtitles');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-subtitles-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-subtitles-button ${super.buildWrapperCSSClass()}`;\n  }\n}\n\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nSubtitlesButton.prototype.kind_ = 'subtitles';\n\n/**\n * The text that should display over the `SubtitlesButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\nComponent$1.registerComponent('SubtitlesButton', SubtitlesButton);\n\n/**\n * @file caption-settings-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The menu item for caption track settings menu\n *\n * @extends TextTrackMenuItem\n */\nclass CaptionSettingsMenuItem extends TextTrackMenuItem {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    options.track = {\n      player,\n      kind: options.kind,\n      label: options.kind + ' settings',\n      selectable: false,\n      default: false,\n      mode: 'disabled'\n    };\n\n    // CaptionSettingsMenuItem has no concept of 'selected'\n    options.selectable = false;\n    options.name = 'CaptionSettingsMenuItem';\n    super(player, options);\n    this.addClass('vjs-texttrack-settings');\n    this.controlText(', opens ' + options.kind + ' settings dialog');\n  }\n\n  /**\n   * This gets called when an `CaptionSettingsMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    this.player().getChild('textTrackSettings').open();\n  }\n\n  /**\n   * Update control text and label on languagechange\n   */\n  handleLanguagechange() {\n    this.$('.vjs-menu-item-text').textContent = this.player_.localize(this.options_.kind + ' settings');\n    super.handleLanguagechange();\n  }\n}\nComponent$1.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\n\n/**\n * @file captions-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting captions\n *\n * @extends TextTrackButton\n */\nclass CaptionsButton extends TextTrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options, ready) {\n    super(player, options, ready);\n    this.setIcon('captions');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-captions-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-captions-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create caption menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  createItems() {\n    const items = [];\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n      items.push(new CaptionSettingsMenuItem(this.player_, {\n        kind: this.kind_\n      }));\n      this.hideThreshold_ += 1;\n    }\n    return super.createItems(items);\n  }\n}\n\n/**\n * `kind` of TextTrack to look for to associate it with this menu.\n *\n * @type {string}\n * @private\n */\nCaptionsButton.prototype.kind_ = 'captions';\n\n/**\n * The text that should display over the `CaptionsButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nCaptionsButton.prototype.controlText_ = 'Captions';\nComponent$1.registerComponent('CaptionsButton', CaptionsButton);\n\n/**\n * @file subs-caps-menu-item.js\n */\n\n/**\n * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\n * in the SubsCapsMenu.\n *\n * @extends TextTrackMenuItem\n */\nclass SubsCapsMenuItem extends TextTrackMenuItem {\n  createEl(type, props, attrs) {\n    const el = super.createEl(type, props, attrs);\n    const parentSpan = el.querySelector('.vjs-menu-item-text');\n    if (this.options_.track.kind === 'captions') {\n      if (this.player_.options_.experimentalSvgIcons) {\n        this.setIcon('captions', el);\n      } else {\n        parentSpan.appendChild(createEl('span', {\n          className: 'vjs-icon-placeholder'\n        }, {\n          'aria-hidden': true\n        }));\n      }\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-control-text',\n        // space added as the text will visually flow with the\n        // label\n        textContent: ` ${this.localize('Captions')}`\n      }));\n    }\n    return el;\n  }\n}\nComponent$1.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\n\n/**\n * @file sub-caps-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The button component for toggling and selecting captions and/or subtitles\n *\n * @extends TextTrackButton\n */\nclass SubsCapsButton extends TextTrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {Function} [ready]\n   *        The function to call when this component is ready.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Although North America uses \"captions\" in most cases for\n    // \"captions and subtitles\" other locales use \"subtitles\"\n    this.label_ = 'subtitles';\n    this.setIcon('subtitles');\n    if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(this.player_.language_) > -1) {\n      this.label_ = 'captions';\n      this.setIcon('captions');\n    }\n    this.menuButton_.controlText(toTitleCase$1(this.label_));\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-subs-caps-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-subs-caps-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create caption/subtitles menu items\n   *\n   * @return {CaptionSettingsMenuItem[]}\n   *         The array of current menu items.\n   */\n  createItems() {\n    let items = [];\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\n      items.push(new CaptionSettingsMenuItem(this.player_, {\n        kind: this.label_\n      }));\n      this.hideThreshold_ += 1;\n    }\n    items = super.createItems(items, SubsCapsMenuItem);\n    return items;\n  }\n}\n\n/**\n * `kind`s of TextTrack to look for to associate it with this menu.\n *\n * @type {array}\n * @private\n */\nSubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\n\n/**\n * The text that should display over the `SubsCapsButton`s controls.\n *\n *\n * @type {string}\n * @protected\n */\nSubsCapsButton.prototype.controlText_ = 'Subtitles';\nComponent$1.registerComponent('SubsCapsButton', SubsCapsButton);\n\n/**\n * @file audio-track-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * An {@link AudioTrack} {@link MenuItem}\n *\n * @extends MenuItem\n */\nclass AudioTrackMenuItem extends MenuItem {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    const track = options.track;\n    const tracks = player.audioTracks();\n\n    // Modify options for parent MenuItem class's init.\n    options.label = track.label || track.language || 'Unknown';\n    options.selected = track.enabled;\n    super(player, options);\n    this.track = track;\n    this.addClass(`vjs-${track.kind}-menu-item`);\n    const changeHandler = (...args) => {\n      this.handleTracksChange.apply(this, args);\n    };\n    tracks.addEventListener('change', changeHandler);\n    this.on('dispose', () => {\n      tracks.removeEventListener('change', changeHandler);\n    });\n  }\n  createEl(type, props, attrs) {\n    const el = super.createEl(type, props, attrs);\n    const parentSpan = el.querySelector('.vjs-menu-item-text');\n    if (['main-desc', 'descriptions'].indexOf(this.options_.track.kind) >= 0) {\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-icon-placeholder'\n      }, {\n        'aria-hidden': true\n      }));\n      parentSpan.appendChild(createEl('span', {\n        className: 'vjs-control-text',\n        textContent: ' ' + this.localize('Descriptions')\n      }));\n    }\n    return el;\n  }\n\n  /**\n   * This gets called when an `AudioTrackMenuItem is \"clicked\". See {@link ClickableComponent}\n   * for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    super.handleClick(event);\n\n    // the audio track list will automatically toggle other tracks\n    // off for us.\n    this.track.enabled = true;\n\n    // when native audio tracks are used, we want to make sure that other tracks are turned off\n    if (this.player_.tech_.featuresNativeAudioTracks) {\n      const tracks = this.player_.audioTracks();\n      for (let i = 0; i < tracks.length; i++) {\n        const track = tracks[i];\n\n        // skip the current track since we enabled it above\n        if (track === this.track) {\n          continue;\n        }\n        track.enabled = track === this.track;\n      }\n    }\n  }\n\n  /**\n   * Handle any {@link AudioTrack} change.\n   *\n   * @param {Event} [event]\n   *        The {@link AudioTrackList#change} event that caused this to run.\n   *\n   * @listens AudioTrackList#change\n   */\n  handleTracksChange(event) {\n    this.selected(this.track.enabled);\n  }\n}\nComponent$1.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\n\n/**\n * @file audio-track-button.js\n */\n\n/**\n * The base class for buttons that toggle specific {@link AudioTrack} types.\n *\n * @extends TrackButton\n */\nclass AudioTrackButton extends TrackButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options={}]\n   *        The key/value store of player options.\n   */\n  constructor(player, options = {}) {\n    options.tracks = player.audioTracks();\n    super(player, options);\n    this.setIcon('audio');\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-audio-button ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-audio-button ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create a menu item for each audio track\n   *\n   * @param {AudioTrackMenuItem[]} [items=[]]\n   *        An array of existing menu items to use.\n   *\n   * @return {AudioTrackMenuItem[]}\n   *         An array of menu items\n   */\n  createItems(items = []) {\n    // if there's only one audio track, there no point in showing it\n    this.hideThreshold_ = 1;\n    const tracks = this.player_.audioTracks();\n    for (let i = 0; i < tracks.length; i++) {\n      const track = tracks[i];\n      items.push(new AudioTrackMenuItem(this.player_, {\n        track,\n        // MenuItem is selectable\n        selectable: true,\n        // MenuItem is NOT multiSelectable (i.e. only one can be marked \"selected\" at a time)\n        multiSelectable: false\n      }));\n    }\n    return items;\n  }\n}\n\n/**\n * The text that should display over the `AudioTrackButton`s controls. Added for localization.\n *\n * @type {string}\n * @protected\n */\nAudioTrackButton.prototype.controlText_ = 'Audio Track';\nComponent$1.registerComponent('AudioTrackButton', AudioTrackButton);\n\n/**\n * @file playback-rate-menu-item.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The specific menu item type for selecting a playback rate.\n *\n * @extends MenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    const label = options.rate;\n    const rate = parseFloat(label, 10);\n\n    // Modify options for parent MenuItem class's init.\n    options.label = label;\n    options.selected = rate === player.playbackRate();\n    options.selectable = true;\n    options.multiSelectable = false;\n    super(player, options);\n    this.label = label;\n    this.rate = rate;\n    this.on(player, 'ratechange', e => this.update(e));\n  }\n\n  /**\n   * This gets called when an `PlaybackRateMenuItem` is \"clicked\". See\n   * {@link ClickableComponent} for more detailed information on what a click can be.\n   *\n   * @param {Event} [event]\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\n   *        called.\n   *\n   * @listens tap\n   * @listens click\n   */\n  handleClick(event) {\n    super.handleClick();\n    this.player().playbackRate(this.rate);\n  }\n\n  /**\n   * Update the PlaybackRateMenuItem when the playbackrate changes.\n   *\n   * @param {Event} [event]\n   *        The `ratechange` event that caused this function to run.\n   *\n   * @listens Player#ratechange\n   */\n  update(event) {\n    this.selected(this.player().playbackRate() === this.rate);\n  }\n}\n\n/**\n * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\n *\n * @type {string}\n * @private\n */\nPlaybackRateMenuItem.prototype.contentElType = 'button';\nComponent$1.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\n\n/**\n * @file playback-rate-menu-button.js\n */\n\n/** @import Player from '../../player' */\n\n/**\n * The component for controlling the playback rate.\n *\n * @extends MenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.menuButton_.el_.setAttribute('aria-describedby', this.labelElId_);\n    this.updateVisibility();\n    this.updateLabel();\n    this.on(player, 'loadstart', e => this.updateVisibility(e));\n    this.on(player, 'ratechange', e => this.updateLabel(e));\n    this.on(player, 'playbackrateschange', e => this.handlePlaybackRateschange(e));\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    const el = super.createEl();\n    this.labelElId_ = 'vjs-playback-rate-value-label-' + this.id_;\n    this.labelEl_ = createEl('div', {\n      className: 'vjs-playback-rate-value',\n      id: this.labelElId_,\n      textContent: '1x'\n    });\n    el.appendChild(this.labelEl_);\n    return el;\n  }\n  dispose() {\n    this.labelEl_ = null;\n    super.dispose();\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-playback-rate ${super.buildCSSClass()}`;\n  }\n  buildWrapperCSSClass() {\n    return `vjs-playback-rate ${super.buildWrapperCSSClass()}`;\n  }\n\n  /**\n   * Create the list of menu items. Specific to each subclass.\n   *\n   */\n  createItems() {\n    const rates = this.playbackRates();\n    const items = [];\n    for (let i = rates.length - 1; i >= 0; i--) {\n      items.push(new PlaybackRateMenuItem(this.player(), {\n        rate: rates[i] + 'x'\n      }));\n    }\n    return items;\n  }\n\n  /**\n   * On playbackrateschange, update the menu to account for the new items.\n   *\n   * @listens Player#playbackrateschange\n   */\n  handlePlaybackRateschange(event) {\n    this.update();\n  }\n\n  /**\n   * Get possible playback rates\n   *\n   * @return {Array}\n   *         All possible playback rates\n   */\n  playbackRates() {\n    const player = this.player();\n    return player.playbackRates && player.playbackRates() || [];\n  }\n\n  /**\n   * Get whether playback rates is supported by the tech\n   * and an array of playback rates exists\n   *\n   * @return {boolean}\n   *         Whether changing playback rate is supported\n   */\n  playbackRateSupported() {\n    return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\n  }\n\n  /**\n   * Hide playback rate controls when they're no playback rate options to select\n   *\n   * @param {Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#loadstart\n   */\n  updateVisibility(event) {\n    if (this.playbackRateSupported()) {\n      this.removeClass('vjs-hidden');\n    } else {\n      this.addClass('vjs-hidden');\n    }\n  }\n\n  /**\n   * Update button label when rate changed\n   *\n   * @param {Event} [event]\n   *        The event that caused this function to run.\n   *\n   * @listens Player#ratechange\n   */\n  updateLabel(event) {\n    if (this.playbackRateSupported()) {\n      this.labelEl_.textContent = this.player().playbackRate() + 'x';\n    }\n  }\n}\n\n/**\n * The text that should display over the `PlaybackRateMenuButton`s controls.\n *\n * Added for localization.\n *\n * @type {string}\n * @protected\n */\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\nComponent$1.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\n\n/**\n * @file spacer.js\n */\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n */\nclass Spacer extends Component$1 {\n  /**\n  * Builds the default DOM `className`.\n  *\n  * @return {string}\n  *         The DOM `className` for this object.\n  */\n  buildCSSClass() {\n    return `vjs-spacer ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl(tag = 'div', props = {}, attributes = {}) {\n    if (!props.className) {\n      props.className = this.buildCSSClass();\n    }\n    return super.createEl(tag, props, attributes);\n  }\n}\nComponent$1.registerComponent('Spacer', Spacer);\n\n/**\n * @file custom-control-spacer.js\n */\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n */\nclass CustomControlSpacer extends Spacer {\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   */\n  buildCSSClass() {\n    return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: this.buildCSSClass(),\n      // No-flex/table-cell mode requires there be some content\n      // in the cell to fill the remaining space of the table.\n      textContent: '\\u00a0'\n    });\n  }\n}\nComponent$1.registerComponent('CustomControlSpacer', CustomControlSpacer);\n\n/**\n * @file control-bar.js\n */\n\n/**\n * Container of main controls.\n *\n * @extends Component\n */\nclass ControlBar extends Component$1 {\n  /**\n   * Create the `Component`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    return super.createEl('div', {\n      className: 'vjs-control-bar',\n      dir: 'ltr'\n    });\n  }\n}\n\n/**\n * Default options for `ControlBar`\n *\n * @type {Object}\n * @private\n */\nControlBar.prototype.options_ = {\n  children: ['playToggle', 'skipBackward', 'skipForward', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'pictureInPictureToggle', 'fullscreenToggle']\n};\nComponent$1.registerComponent('ControlBar', ControlBar);\n\n/**\n * @file error-display.js\n */\n\n/** @import Player from './player' */\n\n/**\n * A display that indicates an error has occurred. This means that the video\n * is unplayable.\n *\n * @extends ModalDialog\n */\nclass ErrorDisplay extends ModalDialog {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param  {Player} player\n   *         The `Player` that this class should be attached to.\n   *\n   * @param  {Object} [options]\n   *         The key/value store of player options.\n   */\n  constructor(player, options) {\n    super(player, options);\n    this.on(player, 'error', e => {\n      this.open(e);\n    });\n  }\n\n  /**\n   * Builds the default DOM `className`.\n   *\n   * @return {string}\n   *         The DOM `className` for this object.\n   *\n   * @deprecated Since version 5.\n   */\n  buildCSSClass() {\n    return `vjs-error-display ${super.buildCSSClass()}`;\n  }\n\n  /**\n   * Gets the localized error message based on the `Player`s error.\n   *\n   * @return {string}\n   *         The `Player`s error message localized or an empty string.\n   */\n  content() {\n    const error = this.player().error();\n    return error ? this.localize(error.message) : '';\n  }\n}\n\n/**\n * The default options for an `ErrorDisplay`.\n *\n * @private\n */\nErrorDisplay.prototype.options_ = Object.assign({}, ModalDialog.prototype.options_, {\n  pauseOnOpen: false,\n  fillAlways: true,\n  temporary: false,\n  uncloseable: true\n});\nComponent$1.registerComponent('ErrorDisplay', ErrorDisplay);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from  '../utils/dom' */\n\n/**\n * Creates DOM element of 'select' & its options.\n *\n * @extends Component\n */\nclass TextTrackSelect extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {string} [options.legendId]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *\n   * @param {string} [options.id]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *\n   * @param {Array} [options.SelectOptions]\n   *        Array that contains the value & textContent of for each of the\n   *        options elements.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    this.el_.setAttribute('aria-labelledby', this.selectLabelledbyIds);\n  }\n\n  /**\n   * Create the `TextTrackSelect`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    this.selectLabelledbyIds = [this.options_.legendId, this.options_.labelId].join(' ').trim();\n\n    // Create select & inner options\n    const selectoptions = createEl('select', {\n      id: this.options_.id\n    }, {}, this.options_.SelectOptions.map(optionText => {\n      // Constructs an id for the <option>.\n      // For the colour settings that have two <selects> with a <label> each, generates an id based off the label value\n      // For font size/family and edge style with one <select> and no <label>, generates an id with a guid\n      const optionId = (this.options_.labelId ? this.options_.labelId : `vjs-track-option-${newGUID()}`) + '-' + optionText[1].replace(/\\W+/g, '');\n      const option = createEl('option', {\n        id: optionId,\n        value: this.localize(optionText[0]),\n        textContent: this.localize(optionText[1])\n      });\n      option.setAttribute('aria-labelledby', `${this.selectLabelledbyIds} ${optionId}`);\n      return option;\n    }));\n    return selectoptions;\n  }\n}\nComponent$1.registerComponent('TextTrackSelect', TextTrackSelect);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from '../utils/dom' */\n\n/**\n * Creates fieldset section of 'TextTrackSettings'.\n * Manganes two versions of fieldsets, one for type of 'colors'\n * & the other for 'font', Component adds diferent DOM elements\n * to that fieldset  depending on the type.\n *\n * @extends Component\n */\nclass TextTrackFieldset extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {string} [options.legendId]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *        It passes to 'TextTrackSelect'.\n   *\n   * @param {string} [options.id]\n   *        A text with part of an string to create atribute of aria-labelledby.\n   *        It passes to 'TextTrackSelect'.\n   *\n   * @param {string} [options.legendText]\n   *        A text to use as the text content of the legend element.\n   *\n   * @param {Array} [options.selects]\n   *        Array that contains the selects that are use to create 'selects'\n   *        components.\n   *\n   * @param {Array} [options.SelectOptions]\n   *        Array that contains the value & textContent of for each of the\n   *        options elements, it passes to 'TextTrackSelect'.\n   *\n   * @param {string} [options.type]\n   *        Conditions if some DOM elements will be added to the fieldset\n   *        component.\n   *\n   * @param {Object} [options.selectConfigs]\n   *        Object with the following properties that are the selects configurations:\n   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n   *        fontPercent, textOpacity, windowColor, windowOpacity.\n   *        These properties are use to configure the 'TextTrackSelect' Component.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Add Components & DOM Elements\n    const legendElement = createEl('legend', {\n      textContent: this.localize(this.options_.legendText),\n      id: this.options_.legendId\n    });\n    this.el().appendChild(legendElement);\n    const selects = this.options_.selects;\n\n    // Iterate array of selects to create 'selects' components\n    for (const i of selects) {\n      const selectConfig = this.options_.selectConfigs[i];\n      const selectClassName = selectConfig.className;\n      const id = selectConfig.id.replace('%s', this.options_.id_);\n      let span = null;\n      const guid = `vjs_select_${newGUID()}`;\n\n      // Conditionally create span to add on the component\n      if (this.options_.type === 'colors') {\n        span = createEl('span', {\n          className: selectClassName\n        });\n        const label = createEl('label', {\n          id,\n          className: 'vjs-label',\n          textContent: this.localize(selectConfig.label)\n        });\n        label.setAttribute('for', guid);\n        span.appendChild(label);\n      }\n      const textTrackSelect = new TextTrackSelect(player, {\n        SelectOptions: selectConfig.options,\n        legendId: this.options_.legendId,\n        id: guid,\n        labelId: id\n      });\n      this.addChild(textTrackSelect);\n\n      // Conditionally append to 'select' component to conditionally created span\n      if (this.options_.type === 'colors') {\n        span.appendChild(textTrackSelect.el());\n        this.el().appendChild(span);\n      }\n    }\n  }\n\n  /**\n   * Create the `TextTrackFieldset`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('fieldset', {\n      // Prefixing classes of elements within a player with \"vjs-\"\n      // is a convention used in Video.js.\n      className: this.options_.className\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TextTrackFieldset', TextTrackFieldset);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from  '../utils/dom' */\n\n/**\n * The component 'TextTrackSettingsColors' displays a set of 'fieldsets'\n * using the component 'TextTrackFieldset'.\n *\n * @extends Component\n */\nclass TextTrackSettingsColors extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {Array} [options.fieldSets]\n   *        Array that contains the configurations for the selects.\n   *\n   * @param {Object} [options.selectConfigs]\n   *        Object with the following properties that are the select confugations:\n   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n   *        fontPercent, textOpacity, windowColor, windowOpacity.\n   *        it passes to 'TextTrackFieldset'.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    const id_ = this.options_.textTrackComponentid;\n\n    // createElFgColor_\n    const ElFgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-text-legend-${id_}`,\n      legendText: this.localize('Text'),\n      className: 'vjs-fg vjs-track-setting',\n      selects: this.options_.fieldSets[0],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'colors'\n    });\n    this.addChild(ElFgColorFieldset);\n\n    // createElBgColor_\n    const ElBgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-background-${id_}`,\n      legendText: this.localize('Text Background'),\n      className: 'vjs-bg vjs-track-setting',\n      selects: this.options_.fieldSets[1],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'colors'\n    });\n    this.addChild(ElBgColorFieldset);\n\n    // createElWinColor_\n    const ElWinColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-window-${id_}`,\n      legendText: this.localize('Caption Area Background'),\n      className: 'vjs-window vjs-track-setting',\n      selects: this.options_.fieldSets[2],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'colors'\n    });\n    this.addChild(ElWinColorFieldset);\n  }\n\n  /**\n   * Create the `TextTrackSettingsColors`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('div', {\n      className: 'vjs-track-settings-colors'\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TextTrackSettingsColors', TextTrackSettingsColors);\n\n/** @import Player from './player' */\n/** @import { ContentDescriptor } from  '../utils/dom' */\n\n/**\n * The component 'TextTrackSettingsFont' displays a set of 'fieldsets'\n * using the component 'TextTrackFieldset'.\n *\n * @extends Component\n */\nclass TextTrackSettingsFont extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {ContentDescriptor} [options.content=undefined]\n   *        Provide customized content for this modal.\n   *\n   * @param {Array} [options.fieldSets]\n   *        Array that contains the configurations for the selects.\n   *\n   * @param {Object} [options.selectConfigs]\n   *        Object with the following properties that are the select confugations:\n   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,\n   *        fontPercent, textOpacity, windowColor, windowOpacity.\n   *        it passes to 'TextTrackFieldset'.\n   */\n  constructor(player, options = {}) {\n    super(player, options);\n    const id_ = this.options_.textTrackComponentid;\n    const ElFgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-font-size-${id_}`,\n      legendText: 'Font Size',\n      className: 'vjs-font-percent vjs-track-setting',\n      selects: this.options_.fieldSets[0],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'font'\n    });\n    this.addChild(ElFgColorFieldset);\n    const ElBgColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-edge-style-${id_}`,\n      legendText: this.localize('Text Edge Style'),\n      className: 'vjs-edge-style vjs-track-setting',\n      selects: this.options_.fieldSets[1],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'font'\n    });\n    this.addChild(ElBgColorFieldset);\n    const ElWinColorFieldset = new TextTrackFieldset(player, {\n      id_,\n      legendId: `captions-font-family-${id_}`,\n      legendText: this.localize('Font Family'),\n      className: 'vjs-font-family vjs-track-setting',\n      selects: this.options_.fieldSets[2],\n      selectConfigs: this.options_.selectConfigs,\n      type: 'font'\n    });\n    this.addChild(ElWinColorFieldset);\n  }\n\n  /**\n   * Create the `TextTrackSettingsFont`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('div', {\n      className: 'vjs-track-settings-font'\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TextTrackSettingsFont', TextTrackSettingsFont);\n\n/**\n * Buttons of reset & done that modal 'TextTrackSettings'\n * uses as part of its content.\n *\n * 'Reset': Resets all settings on 'TextTrackSettings'.\n * 'Done': Closes 'TextTrackSettings' modal.\n *\n * @extends Component\n */\nclass TrackSettingsControls extends Component$1 {\n  constructor(player, options = {}) {\n    super(player, options);\n\n    // Create DOM elements\n    const defaultsDescription = this.localize('restore all settings to the default values');\n    const resetButton = new Button(player, {\n      controlText: defaultsDescription,\n      className: 'vjs-default-button'\n    });\n    resetButton.el().classList.remove('vjs-control', 'vjs-button');\n    resetButton.el().textContent = this.localize('Reset');\n    this.addChild(resetButton);\n    const doneButton = new Button(player, {\n      controlText: defaultsDescription,\n      className: 'vjs-done-button'\n    });\n\n    // Remove unrequired style classes\n    doneButton.el().classList.remove('vjs-control', 'vjs-button');\n    doneButton.el().textContent = this.localize('Done');\n    this.addChild(doneButton);\n  }\n\n  /**\n   * Create the `TrackSettingsControls`'s DOM element\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    const el = createEl('div', {\n      className: 'vjs-track-settings-controls'\n    });\n    return el;\n  }\n}\nComponent$1.registerComponent('TrackSettingsControls', TrackSettingsControls);\n\n/**\n * @file text-track-settings.js\n */\n\n/** @import Player from '../player' */\n\nconst LOCAL_STORAGE_KEY$1 = 'vjs-text-track-settings';\nconst COLOR_BLACK = ['#000', 'Black'];\nconst COLOR_BLUE = ['#00F', 'Blue'];\nconst COLOR_CYAN = ['#0FF', 'Cyan'];\nconst COLOR_GREEN = ['#0F0', 'Green'];\nconst COLOR_MAGENTA = ['#F0F', 'Magenta'];\nconst COLOR_RED = ['#F00', 'Red'];\nconst COLOR_WHITE = ['#FFF', 'White'];\nconst COLOR_YELLOW = ['#FF0', 'Yellow'];\nconst OPACITY_OPAQUE = ['1', 'Opaque'];\nconst OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\nconst OPACITY_TRANS = ['0', 'Transparent'];\n\n// Configuration for the various <select> elements in the DOM of this component.\n//\n// Possible keys include:\n//\n// `default`:\n//   The default option index. Only needs to be provided if not zero.\n// `parser`:\n//   A function which is used to parse the value from the selected option in\n//   a customized way.\n// `selector`:\n//   The selector used to find the associated <select> element.\nconst selectConfigs = {\n  backgroundColor: {\n    selector: '.vjs-bg-color > select',\n    id: 'captions-background-color-%s',\n    label: 'Color',\n    options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN],\n    className: 'vjs-bg-color'\n  },\n  backgroundOpacity: {\n    selector: '.vjs-bg-opacity > select',\n    id: 'captions-background-opacity-%s',\n    label: 'Opacity',\n    options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS],\n    className: 'vjs-bg-opacity vjs-opacity'\n  },\n  color: {\n    selector: '.vjs-text-color > select',\n    id: 'captions-foreground-color-%s',\n    label: 'Color',\n    options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN],\n    className: 'vjs-text-color'\n  },\n  edgeStyle: {\n    selector: '.vjs-edge-style > select',\n    id: '',\n    label: 'Text Edge Style',\n    options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Drop shadow']]\n  },\n  fontFamily: {\n    selector: '.vjs-font-family > select',\n    id: '',\n    label: 'Font Family',\n    options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\n  },\n  fontPercent: {\n    selector: '.vjs-font-percent > select',\n    id: '',\n    label: 'Font Size',\n    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%']],\n    default: 2,\n    parser: v => v === '1.00' ? null : Number(v)\n  },\n  textOpacity: {\n    selector: '.vjs-text-opacity > select',\n    id: 'captions-foreground-opacity-%s',\n    label: 'Opacity',\n    options: [OPACITY_OPAQUE, OPACITY_SEMI],\n    className: 'vjs-text-opacity vjs-opacity'\n  },\n  // Options for this object are defined below.\n  windowColor: {\n    selector: '.vjs-window-color > select',\n    id: 'captions-window-color-%s',\n    label: 'Color',\n    className: 'vjs-window-color'\n  },\n  // Options for this object are defined below.\n  windowOpacity: {\n    selector: '.vjs-window-opacity > select',\n    id: 'captions-window-opacity-%s',\n    label: 'Opacity',\n    options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE],\n    className: 'vjs-window-opacity vjs-opacity'\n  }\n};\nselectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\n\n/**\n * Get the actual value of an option.\n *\n * @param  {string} value\n *         The value to get\n *\n * @param  {Function} [parser]\n *         Optional function to adjust the value.\n *\n * @return {*}\n *         - Will be `undefined` if no value exists\n *         - Will be `undefined` if the given value is \"none\".\n *         - Will be the actual value otherwise.\n *\n * @private\n */\nfunction parseOptionValue(value, parser) {\n  if (parser) {\n    value = parser(value);\n  }\n  if (value && value !== 'none') {\n    return value;\n  }\n}\n\n/**\n * Gets the value of the selected <option> element within a <select> element.\n *\n * @param  {Element} el\n *         the element to look in\n *\n * @param  {Function} [parser]\n *         Optional function to adjust the value.\n *\n * @return {*}\n *         - Will be `undefined` if no value exists\n *         - Will be `undefined` if the given value is \"none\".\n *         - Will be the actual value otherwise.\n *\n * @private\n */\nfunction getSelectedOptionValue(el, parser) {\n  const value = el.options[el.options.selectedIndex].value;\n  return parseOptionValue(value, parser);\n}\n\n/**\n * Sets the selected <option> element within a <select> element based on a\n * given value.\n *\n * @param {Element} el\n *        The element to look in.\n *\n * @param {string} value\n *        the property to look on.\n *\n * @param {Function} [parser]\n *        Optional function to adjust the value before comparing.\n *\n * @private\n */\nfunction setSelectedOption(el, value, parser) {\n  if (!value) {\n    return;\n  }\n  for (let i = 0; i < el.options.length; i++) {\n    if (parseOptionValue(el.options[i].value, parser) === value) {\n      el.selectedIndex = i;\n      break;\n    }\n  }\n}\n\n/**\n * Manipulate Text Tracks settings.\n *\n * @extends ModalDialog\n */\nclass TextTrackSettings extends ModalDialog {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *         The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *         The key/value store of player options.\n   */\n  constructor(player, options) {\n    options.temporary = false;\n    super(player, options);\n    this.updateDisplay = this.updateDisplay.bind(this);\n\n    // fill the modal and pretend we have opened it\n    this.fill();\n    this.hasBeenOpened_ = this.hasBeenFilled_ = true;\n    this.renderModalComponents(player);\n    this.endDialog = createEl('p', {\n      className: 'vjs-control-text',\n      textContent: this.localize('End of dialog window.')\n    });\n    this.el().appendChild(this.endDialog);\n    this.setDefaults();\n\n    // Grab `persistTextTrackSettings` from the player options if not passed in child options\n    if (options.persistTextTrackSettings === undefined) {\n      this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n    }\n    this.bindFunctionsToSelectsAndButtons();\n    if (this.options_.persistTextTrackSettings) {\n      this.restoreSettings();\n    }\n  }\n  renderModalComponents(player) {\n    const textTrackSettingsColors = new TextTrackSettingsColors(player, {\n      textTrackComponentid: this.id_,\n      selectConfigs,\n      fieldSets: [['color', 'textOpacity'], ['backgroundColor', 'backgroundOpacity'], ['windowColor', 'windowOpacity']]\n    });\n    this.addChild(textTrackSettingsColors);\n    const textTrackSettingsFont = new TextTrackSettingsFont(player, {\n      textTrackComponentid: this.id_,\n      selectConfigs,\n      fieldSets: [['fontPercent'], ['edgeStyle'], ['fontFamily']]\n    });\n    this.addChild(textTrackSettingsFont);\n    const trackSettingsControls = new TrackSettingsControls(player);\n    this.addChild(trackSettingsControls);\n  }\n  bindFunctionsToSelectsAndButtons() {\n    this.on(this.$('.vjs-done-button'), ['click', 'tap'], () => {\n      this.saveSettings();\n      this.close();\n    });\n    this.on(this.$('.vjs-default-button'), ['click', 'tap'], () => {\n      this.setDefaults();\n      this.updateDisplay();\n    });\n    each(selectConfigs, config => {\n      this.on(this.$(config.selector), 'change', this.updateDisplay);\n    });\n  }\n  dispose() {\n    this.endDialog = null;\n    super.dispose();\n  }\n  label() {\n    return this.localize('Caption Settings Dialog');\n  }\n  description() {\n    return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\n  }\n  buildCSSClass() {\n    return super.buildCSSClass() + ' vjs-text-track-settings';\n  }\n\n  /**\n   * Gets an object of text track settings (or null).\n   *\n   * @return {Object}\n   *         An object with config values parsed from the DOM or localStorage.\n   */\n  getValues() {\n    return reduce(selectConfigs, (accum, config, key) => {\n      const value = getSelectedOptionValue(this.$(config.selector), config.parser);\n      if (value !== undefined) {\n        accum[key] = value;\n      }\n      return accum;\n    }, {});\n  }\n\n  /**\n   * Sets text track settings from an object of values.\n   *\n   * @param {Object} values\n   *        An object with config values parsed from the DOM or localStorage.\n   */\n  setValues(values) {\n    each(selectConfigs, (config, key) => {\n      setSelectedOption(this.$(config.selector), values[key], config.parser);\n    });\n  }\n\n  /**\n   * Sets all `<select>` elements to their default values.\n   */\n  setDefaults() {\n    each(selectConfigs, config => {\n      const index = config.hasOwnProperty('default') ? config.default : 0;\n      this.$(config.selector).selectedIndex = index;\n    });\n  }\n\n  /**\n   * Restore texttrack settings from localStorage\n   */\n  restoreSettings() {\n    let values;\n    try {\n      values = JSON.parse(window$1.localStorage.getItem(LOCAL_STORAGE_KEY$1));\n    } catch (err) {\n      log$1.warn(err);\n    }\n    if (values) {\n      this.setValues(values);\n    }\n  }\n\n  /**\n   * Save text track settings to localStorage\n   */\n  saveSettings() {\n    if (!this.options_.persistTextTrackSettings) {\n      return;\n    }\n    const values = this.getValues();\n    try {\n      if (Object.keys(values).length) {\n        window$1.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(values));\n      } else {\n        window$1.localStorage.removeItem(LOCAL_STORAGE_KEY$1);\n      }\n    } catch (err) {\n      log$1.warn(err);\n    }\n  }\n\n  /**\n   * Update display of text track settings\n   */\n  updateDisplay() {\n    const ttDisplay = this.player_.getChild('textTrackDisplay');\n    if (ttDisplay) {\n      ttDisplay.updateDisplay();\n    }\n  }\n\n  /**\n   * Repopulate dialog with new localizations on languagechange\n   */\n  handleLanguagechange() {\n    this.fill();\n    this.renderModalComponents(this.player_);\n    this.bindFunctionsToSelectsAndButtons();\n  }\n}\nComponent$1.registerComponent('TextTrackSettings', TextTrackSettings);\n\n/**\n * @file resize-manager.js\n */\n\n/**\n * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\n *\n * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\n *\n * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\n * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\n *\n * @example <caption>How to disable the resize manager</caption>\n * const player = videojs('#vid', {\n *   resizeManager: false\n * });\n *\n * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\n *\n * @extends Component\n */\nclass ResizeManager extends Component$1 {\n  /**\n   * Create the ResizeManager.\n   *\n   * @param {Object} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of ResizeManager options.\n   *\n   * @param {Object} [options.ResizeObserver]\n   *        A polyfill for ResizeObserver can be passed in here.\n   *        If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\n   */\n  constructor(player, options) {\n    let RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || window$1.ResizeObserver;\n\n    // if `null` was passed, we want to disable the ResizeObserver\n    if (options.ResizeObserver === null) {\n      RESIZE_OBSERVER_AVAILABLE = false;\n    }\n\n    // Only create an element when ResizeObserver isn't available\n    const options_ = merge$1({\n      createEl: !RESIZE_OBSERVER_AVAILABLE,\n      reportTouchActivity: false\n    }, options);\n    super(player, options_);\n    this.ResizeObserver = options.ResizeObserver || window$1.ResizeObserver;\n    this.loadListener_ = null;\n    this.resizeObserver_ = null;\n    this.debouncedHandler_ = debounce$1(() => {\n      this.resizeHandler();\n    }, 100, false, this);\n    if (RESIZE_OBSERVER_AVAILABLE) {\n      this.resizeObserver_ = new this.ResizeObserver(this.debouncedHandler_);\n      this.resizeObserver_.observe(player.el());\n    } else {\n      this.loadListener_ = () => {\n        if (!this.el_ || !this.el_.contentWindow) {\n          return;\n        }\n        const debouncedHandler_ = this.debouncedHandler_;\n        let unloadListener_ = this.unloadListener_ = function () {\n          off(this, 'resize', debouncedHandler_);\n          off(this, 'unload', unloadListener_);\n          unloadListener_ = null;\n        };\n\n        // safari and edge can unload the iframe before resizemanager dispose\n        // we have to dispose of event handlers correctly before that happens\n        on(this.el_.contentWindow, 'unload', unloadListener_);\n        on(this.el_.contentWindow, 'resize', debouncedHandler_);\n      };\n      this.one('load', this.loadListener_);\n    }\n  }\n  createEl() {\n    return super.createEl('iframe', {\n      className: 'vjs-resize-manager',\n      tabIndex: -1,\n      title: this.localize('No content')\n    }, {\n      'aria-hidden': 'true'\n    });\n  }\n\n  /**\n   * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\n   *\n   * @fires Player#playerresize\n   */\n  resizeHandler() {\n    /**\n     * Called when the player size has changed\n     *\n     * @event Player#playerresize\n     * @type {Event}\n     */\n    // make sure player is still around to trigger\n    // prevents this from causing an error after dispose\n    if (!this.player_ || !this.player_.trigger) {\n      return;\n    }\n    this.player_.trigger('playerresize');\n  }\n  dispose() {\n    if (this.debouncedHandler_) {\n      this.debouncedHandler_.cancel();\n    }\n    if (this.resizeObserver_) {\n      if (this.player_.el()) {\n        this.resizeObserver_.unobserve(this.player_.el());\n      }\n      this.resizeObserver_.disconnect();\n    }\n    if (this.loadListener_) {\n      this.off('load', this.loadListener_);\n    }\n    if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\n      this.unloadListener_.call(this.el_.contentWindow);\n    }\n    this.ResizeObserver = null;\n    this.resizeObserver = null;\n    this.debouncedHandler_ = null;\n    this.loadListener_ = null;\n    super.dispose();\n  }\n}\nComponent$1.registerComponent('ResizeManager', ResizeManager);\n\n/** @import Player from './player' */\n\nconst defaults$1 = {\n  trackingThreshold: 20,\n  liveTolerance: 15\n};\n\n/*\n  track when we are at the live edge, and other helpers for live playback */\n\n/**\n * A class for checking live current time and determining when the player\n * is at or behind the live edge.\n */\nclass LiveTracker extends Component$1 {\n  /**\n   * Creates an instance of this class.\n   *\n   * @param {Player} player\n   *        The `Player` that this class should be attached to.\n   *\n   * @param {Object} [options]\n   *        The key/value store of player options.\n   *\n   * @param {number} [options.trackingThreshold=20]\n   *        Number of seconds of live window (seekableEnd - seekableStart) that\n   *        media needs to have before the liveui will be shown.\n   *\n   * @param {number} [options.liveTolerance=15]\n   *        Number of seconds behind live that we have to be\n   *        before we will be considered non-live. Note that this will only\n   *        be used when playing at the live edge. This allows large seekable end\n   *        changes to not effect whether we are live or not.\n   */\n  constructor(player, options) {\n    // LiveTracker does not need an element\n    const options_ = merge$1(defaults$1, options, {\n      createEl: false\n    });\n    super(player, options_);\n    this.trackLiveHandler_ = () => this.trackLive_();\n    this.handlePlay_ = e => this.handlePlay(e);\n    this.handleFirstTimeupdate_ = e => this.handleFirstTimeupdate(e);\n    this.handleSeeked_ = e => this.handleSeeked(e);\n    this.seekToLiveEdge_ = e => this.seekToLiveEdge(e);\n    this.reset_();\n    this.on(this.player_, 'durationchange', e => this.handleDurationchange(e));\n    // we should try to toggle tracking on canplay as native playback engines, like Safari\n    // may not have the proper values for things like seekableEnd until then\n    this.on(this.player_, 'canplay', () => this.toggleTracking());\n  }\n\n  /**\n   * all the functionality for tracking when seek end changes\n   * and for tracking how far past seek end we should be\n   */\n  trackLive_() {\n    const seekable = this.player_.seekable();\n\n    // skip undefined seekable\n    if (!seekable || !seekable.length) {\n      return;\n    }\n    const newTime = Number(window$1.performance.now().toFixed(4));\n    const deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\n    this.lastTime_ = newTime;\n    this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\n    const liveCurrentTime = this.liveCurrentTime();\n    const currentTime = this.player_.currentTime();\n\n    // we are behind live if any are true\n    // 1. the player is paused\n    // 2. the user seeked to a location 2 seconds away from live\n    // 3. the difference between live and current time is greater\n    //    liveTolerance which defaults to 15s\n    let isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance;\n\n    // we cannot be behind if\n    // 1. until we have not seen a timeupdate yet\n    // 2. liveCurrentTime is Infinity, which happens on Android and Native Safari\n    if (!this.timeupdateSeen_ || liveCurrentTime === Infinity) {\n      isBehind = false;\n    }\n    if (isBehind !== this.behindLiveEdge_) {\n      this.behindLiveEdge_ = isBehind;\n      this.trigger('liveedgechange');\n    }\n  }\n\n  /**\n   * handle a durationchange event on the player\n   * and start/stop tracking accordingly.\n   */\n  handleDurationchange() {\n    this.toggleTracking();\n  }\n\n  /**\n   * start/stop tracking\n   */\n  toggleTracking() {\n    if (this.player_.duration() === Infinity && this.liveWindow() >= this.options_.trackingThreshold) {\n      if (this.player_.options_.liveui) {\n        this.player_.addClass('vjs-liveui');\n      }\n      this.startTracking();\n    } else {\n      this.player_.removeClass('vjs-liveui');\n      this.stopTracking();\n    }\n  }\n\n  /**\n   * start tracking live playback\n   */\n  startTracking() {\n    if (this.isTracking()) {\n      return;\n    }\n\n    // If we haven't seen a timeupdate, we need to check whether playback\n    // began before this component started tracking. This can happen commonly\n    // when using autoplay.\n    if (!this.timeupdateSeen_) {\n      this.timeupdateSeen_ = this.player_.hasStarted();\n    }\n    this.trackingInterval_ = this.setInterval(this.trackLiveHandler_, UPDATE_REFRESH_INTERVAL);\n    this.trackLive_();\n    this.on(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n    if (!this.timeupdateSeen_) {\n      this.one(this.player_, 'play', this.handlePlay_);\n      this.one(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n    } else {\n      this.on(this.player_, 'seeked', this.handleSeeked_);\n    }\n  }\n\n  /**\n   * handle the first timeupdate on the player if it wasn't already playing\n   * when live tracker started tracking.\n   */\n  handleFirstTimeupdate() {\n    this.timeupdateSeen_ = true;\n    this.on(this.player_, 'seeked', this.handleSeeked_);\n  }\n\n  /**\n   * Keep track of what time a seek starts, and listen for seeked\n   * to find where a seek ends.\n   */\n  handleSeeked() {\n    const timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime());\n    this.seekedBehindLive_ = this.nextSeekedFromUser_ && timeDiff > 2;\n    this.nextSeekedFromUser_ = false;\n    this.trackLive_();\n  }\n\n  /**\n   * handle the first play on the player, and make sure that we seek\n   * right to the live edge.\n   */\n  handlePlay() {\n    this.one(this.player_, 'timeupdate', this.seekToLiveEdge_);\n  }\n\n  /**\n   * Stop tracking, and set all internal variables to\n   * their initial value.\n   */\n  reset_() {\n    this.lastTime_ = -1;\n    this.pastSeekEnd_ = 0;\n    this.lastSeekEnd_ = -1;\n    this.behindLiveEdge_ = true;\n    this.timeupdateSeen_ = false;\n    this.seekedBehindLive_ = false;\n    this.nextSeekedFromUser_ = false;\n    this.clearInterval(this.trackingInterval_);\n    this.trackingInterval_ = null;\n    this.off(this.player_, ['play', 'pause'], this.trackLiveHandler_);\n    this.off(this.player_, 'seeked', this.handleSeeked_);\n    this.off(this.player_, 'play', this.handlePlay_);\n    this.off(this.player_, 'timeupdate', this.handleFirstTimeupdate_);\n    this.off(this.player_, 'timeupdate', this.seekToLiveEdge_);\n  }\n\n  /**\n   * The next seeked event is from the user. Meaning that any seek\n   * > 2s behind live will be considered behind live for real and\n   * liveTolerance will be ignored.\n   */\n  nextSeekedFromUser() {\n    this.nextSeekedFromUser_ = true;\n  }\n\n  /**\n   * stop tracking live playback\n   */\n  stopTracking() {\n    if (!this.isTracking()) {\n      return;\n    }\n    this.reset_();\n    this.trigger('liveedgechange');\n  }\n\n  /**\n   * A helper to get the player seekable end\n   * so that we don't have to null check everywhere\n   *\n   * @return {number}\n   *         The furthest seekable end or Infinity.\n   */\n  seekableEnd() {\n    const seekable = this.player_.seekable();\n    const seekableEnds = [];\n    let i = seekable ? seekable.length : 0;\n    while (i--) {\n      seekableEnds.push(seekable.end(i));\n    }\n\n    // grab the furthest seekable end after sorting, or if there are none\n    // default to Infinity\n    return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\n  }\n\n  /**\n   * A helper to get the player seekable start\n   * so that we don't have to null check everywhere\n   *\n   * @return {number}\n   *         The earliest seekable start or 0.\n   */\n  seekableStart() {\n    const seekable = this.player_.seekable();\n    const seekableStarts = [];\n    let i = seekable ? seekable.length : 0;\n    while (i--) {\n      seekableStarts.push(seekable.start(i));\n    }\n\n    // grab the first seekable start after sorting, or if there are none\n    // default to 0\n    return seekableStarts.length ? seekableStarts.sort()[0] : 0;\n  }\n\n  /**\n   * Get the live time window aka\n   * the amount of time between seekable start and\n   * live current time.\n   *\n   * @return {number}\n   *         The amount of seconds that are seekable in\n   *         the live video.\n   */\n  liveWindow() {\n    const liveCurrentTime = this.liveCurrentTime();\n\n    // if liveCurrenTime is Infinity then we don't have a liveWindow at all\n    if (liveCurrentTime === Infinity) {\n      return 0;\n    }\n    return liveCurrentTime - this.seekableStart();\n  }\n\n  /**\n   * Determines if the player is live, only checks if this component\n   * is tracking live playback or not\n   *\n   * @return {boolean}\n   *         Whether liveTracker is tracking\n   */\n  isLive() {\n    return this.isTracking();\n  }\n\n  /**\n   * Determines if currentTime is at the live edge and won't fall behind\n   * on each seekableendchange\n   *\n   * @return {boolean}\n   *         Whether playback is at the live edge\n   */\n  atLiveEdge() {\n    return !this.behindLiveEdge();\n  }\n\n  /**\n   * get what we expect the live current time to be\n   *\n   * @return {number}\n   *         The expected live current time\n   */\n  liveCurrentTime() {\n    return this.pastSeekEnd() + this.seekableEnd();\n  }\n\n  /**\n   * The number of seconds that have occurred after seekable end\n   * changed. This will be reset to 0 once seekable end changes.\n   *\n   * @return {number}\n   *         Seconds past the current seekable end\n   */\n  pastSeekEnd() {\n    const seekableEnd = this.seekableEnd();\n    if (this.lastSeekEnd_ !== -1 && seekableEnd !== this.lastSeekEnd_) {\n      this.pastSeekEnd_ = 0;\n    }\n    this.lastSeekEnd_ = seekableEnd;\n    return this.pastSeekEnd_;\n  }\n\n  /**\n   * If we are currently behind the live edge, aka currentTime will be\n   * behind on a seekableendchange\n   *\n   * @return {boolean}\n   *         If we are behind the live edge\n   */\n  behindLiveEdge() {\n    return this.behindLiveEdge_;\n  }\n\n  /**\n   * Whether live tracker is currently tracking or not.\n   */\n  isTracking() {\n    return typeof this.trackingInterval_ === 'number';\n  }\n\n  /**\n   * Seek to the live edge if we are behind the live edge\n   */\n  seekToLiveEdge() {\n    this.seekedBehindLive_ = false;\n    if (this.atLiveEdge()) {\n      return;\n    }\n    this.nextSeekedFromUser_ = false;\n    this.player_.currentTime(this.liveCurrentTime());\n  }\n\n  /**\n   * Dispose of liveTracker\n   */\n  dispose() {\n    this.stopTracking();\n    super.dispose();\n  }\n}\nComponent$1.registerComponent('LiveTracker', LiveTracker);\n\n/**\n * Displays an element over the player which contains an optional title and\n * description for the current content.\n *\n * Much of the code for this component originated in the now obsolete\n * videojs-dock plugin: https://github.com/brightcove/videojs-dock/\n *\n * @extends Component\n */\nclass TitleBar extends Component$1 {\n  constructor(player, options) {\n    super(player, options);\n    this.on('statechanged', e => this.updateDom_());\n    this.updateDom_();\n  }\n\n  /**\n   * Create the `TitleBar`'s DOM element\n   *\n   * @return {Element}\n   *         The element that was created.\n   */\n  createEl() {\n    this.els = {\n      title: createEl('div', {\n        className: 'vjs-title-bar-title',\n        id: `vjs-title-bar-title-${newGUID()}`\n      }),\n      description: createEl('div', {\n        className: 'vjs-title-bar-description',\n        id: `vjs-title-bar-description-${newGUID()}`\n      })\n    };\n    return createEl('div', {\n      className: 'vjs-title-bar'\n    }, {}, values(this.els));\n  }\n\n  /**\n   * Updates the DOM based on the component's state object.\n   */\n  updateDom_() {\n    const tech = this.player_.tech_;\n    const techEl = tech && tech.el_;\n    const techAriaAttrs = {\n      title: 'aria-labelledby',\n      description: 'aria-describedby'\n    };\n    ['title', 'description'].forEach(k => {\n      const value = this.state[k];\n      const el = this.els[k];\n      const techAriaAttr = techAriaAttrs[k];\n      emptyEl(el);\n      if (value) {\n        textContent(el, value);\n      }\n\n      // If there is a tech element available, update its ARIA attributes\n      // according to whether a title and/or description have been provided.\n      if (techEl) {\n        techEl.removeAttribute(techAriaAttr);\n        if (value) {\n          techEl.setAttribute(techAriaAttr, el.id);\n        }\n      }\n    });\n    if (this.state.title || this.state.description) {\n      this.show();\n    } else {\n      this.hide();\n    }\n  }\n\n  /**\n   * Update the contents of the title bar component with new title and\n   * description text.\n   *\n   * If both title and description are missing, the title bar will be hidden.\n   *\n   * If either title or description are present, the title bar will be visible.\n   *\n   * NOTE: Any previously set value will be preserved. To unset a previously\n   * set value, you must pass an empty string or null.\n   *\n   * For example:\n   *\n   * ```\n   * update({title: 'foo', description: 'bar'}) // title: 'foo', description: 'bar'\n   * update({description: 'bar2'}) // title: 'foo', description: 'bar2'\n   * update({title: ''}) // title: '', description: 'bar2'\n   * update({title: 'foo', description: null}) // title: 'foo', description: null\n   * ```\n   *\n   * @param  {Object} [options={}]\n   *         An options object. When empty, the title bar will be hidden.\n   *\n   * @param  {string} [options.title]\n   *         A title to display in the title bar.\n   *\n   * @param  {string} [options.description]\n   *         A description to display in the title bar.\n   */\n  update(options) {\n    this.setState(options);\n  }\n\n  /**\n   * Dispose the component.\n   */\n  dispose() {\n    const tech = this.player_.tech_;\n    const techEl = tech && tech.el_;\n    if (techEl) {\n      techEl.removeAttribute('aria-labelledby');\n      techEl.removeAttribute('aria-describedby');\n    }\n    super.dispose();\n    this.els = null;\n  }\n}\nComponent$1.registerComponent('TitleBar', TitleBar);\n\n/** @import Player from './player' */\n\n/**\n * @typedef {object} TransientButtonOptions\n * @property {string} [controlText] Control text, usually visible for these buttons\n * @property {number} [initialDisplay=4000] Time in ms that button should initially remain visible\n * @property {Array<'top'|'neartop'|'bottom'|'left'|'right'>} [position] Array of position strings to add basic styles for positioning\n * @property {string} [className] Class(es) to add\n * @property {boolean} [takeFocus=false] Whether element sohuld take focus when shown\n * @property {Function} [clickHandler] Function called on button activation\n */\n\n/** @type {TransientButtonOptions} */\nconst defaults = {\n  initialDisplay: 4000,\n  position: [],\n  takeFocus: false\n};\n\n/**\n * A floating transient button.\n * It's recommended to insert these buttons _before_ the control bar with the this argument to `addChild`\n * for a logical tab order.\n *\n * @example\n * ```\n * player.addChild(\n *   'TransientButton',\n *   options,\n *   player.children().indexOf(player.getChild(\"ControlBar\"))\n * )\n * ```\n *\n * @extends Button\n */\nclass TransientButton extends Button {\n  /**\n   * TransientButton constructor\n   *\n   * @param {Player} player The button's player\n   * @param {TransientButtonOptions} options Options for the transient button\n   */\n  constructor(player, options) {\n    options = merge$1(defaults, options);\n    super(player, options);\n    this.controlText(options.controlText);\n    this.hide();\n\n    // When shown, the float button will be visible even if the user is inactive.\n    // Clear this if there is any interaction.\n    this.on(this.player_, ['useractive', 'userinactive'], e => {\n      this.removeClass('force-display');\n    });\n  }\n\n  /**\n   * Return CSS class including position classes\n   *\n   * @return {string} CSS class list\n   */\n  buildCSSClass() {\n    return `vjs-transient-button focus-visible ${this.options_.position.map(c => `vjs-${c}`).join(' ')}`;\n  }\n\n  /**\n   * Create the button element\n   *\n   * @return {HTMLButtonElement} The button element\n   */\n  createEl() {\n    /** @type HTMLButtonElement */\n    const el = createEl('button', {}, {\n      type: 'button',\n      class: this.buildCSSClass()\n    }, createEl('span'));\n    this.controlTextEl_ = el.querySelector('span');\n    return el;\n  }\n\n  /**\n   * Show the button. The button will remain visible for the `initialDisplay` time, default 4s,\n   * and when there is user activity.\n   */\n  show() {\n    super.show();\n    this.addClass('force-display');\n    if (this.options_.takeFocus) {\n      this.el().focus({\n        preventScroll: true\n      });\n    }\n    this.forceDisplayTimeout = this.player_.setTimeout(() => {\n      this.removeClass('force-display');\n    }, this.options_.initialDisplay);\n  }\n\n  /**\n   * Hide the display, even if during the `initialDisplay` time.\n   */\n  hide() {\n    this.removeClass('force-display');\n    super.hide();\n  }\n\n  /**\n   * Dispose the component\n   */\n  dispose() {\n    this.player_.clearTimeout(this.forceDisplayTimeout);\n    super.dispose();\n  }\n}\nComponent$1.registerComponent('TransientButton', TransientButton);\n\n/** @import Html5 from './html5' */\n\n/**\n * This function is used to fire a sourceset when there is something\n * similar to `mediaEl.load()` being called. It will try to find the source via\n * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\n * with the source that was found or empty string if we cannot know. If it cannot\n * find a source then `sourceset` will not be fired.\n *\n * @param {Html5} tech\n *        The tech object that sourceset was setup on\n *\n * @return {boolean}\n *         returns false if the sourceset was not fired and true otherwise.\n */\nconst sourcesetLoad = tech => {\n  const el = tech.el();\n\n  // if `el.src` is set, that source will be loaded.\n  if (el.hasAttribute('src')) {\n    tech.triggerSourceset(el.src);\n    return true;\n  }\n\n  /**\n   * Since there isn't a src property on the media element, source elements will be used for\n   * implementing the source selection algorithm. This happens asynchronously and\n   * for most cases were there is more than one source we cannot tell what source will\n   * be loaded, without re-implementing the source selection algorithm. At this time we are not\n   * going to do that. There are three special cases that we do handle here though:\n   *\n   * 1. If there are no sources, do not fire `sourceset`.\n   * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\n   * 3. If there is more than one `<source>` but all of them have the same `src` url.\n   *    That will be our src.\n   */\n  const sources = tech.$$('source');\n  const srcUrls = [];\n  let src = '';\n\n  // if there are no sources, do not fire sourceset\n  if (!sources.length) {\n    return false;\n  }\n\n  // only count valid/non-duplicate source elements\n  for (let i = 0; i < sources.length; i++) {\n    const url = sources[i].src;\n    if (url && srcUrls.indexOf(url) === -1) {\n      srcUrls.push(url);\n    }\n  }\n\n  // there were no valid sources\n  if (!srcUrls.length) {\n    return false;\n  }\n\n  // there is only one valid source element url\n  // use that\n  if (srcUrls.length === 1) {\n    src = srcUrls[0];\n  }\n  tech.triggerSourceset(src);\n  return true;\n};\n\n/**\n * our implementation of an `innerHTML` descriptor for browsers\n * that do not have one.\n */\nconst innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\n  get() {\n    return this.cloneNode(true).innerHTML;\n  },\n  set(v) {\n    // make a dummy node to use innerHTML on\n    const dummy = document$1.createElement(this.nodeName.toLowerCase());\n\n    // set innerHTML to the value provided\n    dummy.innerHTML = v;\n\n    // make a document fragment to hold the nodes from dummy\n    const docFrag = document$1.createDocumentFragment();\n\n    // copy all of the nodes created by the innerHTML on dummy\n    // to the document fragment\n    while (dummy.childNodes.length) {\n      docFrag.appendChild(dummy.childNodes[0]);\n    }\n\n    // remove content\n    this.innerText = '';\n\n    // now we add all of that html in one by appending the\n    // document fragment. This is how innerHTML does it.\n    window$1.Element.prototype.appendChild.call(this, docFrag);\n\n    // then return the result that innerHTML's setter would\n    return this.innerHTML;\n  }\n});\n\n/**\n * Get a property descriptor given a list of priorities and the\n * property to get.\n */\nconst getDescriptor = (priority, prop) => {\n  let descriptor = {};\n  for (let i = 0; i < priority.length; i++) {\n    descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\n    if (descriptor && descriptor.set && descriptor.get) {\n      break;\n    }\n  }\n  descriptor.enumerable = true;\n  descriptor.configurable = true;\n  return descriptor;\n};\nconst getInnerHTMLDescriptor = tech => getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, window$1.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\n\n/**\n * Patches browser internal functions so that we can tell synchronously\n * if a `<source>` was appended to the media element. For some reason this\n * causes a `sourceset` if the the media element is ready and has no source.\n * This happens when:\n * - The page has just loaded and the media element does not have a source.\n * - The media element was emptied of all sources, then `load()` was called.\n *\n * It does this by patching the following functions/properties when they are supported:\n *\n * - `append()` - can be used to add a `<source>` element to the media element\n * - `appendChild()` - can be used to add a `<source>` element to the media element\n * - `insertAdjacentHTML()` -  can be used to add a `<source>` element to the media element\n * - `innerHTML` -  can be used to add a `<source>` element to the media element\n *\n * @param {Html5} tech\n *        The tech object that sourceset is being setup on.\n */\nconst firstSourceWatch = function (tech) {\n  const el = tech.el();\n\n  // make sure firstSourceWatch isn't setup twice.\n  if (el.resetSourceWatch_) {\n    return;\n  }\n  const old = {};\n  const innerDescriptor = getInnerHTMLDescriptor(tech);\n  const appendWrapper = appendFn => (...args) => {\n    const retval = appendFn.apply(el, args);\n    sourcesetLoad(tech);\n    return retval;\n  };\n  ['append', 'appendChild', 'insertAdjacentHTML'].forEach(k => {\n    if (!el[k]) {\n      return;\n    }\n\n    // store the old function\n    old[k] = el[k];\n\n    // call the old function with a sourceset if a source\n    // was loaded\n    el[k] = appendWrapper(old[k]);\n  });\n  Object.defineProperty(el, 'innerHTML', merge$1(innerDescriptor, {\n    set: appendWrapper(innerDescriptor.set)\n  }));\n  el.resetSourceWatch_ = () => {\n    el.resetSourceWatch_ = null;\n    Object.keys(old).forEach(k => {\n      el[k] = old[k];\n    });\n    Object.defineProperty(el, 'innerHTML', innerDescriptor);\n  };\n\n  // on the first sourceset, we need to revert our changes\n  tech.one('sourceset', el.resetSourceWatch_);\n};\n\n/**\n * our implementation of a `src` descriptor for browsers\n * that do not have one\n */\nconst srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\n  get() {\n    if (this.hasAttribute('src')) {\n      return getAbsoluteURL(window$1.Element.prototype.getAttribute.call(this, 'src'));\n    }\n    return '';\n  },\n  set(v) {\n    window$1.Element.prototype.setAttribute.call(this, 'src', v);\n    return v;\n  }\n});\nconst getSrcDescriptor = tech => getDescriptor([tech.el(), window$1.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\n\n/**\n * setup `sourceset` handling on the `Html5` tech. This function\n * patches the following element properties/functions:\n *\n * - `src` - to determine when `src` is set\n * - `setAttribute()` - to determine when `src` is set\n * - `load()` - this re-triggers the source selection algorithm, and can\n *              cause a sourceset.\n *\n * If there is no source when we are adding `sourceset` support or during a `load()`\n * we also patch the functions listed in `firstSourceWatch`.\n *\n * @param {Html5} tech\n *        The tech to patch\n */\nconst setupSourceset = function (tech) {\n  if (!tech.featuresSourceset) {\n    return;\n  }\n  const el = tech.el();\n\n  // make sure sourceset isn't setup twice.\n  if (el.resetSourceset_) {\n    return;\n  }\n  const srcDescriptor = getSrcDescriptor(tech);\n  const oldSetAttribute = el.setAttribute;\n  const oldLoad = el.load;\n  Object.defineProperty(el, 'src', merge$1(srcDescriptor, {\n    set: v => {\n      const retval = srcDescriptor.set.call(el, v);\n\n      // we use the getter here to get the actual value set on src\n      tech.triggerSourceset(el.src);\n      return retval;\n    }\n  }));\n  el.setAttribute = (n, v) => {\n    const retval = oldSetAttribute.call(el, n, v);\n    if (/src/i.test(n)) {\n      tech.triggerSourceset(el.src);\n    }\n    return retval;\n  };\n  el.load = () => {\n    const retval = oldLoad.call(el);\n\n    // if load was called, but there was no source to fire\n    // sourceset on. We have to watch for a source append\n    // as that can trigger a `sourceset` when the media element\n    // has no source\n    if (!sourcesetLoad(tech)) {\n      tech.triggerSourceset('');\n      firstSourceWatch(tech);\n    }\n    return retval;\n  };\n  if (el.currentSrc) {\n    tech.triggerSourceset(el.currentSrc);\n  } else if (!sourcesetLoad(tech)) {\n    firstSourceWatch(tech);\n  }\n  el.resetSourceset_ = () => {\n    el.resetSourceset_ = null;\n    el.load = oldLoad;\n    el.setAttribute = oldSetAttribute;\n    Object.defineProperty(el, 'src', srcDescriptor);\n    if (el.resetSourceWatch_) {\n      el.resetSourceWatch_();\n    }\n  };\n};\n\n/**\n * @file html5.js\n */\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @mixes Tech~SourceHandlerAdditions\n * @extends Tech\n */\nclass Html5 extends Tech {\n  /**\n  * Create an instance of this Tech.\n  *\n  * @param {Object} [options]\n  *        The key/value store of player options.\n  *\n  * @param {Function} [ready]\n  *        Callback function to call when the `HTML5` Tech is ready.\n  */\n  constructor(options, ready) {\n    super(options, ready);\n    const source = options.source;\n    let crossoriginTracks = false;\n    this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.el_.tagName === 'VIDEO';\n\n    // Set the source if one is provided\n    // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n    // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n    // anyway so the error gets fired.\n    if (source && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\n      this.setSource(source);\n    } else {\n      this.handleLateInit_(this.el_);\n    }\n\n    // setup sourceset after late sourceset/init\n    if (options.enableSourceset) {\n      this.setupSourcesetHandling_();\n    }\n    this.isScrubbing_ = false;\n    if (this.el_.hasChildNodes()) {\n      const nodes = this.el_.childNodes;\n      let nodesLength = nodes.length;\n      const removeNodes = [];\n      while (nodesLength--) {\n        const node = nodes[nodesLength];\n        const nodeName = node.nodeName.toLowerCase();\n        if (nodeName === 'track') {\n          if (!this.featuresNativeTextTracks) {\n            // Empty video tag tracks so the built-in player doesn't use them also.\n            // This may not be fast enough to stop HTML5 browsers from reading the tags\n            // so we'll need to turn off any default tracks if we're manually doing\n            // captions and subtitles. videoElement.textTracks\n            removeNodes.push(node);\n          } else {\n            // store HTMLTrackElement and TextTrack to remote list\n            this.remoteTextTrackEls().addTrackElement_(node);\n            this.remoteTextTracks().addTrack(node.track);\n            this.textTracks().addTrack(node.track);\n            if (!crossoriginTracks && !this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\n              crossoriginTracks = true;\n            }\n          }\n        }\n      }\n      for (let i = 0; i < removeNodes.length; i++) {\n        this.el_.removeChild(removeNodes[i]);\n      }\n    }\n    this.proxyNativeTracks_();\n    if (this.featuresNativeTextTracks && crossoriginTracks) {\n      log$1.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\'t used.\\n' + 'This may prevent text tracks from loading.');\n    }\n\n    // prevent iOS Safari from disabling metadata text tracks during native playback\n    this.restoreMetadataTracksInIOSNativePlayer_();\n\n    // Determine if native controls should be used\n    // Our goal should be to get the custom controls on mobile solid everywhere\n    // so we can remove this all together. Right now this will block custom\n    // controls on touch enabled laptops like the Chrome Pixel\n    if ((TOUCH_ENABLED || IS_IPHONE) && options.nativeControlsForTouch === true) {\n      this.setControls(true);\n    }\n\n    // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\n    // into a `fullscreenchange` event\n    this.proxyWebkitFullscreen_();\n    this.triggerReady();\n  }\n\n  /**\n   * Dispose of `HTML5` media element and remove all tracks.\n   */\n  dispose() {\n    if (this.el_ && this.el_.resetSourceset_) {\n      this.el_.resetSourceset_();\n    }\n    Html5.disposeMediaElement(this.el_);\n    this.options_ = null;\n\n    // tech will handle clearing of the emulated track list\n    super.dispose();\n  }\n\n  /**\n   * Modify the media element so that we can detect when\n   * the source is changed. Fires `sourceset` just after the source has changed\n   */\n  setupSourcesetHandling_() {\n    setupSourceset(this);\n  }\n\n  /**\n   * When a captions track is enabled in the iOS Safari native player, all other\n   * tracks are disabled (including metadata tracks), which nulls all of their\n   * associated cue points. This will restore metadata tracks to their pre-fullscreen\n   * state in those cases so that cue points are not needlessly lost.\n   *\n   * @private\n   */\n  restoreMetadataTracksInIOSNativePlayer_() {\n    const textTracks = this.textTracks();\n    let metadataTracksPreFullscreenState;\n\n    // captures a snapshot of every metadata track's current state\n    const takeMetadataTrackSnapshot = () => {\n      metadataTracksPreFullscreenState = [];\n      for (let i = 0; i < textTracks.length; i++) {\n        const track = textTracks[i];\n        if (track.kind === 'metadata') {\n          metadataTracksPreFullscreenState.push({\n            track,\n            storedMode: track.mode\n          });\n        }\n      }\n    };\n\n    // snapshot each metadata track's initial state, and update the snapshot\n    // each time there is a track 'change' event\n    takeMetadataTrackSnapshot();\n    textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n    this.on('dispose', () => textTracks.removeEventListener('change', takeMetadataTrackSnapshot));\n    const restoreTrackMode = () => {\n      for (let i = 0; i < metadataTracksPreFullscreenState.length; i++) {\n        const storedTrack = metadataTracksPreFullscreenState[i];\n        if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\n          storedTrack.track.mode = storedTrack.storedMode;\n        }\n      }\n      // we only want this handler to be executed on the first 'change' event\n      textTracks.removeEventListener('change', restoreTrackMode);\n    };\n\n    // when we enter fullscreen playback, stop updating the snapshot and\n    // restore all track modes to their pre-fullscreen state\n    this.on('webkitbeginfullscreen', () => {\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n\n      // remove the listener before adding it just in case it wasn't previously removed\n      textTracks.removeEventListener('change', restoreTrackMode);\n      textTracks.addEventListener('change', restoreTrackMode);\n    });\n\n    // start updating the snapshot again after leaving fullscreen\n    this.on('webkitendfullscreen', () => {\n      // remove the listener before adding it just in case it wasn't previously removed\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\n      textTracks.addEventListener('change', takeMetadataTrackSnapshot);\n\n      // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\n      textTracks.removeEventListener('change', restoreTrackMode);\n    });\n  }\n\n  /**\n   * Attempt to force override of tracks for the given type\n   *\n   * @param {string} type - Track type to override, possible values include 'Audio',\n   * 'Video', and 'Text'.\n   * @param {boolean} override - If set to true native audio/video will be overridden,\n   * otherwise native audio/video will potentially be used.\n   * @private\n   */\n  overrideNative_(type, override) {\n    // If there is no behavioral change don't add/remove listeners\n    if (override !== this[`featuresNative${type}Tracks`]) {\n      return;\n    }\n    const lowerCaseType = type.toLowerCase();\n    if (this[`${lowerCaseType}TracksListeners_`]) {\n      Object.keys(this[`${lowerCaseType}TracksListeners_`]).forEach(eventName => {\n        const elTracks = this.el()[`${lowerCaseType}Tracks`];\n        elTracks.removeEventListener(eventName, this[`${lowerCaseType}TracksListeners_`][eventName]);\n      });\n    }\n    this[`featuresNative${type}Tracks`] = !override;\n    this[`${lowerCaseType}TracksListeners_`] = null;\n    this.proxyNativeTracksForType_(lowerCaseType);\n  }\n\n  /**\n   * Attempt to force override of native audio tracks.\n   *\n   * @param {boolean} override - If set to true native audio will be overridden,\n   * otherwise native audio will potentially be used.\n   */\n  overrideNativeAudioTracks(override) {\n    this.overrideNative_('Audio', override);\n  }\n\n  /**\n   * Attempt to force override of native video tracks.\n   *\n   * @param {boolean} override - If set to true native video will be overridden,\n   * otherwise native video will potentially be used.\n   */\n  overrideNativeVideoTracks(override) {\n    this.overrideNative_('Video', override);\n  }\n\n  /**\n   * Proxy native track list events for the given type to our track\n   * lists if the browser we are playing in supports that type of track list.\n   *\n   * @param {string} name - Track type; values include 'audio', 'video', and 'text'\n   * @private\n   */\n  proxyNativeTracksForType_(name) {\n    const props = NORMAL[name];\n    const elTracks = this.el()[props.getterName];\n    const techTracks = this[props.getterName]();\n    if (!this[`featuresNative${props.capitalName}Tracks`] || !elTracks || !elTracks.addEventListener) {\n      return;\n    }\n    const listeners = {\n      change: e => {\n        const event = {\n          type: 'change',\n          target: techTracks,\n          currentTarget: techTracks,\n          srcElement: techTracks\n        };\n        techTracks.trigger(event);\n\n        // if we are a text track change event, we should also notify the\n        // remote text track list. This can potentially cause a false positive\n        // if we were to get a change event on a non-remote track and\n        // we triggered the event on the remote text track list which doesn't\n        // contain that track. However, best practices mean looping through the\n        // list of tracks and searching for the appropriate mode value, so,\n        // this shouldn't pose an issue\n        if (name === 'text') {\n          this[REMOTE.remoteText.getterName]().trigger(event);\n        }\n      },\n      addtrack(e) {\n        techTracks.addTrack(e.track);\n      },\n      removetrack(e) {\n        techTracks.removeTrack(e.track);\n      }\n    };\n    const removeOldTracks = function () {\n      const removeTracks = [];\n      for (let i = 0; i < techTracks.length; i++) {\n        let found = false;\n        for (let j = 0; j < elTracks.length; j++) {\n          if (elTracks[j] === techTracks[i]) {\n            found = true;\n            break;\n          }\n        }\n        if (!found) {\n          removeTracks.push(techTracks[i]);\n        }\n      }\n      while (removeTracks.length) {\n        techTracks.removeTrack(removeTracks.shift());\n      }\n    };\n    this[props.getterName + 'Listeners_'] = listeners;\n    Object.keys(listeners).forEach(eventName => {\n      const listener = listeners[eventName];\n      elTracks.addEventListener(eventName, listener);\n      this.on('dispose', e => elTracks.removeEventListener(eventName, listener));\n    });\n\n    // Remove (native) tracks that are not used anymore\n    this.on('loadstart', removeOldTracks);\n    this.on('dispose', e => this.off('loadstart', removeOldTracks));\n  }\n\n  /**\n   * Proxy all native track list events to our track lists if the browser we are playing\n   * in supports that type of track list.\n   *\n   * @private\n   */\n  proxyNativeTracks_() {\n    NORMAL.names.forEach(name => {\n      this.proxyNativeTracksForType_(name);\n    });\n  }\n\n  /**\n   * Create the `Html5` Tech's DOM element.\n   *\n   * @return {Element}\n   *         The element that gets created.\n   */\n  createEl() {\n    let el = this.options_.tag;\n\n    // Check if this browser supports moving the element into the box.\n    // On the iPhone video will break if you move the element,\n    // So we have to create a brand new element.\n    // If we ingested the player div, we do not need to move the media element.\n    if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\n      // If the original tag is still there, clone and remove it.\n      if (el) {\n        const clone = el.cloneNode(true);\n        if (el.parentNode) {\n          el.parentNode.insertBefore(clone, el);\n        }\n        Html5.disposeMediaElement(el);\n        el = clone;\n      } else {\n        el = document$1.createElement('video');\n\n        // determine if native controls should be used\n        const tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\n        const attributes = merge$1({}, tagAttributes);\n        if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n          delete attributes.controls;\n        }\n        setAttributes(el, Object.assign(attributes, {\n          id: this.options_.techId,\n          class: 'vjs-tech'\n        }));\n      }\n      el.playerId = this.options_.playerId;\n    }\n    if (typeof this.options_.preload !== 'undefined') {\n      setAttribute(el, 'preload', this.options_.preload);\n    }\n    if (this.options_.disablePictureInPicture !== undefined) {\n      el.disablePictureInPicture = this.options_.disablePictureInPicture;\n    }\n\n    // Update specific tag settings, in case they were overridden\n    // `autoplay` has to be *last* so that `muted` and `playsinline` are present\n    // when iOS/Safari or other browsers attempt to autoplay.\n    const settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\n    for (let i = 0; i < settingsAttrs.length; i++) {\n      const attr = settingsAttrs[i];\n      const value = this.options_[attr];\n      if (typeof value !== 'undefined') {\n        if (value) {\n          setAttribute(el, attr, attr);\n        } else {\n          removeAttribute(el, attr);\n        }\n        el[attr] = value;\n      }\n    }\n    return el;\n  }\n\n  /**\n   * This will be triggered if the loadstart event has already fired, before videojs was\n   * ready. Two known examples of when this can happen are:\n   * 1. If we're loading the playback object after it has started loading\n   * 2. The media is already playing the (often with autoplay on) then\n   *\n   * This function will fire another loadstart so that videojs can catchup.\n   *\n   * @fires Tech#loadstart\n   *\n   * @return {undefined}\n   *         returns nothing.\n   */\n  handleLateInit_(el) {\n    if (el.networkState === 0 || el.networkState === 3) {\n      // The video element hasn't started loading the source yet\n      // or didn't find a source\n      return;\n    }\n    if (el.readyState === 0) {\n      // NetworkState is set synchronously BUT loadstart is fired at the\n      // end of the current stack, usually before setInterval(fn, 0).\n      // So at this point we know loadstart may have already fired or is\n      // about to fire, and either way the player hasn't seen it yet.\n      // We don't want to fire loadstart prematurely here and cause a\n      // double loadstart so we'll wait and see if it happens between now\n      // and the next loop, and fire it if not.\n      // HOWEVER, we also want to make sure it fires before loadedmetadata\n      // which could also happen between now and the next loop, so we'll\n      // watch for that also.\n      let loadstartFired = false;\n      const setLoadstartFired = function () {\n        loadstartFired = true;\n      };\n      this.on('loadstart', setLoadstartFired);\n      const triggerLoadstart = function () {\n        // We did miss the original loadstart. Make sure the player\n        // sees loadstart before loadedmetadata\n        if (!loadstartFired) {\n          this.trigger('loadstart');\n        }\n      };\n      this.on('loadedmetadata', triggerLoadstart);\n      this.ready(function () {\n        this.off('loadstart', setLoadstartFired);\n        this.off('loadedmetadata', triggerLoadstart);\n        if (!loadstartFired) {\n          // We did miss the original native loadstart. Fire it now.\n          this.trigger('loadstart');\n        }\n      });\n      return;\n    }\n\n    // From here on we know that loadstart already fired and we missed it.\n    // The other readyState events aren't as much of a problem if we double\n    // them, so not going to go to as much trouble as loadstart to prevent\n    // that unless we find reason to.\n    const eventsToTrigger = ['loadstart'];\n\n    // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n    eventsToTrigger.push('loadedmetadata');\n\n    // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n    if (el.readyState >= 2) {\n      eventsToTrigger.push('loadeddata');\n    }\n\n    // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n    if (el.readyState >= 3) {\n      eventsToTrigger.push('canplay');\n    }\n\n    // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n    if (el.readyState >= 4) {\n      eventsToTrigger.push('canplaythrough');\n    }\n\n    // We still need to give the player time to add event listeners\n    this.ready(function () {\n      eventsToTrigger.forEach(function (type) {\n        this.trigger(type);\n      }, this);\n    });\n  }\n\n  /**\n   * Set whether we are scrubbing or not.\n   * This is used to decide whether we should use `fastSeek` or not.\n   * `fastSeek` is used to provide trick play on Safari browsers.\n   *\n   * @param {boolean} isScrubbing\n   *                  - true for we are currently scrubbing\n   *                  - false for we are no longer scrubbing\n   */\n  setScrubbing(isScrubbing) {\n    this.isScrubbing_ = isScrubbing;\n  }\n\n  /**\n   * Get whether we are scrubbing or not.\n   *\n   * @return {boolean} isScrubbing\n   *                  - true for we are currently scrubbing\n   *                  - false for we are no longer scrubbing\n   */\n  scrubbing() {\n    return this.isScrubbing_;\n  }\n\n  /**\n   * Set current time for the `HTML5` tech.\n   *\n   * @param {number} seconds\n   *        Set the current time of the media to this.\n   */\n  setCurrentTime(seconds) {\n    try {\n      if (this.isScrubbing_ && this.el_.fastSeek && IS_ANY_SAFARI) {\n        this.el_.fastSeek(seconds);\n      } else {\n        this.el_.currentTime = seconds;\n      }\n    } catch (e) {\n      log$1(e, 'Video is not ready. (Video.js)');\n      // this.warning(VideoJS.warnings.videoNotReady);\n    }\n  }\n\n  /**\n   * Get the current duration of the HTML5 media element.\n   *\n   * @return {number}\n   *         The duration of the media or 0 if there is no duration.\n   */\n  duration() {\n    // Android Chrome will report duration as Infinity for VOD HLS until after\n    // playback has started, which triggers the live display erroneously.\n    // Return NaN if playback has not started and trigger a durationupdate once\n    // the duration can be reliably known.\n    if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\n      // Wait for the first `timeupdate` with currentTime > 0 - there may be\n      // several with 0\n      const checkProgress = () => {\n        if (this.el_.currentTime > 0) {\n          // Trigger durationchange for genuinely live video\n          if (this.el_.duration === Infinity) {\n            this.trigger('durationchange');\n          }\n          this.off('timeupdate', checkProgress);\n        }\n      };\n      this.on('timeupdate', checkProgress);\n      return NaN;\n    }\n    return this.el_.duration || NaN;\n  }\n\n  /**\n   * Get the current width of the HTML5 media element.\n   *\n   * @return {number}\n   *         The width of the HTML5 media element.\n   */\n  width() {\n    return this.el_.offsetWidth;\n  }\n\n  /**\n   * Get the current height of the HTML5 media element.\n   *\n   * @return {number}\n   *         The height of the HTML5 media element.\n   */\n  height() {\n    return this.el_.offsetHeight;\n  }\n\n  /**\n   * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\n   * `fullscreenchange` event.\n   *\n   * @private\n   * @fires fullscreenchange\n   * @listens webkitendfullscreen\n   * @listens webkitbeginfullscreen\n   * @listens webkitbeginfullscreen\n   */\n  proxyWebkitFullscreen_() {\n    if (!('webkitDisplayingFullscreen' in this.el_)) {\n      return;\n    }\n    const endFn = function () {\n      this.trigger('fullscreenchange', {\n        isFullscreen: false\n      });\n      // Safari will sometimes set controls on the videoelement when existing fullscreen.\n      if (this.el_.controls && !this.options_.nativeControlsForTouch && this.controls()) {\n        this.el_.controls = false;\n      }\n    };\n    const beginFn = function () {\n      if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\n        this.one('webkitendfullscreen', endFn);\n        this.trigger('fullscreenchange', {\n          isFullscreen: true,\n          // set a flag in case another tech triggers fullscreenchange\n          nativeIOSFullscreen: true\n        });\n      }\n    };\n    this.on('webkitbeginfullscreen', beginFn);\n    this.on('dispose', () => {\n      this.off('webkitbeginfullscreen', beginFn);\n      this.off('webkitendfullscreen', endFn);\n    });\n  }\n\n  /**\n   * Check if fullscreen is supported on the video el.\n   *\n   * @return {boolean}\n   *         - True if fullscreen is supported.\n   *         - False if fullscreen is not supported.\n   */\n  supportsFullScreen() {\n    return typeof this.el_.webkitEnterFullScreen === 'function';\n  }\n\n  /**\n   * Request that the `HTML5` Tech enter fullscreen.\n   */\n  enterFullScreen() {\n    const video = this.el_;\n    if (video.paused && video.networkState <= video.HAVE_METADATA) {\n      // attempt to prime the video element for programmatic access\n      // this isn't necessary on the desktop but shouldn't hurt\n      silencePromise(this.el_.play());\n\n      // playing and pausing synchronously during the transition to fullscreen\n      // can get iOS ~6.1 devices into a play/pause loop\n      this.setTimeout(function () {\n        video.pause();\n        try {\n          video.webkitEnterFullScreen();\n        } catch (e) {\n          this.trigger('fullscreenerror', e);\n        }\n      }, 0);\n    } else {\n      try {\n        video.webkitEnterFullScreen();\n      } catch (e) {\n        this.trigger('fullscreenerror', e);\n      }\n    }\n  }\n\n  /**\n   * Request that the `HTML5` Tech exit fullscreen.\n   */\n  exitFullScreen() {\n    if (!this.el_.webkitDisplayingFullscreen) {\n      this.trigger('fullscreenerror', new Error('The video is not fullscreen'));\n      return;\n    }\n    this.el_.webkitExitFullScreen();\n  }\n\n  /**\n   * Create a floating video window always on top of other windows so that users may\n   * continue consuming media while they interact with other content sites, or\n   * applications on their device.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @return {Promise}\n   *         A promise with a Picture-in-Picture window.\n   */\n  requestPictureInPicture() {\n    return this.el_.requestPictureInPicture();\n  }\n\n  /**\n   * Native requestVideoFrameCallback if supported by browser/tech, or fallback\n   * Don't use rVCF on Safari when DRM is playing, as it doesn't fire\n   * Needs to be checked later than the constructor\n   * This will be a false positive for clear sources loaded after a Fairplay source\n   *\n   * @param {function} cb function to call\n   * @return {number} id of request\n   */\n  requestVideoFrameCallback(cb) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      return this.el_.requestVideoFrameCallback(cb);\n    }\n    return super.requestVideoFrameCallback(cb);\n  }\n\n  /**\n   * Native or fallback requestVideoFrameCallback\n   *\n   * @param {number} id request id to cancel\n   */\n  cancelVideoFrameCallback(id) {\n    if (this.featuresVideoFrameCallback && !this.el_.webkitKeys) {\n      this.el_.cancelVideoFrameCallback(id);\n    } else {\n      super.cancelVideoFrameCallback(id);\n    }\n  }\n\n  /**\n   * A getter/setter for the `Html5` Tech's source object.\n   * > Note: Please use {@link Html5#setSource}\n   *\n   * @param {Tech~SourceObject} [src]\n   *        The source object you want to set on the `HTML5` techs element.\n   *\n   * @return {Tech~SourceObject|undefined}\n   *         - The current source object when a source is not passed in.\n   *         - undefined when setting\n   *\n   * @deprecated Since version 5.\n   */\n  src(src) {\n    if (src === undefined) {\n      return this.el_.src;\n    }\n\n    // Setting src through `src` instead of `setSrc` will be deprecated\n    this.setSrc(src);\n  }\n\n  /**\n   * Add a <source> element to the <video> element.\n   *\n   * @param {string} srcUrl\n   *        The URL of the video source.\n   *\n   * @param {string} [mimeType]\n   *        The MIME type of the video source. Optional but recommended.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully added, false otherwise.\n   */\n  addSourceElement(srcUrl, mimeType) {\n    if (!srcUrl) {\n      log$1.error('Invalid source URL.');\n      return false;\n    }\n    const sourceAttributes = {\n      src: srcUrl\n    };\n    if (mimeType) {\n      sourceAttributes.type = mimeType;\n    }\n    const sourceElement = createEl('source', {}, sourceAttributes);\n    this.el_.appendChild(sourceElement);\n    return true;\n  }\n\n  /**\n   * Remove a <source> element from the <video> element by its URL.\n   *\n   * @param {string} srcUrl\n   *        The URL of the source to remove.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully removed, false otherwise.\n   */\n  removeSourceElement(srcUrl) {\n    if (!srcUrl) {\n      log$1.error('Source URL is required to remove the source element.');\n      return false;\n    }\n    const sourceElements = this.el_.querySelectorAll('source');\n    for (const sourceElement of sourceElements) {\n      if (sourceElement.src === srcUrl) {\n        this.el_.removeChild(sourceElement);\n        return true;\n      }\n    }\n    log$1.warn(`No matching source element found with src: ${srcUrl}`);\n    return false;\n  }\n\n  /**\n   * Reset the tech by removing all sources and then calling\n   * {@link Html5.resetMediaElement}.\n   */\n  reset() {\n    Html5.resetMediaElement(this.el_);\n  }\n\n  /**\n   * Get the current source on the `HTML5` Tech. Falls back to returning the source from\n   * the HTML5 media element.\n   *\n   * @return {Tech~SourceObject}\n   *         The current source object from the HTML5 tech. With a fallback to the\n   *         elements source.\n   */\n  currentSrc() {\n    if (this.currentSource_) {\n      return this.currentSource_.src;\n    }\n    return this.el_.currentSrc;\n  }\n\n  /**\n   * Set controls attribute for the HTML5 media Element.\n   *\n   * @param {string} val\n   *        Value to set the controls attribute to\n   */\n  setControls(val) {\n    this.el_.controls = !!val;\n  }\n\n  /**\n   * Create and returns a remote {@link TextTrack} object.\n   *\n   * @param {string} kind\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\n   *\n   * @param {string} [label]\n   *        Label to identify the text track\n   *\n   * @param {string} [language]\n   *        Two letter language abbreviation\n   *\n   * @return {TextTrack}\n   *         The TextTrack that gets created.\n   */\n  addTextTrack(kind, label, language) {\n    if (!this.featuresNativeTextTracks) {\n      return super.addTextTrack(kind, label, language);\n    }\n    return this.el_.addTextTrack(kind, label, language);\n  }\n\n  /**\n   * Creates either native TextTrack or an emulated TextTrack depending\n   * on the value of `featuresNativeTextTracks`\n   *\n   * @param {Object} options\n   *        The object should contain the options to initialize the TextTrack with.\n   *\n   * @param {string} [options.kind]\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\n   *\n   * @param {string} [options.label]\n   *        Label to identify the text track\n   *\n   * @param {string} [options.language]\n   *        Two letter language abbreviation.\n   *\n   * @param {boolean} [options.default]\n   *        Default this track to on.\n   *\n   * @param {string} [options.id]\n   *        The internal id to assign this track.\n   *\n   * @param {string} [options.src]\n   *        A source url for the track.\n   *\n   * @return {HTMLTrackElement}\n   *         The track element that gets created.\n   */\n  createRemoteTextTrack(options) {\n    if (!this.featuresNativeTextTracks) {\n      return super.createRemoteTextTrack(options);\n    }\n    const htmlTrackElement = document$1.createElement('track');\n    if (options.kind) {\n      htmlTrackElement.kind = options.kind;\n    }\n    if (options.label) {\n      htmlTrackElement.label = options.label;\n    }\n    if (options.language || options.srclang) {\n      htmlTrackElement.srclang = options.language || options.srclang;\n    }\n    if (options.default) {\n      htmlTrackElement.default = options.default;\n    }\n    if (options.id) {\n      htmlTrackElement.id = options.id;\n    }\n    if (options.src) {\n      htmlTrackElement.src = options.src;\n    }\n    return htmlTrackElement;\n  }\n\n  /**\n   * Creates a remote text track object and returns an html track element.\n   *\n   * @param {Object} options The object should contain values for\n   * kind, language, label, and src (location of the WebVTT file)\n   * @param {boolean} [manualCleanup=false] if set to true, the TextTrack\n   * will not be removed from the TextTrackList and HtmlTrackElementList\n   * after a source change\n   * @return {HTMLTrackElement} An Html Track Element.\n   * This can be an emulated {@link HTMLTrackElement} or a native one.\n   *\n   */\n  addRemoteTextTrack(options, manualCleanup) {\n    const htmlTrackElement = super.addRemoteTextTrack(options, manualCleanup);\n    if (this.featuresNativeTextTracks) {\n      this.el().appendChild(htmlTrackElement);\n    }\n    return htmlTrackElement;\n  }\n\n  /**\n   * Remove remote `TextTrack` from `TextTrackList` object\n   *\n   * @param {TextTrack} track\n   *        `TextTrack` object to remove\n   */\n  removeRemoteTextTrack(track) {\n    super.removeRemoteTextTrack(track);\n    if (this.featuresNativeTextTracks) {\n      const tracks = this.$$('track');\n      let i = tracks.length;\n      while (i--) {\n        if (track === tracks[i] || track === tracks[i].track) {\n          this.el().removeChild(tracks[i]);\n        }\n      }\n    }\n  }\n\n  /**\n   * Gets available media playback quality metrics as specified by the W3C's Media\n   * Playback Quality API.\n   *\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n   *\n   * @return {Object}\n   *         An object with supported media playback quality metrics\n   */\n  getVideoPlaybackQuality() {\n    if (typeof this.el().getVideoPlaybackQuality === 'function') {\n      return this.el().getVideoPlaybackQuality();\n    }\n    const videoPlaybackQuality = {};\n    if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\n      videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\n      videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\n    }\n    if (window$1.performance) {\n      videoPlaybackQuality.creationTime = window$1.performance.now();\n    }\n    return videoPlaybackQuality;\n  }\n}\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/**\n * Element for testing browser HTML5 media capabilities\n *\n * @type {Element}\n * @constant\n * @private\n */\ndefineLazyProperty(Html5, 'TEST_VID', function () {\n  if (!isReal()) {\n    return;\n  }\n  const video = document$1.createElement('video');\n  const track = document$1.createElement('track');\n  track.kind = 'captions';\n  track.srclang = 'en';\n  track.label = 'English';\n  video.appendChild(track);\n  return video;\n});\n\n/**\n * Check if HTML5 media is supported by this browser/device.\n *\n * @return {boolean}\n *         - True if HTML5 media is supported.\n *         - False if HTML5 media is not supported.\n */\nHtml5.isSupported = function () {\n  // IE with no Media Player is a LIAR! (#984)\n  try {\n    Html5.TEST_VID.volume = 0.5;\n  } catch (e) {\n    return false;\n  }\n  return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\n};\n\n/**\n * Check if the tech can support the given type\n *\n * @param {string} type\n *        The mimetype to check\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.canPlayType = function (type) {\n  return Html5.TEST_VID.canPlayType(type);\n};\n\n/**\n * Check if the tech can support the given source\n *\n * @param {Object} srcObj\n *        The source object\n * @param {Object} options\n *        The options passed to the tech\n * @return {string} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.canPlaySource = function (srcObj, options) {\n  return Html5.canPlayType(srcObj.type);\n};\n\n/**\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {boolean}\n *         - True if volume can be controlled\n *         - False otherwise\n */\nHtml5.canControlVolume = function () {\n  // IE will error if Windows Media Player not installed #3315\n  try {\n    const volume = Html5.TEST_VID.volume;\n    Html5.TEST_VID.volume = volume / 2 + 0.1;\n    const canControl = volume !== Html5.TEST_VID.volume;\n\n    // With the introduction of iOS 15, there are cases where the volume is read as\n    // changed but reverts back to its original state at the start of the next tick.\n    // To determine whether volume can be controlled on iOS,\n    // a timeout is set and the volume is checked asynchronously.\n    // Since `features` doesn't currently work asynchronously, the value is manually set.\n    if (canControl && IS_IOS) {\n      window$1.setTimeout(() => {\n        if (Html5 && Html5.prototype) {\n          Html5.prototype.featuresVolumeControl = volume !== Html5.TEST_VID.volume;\n        }\n      });\n\n      // default iOS to false, which will be updated in the timeout above.\n      return false;\n    }\n    return canControl;\n  } catch (e) {\n    return false;\n  }\n};\n\n/**\n * Check if the volume can be muted in this browser/device.\n * Some devices, e.g. iOS, don't allow changing volume\n * but permits muting/unmuting.\n *\n * @return {boolean}\n *      - True if volume can be muted\n *      - False otherwise\n */\nHtml5.canMuteVolume = function () {\n  try {\n    const muted = Html5.TEST_VID.muted;\n\n    // in some versions of iOS muted property doesn't always\n    // work, so we want to set both property and attribute\n    Html5.TEST_VID.muted = !muted;\n    if (Html5.TEST_VID.muted) {\n      setAttribute(Html5.TEST_VID, 'muted', 'muted');\n    } else {\n      removeAttribute(Html5.TEST_VID, 'muted', 'muted');\n    }\n    return muted !== Html5.TEST_VID.muted;\n  } catch (e) {\n    return false;\n  }\n};\n\n/**\n * Check if the playback rate can be changed in this browser/device.\n *\n * @return {boolean}\n *         - True if playback rate can be controlled\n *         - False otherwise\n */\nHtml5.canControlPlaybackRate = function () {\n  // Playback rate API is implemented in Android Chrome, but doesn't do anything\n  // https://github.com/videojs/video.js/issues/3180\n  if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\n    return false;\n  }\n  // IE will error if Windows Media Player not installed #3315\n  try {\n    const playbackRate = Html5.TEST_VID.playbackRate;\n    Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\n    return playbackRate !== Html5.TEST_VID.playbackRate;\n  } catch (e) {\n    return false;\n  }\n};\n\n/**\n * Check if we can override a video/audio elements attributes, with\n * Object.defineProperty.\n *\n * @return {boolean}\n *         - True if builtin attributes can be overridden\n *         - False otherwise\n */\nHtml5.canOverrideAttributes = function () {\n  // if we cannot overwrite the src/innerHTML property, there is no support\n  // iOS 7 safari for instance cannot do this.\n  try {\n    const noop = () => {};\n    Object.defineProperty(document$1.createElement('video'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document$1.createElement('audio'), 'src', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document$1.createElement('video'), 'innerHTML', {\n      get: noop,\n      set: noop\n    });\n    Object.defineProperty(document$1.createElement('audio'), 'innerHTML', {\n      get: noop,\n      set: noop\n    });\n  } catch (e) {\n    return false;\n  }\n  return true;\n};\n\n/**\n * Check to see if native `TextTrack`s are supported by this browser/device.\n *\n * @return {boolean}\n *         - True if native `TextTrack`s are supported.\n *         - False otherwise\n */\nHtml5.supportsNativeTextTracks = function () {\n  return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\n};\n\n/**\n * Check to see if native `VideoTrack`s are supported by this browser/device\n *\n * @return {boolean}\n *        - True if native `VideoTrack`s are supported.\n *        - False otherwise\n */\nHtml5.supportsNativeVideoTracks = function () {\n  return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\n};\n\n/**\n * Check to see if native `AudioTrack`s are supported by this browser/device\n *\n * @return {boolean}\n *        - True if native `AudioTrack`s are supported.\n *        - False otherwise\n */\nHtml5.supportsNativeAudioTracks = function () {\n  return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\n\n/**\n * Boolean indicating whether the `Tech` supports volume control.\n *\n * @type {boolean}\n * @default {@link Html5.canControlVolume}\n */\n/**\n * Boolean indicating whether the `Tech` supports muting volume.\n *\n * @type {boolean}\n * @default {@link Html5.canMuteVolume}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports changing the speed at which the media\n * plays. Examples:\n *   - Set player to play 2x (twice) as fast\n *   - Set player to play 0.5x (half) as fast\n *\n * @type {boolean}\n * @default {@link Html5.canControlPlaybackRate}\n */\n\n/**\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\n *\n * @type {boolean}\n * @default\n */\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeTextTracks}\n */\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeVideoTracks}\n */\n/**\n * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\n *\n * @type {boolean}\n * @default {@link Html5.supportsNativeAudioTracks}\n */\n[['featuresMuteControl', 'canMuteVolume'], ['featuresPlaybackRate', 'canControlPlaybackRate'], ['featuresSourceset', 'canOverrideAttributes'], ['featuresNativeTextTracks', 'supportsNativeTextTracks'], ['featuresNativeVideoTracks', 'supportsNativeVideoTracks'], ['featuresNativeAudioTracks', 'supportsNativeAudioTracks']].forEach(function ([key, fn]) {\n  defineLazyProperty(Html5.prototype, key, () => Html5[fn](), true);\n});\nHtml5.prototype.featuresVolumeControl = Html5.canControlVolume();\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the media element\n * moving in the DOM. iOS breaks if you move the media element, so this is set this to\n * false there. Everywhere else this should be true.\n *\n * @type {boolean}\n * @default\n */\nHtml5.prototype.movingMediaElementInDOM = !IS_IOS;\n\n// TODO: Previous comment: No longer appears to be used. Can probably be removed.\n//       Is this true?\n/**\n * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\n * when going into fullscreen.\n *\n * @type {boolean}\n * @default\n */\nHtml5.prototype.featuresFullscreenResize = true;\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the progress event.\n * If this is false, manual `progress` events will be triggered instead.\n *\n * @type {boolean}\n * @default\n */\nHtml5.prototype.featuresProgressEvents = true;\n\n/**\n * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\n * If this is false, manual `timeupdate` events will be triggered instead.\n *\n * @default\n */\nHtml5.prototype.featuresTimeupdateEvents = true;\n\n/**\n * Whether the HTML5 el supports `requestVideoFrameCallback`\n *\n * @type {boolean}\n */\nHtml5.prototype.featuresVideoFrameCallback = !!(Html5.TEST_VID && Html5.TEST_VID.requestVideoFrameCallback);\nHtml5.disposeMediaElement = function (el) {\n  if (!el) {\n    return;\n  }\n  if (el.parentNode) {\n    el.parentNode.removeChild(el);\n  }\n\n  // remove any child track or source nodes to prevent their loading\n  while (el.hasChildNodes()) {\n    el.removeChild(el.firstChild);\n  }\n\n  // remove any src reference. not setting `src=''` because that causes a warning\n  // in firefox\n  el.removeAttribute('src');\n\n  // force the media element to update its loading state by calling load()\n  // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n  if (typeof el.load === 'function') {\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n    (function () {\n      try {\n        el.load();\n      } catch (e) {\n        // not supported\n      }\n    })();\n  }\n};\nHtml5.resetMediaElement = function (el) {\n  if (!el) {\n    return;\n  }\n  const sources = el.querySelectorAll('source');\n  let i = sources.length;\n  while (i--) {\n    el.removeChild(sources[i]);\n  }\n\n  // remove any src reference.\n  // not setting `src=''` because that throws an error\n  el.removeAttribute('src');\n  if (typeof el.load === 'function') {\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n    (function () {\n      try {\n        el.load();\n      } catch (e) {\n        // satisfy linter\n      }\n    })();\n  }\n};\n\n/* Native HTML5 element property wrapping ----------------------------------- */\n// Wrap native boolean attributes with getters that check both property and attribute\n// The list is as followed:\n// muted, defaultMuted, autoplay, controls, loop, playsinline\n[\n/**\n * Get the value of `muted` from the media element. `muted` indicates\n * that the volume for the media should be set to silent. This does not actually change\n * the `volume` attribute.\n *\n * @method Html5#muted\n * @return {boolean}\n *         - True if the value of `volume` should be ignored and the audio set to silent.\n *         - False if the value of `volume` should be used.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\n * whether the media should start muted or not. Only changes the default state of the\n * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\n * current state.\n *\n * @method Html5#defaultMuted\n * @return {boolean}\n *         - The value of `defaultMuted` from the media element.\n *         - True indicates that the media should start muted.\n *         - False indicates that the media should not start muted\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Get the value of `autoplay` from the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#autoplay\n * @return {boolean}\n *         - The value of `autoplay` from the media element.\n *         - True indicates that the media should start as soon as the page loads.\n *         - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Get the value of `controls` from the media element. `controls` indicates\n * whether the native media controls should be shown or hidden.\n *\n * @method Html5#controls\n * @return {boolean}\n *         - The value of `controls` from the media element.\n *         - True indicates that native controls should be showing.\n *         - False indicates that native controls should be hidden.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\n */\n'controls',\n/**\n * Get the value of `loop` from the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#loop\n * @return {boolean}\n *         - The value of `loop` from the media element.\n *         - True indicates that playback should seek back to start once\n *           the end of a media is reached.\n *         - False indicates that playback should not loop back to the start when the\n *           end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Get the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#playsinline\n * @return {boolean}\n *         - The value of `playsinline` from the media element.\n *         - True indicates that the media should play inline.\n *         - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n  Html5.prototype[prop] = function () {\n    return this.el_[prop] || this.el_.hasAttribute(prop);\n  };\n});\n\n// Wrap native boolean attributes with setters that set both property and attribute\n// The list is as followed:\n// setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\n// setControls is special-cased above\n[\n/**\n * Set the value of `muted` on the media element. `muted` indicates that the current\n * audio level should be silent.\n *\n * @method Html5#setMuted\n * @param {boolean} muted\n *        - True if the audio should be set to silent\n *        - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\n */\n'muted',\n/**\n * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\n * audio level should be silent, but will only effect the muted level on initial playback..\n *\n * @method Html5.prototype.setDefaultMuted\n * @param {boolean} defaultMuted\n *        - True if the audio should be set to silent\n *        - False otherwise\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\n */\n'defaultMuted',\n/**\n * Set the value of `autoplay` on the media element. `autoplay` indicates\n * that the media should start to play as soon as the page is ready.\n *\n * @method Html5#setAutoplay\n * @param {boolean} autoplay\n *         - True indicates that the media should start as soon as the page loads.\n *         - False indicates that the media should not start as soon as the page loads.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\n */\n'autoplay',\n/**\n * Set the value of `loop` on the media element. `loop` indicates\n * that the media should return to the start of the media and continue playing once\n * it reaches the end.\n *\n * @method Html5#setLoop\n * @param {boolean} loop\n *         - True indicates that playback should seek back to start once\n *           the end of a media is reached.\n *         - False indicates that playback should not loop back to the start when the\n *           end of the media is reached.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\n */\n'loop',\n/**\n * Set the value of `playsinline` from the media element. `playsinline` indicates\n * to the browser that non-fullscreen playback is preferred when fullscreen\n * playback is the native default, such as in iOS Safari.\n *\n * @method Html5#setPlaysinline\n * @param {boolean} playsinline\n *         - True indicates that the media should play inline.\n *         - False indicates that the media should not play inline.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n */\n'playsinline'].forEach(function (prop) {\n  Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n    this.el_[prop] = v;\n    if (v) {\n      this.el_.setAttribute(prop, prop);\n    } else {\n      this.el_.removeAttribute(prop);\n    }\n  };\n});\n\n// Wrap native properties with a getter\n// The list is as followed\n// paused, currentTime, buffered, volume, poster, preload, error, seeking\n// seekable, ended, playbackRate, defaultPlaybackRate, disablePictureInPicture\n// played, networkState, readyState, videoWidth, videoHeight, crossOrigin\n[\n/**\n * Get the value of `paused` from the media element. `paused` indicates whether the media element\n * is currently paused or not.\n *\n * @method Html5#paused\n * @return {boolean}\n *         The value of `paused` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\n */\n'paused',\n/**\n * Get the value of `currentTime` from the media element. `currentTime` indicates\n * the current second that the media is at in playback.\n *\n * @method Html5#currentTime\n * @return {number}\n *         The value of `currentTime` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\n */\n'currentTime',\n/**\n * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\n * object that represents the parts of the media that are already downloaded and\n * available for playback.\n *\n * @method Html5#buffered\n * @return {TimeRange}\n *         The value of `buffered` from the media element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\n */\n'buffered',\n/**\n * Get the value of `volume` from the media element. `volume` indicates\n * the current playback volume of audio for a media. `volume` will be a value from 0\n * (silent) to 1 (loudest and default).\n *\n * @method Html5#volume\n * @return {number}\n *         The value of `volume` from the media element. Value will be between 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Get the value of `poster` from the media element. `poster` indicates\n * that the url of an image file that can/will be shown when no media data is available.\n *\n * @method Html5#poster\n * @return {string}\n *         The value of `poster` from the media element. Value will be a url to an\n *         image.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\n */\n'poster',\n/**\n * Get the value of `preload` from the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n *   media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n *    interaction\n *\n * @method Html5#preload\n * @return {string}\n *         The value of `preload` from the media element. Will be 'none', 'metadata',\n *         or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Get the value of the `error` from the media element. `error` indicates any\n * MediaError that may have occurred during playback. If error returns null there is no\n * current error.\n *\n * @method Html5#error\n * @return {MediaError|null}\n *         The value of `error` from the media element. Will be `MediaError` if there\n *         is a current error and null otherwise.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\n */\n'error',\n/**\n * Get the value of `seeking` from the media element. `seeking` indicates whether the\n * media is currently seeking to a new position or not.\n *\n * @method Html5#seeking\n * @return {boolean}\n *         - The value of `seeking` from the media element.\n *         - True indicates that the media is currently seeking to a new position.\n *         - False indicates that the media is not seeking to a new position at this time.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\n */\n'seeking',\n/**\n * Get the value of `seekable` from the media element. `seekable` returns a\n * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\n *\n * @method Html5#seekable\n * @return {TimeRange}\n *         The value of `seekable` from the media element. A `TimeRange` object\n *         indicating the current ranges of time that can be seeked to.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\n */\n'seekable',\n/**\n * Get the value of `ended` from the media element. `ended` indicates whether\n * the media has reached the end or not.\n *\n * @method Html5#ended\n * @return {boolean}\n *         - The value of `ended` from the media element.\n *         - True indicates that the media has ended.\n *         - False indicates that the media has not ended.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\n */\n'ended',\n/**\n * Get the value of `playbackRate` from the media element. `playbackRate` indicates\n * the rate at which the media is currently playing back. Examples:\n *   - if playbackRate is set to 2, media will play twice as fast.\n *   - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#playbackRate\n * @return {number}\n *         The value of `playbackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\n * the rate at which the media is currently playing back. This value will not indicate the current\n * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\n *\n * Examples:\n *   - if defaultPlaybackRate is set to 2, media will play twice as fast.\n *   - if defaultPlaybackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.defaultPlaybackRate\n * @return {number}\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'defaultPlaybackRate',\n/**\n * Get the value of 'disablePictureInPicture' from the video element.\n *\n * @method Html5#disablePictureInPicture\n * @return {boolean} value\n *         - The value of `disablePictureInPicture` from the video element.\n *         - True indicates that the video can't be played in Picture-In-Picture mode\n *         - False indicates that the video can be played in Picture-In-Picture mode\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n */\n'disablePictureInPicture',\n/**\n * Get the value of `played` from the media element. `played` returns a `TimeRange`\n * object representing points in the media timeline that have been played.\n *\n * @method Html5#played\n * @return {TimeRange}\n *         The value of `played` from the media element. A `TimeRange` object indicating\n *         the ranges of time that have been played.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\n */\n'played',\n/**\n * Get the value of `networkState` from the media element. `networkState` indicates\n * the current network state. It returns an enumeration from the following list:\n * - 0: NETWORK_EMPTY\n * - 1: NETWORK_IDLE\n * - 2: NETWORK_LOADING\n * - 3: NETWORK_NO_SOURCE\n *\n * @method Html5#networkState\n * @return {number}\n *         The value of `networkState` from the media element. This will be a number\n *         from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\n */\n'networkState',\n/**\n * Get the value of `readyState` from the media element. `readyState` indicates\n * the current state of the media element. It returns an enumeration from the\n * following list:\n * - 0: HAVE_NOTHING\n * - 1: HAVE_METADATA\n * - 2: HAVE_CURRENT_DATA\n * - 3: HAVE_FUTURE_DATA\n * - 4: HAVE_ENOUGH_DATA\n *\n * @method Html5#readyState\n * @return {number}\n *         The value of `readyState` from the media element. This will be a number\n *         from the list in the description.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\n */\n'readyState',\n/**\n * Get the value of `videoWidth` from the video element. `videoWidth` indicates\n * the current width of the video in css pixels.\n *\n * @method Html5#videoWidth\n * @return {number}\n *         The value of `videoWidth` from the video element. This will be a number\n *         in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoWidth',\n/**\n * Get the value of `videoHeight` from the video element. `videoHeight` indicates\n * the current height of the video in css pixels.\n *\n * @method Html5#videoHeight\n * @return {number}\n *         The value of `videoHeight` from the video element. This will be a number\n *         in css pixels.\n *\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\n */\n'videoHeight',\n/**\n * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates\n * to the browser that should sent the cookies along with the requests for the\n * different assets/playlists\n *\n * @method Html5#crossOrigin\n * @return {string}\n *         - anonymous indicates that the media should not sent cookies.\n *         - use-credentials indicates that the media should sent cookies along the requests.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n */\n'crossOrigin'].forEach(function (prop) {\n  Html5.prototype[prop] = function () {\n    return this.el_[prop];\n  };\n});\n\n// Wrap native properties with a setter in this format:\n// set + toTitleCase(name)\n// The list is as follows:\n// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate,\n// setDisablePictureInPicture, setCrossOrigin\n[\n/**\n * Set the value of `volume` on the media element. `volume` indicates the current\n * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\n * so on.\n *\n * @method Html5#setVolume\n * @param {number} percentAsDecimal\n *        The volume percent as a decimal. Valid range is from 0-1.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\n */\n'volume',\n/**\n * Set the value of `src` on the media element. `src` indicates the current\n * {@link Tech~SourceObject} for the media.\n *\n * @method Html5#setSrc\n * @param {Tech~SourceObject} src\n *        The source object to set as the current source.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\n */\n'src',\n/**\n * Set the value of `poster` on the media element. `poster` is the url to\n * an image file that can/will be shown when no media data is available.\n *\n * @method Html5#setPoster\n * @param {string} poster\n *        The url to an image that should be used as the `poster` for the media\n *        element.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\n */\n'poster',\n/**\n * Set the value of `preload` on the media element. `preload` indicates\n * what should download before the media is interacted with. It can have the following\n * values:\n * - none: nothing should be downloaded\n * - metadata: poster and the first few frames of the media may be downloaded to get\n *   media dimensions and other metadata\n * - auto: allow the media and metadata for the media to be downloaded before\n *    interaction\n *\n * @method Html5#setPreload\n * @param {string} preload\n *         The value of `preload` to set on the media element. Must be 'none', 'metadata',\n *         or 'auto'.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\n */\n'preload',\n/**\n * Set the value of `playbackRate` on the media element. `playbackRate` indicates\n * the rate at which the media should play back. Examples:\n *   - if playbackRate is set to 2, media will play twice as fast.\n *   - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5#setPlaybackRate\n * @return {number}\n *         The value of `playbackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\n */\n'playbackRate',\n/**\n * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\n * the rate at which the media should play back upon initial startup. Changing this value\n * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\n *\n * Example Values:\n *   - if playbackRate is set to 2, media will play twice as fast.\n *   - if playbackRate is set to 0.5, media will play half as fast.\n *\n * @method Html5.prototype.setDefaultPlaybackRate\n * @return {number}\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\n *         the current playback speed of the media, where 1 is normal speed.\n *\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\n */\n'defaultPlaybackRate',\n/**\n * Prevents the browser from suggesting a Picture-in-Picture context menu\n * or to request Picture-in-Picture automatically in some cases.\n *\n * @method Html5#setDisablePictureInPicture\n * @param {boolean} value\n *         The true value will disable Picture-in-Picture mode.\n *\n * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}\n */\n'disablePictureInPicture',\n/**\n * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates\n * to the browser that should sent the cookies along with the requests for the\n * different assets/playlists\n *\n * @method Html5#setCrossOrigin\n * @param {string} crossOrigin\n *         - anonymous indicates that the media should not sent cookies.\n *         - use-credentials indicates that the media should sent cookies along the requests.\n *\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\n */\n'crossOrigin'].forEach(function (prop) {\n  Html5.prototype['set' + toTitleCase$1(prop)] = function (v) {\n    this.el_[prop] = v;\n  };\n});\n\n// wrap native functions with a function\n// The list is as follows:\n// pause, load, play\n[\n/**\n * A wrapper around the media elements `pause` function. This will call the `HTML5`\n * media elements `pause` function.\n *\n * @method Html5#pause\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\n */\n'pause',\n/**\n * A wrapper around the media elements `load` function. This will call the `HTML5`s\n * media element `load` function.\n *\n * @method Html5#load\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\n */\n'load',\n/**\n * A wrapper around the media elements `play` function. This will call the `HTML5`s\n * media element `play` function.\n *\n * @method Html5#play\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\n */\n'play'].forEach(function (prop) {\n  Html5.prototype[prop] = function () {\n    return this.el_[prop]();\n  };\n});\nTech.withSourceHandlers(Html5);\n\n/**\n * Native source handler for Html5, simply passes the source to the media element.\n *\n * @property {Tech~SourceObject} source\n *        The source object\n *\n * @property {Html5} tech\n *        The instance of the HTML5 tech.\n */\nHtml5.nativeSourceHandler = {};\n\n/**\n * Check if the media element can play the given mime type.\n *\n * @param {string} type\n *        The mimetype to check\n *\n * @return {string}\n *         'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function (type) {\n  // IE without MediaPlayer throws an error (#519)\n  try {\n    return Html5.TEST_VID.canPlayType(type);\n  } catch (e) {\n    return '';\n  }\n};\n\n/**\n * Check if the media element can handle a source natively.\n *\n * @param {Tech~SourceObject} source\n *         The source object\n *\n * @param {Object} [options]\n *         Options to be passed to the tech.\n *\n * @return {string}\n *         'probably', 'maybe', or '' (empty string).\n */\nHtml5.nativeSourceHandler.canHandleSource = function (source, options) {\n  // If a type was provided we should rely on that\n  if (source.type) {\n    return Html5.nativeSourceHandler.canPlayType(source.type);\n\n    // If no type, fall back to checking 'video/[EXTENSION]'\n  } else if (source.src) {\n    const ext = getFileExtension(source.src);\n    return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n  }\n  return '';\n};\n\n/**\n * Pass the source to the native media element.\n *\n * @param {Tech~SourceObject} source\n *        The source object\n *\n * @param {Html5} tech\n *        The instance of the Html5 tech\n *\n * @param {Object} [options]\n *        The options to pass to the source\n */\nHtml5.nativeSourceHandler.handleSource = function (source, tech, options) {\n  tech.setSrc(source.src);\n};\n\n/**\n * A noop for the native dispose function, as cleanup is not needed.\n */\nHtml5.nativeSourceHandler.dispose = function () {};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\nTech.registerTech('Html5', Html5);\n\n/**\n * @file player.js\n */\n\n/** @import { TimeRange } from './utils/time' */\n/** @import HtmlTrackElement from './tracks/html-track-element' */\n\n/**\n * @callback PlayerReadyCallback\n * @this     {Player}\n * @returns  {void}\n */\n\n// The following tech events are simply re-triggered\n// on the player when they happen\nconst TECH_EVENTS_RETRIGGER = [\n/**\n * Fired while the user agent is downloading media data.\n *\n * @event Player#progress\n * @type {Event}\n */\n/**\n * Retrigger the `progress` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechProgress_\n * @fires Player#progress\n * @listens Tech#progress\n */\n'progress',\n/**\n * Fires when the loading of an audio/video is aborted.\n *\n * @event Player#abort\n * @type {Event}\n */\n/**\n * Retrigger the `abort` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechAbort_\n * @fires Player#abort\n * @listens Tech#abort\n */\n'abort',\n/**\n * Fires when the browser is intentionally not getting media data.\n *\n * @event Player#suspend\n * @type {Event}\n */\n/**\n * Retrigger the `suspend` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechSuspend_\n * @fires Player#suspend\n * @listens Tech#suspend\n */\n'suspend',\n/**\n * Fires when the current playlist is empty.\n *\n * @event Player#emptied\n * @type {Event}\n */\n/**\n * Retrigger the `emptied` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechEmptied_\n * @fires Player#emptied\n * @listens Tech#emptied\n */\n'emptied',\n/**\n * Fires when the browser is trying to get media data, but data is not available.\n *\n * @event Player#stalled\n * @type {Event}\n */\n/**\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechStalled_\n * @fires Player#stalled\n * @listens Tech#stalled\n */\n'stalled',\n/**\n * Fires when the browser has loaded meta data for the audio/video.\n *\n * @event Player#loadedmetadata\n * @type {Event}\n */\n/**\n * Retrigger the `loadedmetadata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoadedmetadata_\n * @fires Player#loadedmetadata\n * @listens Tech#loadedmetadata\n */\n'loadedmetadata',\n/**\n * Fires when the browser has loaded the current frame of the audio/video.\n *\n * @event Player#loadeddata\n * @type {event}\n */\n/**\n * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechLoaddeddata_\n * @fires Player#loadeddata\n * @listens Tech#loadeddata\n */\n'loadeddata',\n/**\n * Fires when the current playback position has changed.\n *\n * @event Player#timeupdate\n * @type {event}\n */\n/**\n * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTimeUpdate_\n * @fires Player#timeupdate\n * @listens Tech#timeupdate\n */\n'timeupdate',\n/**\n * Fires when the video's intrinsic dimensions change\n *\n * @event Player#resize\n * @type {event}\n */\n/**\n * Retrigger the `resize` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechResize_\n * @fires Player#resize\n * @listens Tech#resize\n */\n'resize',\n/**\n * Fires when the volume has been changed\n *\n * @event Player#volumechange\n * @type {event}\n */\n/**\n * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechVolumechange_\n * @fires Player#volumechange\n * @listens Tech#volumechange\n */\n'volumechange',\n/**\n * Fires when the text track has been changed\n *\n * @event Player#texttrackchange\n * @type {event}\n */\n/**\n * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\n *\n * @private\n * @method Player#handleTechTexttrackchange_\n * @fires Player#texttrackchange\n * @listens Tech#texttrackchange\n */\n'texttrackchange'];\n\n// events to queue when playback rate is zero\n// this is a hash for the sole purpose of mapping non-camel-cased event names\n// to camel-cased function names\nconst TECH_EVENTS_QUEUE = {\n  canplay: 'CanPlay',\n  canplaythrough: 'CanPlayThrough',\n  playing: 'Playing',\n  seeked: 'Seeked'\n};\nconst BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\nconst BREAKPOINT_CLASSES = {};\n\n// grep: vjs-layout-tiny\n// grep: vjs-layout-x-small\n// grep: vjs-layout-small\n// grep: vjs-layout-medium\n// grep: vjs-layout-large\n// grep: vjs-layout-x-large\n// grep: vjs-layout-huge\nBREAKPOINT_ORDER.forEach(k => {\n  const v = k.charAt(0) === 'x' ? `x-${k.substring(1)}` : k;\n  BREAKPOINT_CLASSES[k] = `vjs-layout-${v}`;\n});\nconst DEFAULT_BREAKPOINTS = {\n  tiny: 210,\n  xsmall: 320,\n  small: 425,\n  medium: 768,\n  large: 1440,\n  xlarge: 2560,\n  huge: Infinity\n};\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods\n * are used to initialize a video.\n *\n * After an instance has been created it can be accessed globally in three ways:\n * 1. By calling `videojs.getPlayer('example_video_1');`\n * 2. By calling `videojs('example_video_1');` (not recommended)\n * 2. By using it directly via `videojs.players.example_video_1;`\n *\n * @extends Component\n * @global\n */\nclass Player extends Component$1 {\n  /**\n   * Create an instance of this class.\n   *\n   * @param {Element} tag\n   *        The original video DOM element used for configuring options.\n   *\n   * @param {Object} [options]\n   *        Object of option names and values.\n   *\n   * @param {PlayerReadyCallback} [ready]\n   *        Ready callback function.\n   */\n  constructor(tag, options, ready) {\n    // Make sure tag ID exists\n    // also here.. probably better\n    tag.id = tag.id || options.id || `vjs_video_${newGUID()}`;\n\n    // Set Options\n    // The options argument overrides options set in the video tag\n    // which overrides globally set options.\n    // This latter part coincides with the load order\n    // (tag must exist before Player)\n    options = Object.assign(Player.getTagSettings(tag), options);\n\n    // Delay the initialization of children because we need to set up\n    // player properties first, and can't use `this` before `super()`\n    options.initChildren = false;\n\n    // Same with creating the element\n    options.createEl = false;\n\n    // don't auto mixin the evented mixin\n    options.evented = false;\n\n    // we don't want the player to report touch activity on itself\n    // see enableTouchActivity in Component\n    options.reportTouchActivity = false;\n\n    // If language is not set, get the closest lang attribute\n    if (!options.language) {\n      const closest = tag.closest('[lang]');\n      if (closest) {\n        options.language = closest.getAttribute('lang');\n      }\n    }\n\n    // Run base component initializing with new options\n    super(null, options, ready);\n\n    // Create bound methods for document listeners.\n    this.boundDocumentFullscreenChange_ = e => this.documentFullscreenChange_(e);\n    this.boundFullWindowOnEscKey_ = e => this.fullWindowOnEscKey(e);\n    this.boundUpdateStyleEl_ = e => this.updateStyleEl_(e);\n    this.boundApplyInitTime_ = e => this.applyInitTime_(e);\n    this.boundUpdateCurrentBreakpoint_ = e => this.updateCurrentBreakpoint_(e);\n    this.boundHandleTechClick_ = e => this.handleTechClick_(e);\n    this.boundHandleTechDoubleClick_ = e => this.handleTechDoubleClick_(e);\n    this.boundHandleTechTouchStart_ = e => this.handleTechTouchStart_(e);\n    this.boundHandleTechTouchMove_ = e => this.handleTechTouchMove_(e);\n    this.boundHandleTechTouchEnd_ = e => this.handleTechTouchEnd_(e);\n    this.boundHandleTechTap_ = e => this.handleTechTap_(e);\n    this.boundUpdatePlayerHeightOnAudioOnlyMode_ = e => this.updatePlayerHeightOnAudioOnlyMode_(e);\n\n    // default isFullscreen_ to false\n    this.isFullscreen_ = false;\n\n    // create logger\n    this.log = createLogger(this.id_);\n\n    // Hold our own reference to fullscreen api so it can be mocked in tests\n    this.fsApi_ = FullscreenApi;\n\n    // Tracks when a tech changes the poster\n    this.isPosterFromTech_ = false;\n\n    // Holds callback info that gets queued when playback rate is zero\n    // and a seek is happening\n    this.queuedCallbacks_ = [];\n\n    // Turn off API access because we're loading a new tech that might load asynchronously\n    this.isReady_ = false;\n\n    // Init state hasStarted_\n    this.hasStarted_ = false;\n\n    // Init state userActive_\n    this.userActive_ = false;\n\n    // Init debugEnabled_\n    this.debugEnabled_ = false;\n\n    // Init state audioOnlyMode_\n    this.audioOnlyMode_ = false;\n\n    // Init state audioPosterMode_\n    this.audioPosterMode_ = false;\n\n    // Init state audioOnlyCache_\n    this.audioOnlyCache_ = {\n      controlBarHeight: null,\n      playerHeight: null,\n      hiddenChildren: []\n    };\n\n    // if the global option object was accidentally blown away by\n    // someone, bail early with an informative error\n    if (!this.options_ || !this.options_.techOrder || !this.options_.techOrder.length) {\n      throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\n    }\n\n    // Store the original tag used to set options\n    this.tag = tag;\n\n    // Store the tag attributes used to restore html5 element\n    this.tagAttributes = tag && getAttributes(tag);\n\n    // Update current language\n    this.language(this.options_.language);\n\n    // Update Supported Languages\n    if (options.languages) {\n      // Normalise player option languages to lowercase\n      const languagesToLower = {};\n      Object.getOwnPropertyNames(options.languages).forEach(function (name) {\n        languagesToLower[name.toLowerCase()] = options.languages[name];\n      });\n      this.languages_ = languagesToLower;\n    } else {\n      this.languages_ = Player.prototype.options_.languages;\n    }\n    this.resetCache_();\n\n    // Set poster\n    /** @type string */\n    this.poster_ = options.poster || '';\n\n    // Set controls\n    /** @type {boolean} */\n    this.controls_ = !!options.controls;\n\n    // Original tag settings stored in options\n    // now remove immediately so native controls don't flash.\n    // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n    tag.controls = false;\n    tag.removeAttribute('controls');\n    this.changingSrc_ = false;\n    this.playCallbacks_ = [];\n    this.playTerminatedQueue_ = [];\n\n    // the attribute overrides the option\n    if (tag.hasAttribute('autoplay')) {\n      this.autoplay(true);\n    } else {\n      // otherwise use the setter to validate and\n      // set the correct value.\n      this.autoplay(this.options_.autoplay);\n    }\n\n    // check plugins\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(name => {\n        if (typeof this[name] !== 'function') {\n          throw new Error(`plugin \"${name}\" does not exist`);\n        }\n      });\n    }\n\n    /*\n     * Store the internal state of scrubbing\n     *\n     * @private\n     * @return {Boolean} True if the user is scrubbing\n     */\n    this.scrubbing_ = false;\n    this.el_ = this.createEl();\n\n    // Make this an evented object and use `el_` as its event bus.\n    evented(this, {\n      eventBusKey: 'el_'\n    });\n\n    // listen to document and player fullscreenchange handlers so we receive those events\n    // before a user can receive them so we can update isFullscreen appropriately.\n    // make sure that we listen to fullscreenchange events before everything else to make sure that\n    // our isFullscreen method is updated properly for internal components as well as external.\n    if (this.fsApi_.requestFullscreen) {\n      on(document$1, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n      this.on(this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    }\n    if (this.fluid_) {\n      this.on(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n    }\n    // We also want to pass the original player options to each component and plugin\n    // as well so they don't need to reach back into the player for options later.\n    // We also need to do another copy of this.options_ so we don't end up with\n    // an infinite loop.\n    const playerOptionsCopy = merge$1(this.options_);\n\n    // Load plugins\n    if (options.plugins) {\n      Object.keys(options.plugins).forEach(name => {\n        this[name](options.plugins[name]);\n      });\n    }\n\n    // Enable debug mode to fire debugon event for all plugins.\n    if (options.debug) {\n      this.debug(true);\n    }\n    this.options_.playerOptions = playerOptionsCopy;\n    this.middleware_ = [];\n    this.playbackRates(options.playbackRates);\n    if (options.experimentalSvgIcons) {\n      // Add SVG Sprite to the DOM\n      const parser = new window$1.DOMParser();\n      const parsedSVG = parser.parseFromString(icons, 'image/svg+xml');\n      const errorNode = parsedSVG.querySelector('parsererror');\n      if (errorNode) {\n        log$1.warn('Failed to load SVG Icons. Falling back to Font Icons.');\n        this.options_.experimentalSvgIcons = null;\n      } else {\n        const sprite = parsedSVG.documentElement;\n        sprite.style.display = 'none';\n        this.el_.appendChild(sprite);\n        this.addClass('vjs-svg-icons-enabled');\n      }\n    }\n    this.initChildren();\n\n    // Set isAudio based on whether or not an audio tag was used\n    this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n    // Update controls className. Can't do this when the controls are initially\n    // set because the element doesn't exist yet.\n    if (this.controls()) {\n      this.addClass('vjs-controls-enabled');\n    } else {\n      this.addClass('vjs-controls-disabled');\n    }\n\n    // Set ARIA label and region role depending on player type\n    this.el_.setAttribute('role', 'region');\n    if (this.isAudio()) {\n      this.el_.setAttribute('aria-label', this.localize('Audio Player'));\n    } else {\n      this.el_.setAttribute('aria-label', this.localize('Video Player'));\n    }\n    if (this.isAudio()) {\n      this.addClass('vjs-audio');\n    }\n\n    // Check if spatial navigation is enabled in the options.\n    // If enabled, instantiate the SpatialNavigation class.\n    if (options.spatialNavigation && options.spatialNavigation.enabled) {\n      this.spatialNavigation = new SpatialNavigation(this);\n      this.addClass('vjs-spatial-navigation-enabled');\n    }\n\n    // TODO: Make this smarter. Toggle user state between touching/mousing\n    // using events, since devices can have both touch and mouse events.\n    // TODO: Make this check be performed again when the window switches between monitors\n    // (See https://github.com/videojs/video.js/issues/5683)\n    if (TOUCH_ENABLED) {\n      this.addClass('vjs-touch-enabled');\n    }\n\n    // iOS Safari has broken hover handling\n    if (!IS_IOS) {\n      this.addClass('vjs-workinghover');\n    }\n\n    // Make player easily findable by ID\n    Player.players[this.id_] = this;\n\n    // Add a major version class to aid css in plugins\n    const majorVersion = version$6.split('.')[0];\n    this.addClass(`vjs-v${majorVersion}`);\n\n    // When the player is first initialized, trigger activity so components\n    // like the control bar show themselves if needed\n    this.userActive(true);\n    this.reportUserActivity();\n    this.one('play', e => this.listenForUserActivity_(e));\n    this.on('keydown', e => this.handleKeyDown(e));\n    this.on('languagechange', e => this.handleLanguagechange(e));\n    this.breakpoints(this.options_.breakpoints);\n    this.responsive(this.options_.responsive);\n\n    // Calling both the audio mode methods after the player is fully\n    // setup to be able to listen to the events triggered by them\n    this.on('ready', () => {\n      // Calling the audioPosterMode method first so that\n      // the audioOnlyMode can take precedence when both options are set to true\n      this.audioPosterMode(this.options_.audioPosterMode);\n      this.audioOnlyMode(this.options_.audioOnlyMode);\n    });\n  }\n\n  /**\n   * Destroys the video player and does any necessary cleanup.\n   *\n   * This is especially helpful if you are dynamically adding and removing videos\n   * to/from the DOM.\n   *\n   * @fires Player#dispose\n   */\n  dispose() {\n    /**\n     * Called when the player is being disposed of.\n     *\n     * @event Player#dispose\n     * @type {Event}\n     */\n    this.trigger('dispose');\n    // prevent dispose from being called twice\n    this.off('dispose');\n\n    // Make sure all player-specific document listeners are unbound. This is\n    off(document$1, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\n    off(document$1, 'keydown', this.boundFullWindowOnEscKey_);\n    if (this.styleEl_ && this.styleEl_.parentNode) {\n      this.styleEl_.parentNode.removeChild(this.styleEl_);\n      this.styleEl_ = null;\n    }\n\n    // Kill reference to this player\n    Player.players[this.id_] = null;\n    if (this.tag && this.tag.player) {\n      this.tag.player = null;\n    }\n    if (this.el_ && this.el_.player) {\n      this.el_.player = null;\n    }\n    if (this.tech_) {\n      this.tech_.dispose();\n      this.isPosterFromTech_ = false;\n      this.poster_ = '';\n    }\n    if (this.playerElIngest_) {\n      this.playerElIngest_ = null;\n    }\n    if (this.tag) {\n      this.tag = null;\n    }\n    clearCacheForPlayer(this);\n\n    // remove all event handlers for track lists\n    // all tracks and track listeners are removed on\n    // tech dispose\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      const list = this[props.getterName]();\n\n      // if it is not a native list\n      // we have to manually remove event listeners\n      if (list && list.off) {\n        list.off();\n      }\n    });\n\n    // the actual .el_ is removed here, or replaced if\n    super.dispose({\n      restoreEl: this.options_.restoreEl\n    });\n  }\n\n  /**\n   * Create the `Player`'s DOM element.\n   *\n   * @return {Element}\n   *         The DOM element that gets created.\n   */\n  createEl() {\n    let tag = this.tag;\n    let el;\n    let playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\n    const divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\n    if (playerElIngest) {\n      el = this.el_ = tag.parentNode;\n    } else if (!divEmbed) {\n      el = this.el_ = super.createEl('div');\n    }\n\n    // Copy over all the attributes from the tag, including ID and class\n    // ID will now reference player box, not the video tag\n    const attrs = getAttributes(tag);\n    if (divEmbed) {\n      el = this.el_ = tag;\n      tag = this.tag = document$1.createElement('video');\n      while (el.children.length) {\n        tag.appendChild(el.firstChild);\n      }\n      if (!hasClass(el, 'video-js')) {\n        addClass(el, 'video-js');\n      }\n      el.appendChild(tag);\n      playerElIngest = this.playerElIngest_ = el;\n      // move properties over from our custom `video-js` element\n      // to our new `video` element. This will move things like\n      // `src` or `controls` that were set via js before the player\n      // was initialized.\n      Object.keys(el).forEach(k => {\n        try {\n          tag[k] = el[k];\n        } catch (e) {\n          // we got a a property like outerHTML which we can't actually copy, ignore it\n        }\n      });\n    }\n\n    // set tabindex to -1 to remove the video element from the focus order\n    tag.setAttribute('tabindex', '-1');\n    attrs.tabindex = '-1';\n\n    // Workaround for #4583 on Chrome (on Windows) with JAWS.\n    // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\n    // Note that we can't detect if JAWS is being used, but this ARIA attribute\n    // doesn't change behavior of Chrome if JAWS is not being used\n    if (IS_CHROME && IS_WINDOWS) {\n      tag.setAttribute('role', 'application');\n      attrs.role = 'application';\n    }\n\n    // Remove width/height attrs from tag so CSS can make it 100% width/height\n    tag.removeAttribute('width');\n    tag.removeAttribute('height');\n    if ('width' in attrs) {\n      delete attrs.width;\n    }\n    if ('height' in attrs) {\n      delete attrs.height;\n    }\n    Object.getOwnPropertyNames(attrs).forEach(function (attr) {\n      // don't copy over the class attribute to the player element when we're in a div embed\n      // the class is already set up properly in the divEmbed case\n      // and we want to make sure that the `video-js` class doesn't get lost\n      if (!(divEmbed && attr === 'class')) {\n        el.setAttribute(attr, attrs[attr]);\n      }\n      if (divEmbed) {\n        tag.setAttribute(attr, attrs[attr]);\n      }\n    });\n\n    // Update tag id/class for use as HTML5 playback tech\n    // Might think we should do this after embedding in container so .vjs-tech class\n    // doesn't flash 100% width/height, but class only applies with .video-js parent\n    tag.playerId = tag.id;\n    tag.id += '_html5_api';\n    tag.className = 'vjs-tech';\n\n    // Make player findable on elements\n    tag.player = el.player = this;\n    // Default state of video is paused\n    this.addClass('vjs-paused');\n    const deviceClassNames = ['IS_SMART_TV', 'IS_TIZEN', 'IS_WEBOS', 'IS_ANDROID', 'IS_IPAD', 'IS_IPHONE', 'IS_CHROMECAST_RECEIVER'].filter(key => browser[key]).map(key => {\n      return 'vjs-device-' + key.substring(3).toLowerCase().replace(/\\_/g, '-');\n    });\n    this.addClass(...deviceClassNames);\n\n    // Add a style element in the player that we'll use to set the width/height\n    // of the player in a way that's still overridable by CSS, just like the\n    // video element\n    if (window$1.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n      this.styleEl_ = createStyleElement('vjs-styles-dimensions');\n      const defaultsStyleEl = $('.vjs-styles-defaults');\n      const head = $('head');\n      head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n    }\n    this.fill_ = false;\n    this.fluid_ = false;\n\n    // Pass in the width/height/aspectRatio options which will update the style el\n    this.width(this.options_.width);\n    this.height(this.options_.height);\n    this.fill(this.options_.fill);\n    this.fluid(this.options_.fluid);\n    this.aspectRatio(this.options_.aspectRatio);\n    // support both crossOrigin and crossorigin to reduce confusion and issues around the name\n    this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin);\n\n    // Hide any links within the video/audio tag,\n    // because IE doesn't hide them completely from screen readers.\n    const links = tag.getElementsByTagName('a');\n    for (let i = 0; i < links.length; i++) {\n      const linkEl = links.item(i);\n      addClass(linkEl, 'vjs-hidden');\n      linkEl.setAttribute('hidden', 'hidden');\n    }\n\n    // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n    // keep track of the original for later so we can know if the source originally failed\n    tag.initNetworkState_ = tag.networkState;\n\n    // Wrap video tag in div (el/box) container\n    if (tag.parentNode && !playerElIngest) {\n      tag.parentNode.insertBefore(el, tag);\n    }\n\n    // insert the tag as the first child of the player element\n    // then manually add it to the children array so that this.addChild\n    // will work properly for other components\n    //\n    // Breaks iPhone, fixed in HTML5 setup.\n    prependTo(tag, el);\n    this.children_.unshift(tag);\n\n    // Set lang attr on player to ensure CSS :lang() in consistent with player\n    // if it's been set to something different to the doc\n    this.el_.setAttribute('lang', this.language_);\n    this.el_.setAttribute('translate', 'no');\n    this.el_ = el;\n    return el;\n  }\n\n  /**\n   * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this\n   * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n   * behavior.\n   *\n   * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n   *\n   * @param {string|null} [value]\n   *        The value to set the `Player`'s crossOrigin to. If an argument is\n   *        given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.\n   *\n   * @return {string|null|undefined}\n   *         - The current crossOrigin value of the `Player` when getting.\n   *         - undefined when setting\n   */\n  crossOrigin(value) {\n    // `null` can be set to unset a value\n    if (typeof value === 'undefined') {\n      return this.techGet_('crossOrigin');\n    }\n    if (value !== null && value !== 'anonymous' && value !== 'use-credentials') {\n      log$1.warn(`crossOrigin must be null,  \"anonymous\" or \"use-credentials\", given \"${value}\"`);\n      return;\n    }\n    this.techCall_('setCrossOrigin', value);\n    if (this.posterImage) {\n      this.posterImage.crossOrigin(value);\n    }\n    return;\n  }\n\n  /**\n   * A getter/setter for the `Player`'s width. Returns the player's configured value.\n   * To get the current width use `currentWidth()`.\n   *\n   * @param {number|string} [value]\n   *        CSS value to set the `Player`'s width to.\n   *\n   * @return {number|undefined}\n   *         - The current width of the `Player` when getting.\n   *         - Nothing when setting\n   */\n  width(value) {\n    return this.dimension('width', value);\n  }\n\n  /**\n   * A getter/setter for the `Player`'s height. Returns the player's configured value.\n   * To get the current height use `currentheight()`.\n   *\n   * @param {number|string} [value]\n   *        CSS value to set the `Player`'s height to.\n   *\n   * @return {number|undefined}\n   *         - The current height of the `Player` when getting.\n   *         - Nothing when setting\n   */\n  height(value) {\n    return this.dimension('height', value);\n  }\n\n  /**\n   * A getter/setter for the `Player`'s width & height.\n   *\n   * @param {string} dimension\n   *        This string can be:\n   *        - 'width'\n   *        - 'height'\n   *\n   * @param {number|string} [value]\n   *        Value for dimension specified in the first argument.\n   *\n   * @return {number}\n   *         The dimension arguments value when getting (width/height).\n   */\n  dimension(dimension, value) {\n    const privDimension = dimension + '_';\n    if (value === undefined) {\n      return this[privDimension] || 0;\n    }\n    if (value === '' || value === 'auto') {\n      // If an empty string is given, reset the dimension to be automatic\n      this[privDimension] = undefined;\n      this.updateStyleEl_();\n      return;\n    }\n    const parsedVal = parseFloat(value);\n    if (isNaN(parsedVal)) {\n      log$1.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n      return;\n    }\n    this[privDimension] = parsedVal;\n    this.updateStyleEl_();\n  }\n\n  /**\n   * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\n   *\n   * Turning this on will turn off fill mode.\n   *\n   * @param {boolean} [bool]\n   *        - A value of true adds the class.\n   *        - A value of false removes the class.\n   *        - No value will be a getter.\n   *\n   * @return {boolean|undefined}\n   *         - The value of fluid when getting.\n   *         - `undefined` when setting.\n   */\n  fluid(bool) {\n    if (bool === undefined) {\n      return !!this.fluid_;\n    }\n    this.fluid_ = !!bool;\n    if (isEvented(this)) {\n      this.off(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n    }\n    if (bool) {\n      this.addClass('vjs-fluid');\n      this.fill(false);\n      addEventedCallback(this, () => {\n        this.on(['playerreset', 'resize'], this.boundUpdateStyleEl_);\n      });\n    } else {\n      this.removeClass('vjs-fluid');\n    }\n    this.updateStyleEl_();\n  }\n\n  /**\n   * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\n   *\n   * Turning this on will turn off fluid mode.\n   *\n   * @param {boolean} [bool]\n   *        - A value of true adds the class.\n   *        - A value of false removes the class.\n   *        - No value will be a getter.\n   *\n   * @return {boolean|undefined}\n   *         - The value of fluid when getting.\n   *         - `undefined` when setting.\n   */\n  fill(bool) {\n    if (bool === undefined) {\n      return !!this.fill_;\n    }\n    this.fill_ = !!bool;\n    if (bool) {\n      this.addClass('vjs-fill');\n      this.fluid(false);\n    } else {\n      this.removeClass('vjs-fill');\n    }\n  }\n\n  /**\n   * Get/Set the aspect ratio\n   *\n   * @param {string} [ratio]\n   *        Aspect ratio for player\n   *\n   * @return {string|undefined}\n   *         returns the current aspect ratio when getting\n   */\n\n  /**\n   * A getter/setter for the `Player`'s aspect ratio.\n   *\n   * @param {string} [ratio]\n   *        The value to set the `Player`'s aspect ratio to.\n   *\n   * @return {string|undefined}\n   *         - The current aspect ratio of the `Player` when getting.\n   *         - undefined when setting\n   */\n  aspectRatio(ratio) {\n    if (ratio === undefined) {\n      return this.aspectRatio_;\n    }\n\n    // Check for width:height format\n    if (!/^\\d+\\:\\d+$/.test(ratio)) {\n      throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n    }\n    this.aspectRatio_ = ratio;\n\n    // We're assuming if you set an aspect ratio you want fluid mode,\n    // because in fixed mode you could calculate width and height yourself.\n    this.fluid(true);\n    this.updateStyleEl_();\n  }\n\n  /**\n   * Update styles of the `Player` element (height, width and aspect ratio).\n   *\n   * @private\n   * @listens Tech#loadedmetadata\n   */\n  updateStyleEl_() {\n    if (window$1.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n      const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n      const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n      const techEl = this.tech_ && this.tech_.el();\n      if (techEl) {\n        if (width >= 0) {\n          techEl.width = width;\n        }\n        if (height >= 0) {\n          techEl.height = height;\n        }\n      }\n      return;\n    }\n    let width;\n    let height;\n    let aspectRatio;\n    let idClass;\n\n    // The aspect ratio is either used directly or to calculate width and height.\n    if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n      // Use any aspectRatio that's been specifically set\n      aspectRatio = this.aspectRatio_;\n    } else if (this.videoWidth() > 0) {\n      // Otherwise try to get the aspect ratio from the video metadata\n      aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n    } else {\n      // Or use a default. The video element's is 2:1, but 16:9 is more common.\n      aspectRatio = '16:9';\n    }\n\n    // Get the ratio as a decimal we can use to calculate dimensions\n    const ratioParts = aspectRatio.split(':');\n    const ratioMultiplier = ratioParts[1] / ratioParts[0];\n    if (this.width_ !== undefined) {\n      // Use any width that's been specifically set\n      width = this.width_;\n    } else if (this.height_ !== undefined) {\n      // Or calculate the width from the aspect ratio if a height has been set\n      width = this.height_ / ratioMultiplier;\n    } else {\n      // Or use the video's metadata, or use the video el's default of 300\n      width = this.videoWidth() || 300;\n    }\n    if (this.height_ !== undefined) {\n      // Use any height that's been specifically set\n      height = this.height_;\n    } else {\n      // Otherwise calculate the height from the ratio and the width\n      height = width * ratioMultiplier;\n    }\n\n    // Ensure the CSS class is valid by starting with an alpha character\n    if (/^[^a-zA-Z]/.test(this.id())) {\n      idClass = 'dimensions-' + this.id();\n    } else {\n      idClass = this.id() + '-dimensions';\n    }\n\n    // Ensure the right class is still on the player for the style element\n    this.addClass(idClass);\n    setTextContent(this.styleEl_, `\n      .${idClass} {\n        width: ${width}px;\n        height: ${height}px;\n      }\n\n      .${idClass}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${ratioMultiplier * 100}%;\n      }\n    `);\n  }\n\n  /**\n   * Load/Create an instance of playback {@link Tech} including element\n   * and API methods. Then append the `Tech` element in `Player` as a child.\n   *\n   * @param {string} techName\n   *        name of the playback technology\n   *\n   * @param {string} source\n   *        video source\n   *\n   * @private\n   */\n  loadTech_(techName, source) {\n    // Pause and remove current playback technology\n    if (this.tech_) {\n      this.unloadTech_();\n    }\n    const titleTechName = toTitleCase$1(techName);\n    const camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1);\n\n    // get rid of the HTML5 video tag as soon as we are using another tech\n    if (titleTechName !== 'Html5' && this.tag) {\n      Tech.getTech('Html5').disposeMediaElement(this.tag);\n      this.tag.player = null;\n      this.tag = null;\n    }\n    this.techName_ = titleTechName;\n\n    // Turn off API access because we're loading a new tech that might load asynchronously\n    this.isReady_ = false;\n    let autoplay = this.autoplay();\n\n    // if autoplay is a string (or `true` with normalizeAutoplay: true) we pass false to the tech\n    // because the player is going to handle autoplay on `loadstart`\n    if (typeof this.autoplay() === 'string' || this.autoplay() === true && this.options_.normalizeAutoplay) {\n      autoplay = false;\n    }\n\n    // Grab tech-specific options from player options and add source and parent element to use.\n    const techOptions = {\n      source,\n      autoplay,\n      'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n      'playerId': this.id(),\n      'techId': `${this.id()}_${camelTechName}_api`,\n      'playsinline': this.options_.playsinline,\n      'preload': this.options_.preload,\n      'loop': this.options_.loop,\n      'disablePictureInPicture': this.options_.disablePictureInPicture,\n      'muted': this.options_.muted,\n      'poster': this.poster(),\n      'language': this.language(),\n      'playerElIngest': this.playerElIngest_ || false,\n      'vtt.js': this.options_['vtt.js'],\n      'canOverridePoster': !!this.options_.techCanOverridePoster,\n      'enableSourceset': this.options_.enableSourceset\n    };\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      techOptions[props.getterName] = this[props.privateName];\n    });\n    Object.assign(techOptions, this.options_[titleTechName]);\n    Object.assign(techOptions, this.options_[camelTechName]);\n    Object.assign(techOptions, this.options_[techName.toLowerCase()]);\n    if (this.tag) {\n      techOptions.tag = this.tag;\n    }\n    if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\n      techOptions.startTime = this.cache_.currentTime;\n    }\n\n    // Initialize tech instance\n    const TechClass = Tech.getTech(techName);\n    if (!TechClass) {\n      throw new Error(`No Tech named '${titleTechName}' exists! '${titleTechName}' should be registered using videojs.registerTech()'`);\n    }\n    this.tech_ = new TechClass(techOptions);\n\n    // player.triggerReady is always async, so don't need this to be async\n    this.tech_.ready(bind_(this, this.handleTechReady_), true);\n    textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n    // Listen to all HTML5-defined events and trigger them on the player\n    TECH_EVENTS_RETRIGGER.forEach(event => {\n      this.on(this.tech_, event, e => this[`handleTech${toTitleCase$1(event)}_`](e));\n    });\n    Object.keys(TECH_EVENTS_QUEUE).forEach(event => {\n      this.on(this.tech_, event, eventObj => {\n        if (this.tech_.playbackRate() === 0 && this.tech_.seeking()) {\n          this.queuedCallbacks_.push({\n            callback: this[`handleTech${TECH_EVENTS_QUEUE[event]}_`].bind(this),\n            event: eventObj\n          });\n          return;\n        }\n        this[`handleTech${TECH_EVENTS_QUEUE[event]}_`](eventObj);\n      });\n    });\n    this.on(this.tech_, 'loadstart', e => this.handleTechLoadStart_(e));\n    this.on(this.tech_, 'sourceset', e => this.handleTechSourceset_(e));\n    this.on(this.tech_, 'waiting', e => this.handleTechWaiting_(e));\n    this.on(this.tech_, 'ended', e => this.handleTechEnded_(e));\n    this.on(this.tech_, 'seeking', e => this.handleTechSeeking_(e));\n    this.on(this.tech_, 'play', e => this.handleTechPlay_(e));\n    this.on(this.tech_, 'pause', e => this.handleTechPause_(e));\n    this.on(this.tech_, 'durationchange', e => this.handleTechDurationChange_(e));\n    this.on(this.tech_, 'fullscreenchange', (e, data) => this.handleTechFullscreenChange_(e, data));\n    this.on(this.tech_, 'fullscreenerror', (e, err) => this.handleTechFullscreenError_(e, err));\n    this.on(this.tech_, 'enterpictureinpicture', e => this.handleTechEnterPictureInPicture_(e));\n    this.on(this.tech_, 'leavepictureinpicture', e => this.handleTechLeavePictureInPicture_(e));\n    this.on(this.tech_, 'error', e => this.handleTechError_(e));\n    this.on(this.tech_, 'posterchange', e => this.handleTechPosterChange_(e));\n    this.on(this.tech_, 'textdata', e => this.handleTechTextData_(e));\n    this.on(this.tech_, 'ratechange', e => this.handleTechRateChange_(e));\n    this.on(this.tech_, 'loadedmetadata', this.boundUpdateStyleEl_);\n    this.usingNativeControls(this.techGet_('controls'));\n    if (this.controls() && !this.usingNativeControls()) {\n      this.addTechControlsListeners_();\n    }\n\n    // Add the tech element in the DOM if it was not already there\n    // Make sure to not insert the original video element if using Html5\n    if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\n      prependTo(this.tech_.el(), this.el());\n    }\n\n    // Get rid of the original video tag reference after the first tech is loaded\n    if (this.tag) {\n      this.tag.player = null;\n      this.tag = null;\n    }\n  }\n\n  /**\n   * Unload and dispose of the current playback {@link Tech}.\n   *\n   * @private\n   */\n  unloadTech_() {\n    // Save the current text tracks so that we can reuse the same text tracks with the next tech\n    ALL.names.forEach(name => {\n      const props = ALL[name];\n      this[props.privateName] = this[props.getterName]();\n    });\n    this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n    this.isReady_ = false;\n    this.tech_.dispose();\n    this.tech_ = false;\n    if (this.isPosterFromTech_) {\n      this.poster_ = '';\n      this.trigger('posterchange');\n    }\n    this.isPosterFromTech_ = false;\n  }\n\n  /**\n   * Return a reference to the current {@link Tech}.\n   * It will print a warning by default about the danger of using the tech directly\n   * but any argument that is passed in will silence the warning.\n   *\n   * @param {*} [safety]\n   *        Anything passed in to silence the warning\n   *\n   * @return {Tech}\n   *         The Tech\n   */\n  tech(safety) {\n    if (safety === undefined) {\n      log$1.warn('Using the tech directly can be dangerous. I hope you know what you\\'re doing.\\n' + 'See https://github.com/videojs/video.js/issues/2617 for more info.\\n');\n    }\n    return this.tech_;\n  }\n\n  /**\n   * An object that contains Video.js version.\n   *\n   * @typedef {Object} PlayerVersion\n   *\n   * @property {string} 'video.js' - Video.js version\n   */\n\n  /**\n   * Returns an object with Video.js version.\n   *\n   * @return {PlayerVersion}\n   *          An object with Video.js version.\n   */\n  version() {\n    return {\n      'video.js': version$6\n    };\n  }\n\n  /**\n   * Set up click and touch listeners for the playback element\n   *\n   * - On desktops: a click on the video itself will toggle playback\n   * - On mobile devices: a click on the video toggles controls\n   *   which is done by toggling the user state between active and\n   *   inactive\n   * - A tap can signal that a user has become active or has become inactive\n   *   e.g. a quick tap on an iPhone movie should reveal the controls. Another\n   *   quick tap should hide them again (signaling the user is in an inactive\n   *   viewing state)\n   * - In addition to this, we still want the user to be considered inactive after\n   *   a few seconds of inactivity.\n   *\n   * > Note: the only part of iOS interaction we can't mimic with this setup\n   * is a touch and hold on the video element counting as activity in order to\n   * keep the controls showing, but that shouldn't be an issue. A touch and hold\n   * on any controls will still keep the user active\n   *\n   * @private\n   */\n  addTechControlsListeners_() {\n    // Make sure to remove all the previous listeners in case we are called multiple times.\n    this.removeTechControlsListeners_();\n    this.on(this.tech_, 'click', this.boundHandleTechClick_);\n    this.on(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n\n    // If the controls were hidden we don't want that to change without a tap event\n    // so we'll check if the controls were already showing before reporting user\n    // activity\n    this.on(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n    this.on(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n    this.on(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n\n    // The tap listener needs to come after the touchend listener because the tap\n    // listener cancels out any reportedUserActivity when setting userActive(false)\n    this.on(this.tech_, 'tap', this.boundHandleTechTap_);\n  }\n\n  /**\n   * Remove the listeners used for click and tap controls. This is needed for\n   * toggling to controls disabled, where a tap/touch should do nothing.\n   *\n   * @private\n   */\n  removeTechControlsListeners_() {\n    // We don't want to just use `this.off()` because there might be other needed\n    // listeners added by techs that extend this.\n    this.off(this.tech_, 'tap', this.boundHandleTechTap_);\n    this.off(this.tech_, 'touchstart', this.boundHandleTechTouchStart_);\n    this.off(this.tech_, 'touchmove', this.boundHandleTechTouchMove_);\n    this.off(this.tech_, 'touchend', this.boundHandleTechTouchEnd_);\n    this.off(this.tech_, 'click', this.boundHandleTechClick_);\n    this.off(this.tech_, 'dblclick', this.boundHandleTechDoubleClick_);\n  }\n\n  /**\n   * Player waits for the tech to be ready\n   *\n   * @private\n   */\n  handleTechReady_() {\n    this.triggerReady();\n\n    // Keep the same volume as before\n    if (this.cache_.volume) {\n      this.techCall_('setVolume', this.cache_.volume);\n    }\n\n    // Look if the tech found a higher resolution poster while loading\n    this.handleTechPosterChange_();\n\n    // Update the duration if available\n    this.handleTechDurationChange_();\n  }\n\n  /**\n   * Retrigger the `loadstart` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#loadstart\n   * @listens Tech#loadstart\n   * @private\n   */\n  handleTechLoadStart_() {\n    // TODO: Update to use `emptied` event instead. See #1277.\n\n    this.removeClass('vjs-ended', 'vjs-seeking');\n\n    // reset the error state\n    this.error(null);\n\n    // Update the duration\n    this.handleTechDurationChange_();\n    if (!this.paused()) {\n      /**\n       * Fired when the user agent begins looking for media data\n       *\n       * @event Player#loadstart\n       * @type {Event}\n       */\n      this.trigger('loadstart');\n    } else {\n      // reset the hasStarted state\n      this.hasStarted(false);\n      this.trigger('loadstart');\n    }\n\n    // autoplay happens after loadstart for the browser,\n    // so we mimic that behavior\n    this.manualAutoplay_(this.autoplay() === true && this.options_.normalizeAutoplay ? 'play' : this.autoplay());\n  }\n\n  /**\n   * Handle autoplay string values, rather than the typical boolean\n   * values that should be handled by the tech. Note that this is not\n   * part of any specification. Valid values and what they do can be\n   * found on the autoplay getter at Player#autoplay()\n   */\n  manualAutoplay_(type) {\n    if (!this.tech_ || typeof type !== 'string') {\n      return;\n    }\n\n    // Save original muted() value, set muted to true, and attempt to play().\n    // On promise rejection, restore muted from saved value\n    const resolveMuted = () => {\n      const previouslyMuted = this.muted();\n      this.muted(true);\n      const restoreMuted = () => {\n        this.muted(previouslyMuted);\n      };\n\n      // restore muted on play terminatation\n      this.playTerminatedQueue_.push(restoreMuted);\n      const mutedPromise = this.play();\n      if (!isPromise(mutedPromise)) {\n        return;\n      }\n      return mutedPromise.catch(err => {\n        restoreMuted();\n        throw new Error(`Rejection at manualAutoplay. Restoring muted value. ${err ? err : ''}`);\n      });\n    };\n    let promise;\n\n    // if muted defaults to true\n    // the only thing we can do is call play\n    if (type === 'any' && !this.muted()) {\n      promise = this.play();\n      if (isPromise(promise)) {\n        promise = promise.catch(resolveMuted);\n      }\n    } else if (type === 'muted' && !this.muted()) {\n      promise = resolveMuted();\n    } else {\n      promise = this.play();\n    }\n    if (!isPromise(promise)) {\n      return;\n    }\n    return promise.then(() => {\n      this.trigger({\n        type: 'autoplay-success',\n        autoplay: type\n      });\n    }).catch(() => {\n      this.trigger({\n        type: 'autoplay-failure',\n        autoplay: type\n      });\n    });\n  }\n\n  /**\n   * Update the internal source caches so that we return the correct source from\n   * `src()`, `currentSource()`, and `currentSources()`.\n   *\n   * > Note: `currentSources` will not be updated if the source that is passed in exists\n   *         in the current `currentSources` cache.\n   *\n   *\n   * @param {Tech~SourceObject} srcObj\n   *        A string or object source to update our caches to.\n   */\n  updateSourceCaches_(srcObj = '') {\n    let src = srcObj;\n    let type = '';\n    if (typeof src !== 'string') {\n      src = srcObj.src;\n      type = srcObj.type;\n    }\n\n    // make sure all the caches are set to default values\n    // to prevent null checking\n    this.cache_.source = this.cache_.source || {};\n    this.cache_.sources = this.cache_.sources || [];\n\n    // try to get the type of the src that was passed in\n    if (src && !type) {\n      type = findMimetype(this, src);\n    }\n\n    // update `currentSource` cache always\n    this.cache_.source = merge$1({}, srcObj, {\n      src,\n      type\n    });\n    const matchingSources = this.cache_.sources.filter(s => s.src && s.src === src);\n    const sourceElSources = [];\n    const sourceEls = this.$$('source');\n    const matchingSourceEls = [];\n    for (let i = 0; i < sourceEls.length; i++) {\n      const sourceObj = getAttributes(sourceEls[i]);\n      sourceElSources.push(sourceObj);\n      if (sourceObj.src && sourceObj.src === src) {\n        matchingSourceEls.push(sourceObj.src);\n      }\n    }\n\n    // if we have matching source els but not matching sources\n    // the current source cache is not up to date\n    if (matchingSourceEls.length && !matchingSources.length) {\n      this.cache_.sources = sourceElSources;\n      // if we don't have matching source or source els set the\n      // sources cache to the `currentSource` cache\n    } else if (!matchingSources.length) {\n      this.cache_.sources = [this.cache_.source];\n    }\n\n    // update the tech `src` cache\n    this.cache_.src = src;\n  }\n\n  /**\n   * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\n   * causing the media element to reload.\n   *\n   * It will fire for the initial source and each subsequent source.\n   * This event is a custom event from Video.js and is triggered by the {@link Tech}.\n   *\n   * The event object for this event contains a `src` property that will contain the source\n   * that was available when the event was triggered. This is generally only necessary if Video.js\n   * is switching techs while the source was being changed.\n   *\n   * It is also fired when `load` is called on the player (or media element)\n   * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\n   * says that the resource selection algorithm needs to be aborted and restarted.\n   * In this case, it is very likely that the `src` property will be set to the\n   * empty string `\"\"` to indicate we do not know what the source will be but\n   * that it is changing.\n   *\n   * *This event is currently still experimental and may change in minor releases.*\n   * __To use this, pass `enableSourceset` option to the player.__\n   *\n   * @event Player#sourceset\n   * @type {Event}\n   * @prop {string} src\n   *                The source url available when the `sourceset` was triggered.\n   *                It will be an empty string if we cannot know what the source is\n   *                but know that the source will change.\n   */\n  /**\n   * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#sourceset\n   * @listens Tech#sourceset\n   * @private\n   */\n  handleTechSourceset_(event) {\n    // only update the source cache when the source\n    // was not updated using the player api\n    if (!this.changingSrc_) {\n      let updateSourceCaches = src => this.updateSourceCaches_(src);\n      const playerSrc = this.currentSource().src;\n      const eventSrc = event.src;\n\n      // if we have a playerSrc that is not a blob, and a tech src that is a blob\n      if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\n        // if both the tech source and the player source were updated we assume\n        // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\n        if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\n          updateSourceCaches = () => {};\n        }\n      }\n\n      // update the source to the initial source right away\n      // in some cases this will be empty string\n      updateSourceCaches(eventSrc);\n\n      // if the `sourceset` `src` was an empty string\n      // wait for a `loadstart` to update the cache to `currentSrc`.\n      // If a sourceset happens before a `loadstart`, we reset the state\n      if (!event.src) {\n        this.tech_.any(['sourceset', 'loadstart'], e => {\n          // if a sourceset happens before a `loadstart` there\n          // is nothing to do as this `handleTechSourceset_`\n          // will be called again and this will be handled there.\n          if (e.type === 'sourceset') {\n            return;\n          }\n          const techSrc = this.techGet_('currentSrc');\n          this.lastSource_.tech = techSrc;\n          this.updateSourceCaches_(techSrc);\n        });\n      }\n    }\n    this.lastSource_ = {\n      player: this.currentSource().src,\n      tech: event.src\n    };\n    this.trigger({\n      src: event.src,\n      type: 'sourceset'\n    });\n  }\n\n  /**\n   * Add/remove the vjs-has-started class\n   *\n   *\n   * @param {boolean} request\n   *        - true: adds the class\n   *        - false: remove the class\n   *\n   * @return {boolean}\n   *         the boolean value of hasStarted_\n   */\n  hasStarted(request) {\n    if (request === undefined) {\n      // act as getter, if we have no request to change\n      return this.hasStarted_;\n    }\n    if (request === this.hasStarted_) {\n      return;\n    }\n    this.hasStarted_ = request;\n    if (this.hasStarted_) {\n      this.addClass('vjs-has-started');\n    } else {\n      this.removeClass('vjs-has-started');\n    }\n  }\n\n  /**\n   * Fired whenever the media begins or resumes playback\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\n   * @fires Player#play\n   * @listens Tech#play\n   * @private\n   */\n  handleTechPlay_() {\n    this.removeClass('vjs-ended', 'vjs-paused');\n    this.addClass('vjs-playing');\n\n    // hide the poster when the user hits play\n    this.hasStarted(true);\n    /**\n     * Triggered whenever an {@link Tech#play} event happens. Indicates that\n     * playback has started or resumed.\n     *\n     * @event Player#play\n     * @type {Event}\n     */\n    this.trigger('play');\n  }\n\n  /**\n   * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\n   *\n   * If there were any events queued while the playback rate was zero, fire\n   * those events now.\n   *\n   * @private\n   * @method Player#handleTechRateChange_\n   * @fires Player#ratechange\n   * @listens Tech#ratechange\n   */\n  handleTechRateChange_() {\n    if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\n      this.queuedCallbacks_.forEach(queued => queued.callback(queued.event));\n      this.queuedCallbacks_ = [];\n    }\n    this.cache_.lastPlaybackRate = this.tech_.playbackRate();\n    /**\n     * Fires when the playing speed of the audio/video is changed\n     *\n     * @event Player#ratechange\n     * @type {event}\n     */\n    this.trigger('ratechange');\n  }\n\n  /**\n   * Retrigger the `waiting` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#waiting\n   * @listens Tech#waiting\n   * @private\n   */\n  handleTechWaiting_() {\n    this.addClass('vjs-waiting');\n    /**\n     * A readyState change on the DOM element has caused playback to stop.\n     *\n     * @event Player#waiting\n     * @type {Event}\n     */\n    this.trigger('waiting');\n\n    // Browsers may emit a timeupdate event after a waiting event. In order to prevent\n    // premature removal of the waiting class, wait for the time to change.\n    const timeWhenWaiting = this.currentTime();\n    const timeUpdateListener = () => {\n      if (timeWhenWaiting !== this.currentTime()) {\n        this.removeClass('vjs-waiting');\n        this.off('timeupdate', timeUpdateListener);\n      }\n    };\n    this.on('timeupdate', timeUpdateListener);\n  }\n\n  /**\n   * Retrigger the `canplay` event that was triggered by the {@link Tech}.\n   * > Note: This is not consistent between browsers. See #1351\n   *\n   * @fires Player#canplay\n   * @listens Tech#canplay\n   * @private\n   */\n  handleTechCanPlay_() {\n    this.removeClass('vjs-waiting');\n    /**\n     * The media has a readyState of HAVE_FUTURE_DATA or greater.\n     *\n     * @event Player#canplay\n     * @type {Event}\n     */\n    this.trigger('canplay');\n  }\n\n  /**\n   * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#canplaythrough\n   * @listens Tech#canplaythrough\n   * @private\n   */\n  handleTechCanPlayThrough_() {\n    this.removeClass('vjs-waiting');\n    /**\n     * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\n     * entire media file can be played without buffering.\n     *\n     * @event Player#canplaythrough\n     * @type {Event}\n     */\n    this.trigger('canplaythrough');\n  }\n\n  /**\n   * Retrigger the `playing` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#playing\n   * @listens Tech#playing\n   * @private\n   */\n  handleTechPlaying_() {\n    this.removeClass('vjs-waiting');\n    /**\n     * The media is no longer blocked from playback, and has started playing.\n     *\n     * @event Player#playing\n     * @type {Event}\n     */\n    this.trigger('playing');\n  }\n\n  /**\n   * Retrigger the `seeking` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#seeking\n   * @listens Tech#seeking\n   * @private\n   */\n  handleTechSeeking_() {\n    this.addClass('vjs-seeking');\n    /**\n     * Fired whenever the player is jumping to a new time\n     *\n     * @event Player#seeking\n     * @type {Event}\n     */\n    this.trigger('seeking');\n  }\n\n  /**\n   * Retrigger the `seeked` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#seeked\n   * @listens Tech#seeked\n   * @private\n   */\n  handleTechSeeked_() {\n    this.removeClass('vjs-seeking', 'vjs-ended');\n    /**\n     * Fired when the player has finished jumping to a new time\n     *\n     * @event Player#seeked\n     * @type {Event}\n     */\n    this.trigger('seeked');\n  }\n\n  /**\n   * Retrigger the `pause` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#pause\n   * @listens Tech#pause\n   * @private\n   */\n  handleTechPause_() {\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused');\n    /**\n     * Fired whenever the media has been paused\n     *\n     * @event Player#pause\n     * @type {Event}\n     */\n    this.trigger('pause');\n  }\n\n  /**\n   * Retrigger the `ended` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#ended\n   * @listens Tech#ended\n   * @private\n   */\n  handleTechEnded_() {\n    this.addClass('vjs-ended');\n    this.removeClass('vjs-waiting');\n    if (this.options_.loop) {\n      this.currentTime(0);\n      this.play();\n    } else if (!this.paused()) {\n      this.pause();\n    }\n\n    /**\n     * Fired when the end of the media resource is reached (currentTime == duration)\n     *\n     * @event Player#ended\n     * @type {Event}\n     */\n    this.trigger('ended');\n  }\n\n  /**\n   * Fired when the duration of the media resource is first known or changed\n   *\n   * @listens Tech#durationchange\n   * @private\n   */\n  handleTechDurationChange_() {\n    this.duration(this.techGet_('duration'));\n  }\n\n  /**\n   * Handle a click on the media element to play/pause\n   *\n   * @param {Event} event\n   *        the event that caused this function to trigger\n   *\n   * @listens Tech#click\n   * @private\n   */\n  handleTechClick_(event) {\n    // When controls are disabled a click should not toggle playback because\n    // the click is considered a control\n    if (!this.controls_) {\n      return;\n    }\n    if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.click === undefined || this.options_.userActions.click !== false) {\n      if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.click === 'function') {\n        this.options_.userActions.click.call(this, event);\n      } else if (this.paused()) {\n        silencePromise(this.play());\n      } else {\n        this.pause();\n      }\n    }\n  }\n\n  /**\n   * Handle a double-click on the media element to enter/exit fullscreen,\n   * or exit documentPictureInPicture mode\n   *\n   * @param {Event} event\n   *        the event that caused this function to trigger\n   *\n   * @listens Tech#dblclick\n   * @private\n   */\n  handleTechDoubleClick_(event) {\n    if (!this.controls_) {\n      return;\n    }\n\n    // we do not want to toggle fullscreen state\n    // when double-clicking inside a control bar or a modal\n    const inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), el => el.contains(event.target));\n    if (!inAllowedEls) {\n      /*\n       * options.userActions.doubleClick\n       *\n       * If `undefined` or `true`, double-click toggles fullscreen if controls are present\n       * Set to `false` to disable double-click handling\n       * Set to a function to substitute an external double-click handler\n       */\n      if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\n        if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\n          this.options_.userActions.doubleClick.call(this, event);\n        } else if (this.isInPictureInPicture() && !document$1.pictureInPictureElement) {\n          // Checking the presence of `window.documentPictureInPicture.window` complicates\n          // tests, checking `document.pictureInPictureElement` also works. It wouldn't\n          // be null in regular picture in picture.\n          // Exit picture in picture mode. This gesture can't trigger pip on the main window.\n          this.exitPictureInPicture();\n        } else if (this.isFullscreen()) {\n          this.exitFullscreen();\n        } else {\n          this.requestFullscreen();\n        }\n      }\n    }\n  }\n\n  /**\n   * Handle a tap on the media element. It will toggle the user\n   * activity state, which hides and shows the controls.\n   *\n   * @listens Tech#tap\n   * @private\n   */\n  handleTechTap_() {\n    this.userActive(!this.userActive());\n  }\n\n  /**\n   * Handle touch to start\n   *\n   * @listens Tech#touchstart\n   * @private\n   */\n  handleTechTouchStart_() {\n    this.userWasActive = this.userActive();\n  }\n\n  /**\n   * Handle touch to move\n   *\n   * @listens Tech#touchmove\n   * @private\n   */\n  handleTechTouchMove_() {\n    if (this.userWasActive) {\n      this.reportUserActivity();\n    }\n  }\n\n  /**\n   * Handle touch to end\n   *\n   * @param {Event} event\n   *        the touchend event that triggered\n   *        this function\n   *\n   * @listens Tech#touchend\n   * @private\n   */\n  handleTechTouchEnd_(event) {\n    // Stop the mouse events from also happening\n    if (event.cancelable) {\n      event.preventDefault();\n    }\n  }\n\n  /**\n   * @private\n   */\n  toggleFullscreenClass_() {\n    if (this.isFullscreen()) {\n      this.addClass('vjs-fullscreen');\n    } else {\n      this.removeClass('vjs-fullscreen');\n    }\n  }\n\n  /**\n   * when the document fschange event triggers it calls this\n   */\n  documentFullscreenChange_(e) {\n    const targetPlayer = e.target.player;\n\n    // if another player was fullscreen\n    // do a null check for targetPlayer because older firefox's would put document as e.target\n    if (targetPlayer && targetPlayer !== this) {\n      return;\n    }\n    const el = this.el();\n    let isFs = document$1[this.fsApi_.fullscreenElement] === el;\n    if (!isFs && el.matches) {\n      isFs = el.matches(':' + this.fsApi_.fullscreen);\n    }\n    this.isFullscreen(isFs);\n  }\n\n  /**\n   * Handle Tech Fullscreen Change\n   *\n   * @param {Event} event\n   *        the fullscreenchange event that triggered this function\n   *\n   * @param {Object} data\n   *        the data that was sent with the event\n   *\n   * @private\n   * @listens Tech#fullscreenchange\n   * @fires Player#fullscreenchange\n   */\n  handleTechFullscreenChange_(event, data) {\n    if (data) {\n      if (data.nativeIOSFullscreen) {\n        this.addClass('vjs-ios-native-fs');\n        this.tech_.one('webkitendfullscreen', () => {\n          this.removeClass('vjs-ios-native-fs');\n        });\n      }\n      this.isFullscreen(data.isFullscreen);\n    }\n  }\n  handleTechFullscreenError_(event, err) {\n    this.trigger('fullscreenerror', err);\n  }\n\n  /**\n   * @private\n   */\n  togglePictureInPictureClass_() {\n    if (this.isInPictureInPicture()) {\n      this.addClass('vjs-picture-in-picture');\n    } else {\n      this.removeClass('vjs-picture-in-picture');\n    }\n  }\n\n  /**\n   * Handle Tech Enter Picture-in-Picture.\n   *\n   * @param {Event} event\n   *        the enterpictureinpicture event that triggered this function\n   *\n   * @private\n   * @listens Tech#enterpictureinpicture\n   */\n  handleTechEnterPictureInPicture_(event) {\n    this.isInPictureInPicture(true);\n  }\n\n  /**\n   * Handle Tech Leave Picture-in-Picture.\n   *\n   * @param {Event} event\n   *        the leavepictureinpicture event that triggered this function\n   *\n   * @private\n   * @listens Tech#leavepictureinpicture\n   */\n  handleTechLeavePictureInPicture_(event) {\n    this.isInPictureInPicture(false);\n  }\n\n  /**\n   * Fires when an error occurred during the loading of an audio/video.\n   *\n   * @private\n   * @listens Tech#error\n   */\n  handleTechError_() {\n    const error = this.tech_.error();\n    if (error) {\n      this.error(error);\n    }\n  }\n\n  /**\n   * Retrigger the `textdata` event that was triggered by the {@link Tech}.\n   *\n   * @fires Player#textdata\n   * @listens Tech#textdata\n   * @private\n   */\n  handleTechTextData_() {\n    let data = null;\n    if (arguments.length > 1) {\n      data = arguments[1];\n    }\n\n    /**\n     * Fires when we get a textdata event from tech\n     *\n     * @event Player#textdata\n     * @type {Event}\n     */\n    this.trigger('textdata', data);\n  }\n\n  /**\n   * Get object for cached values.\n   *\n   * @return {Object}\n   *         get the current object cache\n   */\n  getCache() {\n    return this.cache_;\n  }\n\n  /**\n   * Resets the internal cache object.\n   *\n   * Using this function outside the player constructor or reset method may\n   * have unintended side-effects.\n   *\n   * @private\n   */\n  resetCache_() {\n    this.cache_ = {\n      // Right now, the currentTime is not _really_ cached because it is always\n      // retrieved from the tech (see: currentTime). However, for completeness,\n      // we set it to zero here to ensure that if we do start actually caching\n      // it, we reset it along with everything else.\n      currentTime: 0,\n      initTime: 0,\n      inactivityTimeout: this.options_.inactivityTimeout,\n      duration: NaN,\n      lastVolume: 1,\n      lastPlaybackRate: this.defaultPlaybackRate(),\n      media: null,\n      src: '',\n      source: {},\n      sources: [],\n      playbackRates: [],\n      volume: 1\n    };\n  }\n\n  /**\n   * Pass values to the playback tech\n   *\n   * @param {string} [method]\n   *        the method to call\n   *\n   * @param {Object} [arg]\n   *        the argument to pass\n   *\n   * @private\n   */\n  techCall_(method, arg) {\n    // If it's not ready yet, call method when it is\n\n    this.ready(function () {\n      if (method in allowedSetters) {\n        return set(this.middleware_, this.tech_, method, arg);\n      } else if (method in allowedMediators) {\n        return mediate(this.middleware_, this.tech_, method, arg);\n      }\n      try {\n        if (this.tech_) {\n          this.tech_[method](arg);\n        }\n      } catch (e) {\n        log$1(e);\n        throw e;\n      }\n    }, true);\n  }\n\n  /**\n   * Mediate attempt to call playback tech method\n   * and return the value of the method called.\n   *\n   * @param {string} method\n   *        Tech method\n   *\n   * @return {*}\n   *         Value returned by the tech method called, undefined if tech\n   *         is not ready or tech method is not present\n   *\n   * @private\n   */\n  techGet_(method) {\n    if (!this.tech_ || !this.tech_.isReady_) {\n      return;\n    }\n    if (method in allowedGetters) {\n      return get(this.middleware_, this.tech_, method);\n    } else if (method in allowedMediators) {\n      return mediate(this.middleware_, this.tech_, method);\n    }\n\n    // Log error when playback tech object is present but method\n    // is undefined or unavailable\n    try {\n      return this.tech_[method]();\n    } catch (e) {\n      // When building additional tech libs, an expected method may not be defined yet\n      if (this.tech_[method] === undefined) {\n        log$1(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n        throw e;\n      }\n\n      // When a method isn't available on the object it throws a TypeError\n      if (e.name === 'TypeError') {\n        log$1(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n        this.tech_.isReady_ = false;\n        throw e;\n      }\n\n      // If error unknown, just log and throw\n      log$1(e);\n      throw e;\n    }\n  }\n\n  /**\n   * Attempt to begin playback at the first opportunity.\n   *\n   * @return {Promise|undefined}\n   *         Returns a promise if the browser supports Promises (or one\n   *         was passed in as an option). This promise will be resolved on\n   *         the return value of play. If this is undefined it will fulfill the\n   *         promise chain otherwise the promise chain will be fulfilled when\n   *         the promise from play is fulfilled.\n   */\n  play() {\n    return new Promise(resolve => {\n      this.play_(resolve);\n    });\n  }\n\n  /**\n   * The actual logic for play, takes a callback that will be resolved on the\n   * return value of play. This allows us to resolve to the play promise if there\n   * is one on modern browsers.\n   *\n   * @private\n   * @param {Function} [callback]\n   *        The callback that should be called when the techs play is actually called\n   */\n  play_(callback = silencePromise) {\n    this.playCallbacks_.push(callback);\n    const isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc()));\n    const isSafariOrIOS = Boolean(IS_ANY_SAFARI || IS_IOS);\n\n    // treat calls to play_ somewhat like the `one` event function\n    if (this.waitToPlay_) {\n      this.off(['ready', 'loadstart'], this.waitToPlay_);\n      this.waitToPlay_ = null;\n    }\n\n    // if the player/tech is not ready or the src itself is not ready\n    // queue up a call to play on `ready` or `loadstart`\n    if (!this.isReady_ || !isSrcReady) {\n      this.waitToPlay_ = e => {\n        this.play_();\n      };\n      this.one(['ready', 'loadstart'], this.waitToPlay_);\n\n      // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\n      // in that case, we need to prime the video element by calling load so it'll be ready in time\n      if (!isSrcReady && isSafariOrIOS) {\n        this.load();\n      }\n      return;\n    }\n\n    // If the player/tech is ready and we have a source, we can attempt playback.\n    const val = this.techGet_('play');\n\n    // For native playback, reset the progress bar if we get a play call from a replay.\n    const isNativeReplay = isSafariOrIOS && this.hasClass('vjs-ended');\n    if (isNativeReplay) {\n      this.resetProgressBar_();\n    }\n    // play was terminated if the returned value is null\n    if (val === null) {\n      this.runPlayTerminatedQueue_();\n    } else {\n      this.runPlayCallbacks_(val);\n    }\n  }\n\n  /**\n   * These functions will be run when if play is terminated. If play\n   * runPlayCallbacks_ is run these function will not be run. This allows us\n   * to differentiate between a terminated play and an actual call to play.\n   */\n  runPlayTerminatedQueue_() {\n    const queue = this.playTerminatedQueue_.slice(0);\n    this.playTerminatedQueue_ = [];\n    queue.forEach(function (q) {\n      q();\n    });\n  }\n\n  /**\n   * When a callback to play is delayed we have to run these\n   * callbacks when play is actually called on the tech. This function\n   * runs the callbacks that were delayed and accepts the return value\n   * from the tech.\n   *\n   * @param {undefined|Promise} val\n   *        The return value from the tech.\n   */\n  runPlayCallbacks_(val) {\n    const callbacks = this.playCallbacks_.slice(0);\n    this.playCallbacks_ = [];\n    // clear play terminatedQueue since we finished a real play\n    this.playTerminatedQueue_ = [];\n    callbacks.forEach(function (cb) {\n      cb(val);\n    });\n  }\n\n  /**\n   * Pause the video playback\n   */\n  pause() {\n    this.techCall_('pause');\n  }\n\n  /**\n   * Check if the player is paused or has yet to play\n   *\n   * @return {boolean}\n   *         - false: if the media is currently playing\n   *         - true: if media is not currently playing\n   */\n  paused() {\n    // The initial state of paused should be true (in Safari it's actually false)\n    return this.techGet_('paused') === false ? false : true;\n  }\n\n  /**\n   * Get a TimeRange object representing the current ranges of time that the user\n   * has played.\n   *\n   * @return {TimeRange}\n   *         A time range object that represents all the increments of time that have\n   *         been played.\n   */\n  played() {\n    return this.techGet_('played') || createTimeRanges$1(0, 0);\n  }\n\n  /**\n   * Sets or returns whether or not the user is \"scrubbing\". Scrubbing is\n   * when the user has clicked the progress bar handle and is\n   * dragging it along the progress bar.\n   *\n   * @param {boolean} [isScrubbing]\n   *        whether the user is or is not scrubbing\n   *\n   * @return {boolean|undefined}\n   *         - The value of scrubbing when getting\n   *         - Nothing when setting\n   */\n  scrubbing(isScrubbing) {\n    if (typeof isScrubbing === 'undefined') {\n      return this.scrubbing_;\n    }\n    this.scrubbing_ = !!isScrubbing;\n    this.techCall_('setScrubbing', this.scrubbing_);\n    if (isScrubbing) {\n      this.addClass('vjs-scrubbing');\n    } else {\n      this.removeClass('vjs-scrubbing');\n    }\n  }\n\n  /**\n   * Get or set the current time (in seconds)\n   *\n   * @param {number|string} [seconds]\n   *        The time to seek to in seconds\n   *\n   * @return {number|undefined}\n   *         - the current time in seconds when getting\n   *         - Nothing when setting\n   */\n  currentTime(seconds) {\n    if (seconds === undefined) {\n      // cache last currentTime and return. default to 0 seconds\n      //\n      // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n      // currentTime when scrubbing, but may not provide much performance benefit after all.\n      // Should be tested. Also something has to read the actual current time or the cache will\n      // never get updated.\n      this.cache_.currentTime = this.techGet_('currentTime') || 0;\n      return this.cache_.currentTime;\n    }\n    if (seconds < 0) {\n      seconds = 0;\n    }\n    if (!this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) {\n      this.cache_.initTime = seconds;\n      this.off('canplay', this.boundApplyInitTime_);\n      this.one('canplay', this.boundApplyInitTime_);\n      return;\n    }\n    this.techCall_('setCurrentTime', seconds);\n    this.cache_.initTime = 0;\n    if (isFinite(seconds)) {\n      this.cache_.currentTime = Number(seconds);\n    }\n  }\n\n  /**\n   * Apply the value of initTime stored in cache as currentTime.\n   *\n   * @private\n   */\n  applyInitTime_() {\n    this.currentTime(this.cache_.initTime);\n  }\n\n  /**\n   * Normally gets the length in time of the video in seconds;\n   * in all but the rarest use cases an argument will NOT be passed to the method\n   *\n   * > **NOTE**: The video must have started loading before the duration can be\n   * known, and depending on preload behaviour may not be known until the video starts\n   * playing.\n   *\n   * @fires Player#durationchange\n   *\n   * @param {number} [seconds]\n   *        The duration of the video to set in seconds\n   *\n   * @return {number|undefined}\n   *         - The duration of the video in seconds when getting\n   *         - Nothing when setting\n   */\n  duration(seconds) {\n    if (seconds === undefined) {\n      // return NaN if the duration is not known\n      return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\n    }\n    seconds = parseFloat(seconds);\n\n    // Standardize on Infinity for signaling video is live\n    if (seconds < 0) {\n      seconds = Infinity;\n    }\n    if (seconds !== this.cache_.duration) {\n      // Cache the last set value for optimized scrubbing\n      this.cache_.duration = seconds;\n      if (seconds === Infinity) {\n        this.addClass('vjs-live');\n      } else {\n        this.removeClass('vjs-live');\n      }\n      if (!isNaN(seconds)) {\n        // Do not fire durationchange unless the duration value is known.\n        // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\n\n        /**\n         * @event Player#durationchange\n         * @type {Event}\n         */\n        this.trigger('durationchange');\n      }\n    }\n  }\n\n  /**\n   * Calculates how much time is left in the video. Not part\n   * of the native video API.\n   *\n   * @return {number}\n   *         The time remaining in seconds\n   */\n  remainingTime() {\n    return this.duration() - this.currentTime();\n  }\n\n  /**\n   * A remaining time function that is intended to be used when\n   * the time is to be displayed directly to the user.\n   *\n   * @return {number}\n   *         The rounded time remaining in seconds\n   */\n  remainingTimeDisplay() {\n    return Math.floor(this.duration()) - Math.floor(this.currentTime());\n  }\n\n  //\n  // Kind of like an array of portions of the video that have been downloaded.\n\n  /**\n   * Get a TimeRange object with an array of the times of the video\n   * that have been downloaded. If you just want the percent of the\n   * video that's been downloaded, use bufferedPercent.\n   *\n   * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\n   *\n   * @return {TimeRange}\n   *         A mock {@link TimeRanges} object (following HTML spec)\n   */\n  buffered() {\n    let buffered = this.techGet_('buffered');\n    if (!buffered || !buffered.length) {\n      buffered = createTimeRanges$1(0, 0);\n    }\n    return buffered;\n  }\n\n  /**\n   * Get the TimeRanges of the media that are currently available\n   * for seeking to.\n   *\n   * @see [Seekable Spec]{@link https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable}\n   *\n   * @return {TimeRange}\n   *         A mock {@link TimeRanges} object (following HTML spec)\n   */\n  seekable() {\n    let seekable = this.techGet_('seekable');\n    if (!seekable || !seekable.length) {\n      seekable = createTimeRanges$1(0, 0);\n    }\n    return seekable;\n  }\n\n  /**\n   * Returns whether the player is in the \"seeking\" state.\n   *\n   * @return {boolean} True if the player is in the seeking state, false if not.\n   */\n  seeking() {\n    return this.techGet_('seeking');\n  }\n\n  /**\n   * Returns whether the player is in the \"ended\" state.\n   *\n   * @return {boolean} True if the player is in the ended state, false if not.\n   */\n  ended() {\n    return this.techGet_('ended');\n  }\n\n  /**\n   * Returns the current state of network activity for the element, from\n   * the codes in the list below.\n   * - NETWORK_EMPTY (numeric value 0)\n   *   The element has not yet been initialised. All attributes are in\n   *   their initial states.\n   * - NETWORK_IDLE (numeric value 1)\n   *   The element's resource selection algorithm is active and has\n   *   selected a resource, but it is not actually using the network at\n   *   this time.\n   * - NETWORK_LOADING (numeric value 2)\n   *   The user agent is actively trying to download data.\n   * - NETWORK_NO_SOURCE (numeric value 3)\n   *   The element's resource selection algorithm is active, but it has\n   *   not yet found a resource to use.\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n   * @return {number} the current network activity state\n   */\n  networkState() {\n    return this.techGet_('networkState');\n  }\n\n  /**\n   * Returns a value that expresses the current state of the element\n   * with respect to rendering the current playback position, from the\n   * codes in the list below.\n   * - HAVE_NOTHING (numeric value 0)\n   *   No information regarding the media resource is available.\n   * - HAVE_METADATA (numeric value 1)\n   *   Enough of the resource has been obtained that the duration of the\n   *   resource is available.\n   * - HAVE_CURRENT_DATA (numeric value 2)\n   *   Data for the immediate current playback position is available.\n   * - HAVE_FUTURE_DATA (numeric value 3)\n   *   Data for the immediate current playback position is available, as\n   *   well as enough data for the user agent to advance the current\n   *   playback position in the direction of playback.\n   * - HAVE_ENOUGH_DATA (numeric value 4)\n   *   The user agent estimates that enough data is available for\n   *   playback to proceed uninterrupted.\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n   * @return {number} the current playback rendering state\n   */\n  readyState() {\n    return this.techGet_('readyState');\n  }\n\n  /**\n   * Get the percent (as a decimal) of the video that's been downloaded.\n   * This method is not a part of the native HTML video API.\n   *\n   * @return {number}\n   *         A decimal between 0 and 1 representing the percent\n   *         that is buffered 0 being 0% and 1 being 100%\n   */\n  bufferedPercent() {\n    return bufferedPercent(this.buffered(), this.duration());\n  }\n\n  /**\n   * Get the ending time of the last buffered time range\n   * This is used in the progress bar to encapsulate all time ranges.\n   *\n   * @return {number}\n   *         The end of the last buffered time range\n   */\n  bufferedEnd() {\n    const buffered = this.buffered();\n    const duration = this.duration();\n    let end = buffered.end(buffered.length - 1);\n    if (end > duration) {\n      end = duration;\n    }\n    return end;\n  }\n\n  /**\n   * Get or set the current volume of the media\n   *\n   * @param  {number} [percentAsDecimal]\n   *         The new volume as a decimal percent:\n   *         - 0 is muted/0%/off\n   *         - 1.0 is 100%/full\n   *         - 0.5 is half volume or 50%\n   *\n   * @return {number|undefined}\n   *         The current volume as a percent when getting\n   */\n  volume(percentAsDecimal) {\n    let vol;\n    if (percentAsDecimal !== undefined) {\n      // Force value to between 0 and 1\n      vol = Math.max(0, Math.min(1, percentAsDecimal));\n      this.cache_.volume = vol;\n      this.techCall_('setVolume', vol);\n      if (vol > 0) {\n        this.lastVolume_(vol);\n      }\n      return;\n    }\n\n    // Default to 1 when returning current volume.\n    vol = parseFloat(this.techGet_('volume'));\n    return isNaN(vol) ? 1 : vol;\n  }\n\n  /**\n   * Get the current muted state, or turn mute on or off\n   *\n   * @param {boolean} [muted]\n   *        - true to mute\n   *        - false to unmute\n   *\n   * @return {boolean|undefined}\n   *         - true if mute is on and getting\n   *         - false if mute is off and getting\n   *         - nothing if setting\n   */\n  muted(muted) {\n    if (muted !== undefined) {\n      this.techCall_('setMuted', muted);\n      return;\n    }\n    return this.techGet_('muted') || false;\n  }\n\n  /**\n   * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\n   * indicates the state of muted on initial playback.\n   *\n   * ```js\n   *   var myPlayer = videojs('some-player-id');\n   *\n   *   myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n   *\n   *   // get, should be false\n   *   console.log(myPlayer.defaultMuted());\n   *   // set to true\n   *   myPlayer.defaultMuted(true);\n   *   // get should be true\n   *   console.log(myPlayer.defaultMuted());\n   * ```\n   *\n   * @param {boolean} [defaultMuted]\n   *        - true to mute\n   *        - false to unmute\n   *\n   * @return {boolean|undefined}\n   *         - true if defaultMuted is on and getting\n   *         - false if defaultMuted is off and getting\n   *         - Nothing when setting\n   */\n  defaultMuted(defaultMuted) {\n    if (defaultMuted !== undefined) {\n      this.techCall_('setDefaultMuted', defaultMuted);\n    }\n    return this.techGet_('defaultMuted') || false;\n  }\n\n  /**\n   * Get the last volume, or set it\n   *\n   * @param  {number} [percentAsDecimal]\n   *         The new last volume as a decimal percent:\n   *         - 0 is muted/0%/off\n   *         - 1.0 is 100%/full\n   *         - 0.5 is half volume or 50%\n   *\n   * @return {number|undefined}\n   *         - The current value of lastVolume as a percent when getting\n   *         - Nothing when setting\n   *\n   * @private\n   */\n  lastVolume_(percentAsDecimal) {\n    if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\n      this.cache_.lastVolume = percentAsDecimal;\n      return;\n    }\n    return this.cache_.lastVolume;\n  }\n\n  /**\n   * Check if current tech can support native fullscreen\n   * (e.g. with built in controls like iOS)\n   *\n   * @return {boolean}\n   *         if native fullscreen is supported\n   */\n  supportsFullScreen() {\n    return this.techGet_('supportsFullScreen') || false;\n  }\n\n  /**\n   * Check if the player is in fullscreen mode or tell the player that it\n   * is or is not in fullscreen mode.\n   *\n   * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n   * property and instead document.fullscreenElement is used. But isFullscreen is\n   * still a valuable property for internal player workings.\n   *\n   * @param  {boolean} [isFS]\n   *         Set the players current fullscreen state\n   *\n   * @return {boolean|undefined}\n   *         - true if fullscreen is on and getting\n   *         - false if fullscreen is off and getting\n   *         - Nothing when setting\n   */\n  isFullscreen(isFS) {\n    if (isFS !== undefined) {\n      const oldValue = this.isFullscreen_;\n      this.isFullscreen_ = Boolean(isFS);\n\n      // if we changed fullscreen state and we're in prefixed mode, trigger fullscreenchange\n      // this is the only place where we trigger fullscreenchange events for older browsers\n      // fullWindow mode is treated as a prefixed event and will get a fullscreenchange event as well\n      if (this.isFullscreen_ !== oldValue && this.fsApi_.prefixed) {\n        /**\n           * @event Player#fullscreenchange\n           * @type {Event}\n           */\n        this.trigger('fullscreenchange');\n      }\n      this.toggleFullscreenClass_();\n      return;\n    }\n    return this.isFullscreen_;\n  }\n\n  /**\n   * Increase the size of the video to full screen\n   * In some browsers, full screen is not supported natively, so it enters\n   * \"full window mode\", where the video fills the browser window.\n   * In browsers and devices that support native full screen, sometimes the\n   * browser's default controls will be shown, and not the Video.js custom skin.\n   * This includes most mobile devices (iOS, Android) and older versions of\n   * Safari.\n   *\n   * @param  {Object} [fullscreenOptions]\n   *         Override the player fullscreen options\n   *\n   * @fires Player#fullscreenchange\n   */\n  requestFullscreen(fullscreenOptions) {\n    if (this.isInPictureInPicture()) {\n      this.exitPictureInPicture();\n    }\n    const self = this;\n    return new Promise((resolve, reject) => {\n      function offHandler() {\n        self.off('fullscreenerror', errorHandler);\n        self.off('fullscreenchange', changeHandler);\n      }\n      function changeHandler() {\n        offHandler();\n        resolve();\n      }\n      function errorHandler(e, err) {\n        offHandler();\n        reject(err);\n      }\n      self.one('fullscreenchange', changeHandler);\n      self.one('fullscreenerror', errorHandler);\n      const promise = self.requestFullscreenHelper_(fullscreenOptions);\n      if (promise) {\n        promise.then(offHandler, offHandler);\n        promise.then(resolve, reject);\n      }\n    });\n  }\n  requestFullscreenHelper_(fullscreenOptions) {\n    let fsOptions;\n\n    // Only pass fullscreen options to requestFullscreen in spec-compliant browsers.\n    // Use defaults or player configured option unless passed directly to this method.\n    if (!this.fsApi_.prefixed) {\n      fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\n      if (fullscreenOptions !== undefined) {\n        fsOptions = fullscreenOptions;\n      }\n    }\n\n    // This method works as follows:\n    // 1. if a fullscreen api is available, use it\n    //   1. call requestFullscreen with potential options\n    //   2. if we got a promise from above, use it to update isFullscreen()\n    // 2. otherwise, if the tech supports fullscreen, call `enterFullScreen` on it.\n    //   This is particularly used for iPhone, older iPads, and non-safari browser on iOS.\n    // 3. otherwise, use \"fullWindow\" mode\n    if (this.fsApi_.requestFullscreen) {\n      const promise = this.el_[this.fsApi_.requestFullscreen](fsOptions);\n\n      // Even on browsers with promise support this may not return a promise\n      if (promise) {\n        promise.then(() => this.isFullscreen(true), () => this.isFullscreen(false));\n      }\n      return promise;\n    } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n      // we can't take the video.js controls fullscreen but we can go fullscreen\n      // with native controls\n      this.techCall_('enterFullScreen');\n    } else {\n      // fullscreen isn't supported so we'll just stretch the video element to\n      // fill the viewport\n      this.enterFullWindow();\n    }\n  }\n\n  /**\n   * Return the video to its normal size after having been in full screen mode\n   *\n   * @fires Player#fullscreenchange\n   */\n  exitFullscreen() {\n    const self = this;\n    return new Promise((resolve, reject) => {\n      function offHandler() {\n        self.off('fullscreenerror', errorHandler);\n        self.off('fullscreenchange', changeHandler);\n      }\n      function changeHandler() {\n        offHandler();\n        resolve();\n      }\n      function errorHandler(e, err) {\n        offHandler();\n        reject(err);\n      }\n      self.one('fullscreenchange', changeHandler);\n      self.one('fullscreenerror', errorHandler);\n      const promise = self.exitFullscreenHelper_();\n      if (promise) {\n        promise.then(offHandler, offHandler);\n        // map the promise to our resolve/reject methods\n        promise.then(resolve, reject);\n      }\n    });\n  }\n  exitFullscreenHelper_() {\n    if (this.fsApi_.requestFullscreen) {\n      const promise = document$1[this.fsApi_.exitFullscreen]();\n\n      // Even on browsers with promise support this may not return a promise\n      if (promise) {\n        // we're splitting the promise here, so, we want to catch the\n        // potential error so that this chain doesn't have unhandled errors\n        silencePromise(promise.then(() => this.isFullscreen(false)));\n      }\n      return promise;\n    } else if (this.tech_.supportsFullScreen() && !this.options_.preferFullWindow === true) {\n      this.techCall_('exitFullScreen');\n    } else {\n      this.exitFullWindow();\n    }\n  }\n\n  /**\n   * When fullscreen isn't supported we can stretch the\n   * video container to as wide as the browser will let us.\n   *\n   * @fires Player#enterFullWindow\n   */\n  enterFullWindow() {\n    this.isFullscreen(true);\n    this.isFullWindow = true;\n\n    // Storing original doc overflow value to return to when fullscreen is off\n    this.docOrigOverflow = document$1.documentElement.style.overflow;\n\n    // Add listener for esc key to exit fullscreen\n    on(document$1, 'keydown', this.boundFullWindowOnEscKey_);\n\n    // Hide any scroll bars\n    document$1.documentElement.style.overflow = 'hidden';\n\n    // Apply fullscreen styles\n    addClass(document$1.body, 'vjs-full-window');\n\n    /**\n     * @event Player#enterFullWindow\n     * @type {Event}\n     */\n    this.trigger('enterFullWindow');\n  }\n\n  /**\n   * Check for call to either exit full window or\n   * full screen on ESC key\n   *\n   * @param {string} event\n   *        Event to check for key press\n   */\n  fullWindowOnEscKey(event) {\n    if (event.key === 'Escape') {\n      if (this.isFullscreen() === true) {\n        if (!this.isFullWindow) {\n          this.exitFullscreen();\n        } else {\n          this.exitFullWindow();\n        }\n      }\n    }\n  }\n\n  /**\n   * Exit full window\n   *\n   * @fires Player#exitFullWindow\n   */\n  exitFullWindow() {\n    this.isFullscreen(false);\n    this.isFullWindow = false;\n    off(document$1, 'keydown', this.boundFullWindowOnEscKey_);\n\n    // Unhide scroll bars.\n    document$1.documentElement.style.overflow = this.docOrigOverflow;\n\n    // Remove fullscreen styles\n    removeClass(document$1.body, 'vjs-full-window');\n\n    // Resize the box, controller, and poster to original sizes\n    // this.positionAll();\n    /**\n     * @event Player#exitFullWindow\n     * @type {Event}\n     */\n    this.trigger('exitFullWindow');\n  }\n\n  /**\n   * Get or set disable Picture-in-Picture mode.\n   *\n   * @param {boolean} [value]\n   *                  - true will disable Picture-in-Picture mode\n   *                  - false will enable Picture-in-Picture mode\n   */\n  disablePictureInPicture(value) {\n    if (value === undefined) {\n      return this.techGet_('disablePictureInPicture');\n    }\n    this.techCall_('setDisablePictureInPicture', value);\n    this.options_.disablePictureInPicture = value;\n    this.trigger('disablepictureinpicturechanged');\n  }\n\n  /**\n   * Check if the player is in Picture-in-Picture mode or tell the player that it\n   * is or is not in Picture-in-Picture mode.\n   *\n   * @param  {boolean} [isPiP]\n   *         Set the players current Picture-in-Picture state\n   *\n   * @return {boolean|undefined}\n   *         - true if Picture-in-Picture is on and getting\n   *         - false if Picture-in-Picture is off and getting\n   *         - nothing if setting\n   */\n  isInPictureInPicture(isPiP) {\n    if (isPiP !== undefined) {\n      this.isInPictureInPicture_ = !!isPiP;\n      this.togglePictureInPictureClass_();\n      return;\n    }\n    return !!this.isInPictureInPicture_;\n  }\n\n  /**\n   * Create a floating video window always on top of other windows so that users may\n   * continue consuming media while they interact with other content sites, or\n   * applications on their device.\n   *\n   * This can use document picture-in-picture or element picture in picture\n   *\n   * Set `enableDocumentPictureInPicture` to `true` to use docPiP on a supported browser\n   * Else set `disablePictureInPicture` to `false` to disable elPiP on a supported browser\n   *\n   *\n   * @see [Spec]{@link https://w3c.github.io/picture-in-picture/}\n   * @see [Spec]{@link https://wicg.github.io/document-picture-in-picture/}\n   *\n   * @fires Player#enterpictureinpicture\n   *\n   * @return {Promise}\n   *         A promise with a Picture-in-Picture window.\n   */\n  requestPictureInPicture() {\n    if (this.options_.enableDocumentPictureInPicture && window$1.documentPictureInPicture) {\n      const pipContainer = document$1.createElement(this.el().tagName);\n      pipContainer.classList = this.el().classList;\n      pipContainer.classList.add('vjs-pip-container');\n      if (this.posterImage) {\n        pipContainer.appendChild(this.posterImage.el().cloneNode(true));\n      }\n      if (this.titleBar) {\n        pipContainer.appendChild(this.titleBar.el().cloneNode(true));\n      }\n      pipContainer.appendChild(createEl('p', {\n        className: 'vjs-pip-text'\n      }, {}, this.localize('Playing in picture-in-picture')));\n      return window$1.documentPictureInPicture.requestWindow({\n        // The aspect ratio won't be correct, Chrome bug https://crbug.com/1407629\n        width: this.videoWidth(),\n        height: this.videoHeight()\n      }).then(pipWindow => {\n        copyStyleSheetsToWindow(pipWindow);\n        this.el_.parentNode.insertBefore(pipContainer, this.el_);\n        pipWindow.document.body.appendChild(this.el_);\n        pipWindow.document.body.classList.add('vjs-pip-window');\n        this.player_.isInPictureInPicture(true);\n        this.player_.trigger({\n          type: 'enterpictureinpicture',\n          pipWindow\n        });\n\n        // Listen for the PiP closing event to move the video back.\n        pipWindow.addEventListener('pagehide', event => {\n          const pipVideo = event.target.querySelector('.video-js');\n          pipContainer.parentNode.replaceChild(pipVideo, pipContainer);\n          this.player_.isInPictureInPicture(false);\n          this.player_.trigger('leavepictureinpicture');\n        });\n        return pipWindow;\n      });\n    }\n    if ('pictureInPictureEnabled' in document$1 && this.disablePictureInPicture() === false) {\n      /**\n       * This event fires when the player enters picture in picture mode\n       *\n       * @event Player#enterpictureinpicture\n       * @type {Event}\n       */\n      return this.techGet_('requestPictureInPicture');\n    }\n    return Promise.reject('No PiP mode is available');\n  }\n\n  /**\n   * Exit Picture-in-Picture mode.\n   *\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\n   *\n   * @fires Player#leavepictureinpicture\n   *\n   * @return {Promise}\n   *         A promise.\n   */\n  exitPictureInPicture() {\n    if (window$1.documentPictureInPicture && window$1.documentPictureInPicture.window) {\n      // With documentPictureInPicture, Player#leavepictureinpicture is fired in the pagehide handler\n      window$1.documentPictureInPicture.window.close();\n      return Promise.resolve();\n    }\n    if ('pictureInPictureEnabled' in document$1) {\n      /**\n       * This event fires when the player leaves picture in picture mode\n       *\n       * @event Player#leavepictureinpicture\n       * @type {Event}\n       */\n      return document$1.exitPictureInPicture();\n    }\n  }\n\n  /**\n   * Called when this Player has focus and a key gets pressed down, or when\n   * any Component of this player receives a key press that it doesn't handle.\n   * This allows player-wide hotkeys (either as defined below, or optionally\n   * by an external function).\n   *\n   * @param {KeyboardEvent} event\n   *        The `keydown` event that caused this function to be called.\n   *\n   * @listens keydown\n   */\n  handleKeyDown(event) {\n    const {\n      userActions\n    } = this.options_;\n\n    // Bail out if hotkeys are not configured.\n    if (!userActions || !userActions.hotkeys) {\n      return;\n    }\n\n    // Function that determines whether or not to exclude an element from\n    // hotkeys handling.\n    const excludeElement = el => {\n      const tagName = el.tagName.toLowerCase();\n\n      // The first and easiest test is for `contenteditable` elements.\n      if (el.isContentEditable) {\n        return true;\n      }\n\n      // Inputs matching these types will still trigger hotkey handling as\n      // they are not text inputs.\n      const allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\n      if (tagName === 'input') {\n        return allowedInputTypes.indexOf(el.type) === -1;\n      }\n\n      // The final test is by tag name. These tags will be excluded entirely.\n      const excludedTags = ['textarea'];\n      return excludedTags.indexOf(tagName) !== -1;\n    };\n\n    // Bail out if the user is focused on an interactive form element.\n    if (excludeElement(this.el_.ownerDocument.activeElement)) {\n      return;\n    }\n    if (typeof userActions.hotkeys === 'function') {\n      userActions.hotkeys.call(this, event);\n    } else {\n      this.handleHotkeys(event);\n    }\n  }\n\n  /**\n   * Called when this Player receives a hotkey keydown event.\n   * Supported player-wide hotkeys are:\n   *\n   *   f          - toggle fullscreen\n   *   m          - toggle mute\n   *   k or Space - toggle play/pause\n   *\n   * @param {Event} event\n   *        The `keydown` event that caused this function to be called.\n   */\n  handleHotkeys(event) {\n    const hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {};\n\n    // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\n    const {\n      fullscreenKey = keydownEvent => event.key.toLowerCase() === 'f',\n      muteKey = keydownEvent => event.key.toLowerCase() === 'm',\n      playPauseKey = keydownEvent => event.key.toLowerCase() === 'k' || event.key.toLowerCase() === ' '\n    } = hotkeys;\n    if (fullscreenKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const FSToggle = Component$1.getComponent('FullscreenToggle');\n      if (document$1[this.fsApi_.fullscreenEnabled] !== false) {\n        FSToggle.prototype.handleClick.call(this, event);\n      }\n    } else if (muteKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const MuteToggle = Component$1.getComponent('MuteToggle');\n      MuteToggle.prototype.handleClick.call(this, event);\n    } else if (playPauseKey.call(this, event)) {\n      event.preventDefault();\n      event.stopPropagation();\n      const PlayToggle = Component$1.getComponent('PlayToggle');\n      PlayToggle.prototype.handleClick.call(this, event);\n    }\n  }\n\n  /**\n   * Check whether the player can play a given mimetype\n   *\n   * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\n   *\n   * @param {string} type\n   *        The mimetype to check\n   *\n   * @return {string}\n   *         'probably', 'maybe', or '' (empty string)\n   */\n  canPlayType(type) {\n    let can;\n\n    // Loop through each playback technology in the options order\n    for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n      const techName = j[i];\n      let tech = Tech.getTech(techName);\n\n      // Support old behavior of techs being registered as components.\n      // Remove once that deprecated behavior is removed.\n      if (!tech) {\n        tech = Component$1.getComponent(techName);\n      }\n\n      // Check if the current tech is defined before continuing\n      if (!tech) {\n        log$1.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n        continue;\n      }\n\n      // Check if the browser supports this technology\n      if (tech.isSupported()) {\n        can = tech.canPlayType(type);\n        if (can) {\n          return can;\n        }\n      }\n    }\n    return '';\n  }\n\n  /**\n   * Select source based on tech-order or source-order\n   * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n   * defaults to tech-order selection\n   *\n   * @param {Array} sources\n   *        The sources for a media asset\n   *\n   * @return {Object|boolean}\n   *         Object of source and tech order or false\n   */\n  selectSource(sources) {\n    // Get only the techs specified in `techOrder` that exist and are supported by the\n    // current platform\n    const techs = this.options_.techOrder.map(techName => {\n      return [techName, Tech.getTech(techName)];\n    }).filter(([techName, tech]) => {\n      // Check if the current tech is defined before continuing\n      if (tech) {\n        // Check if the browser supports this technology\n        return tech.isSupported();\n      }\n      log$1.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n      return false;\n    });\n\n    // Iterate over each `innerArray` element once per `outerArray` element and execute\n    // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n    // that value.\n    const findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n      let found;\n      outerArray.some(outerChoice => {\n        return innerArray.some(innerChoice => {\n          found = tester(outerChoice, innerChoice);\n          if (found) {\n            return true;\n          }\n        });\n      });\n      return found;\n    };\n    let foundSourceAndTech;\n    const flip = fn => (a, b) => fn(b, a);\n    const finder = ([techName, tech], source) => {\n      if (tech.canPlaySource(source, this.options_[techName.toLowerCase()])) {\n        return {\n          source,\n          tech: techName\n        };\n      }\n    };\n\n    // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n    // to select from them based on their priority.\n    if (this.options_.sourceOrder) {\n      // Source-first ordering\n      foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n    } else {\n      // Tech-first ordering\n      foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n    }\n    return foundSourceAndTech || false;\n  }\n\n  /**\n   * Executes source setting and getting logic\n   *\n   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n   *        A SourceObject, an array of SourceObjects, or a string referencing\n   *        a URL to a media source. It is _highly recommended_ that an object\n   *        or array of objects is used here, so that source selection\n   *        algorithms can take the `type` into account.\n   *\n   *        If not provided, this method acts as a getter.\n   * @param {boolean} [isRetry]\n   *        Indicates whether this is being called internally as a result of a retry\n   *\n   * @return {string|undefined}\n   *         If the `source` argument is missing, returns the current source\n   *         URL. Otherwise, returns nothing/undefined.\n   */\n  handleSrc_(source, isRetry) {\n    // getter usage\n    if (typeof source === 'undefined') {\n      return this.cache_.src || '';\n    }\n\n    // Reset retry behavior for new source\n    if (this.resetRetryOnError_) {\n      this.resetRetryOnError_();\n    }\n\n    // filter out invalid sources and turn our source into\n    // an array of source objects\n    const sources = filterSource(source);\n\n    // if a source was passed in then it is invalid because\n    // it was filtered to a zero length Array. So we have to\n    // show an error\n    if (!sources.length) {\n      this.setTimeout(function () {\n        this.error({\n          code: 4,\n          message: this.options_.notSupportedMessage\n        });\n      }, 0);\n      return;\n    }\n\n    // initial sources\n    this.changingSrc_ = true;\n\n    // Only update the cached source list if we are not retrying a new source after error,\n    // since in that case we want to include the failed source(s) in the cache\n    if (!isRetry) {\n      this.cache_.sources = sources;\n    }\n    this.updateSourceCaches_(sources[0]);\n\n    // middlewareSource is the source after it has been changed by middleware\n    setSource(this, sources[0], (middlewareSource, mws) => {\n      this.middleware_ = mws;\n\n      // since sourceSet is async we have to update the cache again after we select a source since\n      // the source that is selected could be out of order from the cache update above this callback.\n      if (!isRetry) {\n        this.cache_.sources = sources;\n      }\n      this.updateSourceCaches_(middlewareSource);\n      const err = this.src_(middlewareSource);\n      if (err) {\n        if (sources.length > 1) {\n          return this.handleSrc_(sources.slice(1));\n        }\n        this.changingSrc_ = false;\n\n        // We need to wrap this in a timeout to give folks a chance to add error event handlers\n        this.setTimeout(function () {\n          this.error({\n            code: 4,\n            message: this.options_.notSupportedMessage\n          });\n        }, 0);\n\n        // we could not find an appropriate tech, but let's still notify the delegate that this is it\n        // this needs a better comment about why this is needed\n        this.triggerReady();\n        return;\n      }\n      setTech(mws, this.tech_);\n    });\n\n    // Try another available source if this one fails before playback.\n    if (sources.length > 1) {\n      const retry = () => {\n        // Remove the error modal\n        this.error(null);\n        this.handleSrc_(sources.slice(1), true);\n      };\n      const stopListeningForErrors = () => {\n        this.off('error', retry);\n      };\n      this.one('error', retry);\n      this.one('playing', stopListeningForErrors);\n      this.resetRetryOnError_ = () => {\n        this.off('error', retry);\n        this.off('playing', stopListeningForErrors);\n      };\n    }\n  }\n\n  /**\n   * Get or set the video source.\n   *\n   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\n   *        A SourceObject, an array of SourceObjects, or a string referencing\n   *        a URL to a media source. It is _highly recommended_ that an object\n   *        or array of objects is used here, so that source selection\n   *        algorithms can take the `type` into account.\n   *\n   *        If not provided, this method acts as a getter.\n   *\n   * @return {string|undefined}\n   *         If the `source` argument is missing, returns the current source\n   *         URL. Otherwise, returns nothing/undefined.\n   */\n  src(source) {\n    return this.handleSrc_(source, false);\n  }\n\n  /**\n   * Set the source object on the tech, returns a boolean that indicates whether\n   * there is a tech that can play the source or not\n   *\n   * @param {Tech~SourceObject} source\n   *        The source object to set on the Tech\n   *\n   * @return {boolean}\n   *         - True if there is no Tech to playback this source\n   *         - False otherwise\n   *\n   * @private\n   */\n  src_(source) {\n    const sourceTech = this.selectSource([source]);\n    if (!sourceTech) {\n      return true;\n    }\n    if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\n      this.changingSrc_ = true;\n      // load this technology with the chosen source\n      this.loadTech_(sourceTech.tech, sourceTech.source);\n      this.tech_.ready(() => {\n        this.changingSrc_ = false;\n      });\n      return false;\n    }\n\n    // wait until the tech is ready to set the source\n    // and set it synchronously if possible (#2326)\n    this.ready(function () {\n      // The setSource tech method was added with source handlers\n      // so older techs won't support it\n      // We need to check the direct prototype for the case where subclasses\n      // of the tech do not support source handlers\n      if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\n        this.techCall_('setSource', source);\n      } else {\n        this.techCall_('src', source.src);\n      }\n      this.changingSrc_ = false;\n    }, true);\n    return false;\n  }\n\n  /**\n   * Add a <source> element to the <video> element.\n   *\n   * @param {string} srcUrl\n   *        The URL of the video source.\n   *\n   * @param {string} [mimeType]\n   *        The MIME type of the video source. Optional but recommended.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully added, false otherwise.\n   */\n  addSourceElement(srcUrl, mimeType) {\n    if (!this.tech_) {\n      return false;\n    }\n    return this.tech_.addSourceElement(srcUrl, mimeType);\n  }\n\n  /**\n   * Remove a <source> element from the <video> element by its URL.\n   *\n   * @param {string} srcUrl\n   *        The URL of the source to remove.\n   *\n   * @return {boolean}\n   *         Returns true if the source element was successfully removed, false otherwise.\n   */\n  removeSourceElement(srcUrl) {\n    if (!this.tech_) {\n      return false;\n    }\n    return this.tech_.removeSourceElement(srcUrl);\n  }\n\n  /**\n   * Begin loading the src data.\n   */\n  load() {\n    // Workaround to use the load method with the VHS.\n    // Does not cover the case when the load method is called directly from the mediaElement.\n    if (this.tech_ && this.tech_.vhs) {\n      this.src(this.currentSource());\n      return;\n    }\n    this.techCall_('load');\n  }\n\n  /**\n   * Reset the player. Loads the first tech in the techOrder,\n   * removes all the text tracks in the existing `tech`,\n   * and calls `reset` on the `tech`.\n   */\n  reset() {\n    if (this.paused()) {\n      this.doReset_();\n    } else {\n      const playPromise = this.play();\n      silencePromise(playPromise.then(() => this.doReset_()));\n    }\n  }\n  doReset_() {\n    if (this.tech_) {\n      this.tech_.clearTracks('text');\n    }\n    this.removeClass('vjs-playing');\n    this.addClass('vjs-paused');\n    this.resetCache_();\n    this.poster('');\n    this.loadTech_(this.options_.techOrder[0], null);\n    this.techCall_('reset');\n    this.resetControlBarUI_();\n    this.error(null);\n    if (this.titleBar) {\n      this.titleBar.update({\n        title: undefined,\n        description: undefined\n      });\n    }\n    if (isEvented(this)) {\n      this.trigger('playerreset');\n    }\n  }\n\n  /**\n   * Reset Control Bar's UI by calling sub-methods that reset\n   * all of Control Bar's components\n   */\n  resetControlBarUI_() {\n    this.resetProgressBar_();\n    this.resetPlaybackRate_();\n    this.resetVolumeBar_();\n  }\n\n  /**\n   * Reset tech's progress so progress bar is reset in the UI\n   */\n  resetProgressBar_() {\n    this.currentTime(0);\n    const {\n      currentTimeDisplay,\n      durationDisplay,\n      progressControl,\n      remainingTimeDisplay\n    } = this.controlBar || {};\n    const {\n      seekBar\n    } = progressControl || {};\n    if (currentTimeDisplay) {\n      currentTimeDisplay.updateContent();\n    }\n    if (durationDisplay) {\n      durationDisplay.updateContent();\n    }\n    if (remainingTimeDisplay) {\n      remainingTimeDisplay.updateContent();\n    }\n    if (seekBar) {\n      seekBar.update();\n      if (seekBar.loadProgressBar) {\n        seekBar.loadProgressBar.update();\n      }\n    }\n  }\n\n  /**\n   * Reset Playback ratio\n   */\n  resetPlaybackRate_() {\n    this.playbackRate(this.defaultPlaybackRate());\n    this.handleTechRateChange_();\n  }\n\n  /**\n   * Reset Volume bar\n   */\n  resetVolumeBar_() {\n    this.volume(1.0);\n    this.trigger('volumechange');\n  }\n\n  /**\n   * Returns all of the current source objects.\n   *\n   * @return {Tech~SourceObject[]}\n   *         The current source objects\n   */\n  currentSources() {\n    const source = this.currentSource();\n    const sources = [];\n\n    // assume `{}` or `{ src }`\n    if (Object.keys(source).length !== 0) {\n      sources.push(source);\n    }\n    return this.cache_.sources || sources;\n  }\n\n  /**\n   * Returns the current source object.\n   *\n   * @return {Tech~SourceObject}\n   *         The current source object\n   */\n  currentSource() {\n    return this.cache_.source || {};\n  }\n\n  /**\n   * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n   * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\n   *\n   * @return {string}\n   *         The current source\n   */\n  currentSrc() {\n    return this.currentSource() && this.currentSource().src || '';\n  }\n\n  /**\n   * Get the current source type e.g. video/mp4\n   * This can allow you rebuild the current source object so that you could load the same\n   * source and tech later\n   *\n   * @return {string}\n   *         The source MIME type\n   */\n  currentType() {\n    return this.currentSource() && this.currentSource().type || '';\n  }\n\n  /**\n   * Get or set the preload attribute\n   *\n   * @param {'none'|'auto'|'metadata'} [value]\n   *        Preload mode to pass to tech\n   *\n   * @return {string|undefined}\n   *         - The preload attribute value when getting\n   *         - Nothing when setting\n   */\n  preload(value) {\n    if (value !== undefined) {\n      this.techCall_('setPreload', value);\n      this.options_.preload = value;\n      return;\n    }\n    return this.techGet_('preload');\n  }\n\n  /**\n   * Get or set the autoplay option. When this is a boolean it will\n   * modify the attribute on the tech. When this is a string the attribute on\n   * the tech will be removed and `Player` will handle autoplay on loadstarts.\n   *\n   * @param {boolean|'play'|'muted'|'any'} [value]\n   *        - true: autoplay using the browser behavior\n   *        - false: do not autoplay\n   *        - 'play': call play() on every loadstart\n   *        - 'muted': call muted() then play() on every loadstart\n   *        - 'any': call play() on every loadstart. if that fails call muted() then play().\n   *        - *: values other than those listed here will be set `autoplay` to true\n   *\n   * @return {boolean|string|undefined}\n   *         - The current value of autoplay when getting\n   *         - Nothing when setting\n   */\n  autoplay(value) {\n    // getter usage\n    if (value === undefined) {\n      return this.options_.autoplay || false;\n    }\n    let techAutoplay;\n\n    // if the value is a valid string set it to that, or normalize `true` to 'play', if need be\n    if (typeof value === 'string' && /(any|play|muted)/.test(value) || value === true && this.options_.normalizeAutoplay) {\n      this.options_.autoplay = value;\n      this.manualAutoplay_(typeof value === 'string' ? value : 'play');\n      techAutoplay = false;\n\n      // any falsy value sets autoplay to false in the browser,\n      // lets do the same\n    } else if (!value) {\n      this.options_.autoplay = false;\n\n      // any other value (ie truthy) sets autoplay to true\n    } else {\n      this.options_.autoplay = true;\n    }\n    techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay;\n\n    // if we don't have a tech then we do not queue up\n    // a setAutoplay call on tech ready. We do this because the\n    // autoplay option will be passed in the constructor and we\n    // do not need to set it twice\n    if (this.tech_) {\n      this.techCall_('setAutoplay', techAutoplay);\n    }\n  }\n\n  /**\n   * Set or unset the playsinline attribute.\n   * Playsinline tells the browser that non-fullscreen playback is preferred.\n   *\n   * @param {boolean} [value]\n   *        - true means that we should try to play inline by default\n   *        - false means that we should use the browser's default playback mode,\n   *          which in most cases is inline. iOS Safari is a notable exception\n   *          and plays fullscreen by default.\n   *\n   * @return {string|undefined}\n   *         - the current value of playsinline\n   *         - Nothing when setting\n   *\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\n   */\n  playsinline(value) {\n    if (value !== undefined) {\n      this.techCall_('setPlaysinline', value);\n      this.options_.playsinline = value;\n    }\n    return this.techGet_('playsinline');\n  }\n\n  /**\n   * Get or set the loop attribute on the video element.\n   *\n   * @param {boolean} [value]\n   *        - true means that we should loop the video\n   *        - false means that we should not loop the video\n   *\n   * @return {boolean|undefined}\n   *         - The current value of loop when getting\n   *         - Nothing when setting\n   */\n  loop(value) {\n    if (value !== undefined) {\n      this.techCall_('setLoop', value);\n      this.options_.loop = value;\n      return;\n    }\n    return this.techGet_('loop');\n  }\n\n  /**\n   * Get or set the poster image source url\n   *\n   * @fires Player#posterchange\n   *\n   * @param {string} [src]\n   *        Poster image source URL\n   *\n   * @return {string|undefined}\n   *         - The current value of poster when getting\n   *         - Nothing when setting\n   */\n  poster(src) {\n    if (src === undefined) {\n      return this.poster_;\n    }\n\n    // The correct way to remove a poster is to set as an empty string\n    // other falsey values will throw errors\n    if (!src) {\n      src = '';\n    }\n    if (src === this.poster_) {\n      return;\n    }\n\n    // update the internal poster variable\n    this.poster_ = src;\n\n    // update the tech's poster\n    this.techCall_('setPoster', src);\n    this.isPosterFromTech_ = false;\n\n    // alert components that the poster has been set\n    /**\n     * This event fires when the poster image is changed on the player.\n     *\n     * @event Player#posterchange\n     * @type {Event}\n     */\n    this.trigger('posterchange');\n  }\n\n  /**\n   * Some techs (e.g. YouTube) can provide a poster source in an\n   * asynchronous way. We want the poster component to use this\n   * poster source so that it covers up the tech's controls.\n   * (YouTube's play button). However we only want to use this\n   * source if the player user hasn't set a poster through\n   * the normal APIs.\n   *\n   * @fires Player#posterchange\n   * @listens Tech#posterchange\n   * @private\n   */\n  handleTechPosterChange_() {\n    if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\n      const newPoster = this.tech_.poster() || '';\n      if (newPoster !== this.poster_) {\n        this.poster_ = newPoster;\n        this.isPosterFromTech_ = true;\n\n        // Let components know the poster has changed\n        this.trigger('posterchange');\n      }\n    }\n  }\n\n  /**\n   * Get or set whether or not the controls are showing.\n   *\n   * @fires Player#controlsenabled\n   *\n   * @param {boolean} [bool]\n   *        - true to turn controls on\n   *        - false to turn controls off\n   *\n   * @return {boolean|undefined}\n   *         - The current value of controls when getting\n   *         - Nothing when setting\n   */\n  controls(bool) {\n    if (bool === undefined) {\n      return !!this.controls_;\n    }\n    bool = !!bool;\n\n    // Don't trigger a change event unless it actually changed\n    if (this.controls_ === bool) {\n      return;\n    }\n    this.controls_ = bool;\n    if (this.usingNativeControls()) {\n      this.techCall_('setControls', bool);\n    }\n    if (this.controls_) {\n      this.removeClass('vjs-controls-disabled');\n      this.addClass('vjs-controls-enabled');\n      /**\n       * @event Player#controlsenabled\n       * @type {Event}\n       */\n      this.trigger('controlsenabled');\n      if (!this.usingNativeControls()) {\n        this.addTechControlsListeners_();\n      }\n    } else {\n      this.removeClass('vjs-controls-enabled');\n      this.addClass('vjs-controls-disabled');\n      /**\n       * @event Player#controlsdisabled\n       * @type {Event}\n       */\n      this.trigger('controlsdisabled');\n      if (!this.usingNativeControls()) {\n        this.removeTechControlsListeners_();\n      }\n    }\n  }\n\n  /**\n   * Toggle native controls on/off. Native controls are the controls built into\n   * devices (e.g. default iPhone controls) or other techs\n   * (e.g. Vimeo Controls)\n   * **This should only be set by the current tech, because only the tech knows\n   * if it can support native controls**\n   *\n   * @fires Player#usingnativecontrols\n   * @fires Player#usingcustomcontrols\n   *\n   * @param {boolean} [bool]\n   *        - true to turn native controls on\n   *        - false to turn native controls off\n   *\n   * @return {boolean|undefined}\n   *         - The current value of native controls when getting\n   *         - Nothing when setting\n   */\n  usingNativeControls(bool) {\n    if (bool === undefined) {\n      return !!this.usingNativeControls_;\n    }\n    bool = !!bool;\n\n    // Don't trigger a change event unless it actually changed\n    if (this.usingNativeControls_ === bool) {\n      return;\n    }\n    this.usingNativeControls_ = bool;\n    if (this.usingNativeControls_) {\n      this.addClass('vjs-using-native-controls');\n\n      /**\n       * player is using the native device controls\n       *\n       * @event Player#usingnativecontrols\n       * @type {Event}\n       */\n      this.trigger('usingnativecontrols');\n    } else {\n      this.removeClass('vjs-using-native-controls');\n\n      /**\n       * player is using the custom HTML controls\n       *\n       * @event Player#usingcustomcontrols\n       * @type {Event}\n       */\n      this.trigger('usingcustomcontrols');\n    }\n  }\n\n  /**\n   * Set or get the current MediaError\n   *\n   * @fires Player#error\n   *\n   * @param  {MediaError|string|number} [err]\n   *         A MediaError or a string/number to be turned\n   *         into a MediaError\n   *\n   * @return {MediaError|null|undefined}\n   *         - The current MediaError when getting (or null)\n   *         - Nothing when setting\n   */\n  error(err) {\n    if (err === undefined) {\n      return this.error_ || null;\n    }\n\n    // allow hooks to modify error object\n    hooks('beforeerror').forEach(hookFunction => {\n      const newErr = hookFunction(this, err);\n      if (!(isObject(newErr) && !Array.isArray(newErr) || typeof newErr === 'string' || typeof newErr === 'number' || newErr === null)) {\n        this.log.error('please return a value that MediaError expects in beforeerror hooks');\n        return;\n      }\n      err = newErr;\n    });\n\n    // Suppress the first error message for no compatible source until\n    // user interaction\n    if (this.options_.suppressNotSupportedError && err && err.code === 4) {\n      const triggerSuppressedError = function () {\n        this.error(err);\n      };\n      this.options_.suppressNotSupportedError = false;\n      this.any(['click', 'touchstart'], triggerSuppressedError);\n      this.one('loadstart', function () {\n        this.off(['click', 'touchstart'], triggerSuppressedError);\n      });\n      return;\n    }\n\n    // restoring to default\n    if (err === null) {\n      this.error_ = null;\n      this.removeClass('vjs-error');\n      if (this.errorDisplay) {\n        this.errorDisplay.close();\n      }\n      return;\n    }\n    this.error_ = new MediaError(err);\n\n    // add the vjs-error classname to the player\n    this.addClass('vjs-error');\n\n    // log the name of the error type and any message\n    // IE11 logs \"[object object]\" and required you to expand message to see error object\n    log$1.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n    /**\n     * @event Player#error\n     * @type {Event}\n     */\n    this.trigger('error');\n\n    // notify hooks of the per player error\n    hooks('error').forEach(hookFunction => hookFunction(this, this.error_));\n    return;\n  }\n\n  /**\n   * Report user activity\n   *\n   * @param {Object} event\n   *        Event object\n   */\n  reportUserActivity(event) {\n    this.userActivity_ = true;\n  }\n\n  /**\n   * Get/set if user is active\n   *\n   * @fires Player#useractive\n   * @fires Player#userinactive\n   *\n   * @param {boolean} [bool]\n   *        - true if the user is active\n   *        - false if the user is inactive\n   *\n   * @return {boolean|undefined}\n   *         - The current value of userActive when getting\n   *         - Nothing when setting\n   */\n  userActive(bool) {\n    if (bool === undefined) {\n      return this.userActive_;\n    }\n    bool = !!bool;\n    if (bool === this.userActive_) {\n      return;\n    }\n    this.userActive_ = bool;\n    if (this.userActive_) {\n      this.userActivity_ = true;\n      this.removeClass('vjs-user-inactive');\n      this.addClass('vjs-user-active');\n      /**\n       * @event Player#useractive\n       * @type {Event}\n       */\n      this.trigger('useractive');\n      return;\n    }\n\n    // Chrome/Safari/IE have bugs where when you change the cursor it can\n    // trigger a mousemove event. This causes an issue when you're hiding\n    // the cursor when the user is inactive, and a mousemove signals user\n    // activity. Making it impossible to go into inactive mode. Specifically\n    // this happens in fullscreen when we really need to hide the cursor.\n    //\n    // When this gets resolved in ALL browsers it can be removed\n    // https://code.google.com/p/chromium/issues/detail?id=103041\n    if (this.tech_) {\n      this.tech_.one('mousemove', function (e) {\n        e.stopPropagation();\n        e.preventDefault();\n      });\n    }\n    this.userActivity_ = false;\n    this.removeClass('vjs-user-active');\n    this.addClass('vjs-user-inactive');\n    /**\n     * @event Player#userinactive\n     * @type {Event}\n     */\n    this.trigger('userinactive');\n  }\n\n  /**\n   * Listen for user activity based on timeout value\n   *\n   * @private\n   */\n  listenForUserActivity_() {\n    let mouseInProgress;\n    let lastMoveX;\n    let lastMoveY;\n    const handleActivity = bind_(this, this.reportUserActivity);\n    const handleMouseMove = function (e) {\n      // #1068 - Prevent mousemove spamming\n      // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n      if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n        lastMoveX = e.screenX;\n        lastMoveY = e.screenY;\n        handleActivity();\n      }\n    };\n    const handleMouseDown = function () {\n      handleActivity();\n      // For as long as the they are touching the device or have their mouse down,\n      // we consider them active even if they're not moving their finger or mouse.\n      // So we want to continue to update that they are active\n      this.clearInterval(mouseInProgress);\n      // Setting userActivity=true now and setting the interval to the same time\n      // as the activityCheck interval (250) should ensure we never miss the\n      // next activityCheck\n      mouseInProgress = this.setInterval(handleActivity, 250);\n    };\n    const handleMouseUpAndMouseLeave = function (event) {\n      handleActivity();\n      // Stop the interval that maintains activity if the mouse/touch is down\n      this.clearInterval(mouseInProgress);\n    };\n\n    // Any mouse movement will be considered user activity\n    this.on('mousedown', handleMouseDown);\n    this.on('mousemove', handleMouseMove);\n    this.on('mouseup', handleMouseUpAndMouseLeave);\n    this.on('mouseleave', handleMouseUpAndMouseLeave);\n    const controlBar = this.getChild('controlBar');\n\n    // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\n    // controlBar would no longer be hidden by default timeout.\n    if (controlBar && !IS_IOS && !IS_ANDROID) {\n      controlBar.on('mouseenter', function (event) {\n        if (this.player().options_.inactivityTimeout !== 0) {\n          this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\n        }\n        this.player().options_.inactivityTimeout = 0;\n      });\n      controlBar.on('mouseleave', function (event) {\n        this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\n      });\n    }\n\n    // Listen for keyboard navigation\n    // Shouldn't need to use inProgress interval because of key repeat\n    this.on('keydown', handleActivity);\n    this.on('keyup', handleActivity);\n\n    // Run an interval every 250 milliseconds instead of stuffing everything into\n    // the mousemove/touchmove function itself, to prevent performance degradation.\n    // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n    // then gets picked up by this loop\n    // http://ejohn.org/blog/learning-from-twitter/\n    let inactivityTimeout;\n\n    /** @this Player */\n    const activityCheck = function () {\n      // Check to see if mouse/touch activity has happened\n      if (!this.userActivity_) {\n        return;\n      }\n\n      // Reset the activity tracker\n      this.userActivity_ = false;\n\n      // If the user state was inactive, set the state to active\n      this.userActive(true);\n\n      // Clear any existing inactivity timeout to start the timer over\n      this.clearTimeout(inactivityTimeout);\n      const timeout = this.options_.inactivityTimeout;\n      if (timeout <= 0) {\n        return;\n      }\n\n      // In <timeout> milliseconds, if no more activity has occurred the\n      // user will be considered inactive\n      inactivityTimeout = this.setTimeout(function () {\n        // Protect against the case where the inactivityTimeout can trigger just\n        // before the next user activity is picked up by the activity check loop\n        // causing a flicker\n        if (!this.userActivity_) {\n          this.userActive(false);\n        }\n      }, timeout);\n    };\n    this.setInterval(activityCheck, 250);\n  }\n\n  /**\n   * Gets or sets the current playback rate. A playback rate of\n   * 1.0 represents normal speed and 0.5 would indicate half-speed\n   * playback, for instance.\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n   *\n   * @param {number} [rate]\n   *       New playback rate to set.\n   *\n   * @return {number|undefined}\n   *         - The current playback rate when getting or 1.0\n   *         - Nothing when setting\n   */\n  playbackRate(rate) {\n    if (rate !== undefined) {\n      // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\n      // that is registered above\n      this.techCall_('setPlaybackRate', rate);\n      return;\n    }\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\n      return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\n    }\n    return 1.0;\n  }\n\n  /**\n   * Gets or sets the current default playback rate. A default playback rate of\n   * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\n   * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\n   * not the current playbackRate.\n   *\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\n   *\n   * @param {number} [rate]\n   *       New default playback rate to set.\n   *\n   * @return {number|undefined}\n   *         - The default playback rate when getting or 1.0\n   *         - Nothing when setting\n   */\n  defaultPlaybackRate(rate) {\n    if (rate !== undefined) {\n      return this.techCall_('setDefaultPlaybackRate', rate);\n    }\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\n      return this.techGet_('defaultPlaybackRate');\n    }\n    return 1.0;\n  }\n\n  /**\n   * Gets or sets the audio flag\n   *\n   * @param {boolean} [bool]\n   *        - true signals that this is an audio player\n   *        - false signals that this is not an audio player\n   *\n   * @return {boolean|undefined}\n   *         - The current value of isAudio when getting\n   *         - Nothing when setting\n   */\n  isAudio(bool) {\n    if (bool !== undefined) {\n      this.isAudio_ = !!bool;\n      return;\n    }\n    return !!this.isAudio_;\n  }\n  updatePlayerHeightOnAudioOnlyMode_() {\n    const controlBar = this.getChild('ControlBar');\n    if (!controlBar || this.audioOnlyCache_.controlBarHeight === controlBar.currentHeight()) {\n      return;\n    }\n    this.audioOnlyCache_.controlBarHeight = controlBar.currentHeight();\n    this.height(this.audioOnlyCache_.controlBarHeight);\n  }\n  enableAudioOnlyUI_() {\n    // Update styling immediately to show the control bar so we can get its height\n    this.addClass('vjs-audio-only-mode');\n    const playerChildren = this.children();\n    const controlBar = this.getChild('ControlBar');\n    const controlBarHeight = controlBar && controlBar.currentHeight();\n\n    // Hide all player components except the control bar. Control bar components\n    // needed only for video are hidden with CSS\n    playerChildren.forEach(child => {\n      if (child === controlBar) {\n        return;\n      }\n      if (child.el_ && !child.hasClass('vjs-hidden')) {\n        child.hide();\n        this.audioOnlyCache_.hiddenChildren.push(child);\n      }\n    });\n    this.audioOnlyCache_.playerHeight = this.currentHeight();\n    this.audioOnlyCache_.controlBarHeight = controlBarHeight;\n    this.on('playerresize', this.boundUpdatePlayerHeightOnAudioOnlyMode_);\n\n    // Set the player height the same as the control bar\n    this.height(controlBarHeight);\n    this.trigger('audioonlymodechange');\n  }\n  disableAudioOnlyUI_() {\n    this.removeClass('vjs-audio-only-mode');\n    this.off('playerresize', this.boundUpdatePlayerHeightOnAudioOnlyMode_);\n\n    // Show player components that were previously hidden\n    this.audioOnlyCache_.hiddenChildren.forEach(child => child.show());\n\n    // Reset player height\n    this.height(this.audioOnlyCache_.playerHeight);\n    this.trigger('audioonlymodechange');\n  }\n\n  /**\n   * Get the current audioOnlyMode state or set audioOnlyMode to true or false.\n   *\n   * Setting this to `true` will hide all player components except the control bar,\n   * as well as control bar components needed only for video.\n   *\n   * @param {boolean} [value]\n   *         The value to set audioOnlyMode to.\n   *\n   * @return {Promise|boolean}\n   *        A Promise is returned when setting the state, and a boolean when getting\n   *        the present state\n   */\n  audioOnlyMode(value) {\n    if (typeof value !== 'boolean' || value === this.audioOnlyMode_) {\n      return this.audioOnlyMode_;\n    }\n    this.audioOnlyMode_ = value;\n\n    // Enable Audio Only Mode\n    if (value) {\n      const exitPromises = [];\n\n      // Fullscreen and PiP are not supported in audioOnlyMode, so exit if we need to.\n      if (this.isInPictureInPicture()) {\n        exitPromises.push(this.exitPictureInPicture());\n      }\n      if (this.isFullscreen()) {\n        exitPromises.push(this.exitFullscreen());\n      }\n      if (this.audioPosterMode()) {\n        exitPromises.push(this.audioPosterMode(false));\n      }\n      return Promise.all(exitPromises).then(() => this.enableAudioOnlyUI_());\n    }\n\n    // Disable Audio Only Mode\n    return Promise.resolve().then(() => this.disableAudioOnlyUI_());\n  }\n  enablePosterModeUI_() {\n    // Hide the video element and show the poster image to enable posterModeUI\n    const tech = this.tech_ && this.tech_;\n    tech.hide();\n    this.addClass('vjs-audio-poster-mode');\n    this.trigger('audiopostermodechange');\n  }\n  disablePosterModeUI_() {\n    // Show the video element and hide the poster image to disable posterModeUI\n    const tech = this.tech_ && this.tech_;\n    tech.show();\n    this.removeClass('vjs-audio-poster-mode');\n    this.trigger('audiopostermodechange');\n  }\n\n  /**\n   * Get the current audioPosterMode state or set audioPosterMode to true or false\n   *\n   * @param {boolean} [value]\n   *         The value to set audioPosterMode to.\n   *\n   * @return {Promise|boolean}\n   *         A Promise is returned when setting the state, and a boolean when getting\n   *        the present state\n   */\n  audioPosterMode(value) {\n    if (typeof value !== 'boolean' || value === this.audioPosterMode_) {\n      return this.audioPosterMode_;\n    }\n    this.audioPosterMode_ = value;\n    if (value) {\n      if (this.audioOnlyMode()) {\n        const audioOnlyModePromise = this.audioOnlyMode(false);\n        return audioOnlyModePromise.then(() => {\n          // enable audio poster mode after audio only mode is disabled\n          this.enablePosterModeUI_();\n        });\n      }\n      return Promise.resolve().then(() => {\n        // enable audio poster mode\n        this.enablePosterModeUI_();\n      });\n    }\n    return Promise.resolve().then(() => {\n      // disable audio poster mode\n      this.disablePosterModeUI_();\n    });\n  }\n\n  /**\n   * A helper method for adding a {@link TextTrack} to our\n   * {@link TextTrackList}.\n   *\n   * In addition to the W3C settings we allow adding additional info through options.\n   *\n   * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n   *\n   * @param {string} [kind]\n   *        the kind of TextTrack you are adding\n   *\n   * @param {string} [label]\n   *        the label to give the TextTrack label\n   *\n   * @param {string} [language]\n   *        the language to set on the TextTrack\n   *\n   * @return {TextTrack|undefined}\n   *         the TextTrack that was added or undefined\n   *         if there is no tech\n   */\n  addTextTrack(kind, label, language) {\n    if (this.tech_) {\n      return this.tech_.addTextTrack(kind, label, language);\n    }\n  }\n\n  /**\n   * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.\n   *\n   * @param {Object} options\n   *        Options to pass to {@link HTMLTrackElement} during creation. See\n   *        {@link HTMLTrackElement} for object properties that you should use.\n   *\n   * @param {boolean} [manualCleanup=false] if set to true, the TextTrack will not be removed\n   *                                        from the TextTrackList and HtmlTrackElementList\n   *                                        after a source change\n   *\n   * @return {HtmlTrackElement}\n   *         the HTMLTrackElement that was created and added\n   *         to the HtmlTrackElementList and the remote\n   *         TextTrackList\n   *\n   */\n  addRemoteTextTrack(options, manualCleanup) {\n    if (this.tech_) {\n      return this.tech_.addRemoteTextTrack(options, manualCleanup);\n    }\n  }\n\n  /**\n   * Remove a remote {@link TextTrack} from the respective\n   * {@link TextTrackList} and {@link HtmlTrackElementList}.\n   *\n   * @param {Object} track\n   *        Remote {@link TextTrack} to remove\n   *\n   * @return {undefined}\n   *         does not return anything\n   */\n  removeRemoteTextTrack(obj = {}) {\n    let {\n      track\n    } = obj;\n    if (!track) {\n      track = obj;\n    }\n\n    // destructure the input into an object with a track argument, defaulting to arguments[0]\n    // default the whole argument to an empty object if nothing was passed in\n\n    if (this.tech_) {\n      return this.tech_.removeRemoteTextTrack(track);\n    }\n  }\n\n  /**\n   * Gets available media playback quality metrics as specified by the W3C's Media\n   * Playback Quality API.\n   *\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\n   *\n   * @return {Object|undefined}\n   *         An object with supported media playback quality metrics or undefined if there\n   *         is no tech or the tech does not support it.\n   */\n  getVideoPlaybackQuality() {\n    return this.techGet_('getVideoPlaybackQuality');\n  }\n\n  /**\n   * Get video width\n   *\n   * @return {number}\n   *         current video width\n   */\n  videoWidth() {\n    return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n  }\n\n  /**\n   * Get video height\n   *\n   * @return {number}\n   *         current video height\n   */\n  videoHeight() {\n    return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n  }\n\n  /**\n   * Set or get the player's language code.\n   *\n   * Changing the language will trigger\n   * [languagechange]{@link Player#event:languagechange}\n   * which Components can use to update control text.\n   * ClickableComponent will update its control text by default on\n   * [languagechange]{@link Player#event:languagechange}.\n   *\n   * @fires Player#languagechange\n   *\n   * @param {string} [code]\n   *        the language code to set the player to\n   *\n   * @return {string|undefined}\n   *         - The current language code when getting\n   *         - Nothing when setting\n   */\n  language(code) {\n    if (code === undefined) {\n      return this.language_;\n    }\n    if (this.language_ !== String(code).toLowerCase()) {\n      this.language_ = String(code).toLowerCase();\n\n      // during first init, it's possible some things won't be evented\n      if (isEvented(this)) {\n        /**\n        * fires when the player language change\n        *\n        * @event Player#languagechange\n        * @type {Event}\n        */\n        this.trigger('languagechange');\n      }\n    }\n  }\n\n  /**\n   * Get the player's language dictionary\n   * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n   * Languages specified directly in the player options have precedence\n   *\n   * @return {Array}\n   *         An array of of supported languages\n   */\n  languages() {\n    return merge$1(Player.prototype.options_.languages, this.languages_);\n  }\n\n  /**\n   * returns a JavaScript object representing the current track\n   * information. **DOES not return it as JSON**\n   *\n   * @return {Object}\n   *         Object representing the current of track info\n   */\n  toJSON() {\n    const options = merge$1(this.options_);\n    const tracks = options.tracks;\n    options.tracks = [];\n    for (let i = 0; i < tracks.length; i++) {\n      let track = tracks[i];\n\n      // deep merge tracks and null out player so no circular references\n      track = merge$1(track);\n      track.player = undefined;\n      options.tracks[i] = track;\n    }\n    return options;\n  }\n\n  /**\n   * Creates a simple modal dialog (an instance of the {@link ModalDialog}\n   * component) that immediately overlays the player with arbitrary\n   * content and removes itself when closed.\n   *\n   * @param {string|Function|Element|Array|null} content\n   *        Same as {@link ModalDialog#content}'s param of the same name.\n   *        The most straight-forward usage is to provide a string or DOM\n   *        element.\n   *\n   * @param {Object} [options]\n   *        Extra options which will be passed on to the {@link ModalDialog}.\n   *\n   * @return {ModalDialog}\n   *         the {@link ModalDialog} that was created\n   */\n  createModal(content, options) {\n    options = options || {};\n    options.content = content || '';\n    const modal = new ModalDialog(this, options);\n    this.addChild(modal);\n    modal.on('dispose', () => {\n      this.removeChild(modal);\n    });\n    modal.open();\n    return modal;\n  }\n\n  /**\n   * Change breakpoint classes when the player resizes.\n   *\n   * @private\n   */\n  updateCurrentBreakpoint_() {\n    if (!this.responsive()) {\n      return;\n    }\n    const currentBreakpoint = this.currentBreakpoint();\n    const currentWidth = this.currentWidth();\n    for (let i = 0; i < BREAKPOINT_ORDER.length; i++) {\n      const candidateBreakpoint = BREAKPOINT_ORDER[i];\n      const maxWidth = this.breakpoints_[candidateBreakpoint];\n      if (currentWidth <= maxWidth) {\n        // The current breakpoint did not change, nothing to do.\n        if (currentBreakpoint === candidateBreakpoint) {\n          return;\n        }\n\n        // Only remove a class if there is a current breakpoint.\n        if (currentBreakpoint) {\n          this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\n        }\n        this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\n        this.breakpoint_ = candidateBreakpoint;\n        break;\n      }\n    }\n  }\n\n  /**\n   * Removes the current breakpoint.\n   *\n   * @private\n   */\n  removeCurrentBreakpoint_() {\n    const className = this.currentBreakpointClass();\n    this.breakpoint_ = '';\n    if (className) {\n      this.removeClass(className);\n    }\n  }\n\n  /**\n   * Get or set breakpoints on the player.\n   *\n   * Calling this method with an object or `true` will remove any previous\n   * custom breakpoints and start from the defaults again.\n   *\n   * @param  {Object|boolean} [breakpoints]\n   *         If an object is given, it can be used to provide custom\n   *         breakpoints. If `true` is given, will set default breakpoints.\n   *         If this argument is not given, will simply return the current\n   *         breakpoints.\n   *\n   * @param  {number} [breakpoints.tiny]\n   *         The maximum width for the \"vjs-layout-tiny\" class.\n   *\n   * @param  {number} [breakpoints.xsmall]\n   *         The maximum width for the \"vjs-layout-x-small\" class.\n   *\n   * @param  {number} [breakpoints.small]\n   *         The maximum width for the \"vjs-layout-small\" class.\n   *\n   * @param  {number} [breakpoints.medium]\n   *         The maximum width for the \"vjs-layout-medium\" class.\n   *\n   * @param  {number} [breakpoints.large]\n   *         The maximum width for the \"vjs-layout-large\" class.\n   *\n   * @param  {number} [breakpoints.xlarge]\n   *         The maximum width for the \"vjs-layout-x-large\" class.\n   *\n   * @param  {number} [breakpoints.huge]\n   *         The maximum width for the \"vjs-layout-huge\" class.\n   *\n   * @return {Object}\n   *         An object mapping breakpoint names to maximum width values.\n   */\n  breakpoints(breakpoints) {\n    // Used as a getter.\n    if (breakpoints === undefined) {\n      return Object.assign(this.breakpoints_);\n    }\n    this.breakpoint_ = '';\n    this.breakpoints_ = Object.assign({}, DEFAULT_BREAKPOINTS, breakpoints);\n\n    // When breakpoint definitions change, we need to update the currently\n    // selected breakpoint.\n    this.updateCurrentBreakpoint_();\n\n    // Clone the breakpoints before returning.\n    return Object.assign(this.breakpoints_);\n  }\n\n  /**\n   * Get or set a flag indicating whether or not this player should adjust\n   * its UI based on its dimensions.\n   *\n   * @param  {boolean} [value]\n   *         Should be `true` if the player should adjust its UI based on its\n   *         dimensions; otherwise, should be `false`.\n   *\n   * @return {boolean|undefined}\n   *         Will be `true` if this player should adjust its UI based on its\n   *         dimensions; otherwise, will be `false`.\n   *         Nothing if setting\n   */\n  responsive(value) {\n    // Used as a getter.\n    if (value === undefined) {\n      return this.responsive_;\n    }\n    value = Boolean(value);\n    const current = this.responsive_;\n\n    // Nothing changed.\n    if (value === current) {\n      return;\n    }\n\n    // The value actually changed, set it.\n    this.responsive_ = value;\n\n    // Start listening for breakpoints and set the initial breakpoint if the\n    // player is now responsive.\n    if (value) {\n      this.on('playerresize', this.boundUpdateCurrentBreakpoint_);\n      this.updateCurrentBreakpoint_();\n\n      // Stop listening for breakpoints if the player is no longer responsive.\n    } else {\n      this.off('playerresize', this.boundUpdateCurrentBreakpoint_);\n      this.removeCurrentBreakpoint_();\n    }\n    return value;\n  }\n\n  /**\n   * Get current breakpoint name, if any.\n   *\n   * @return {string}\n   *         If there is currently a breakpoint set, returns a the key from the\n   *         breakpoints object matching it. Otherwise, returns an empty string.\n   */\n  currentBreakpoint() {\n    return this.breakpoint_;\n  }\n\n  /**\n   * Get the current breakpoint class name.\n   *\n   * @return {string}\n   *         The matching class name (e.g. `\"vjs-layout-tiny\"` or\n   *         `\"vjs-layout-large\"`) for the current breakpoint. Empty string if\n   *         there is no current breakpoint.\n   */\n  currentBreakpointClass() {\n    return BREAKPOINT_CLASSES[this.breakpoint_] || '';\n  }\n\n  /**\n   * An object that describes a single piece of media.\n   *\n   * Properties that are not part of this type description will be retained; so,\n   * this can be viewed as a generic metadata storage mechanism as well.\n   *\n   * @see      {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\n   * @typedef  {Object} Player~MediaObject\n   *\n   * @property {string} [album]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API.\n   *\n   * @property {string} [artist]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API.\n   *\n   * @property {Object[]} [artwork]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API. If not specified, will be populated via the `poster`, if\n   *           available.\n   *\n   * @property {string} [poster]\n   *           URL to an image that will display before playback.\n   *\n   * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\n   *           A single source object, an array of source objects, or a string\n   *           referencing a URL to a media source. It is _highly recommended_\n   *           that an object or array of objects is used here, so that source\n   *           selection algorithms can take the `type` into account.\n   *\n   * @property {string} [title]\n   *           Unused, except if this object is passed to the `MediaSession`\n   *           API.\n   *\n   * @property {Object[]} [textTracks]\n   *           An array of objects to be used to create text tracks, following\n   *           the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\n   *           For ease of removal, these will be created as \"remote\" text\n   *           tracks and set to automatically clean up on source changes.\n   *\n   *           These objects may have properties like `src`, `kind`, `label`,\n   *           and `language`, see {@link Tech#createRemoteTextTrack}.\n   */\n\n  /**\n   * Populate the player using a {@link Player~MediaObject|MediaObject}.\n   *\n   * @param  {Player~MediaObject} media\n   *         A media object.\n   *\n   * @param  {Function} ready\n   *         A callback to be called when the player is ready.\n   */\n  loadMedia(media, ready) {\n    if (!media || typeof media !== 'object') {\n      return;\n    }\n    const crossOrigin = this.crossOrigin();\n    this.reset();\n\n    // Clone the media object so it cannot be mutated from outside.\n    this.cache_.media = merge$1(media);\n    const {\n      artist,\n      artwork,\n      description,\n      poster,\n      src,\n      textTracks,\n      title\n    } = this.cache_.media;\n\n    // If `artwork` is not given, create it using `poster`.\n    if (!artwork && poster) {\n      this.cache_.media.artwork = [{\n        src: poster,\n        type: getMimetype(poster)\n      }];\n    }\n    if (crossOrigin) {\n      this.crossOrigin(crossOrigin);\n    }\n    if (src) {\n      this.src(src);\n    }\n    if (poster) {\n      this.poster(poster);\n    }\n    if (Array.isArray(textTracks)) {\n      textTracks.forEach(tt => this.addRemoteTextTrack(tt, false));\n    }\n    if (this.titleBar) {\n      this.titleBar.update({\n        title,\n        description: description || artist || ''\n      });\n    }\n    this.ready(ready);\n  }\n\n  /**\n   * Get a clone of the current {@link Player~MediaObject} for this player.\n   *\n   * If the `loadMedia` method has not been used, will attempt to return a\n   * {@link Player~MediaObject} based on the current state of the player.\n   *\n   * @return {Player~MediaObject}\n   */\n  getMedia() {\n    if (!this.cache_.media) {\n      const poster = this.poster();\n      const src = this.currentSources();\n      const textTracks = Array.prototype.map.call(this.remoteTextTracks(), tt => ({\n        kind: tt.kind,\n        label: tt.label,\n        language: tt.language,\n        src: tt.src\n      }));\n      const media = {\n        src,\n        textTracks\n      };\n      if (poster) {\n        media.poster = poster;\n        media.artwork = [{\n          src: media.poster,\n          type: getMimetype(media.poster)\n        }];\n      }\n      return media;\n    }\n    return merge$1(this.cache_.media);\n  }\n\n  /**\n   * Gets tag settings\n   *\n   * @param {Element} tag\n   *        The player tag\n   *\n   * @return {Object}\n   *         An object containing all of the settings\n   *         for a player tag\n   */\n  static getTagSettings(tag) {\n    const baseOptions = {\n      sources: [],\n      tracks: []\n    };\n    const tagOptions = getAttributes(tag);\n    const dataSetup = tagOptions['data-setup'];\n    if (hasClass(tag, 'vjs-fill')) {\n      tagOptions.fill = true;\n    }\n    if (hasClass(tag, 'vjs-fluid')) {\n      tagOptions.fluid = true;\n    }\n\n    // Check if data-setup attr exists.\n    if (dataSetup !== null) {\n      // Parse options JSON\n      try {\n        // If empty string, make it a parsable json object.\n        Object.assign(tagOptions, JSON.parse(dataSetup || '{}'));\n      } catch (e) {\n        log$1.error('data-setup', e);\n      }\n    }\n    Object.assign(baseOptions, tagOptions);\n\n    // Get tag children settings\n    if (tag.hasChildNodes()) {\n      const children = tag.childNodes;\n      for (let i = 0, j = children.length; i < j; i++) {\n        const child = children[i];\n        // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n        const childName = child.nodeName.toLowerCase();\n        if (childName === 'source') {\n          baseOptions.sources.push(getAttributes(child));\n        } else if (childName === 'track') {\n          baseOptions.tracks.push(getAttributes(child));\n        }\n      }\n    }\n    return baseOptions;\n  }\n\n  /**\n   * Set debug mode to enable/disable logs at info level.\n   *\n   * @param {boolean} enabled\n   * @fires Player#debugon\n   * @fires Player#debugoff\n   * @return {boolean|undefined}\n   */\n  debug(enabled) {\n    if (enabled === undefined) {\n      return this.debugEnabled_;\n    }\n    if (enabled) {\n      this.trigger('debugon');\n      this.previousLogLevel_ = this.log.level;\n      this.log.level('debug');\n      this.debugEnabled_ = true;\n    } else {\n      this.trigger('debugoff');\n      this.log.level(this.previousLogLevel_);\n      this.previousLogLevel_ = undefined;\n      this.debugEnabled_ = false;\n    }\n  }\n\n  /**\n   * Set or get current playback rates.\n   * Takes an array and updates the playback rates menu with the new items.\n   * Pass in an empty array to hide the menu.\n   * Values other than arrays are ignored.\n   *\n   * @fires Player#playbackrateschange\n   * @param {number[]} [newRates]\n   *                   The new rates that the playback rates menu should update to.\n   *                   An empty array will hide the menu\n   * @return {number[]} When used as a getter will return the current playback rates\n   */\n  playbackRates(newRates) {\n    if (newRates === undefined) {\n      return this.cache_.playbackRates;\n    }\n\n    // ignore any value that isn't an array\n    if (!Array.isArray(newRates)) {\n      return;\n    }\n\n    // ignore any arrays that don't only contain numbers\n    if (!newRates.every(rate => typeof rate === 'number')) {\n      return;\n    }\n    this.cache_.playbackRates = newRates;\n\n    /**\n    * fires when the playback rates in a player are changed\n    *\n    * @event Player#playbackrateschange\n    * @type {Event}\n    */\n    this.trigger('playbackrateschange');\n  }\n\n  /**\n   * Reports whether or not a player has a plugin available.\n   *\n   * This does not report whether or not the plugin has ever been initialized\n   * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\n   *\n   * @method hasPlugin\n   * @param  {string}  name\n   *         The name of a plugin.\n   *\n   * @return {boolean}\n   *         Whether or not this player has the requested plugin available.\n   */\n\n  /**\n   * Reports whether or not a player is using a plugin by name.\n   *\n   * For basic plugins, this only reports whether the plugin has _ever_ been\n   * initialized on this player.\n   *\n   * @method Player#usingPlugin\n   * @param  {string} name\n   *         The name of a plugin.\n   *\n   * @return {boolean}\n   *         Whether or not this player is using the requested plugin.\n   */\n}\n\n/**\n * Get the {@link VideoTrackList}\n *\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\n *\n * @return {VideoTrackList}\n *         the current video track list\n *\n * @method Player.prototype.videoTracks\n */\n\n/**\n * Get the {@link AudioTrackList}\n *\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\n *\n * @return {AudioTrackList}\n *         the current audio track list\n *\n * @method Player.prototype.audioTracks\n */\n\n/**\n * Get the {@link TextTrackList}\n *\n * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {TextTrackList}\n *         the current text track list\n *\n * @method Player.prototype.textTracks\n */\n\n/**\n * Get the remote {@link TextTrackList}\n *\n * @return {TextTrackList}\n *         The current remote text track list\n *\n * @method Player.prototype.remoteTextTracks\n */\n\n/**\n * Get the remote {@link HtmlTrackElementList} tracks.\n *\n * @return {HtmlTrackElementList}\n *         The current remote text track element list\n *\n * @method Player.prototype.remoteTextTrackEls\n */\n\nALL.names.forEach(function (name) {\n  const props = ALL[name];\n  Player.prototype[props.getterName] = function () {\n    if (this.tech_) {\n      return this.tech_[props.getterName]();\n    }\n\n    // if we have not yet loadTech_, we create {video,audio,text}Tracks_\n    // these will be passed to the tech during loading\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\n    return this[props.privateName];\n  };\n});\n\n/**\n * Get or set the `Player`'s crossorigin option. For the HTML5 player, this\n * sets the `crossOrigin` property on the `<video>` tag to control the CORS\n * behavior.\n *\n * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\n *\n * @param {string} [value]\n *        The value to set the `Player`'s crossorigin to. If an argument is\n *        given, must be one of `anonymous` or `use-credentials`.\n *\n * @return {string|undefined}\n *         - The current crossorigin value of the `Player` when getting.\n *         - undefined when setting\n */\nPlayer.prototype.crossorigin = Player.prototype.crossOrigin;\n\n/**\n * Global enumeration of players.\n *\n * The keys are the player IDs and the values are either the {@link Player}\n * instance or `null` for disposed players.\n *\n * @type {Object}\n */\nPlayer.players = {};\nconst navigator = window$1.navigator;\n\n/*\n * Player instance options, surfaced using options\n * options = Player.prototype.options_\n * Make changes in options, not here.\n *\n * @type {Object}\n * @private\n */\nPlayer.prototype.options_ = {\n  // Default order of fallback technology\n  techOrder: Tech.defaultTechOrder_,\n  html5: {},\n  // enable sourceset by default\n  enableSourceset: true,\n  // default inactivity timeout\n  inactivityTimeout: 2000,\n  // default playback rates\n  playbackRates: [],\n  // Add playback rate selection by adding rates\n  // 'playbackRates': [0.5, 1, 1.5, 2],\n  liveui: false,\n  // Included control sets\n  children: ['mediaLoader', 'posterImage', 'titleBar', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\n  language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\n  // locales and their language translations\n  languages: {},\n  // Default message to show when a video cannot be played.\n  notSupportedMessage: 'No compatible source was found for this media.',\n  normalizeAutoplay: false,\n  fullscreen: {\n    options: {\n      navigationUI: 'hide'\n    }\n  },\n  breakpoints: {},\n  responsive: false,\n  audioOnlyMode: false,\n  audioPosterMode: false,\n  spatialNavigation: {\n    enabled: false,\n    horizontalSeek: false\n  },\n  // Default smooth seeking to false\n  enableSmoothSeeking: false,\n  disableSeekWhileScrubbingOnMobile: false\n};\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\n  Player.prototype[`handleTech${toTitleCase$1(event)}_`] = function () {\n    return this.trigger(event);\n  };\n});\n\n/**\n * Fired when the player has initial duration and dimension information\n *\n * @event Player#loadedmetadata\n * @type {Event}\n */\n\n/**\n * Fired when the player has downloaded data at the current playback position\n *\n * @event Player#loadeddata\n * @type {Event}\n */\n\n/**\n * Fired when the current playback position has changed *\n * During playback this is fired every 15-250 milliseconds, depending on the\n * playback technology in use.\n *\n * @event Player#timeupdate\n * @type {Event}\n */\n\n/**\n * Fired when the volume changes\n *\n * @event Player#volumechange\n * @type {Event}\n */\n\nComponent$1.registerComponent('Player', Player);\n\n/**\n * @file plugin.js\n */\n\n/**\n * The base plugin name.\n *\n * @private\n * @constant\n * @type {string}\n */\nconst BASE_PLUGIN_NAME = 'plugin';\n\n/**\n * The key on which a player's active plugins cache is stored.\n *\n * @private\n * @constant\n * @type     {string}\n */\nconst PLUGIN_CACHE_KEY = 'activePlugins_';\n\n/**\n * Stores registered plugins in a private space.\n *\n * @private\n * @type    {Object}\n */\nconst pluginStorage = {};\n\n/**\n * Reports whether or not a plugin has been registered.\n *\n * @private\n * @param   {string} name\n *          The name of a plugin.\n *\n * @return {boolean}\n *          Whether or not the plugin has been registered.\n */\nconst pluginExists = name => pluginStorage.hasOwnProperty(name);\n\n/**\n * Get a single registered plugin by name.\n *\n * @private\n * @param   {string} name\n *          The name of a plugin.\n *\n * @return {typeof Plugin|Function|undefined}\n *          The plugin (or undefined).\n */\nconst getPlugin = name => pluginExists(name) ? pluginStorage[name] : undefined;\n\n/**\n * Marks a plugin as \"active\" on a player.\n *\n * Also, ensures that the player has an object for tracking active plugins.\n *\n * @private\n * @param   {Player} player\n *          A Video.js player instance.\n *\n * @param   {string} name\n *          The name of a plugin.\n */\nconst markPluginAsActive = (player, name) => {\n  player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\n  player[PLUGIN_CACHE_KEY][name] = true;\n};\n\n/**\n * Triggers a pair of plugin setup events.\n *\n * @private\n * @param  {Player} player\n *         A Video.js player instance.\n *\n * @param  {PluginEventHash} hash\n *         A plugin event hash.\n *\n * @param  {boolean} [before]\n *         If true, prefixes the event name with \"before\". In other words,\n *         use this to trigger \"beforepluginsetup\" instead of \"pluginsetup\".\n */\nconst triggerSetupEvent = (player, hash, before) => {\n  const eventName = (before ? 'before' : '') + 'pluginsetup';\n  player.trigger(eventName, hash);\n  player.trigger(eventName + ':' + hash.name, hash);\n};\n\n/**\n * Takes a basic plugin function and returns a wrapper function which marks\n * on the player that the plugin has been activated.\n *\n * @private\n * @param   {string} name\n *          The name of the plugin.\n *\n * @param   {Function} plugin\n *          The basic plugin.\n *\n * @return {Function}\n *          A wrapper function for the given plugin.\n */\nconst createBasicPlugin = function (name, plugin) {\n  const basicPluginWrapper = function () {\n    // We trigger the \"beforepluginsetup\" and \"pluginsetup\" events on the player\n    // regardless, but we want the hash to be consistent with the hash provided\n    // for advanced plugins.\n    //\n    // The only potentially counter-intuitive thing here is the `instance` in\n    // the \"pluginsetup\" event is the value returned by the `plugin` function.\n    triggerSetupEvent(this, {\n      name,\n      plugin,\n      instance: null\n    }, true);\n    const instance = plugin.apply(this, arguments);\n    markPluginAsActive(this, name);\n    triggerSetupEvent(this, {\n      name,\n      plugin,\n      instance\n    });\n    return instance;\n  };\n  Object.keys(plugin).forEach(function (prop) {\n    basicPluginWrapper[prop] = plugin[prop];\n  });\n  return basicPluginWrapper;\n};\n\n/**\n * Takes a plugin sub-class and returns a factory function for generating\n * instances of it.\n *\n * This factory function will replace itself with an instance of the requested\n * sub-class of Plugin.\n *\n * @private\n * @param   {string} name\n *          The name of the plugin.\n *\n * @param   {Plugin} PluginSubClass\n *          The advanced plugin.\n *\n * @return {Function}\n */\nconst createPluginFactory = (name, PluginSubClass) => {\n  // Add a `name` property to the plugin prototype so that each plugin can\n  // refer to itself by name.\n  PluginSubClass.prototype.name = name;\n  return function (...args) {\n    triggerSetupEvent(this, {\n      name,\n      plugin: PluginSubClass,\n      instance: null\n    }, true);\n    const instance = new PluginSubClass(...[this, ...args]);\n\n    // The plugin is replaced by a function that returns the current instance.\n    this[name] = () => instance;\n    triggerSetupEvent(this, instance.getEventHash());\n    return instance;\n  };\n};\n\n/**\n * Parent class for all advanced plugins.\n *\n * @mixes   module:evented~EventedMixin\n * @mixes   module:stateful~StatefulMixin\n * @fires   Player#beforepluginsetup\n * @fires   Player#beforepluginsetup:$name\n * @fires   Player#pluginsetup\n * @fires   Player#pluginsetup:$name\n * @listens Player#dispose\n * @throws  {Error}\n *          If attempting to instantiate the base {@link Plugin} class\n *          directly instead of via a sub-class.\n */\nclass Plugin {\n  /**\n   * Creates an instance of this class.\n   *\n   * Sub-classes should call `super` to ensure plugins are properly initialized.\n   *\n   * @param {Player} player\n   *        A Video.js player instance.\n   */\n  constructor(player) {\n    if (this.constructor === Plugin) {\n      throw new Error('Plugin must be sub-classed; not directly instantiated.');\n    }\n    this.player = player;\n    if (!this.log) {\n      this.log = this.player.log.createLogger(this.name);\n    }\n\n    // Make this object evented, but remove the added `trigger` method so we\n    // use the prototype version instead.\n    evented(this);\n    delete this.trigger;\n    stateful(this, this.constructor.defaultState);\n    markPluginAsActive(player, this.name);\n\n    // Auto-bind the dispose method so we can use it as a listener and unbind\n    // it later easily.\n    this.dispose = this.dispose.bind(this);\n\n    // If the player is disposed, dispose the plugin.\n    player.on('dispose', this.dispose);\n  }\n\n  /**\n   * Get the version of the plugin that was set on <pluginName>.VERSION\n   */\n  version() {\n    return this.constructor.VERSION;\n  }\n\n  /**\n   * Each event triggered by plugins includes a hash of additional data with\n   * conventional properties.\n   *\n   * This returns that object or mutates an existing hash.\n   *\n   * @param   {Object} [hash={}]\n   *          An object to be used as event an event hash.\n   *\n   * @return {PluginEventHash}\n   *          An event hash object with provided properties mixed-in.\n   */\n  getEventHash(hash = {}) {\n    hash.name = this.name;\n    hash.plugin = this.constructor;\n    hash.instance = this;\n    return hash;\n  }\n\n  /**\n   * Triggers an event on the plugin object and overrides\n   * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\n   *\n   * @param   {string|Object} event\n   *          An event type or an object with a type property.\n   *\n   * @param   {Object} [hash={}]\n   *          Additional data hash to merge with a\n   *          {@link PluginEventHash|PluginEventHash}.\n   *\n   * @return {boolean}\n   *          Whether or not default was prevented.\n   */\n  trigger(event, hash = {}) {\n    return trigger(this.eventBusEl_, event, this.getEventHash(hash));\n  }\n\n  /**\n   * Handles \"statechanged\" events on the plugin. No-op by default, override by\n   * subclassing.\n   *\n   * @abstract\n   * @param    {Event} e\n   *           An event object provided by a \"statechanged\" event.\n   *\n   * @param    {Object} e.changes\n   *           An object describing changes that occurred with the \"statechanged\"\n   *           event.\n   */\n  handleStateChanged(e) {}\n\n  /**\n   * Disposes a plugin.\n   *\n   * Subclasses can override this if they want, but for the sake of safety,\n   * it's probably best to subscribe the \"dispose\" event.\n   *\n   * @fires Plugin#dispose\n   */\n  dispose() {\n    const {\n      name,\n      player\n    } = this;\n\n    /**\n     * Signals that a advanced plugin is about to be disposed.\n     *\n     * @event Plugin#dispose\n     * @type  {Event}\n     */\n    this.trigger('dispose');\n    this.off();\n    player.off('dispose', this.dispose);\n\n    // Eliminate any possible sources of leaking memory by clearing up\n    // references between the player and the plugin instance and nulling out\n    // the plugin's state and replacing methods with a function that throws.\n    player[PLUGIN_CACHE_KEY][name] = false;\n    this.player = this.state = null;\n\n    // Finally, replace the plugin name on the player with a new factory\n    // function, so that the plugin is ready to be set up again.\n    player[name] = createPluginFactory(name, pluginStorage[name]);\n  }\n\n  /**\n   * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\n   *\n   * @param   {string|Function} plugin\n   *          If a string, matches the name of a plugin. If a function, will be\n   *          tested directly.\n   *\n   * @return {boolean}\n   *          Whether or not a plugin is a basic plugin.\n   */\n  static isBasic(plugin) {\n    const p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\n    return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\n  }\n\n  /**\n   * Register a Video.js plugin.\n   *\n   * @param   {string} name\n   *          The name of the plugin to be registered. Must be a string and\n   *          must not match an existing plugin or a method on the `Player`\n   *          prototype.\n   *\n   * @param   {typeof Plugin|Function} plugin\n   *          A sub-class of `Plugin` or a function for basic plugins.\n   *\n   * @return {typeof Plugin|Function}\n   *          For advanced plugins, a factory function for that plugin. For\n   *          basic plugins, a wrapper function that initializes the plugin.\n   */\n  static registerPlugin(name, plugin) {\n    if (typeof name !== 'string') {\n      throw new Error(`Illegal plugin name, \"${name}\", must be a string, was ${typeof name}.`);\n    }\n    if (pluginExists(name)) {\n      log$1.warn(`A plugin named \"${name}\" already exists. You may want to avoid re-registering plugins!`);\n    } else if (Player.prototype.hasOwnProperty(name)) {\n      throw new Error(`Illegal plugin name, \"${name}\", cannot share a name with an existing player method!`);\n    }\n    if (typeof plugin !== 'function') {\n      throw new Error(`Illegal plugin for \"${name}\", must be a function, was ${typeof plugin}.`);\n    }\n    pluginStorage[name] = plugin;\n\n    // Add a player prototype method for all sub-classed plugins (but not for\n    // the base Plugin class).\n    if (name !== BASE_PLUGIN_NAME) {\n      if (Plugin.isBasic(plugin)) {\n        Player.prototype[name] = createBasicPlugin(name, plugin);\n      } else {\n        Player.prototype[name] = createPluginFactory(name, plugin);\n      }\n    }\n    return plugin;\n  }\n\n  /**\n   * De-register a Video.js plugin.\n   *\n   * @param  {string} name\n   *         The name of the plugin to be de-registered. Must be a string that\n   *         matches an existing plugin.\n   *\n   * @throws {Error}\n   *         If an attempt is made to de-register the base plugin.\n   */\n  static deregisterPlugin(name) {\n    if (name === BASE_PLUGIN_NAME) {\n      throw new Error('Cannot de-register base plugin.');\n    }\n    if (pluginExists(name)) {\n      delete pluginStorage[name];\n      delete Player.prototype[name];\n    }\n  }\n\n  /**\n   * Gets an object containing multiple Video.js plugins.\n   *\n   * @param   {Array} [names]\n   *          If provided, should be an array of plugin names. Defaults to _all_\n   *          plugin names.\n   *\n   * @return {Object|undefined}\n   *          An object containing plugin(s) associated with their name(s) or\n   *          `undefined` if no matching plugins exist).\n   */\n  static getPlugins(names = Object.keys(pluginStorage)) {\n    let result;\n    names.forEach(name => {\n      const plugin = getPlugin(name);\n      if (plugin) {\n        result = result || {};\n        result[name] = plugin;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * Gets a plugin's version, if available\n   *\n   * @param   {string} name\n   *          The name of a plugin.\n   *\n   * @return {string}\n   *          The plugin's version or an empty string.\n   */\n  static getPluginVersion(name) {\n    const plugin = getPlugin(name);\n    return plugin && plugin.VERSION || '';\n  }\n}\n\n/**\n * Gets a plugin by name if it exists.\n *\n * @static\n * @method   getPlugin\n * @memberOf Plugin\n * @param    {string} name\n *           The name of a plugin.\n *\n * @returns  {typeof Plugin|Function|undefined}\n *           The plugin (or `undefined`).\n */\nPlugin.getPlugin = getPlugin;\n\n/**\n * The name of the base plugin class as it is registered.\n *\n * @type {string}\n */\nPlugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\nPlugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\n\n/**\n * Documented in player.js\n *\n * @ignore\n */\nPlayer.prototype.usingPlugin = function (name) {\n  return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\n};\n\n/**\n * Documented in player.js\n *\n * @ignore\n */\nPlayer.prototype.hasPlugin = function (name) {\n  return !!pluginExists(name);\n};\n\n/**\n * Signals that a plugin is about to be set up on a player.\n *\n * @event    Player#beforepluginsetup\n * @type     {PluginEventHash}\n */\n\n/**\n * Signals that a plugin is about to be set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event    Player#beforepluginsetup:$name\n * @type     {PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player.\n *\n * @event    Player#pluginsetup\n * @type     {PluginEventHash}\n */\n\n/**\n * Signals that a plugin has just been set up on a player - by name. The name\n * is the name of the plugin.\n *\n * @event    Player#pluginsetup:$name\n * @type     {PluginEventHash}\n */\n\n/**\n * @typedef  {Object} PluginEventHash\n *\n * @property {string} instance\n *           For basic plugins, the return value of the plugin function. For\n *           advanced plugins, the plugin instance on which the event is fired.\n *\n * @property {string} name\n *           The name of the plugin.\n *\n * @property {string} plugin\n *           For basic plugins, the plugin function. For advanced plugins, the\n *           plugin class/constructor.\n */\n\n/**\n * @file deprecate.js\n * @module deprecate\n */\n\n/**\n * Decorate a function with a deprecation message the first time it is called.\n *\n * @param  {string}   message\n *         A deprecation message to log the first time the returned function\n *         is called.\n *\n * @param  {Function} fn\n *         The function to be deprecated.\n *\n * @return {Function}\n *         A wrapper function that will log a deprecation warning the first\n *         time it is called. The return value will be the return value of\n *         the wrapped function.\n */\nfunction deprecate(message, fn) {\n  let warned = false;\n  return function (...args) {\n    if (!warned) {\n      log$1.warn(message);\n    }\n    warned = true;\n    return fn.apply(this, args);\n  };\n}\n\n/**\n * Internal function used to mark a function as deprecated in the next major\n * version with consistent messaging.\n *\n * @param  {number}   major   The major version where it will be removed\n * @param  {string}   oldName The old function name\n * @param  {string}   newName The new function name\n * @param  {Function} fn      The function to deprecate\n * @return {Function}         The decorated function\n */\nfunction deprecateForMajor(major, oldName, newName, fn) {\n  return deprecate(`${oldName} is deprecated and will be removed in ${major}.0; please use ${newName} instead.`, fn);\n}\n\nvar VjsErrors = {\n  NetworkBadStatus: 'networkbadstatus',\n  NetworkRequestFailed: 'networkrequestfailed',\n  NetworkRequestAborted: 'networkrequestaborted',\n  NetworkRequestTimeout: 'networkrequesttimeout',\n  NetworkBodyParserFailed: 'networkbodyparserfailed',\n  StreamingHlsPlaylistParserError: 'streaminghlsplaylistparsererror',\n  StreamingDashManifestParserError: 'streamingdashmanifestparsererror',\n  StreamingContentSteeringParserError: 'streamingcontentsteeringparsererror',\n  StreamingVttParserError: 'streamingvttparsererror',\n  StreamingFailedToSelectNextSegment: 'streamingfailedtoselectnextsegment',\n  StreamingFailedToDecryptSegment: 'streamingfailedtodecryptsegment',\n  StreamingFailedToTransmuxSegment: 'streamingfailedtotransmuxsegment',\n  StreamingFailedToAppendSegment: 'streamingfailedtoappendsegment',\n  StreamingCodecsChangeError: 'streamingcodecschangeerror'\n};\n\n/**\n * @file video.js\n * @module videojs\n */\n\n/** @import { PlayerReadyCallback } from './player' */\n\n/**\n * Normalize an `id` value by trimming off a leading `#`\n *\n * @private\n * @param   {string} id\n *          A string, maybe with a leading `#`.\n *\n * @return {string}\n *          The string, without any leading `#`.\n */\nconst normalizeId = id => id.indexOf('#') === 0 ? id.slice(1) : id;\n\n/**\n * The `videojs()` function doubles as the main function for users to create a\n * {@link Player} instance as well as the main library namespace.\n *\n * It can also be used as a getter for a pre-existing {@link Player} instance.\n * However, we _strongly_ recommend using `videojs.getPlayer()` for this\n * purpose because it avoids any potential for unintended initialization.\n *\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\n * of our JSDoc template, we cannot properly document this as both a function\n * and a namespace, so its function signature is documented here.\n *\n * #### Arguments\n * ##### id\n * string|Element, **required**\n *\n * Video element or video element ID.\n *\n * ##### options\n * Object, optional\n *\n * Options object for providing settings.\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * ##### ready\n * {@link Component~ReadyCallback}, optional\n *\n * A function to be called when the {@link Player} and {@link Tech} are ready.\n *\n * #### Return Value\n *\n * The `videojs()` function returns a {@link Player} instance.\n *\n * @namespace\n *\n * @borrows AudioTrack as AudioTrack\n * @borrows Component.getComponent as getComponent\n * @borrows module:events.on as on\n * @borrows module:events.one as one\n * @borrows module:events.off as off\n * @borrows module:events.trigger as trigger\n * @borrows EventTarget as EventTarget\n * @borrows module:middleware.use as use\n * @borrows Player.players as players\n * @borrows Plugin.registerPlugin as registerPlugin\n * @borrows Plugin.deregisterPlugin as deregisterPlugin\n * @borrows Plugin.getPlugins as getPlugins\n * @borrows Plugin.getPlugin as getPlugin\n * @borrows Plugin.getPluginVersion as getPluginVersion\n * @borrows Tech.getTech as getTech\n * @borrows Tech.registerTech as registerTech\n * @borrows TextTrack as TextTrack\n * @borrows VideoTrack as VideoTrack\n *\n * @param  {string|Element} id\n *         Video element or video element ID.\n *\n * @param  {Object} [options]\n *         Options object for providing settings.\n *         See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\n *\n * @param  {PlayerReadyCallback} [ready]\n *         A function to be called when the {@link Player} and {@link Tech} are\n *         ready.\n *\n * @return {Player}\n *         The `videojs()` function returns a {@link Player|Player} instance.\n */\nfunction videojs(id, options, ready) {\n  let player = videojs.getPlayer(id);\n  if (player) {\n    if (options) {\n      log$1.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n    }\n    if (ready) {\n      player.ready(ready);\n    }\n    return player;\n  }\n  const el = typeof id === 'string' ? $('#' + normalizeId(id)) : id;\n  if (!isEl(el)) {\n    throw new TypeError('The element or ID supplied is not valid. (videojs)');\n  }\n\n  // document.body.contains(el) will only check if el is contained within that one document.\n  // This causes problems for elements in iframes.\n  // Instead, use the element's ownerDocument instead of the global document.\n  // This will make sure that the element is indeed in the dom of that document.\n  // Additionally, check that the document in question has a default view.\n  // If the document is no longer attached to the dom, the defaultView of the document will be null.\n  // If element is inside Shadow DOM (e.g. is part of a Custom element), ownerDocument.body\n  // always returns false. Instead, use the Shadow DOM root.\n  const inShadowDom = 'getRootNode' in el ? el.getRootNode() instanceof window$1.ShadowRoot : false;\n  const rootNode = inShadowDom ? el.getRootNode() : el.ownerDocument.body;\n  if (!el.ownerDocument.defaultView || !rootNode.contains(el)) {\n    log$1.warn('The element supplied is not included in the DOM');\n  }\n  options = options || {};\n\n  // Store a copy of the el before modification, if it is to be restored in destroy()\n  // If div ingest, store the parent div\n  if (options.restoreEl === true) {\n    options.restoreEl = (el.parentNode && el.parentNode.hasAttribute && el.parentNode.hasAttribute('data-vjs-player') ? el.parentNode : el).cloneNode(true);\n  }\n  hooks('beforesetup').forEach(hookFunction => {\n    const opts = hookFunction(el, merge$1(options));\n    if (!isObject(opts) || Array.isArray(opts)) {\n      log$1.error('please return an object in beforesetup hooks');\n      return;\n    }\n    options = merge$1(options, opts);\n  });\n\n  // We get the current \"Player\" component here in case an integration has\n  // replaced it with a custom player.\n  const PlayerComponent = Component$1.getComponent('Player');\n  player = new PlayerComponent(el, options, ready);\n  hooks('setup').forEach(hookFunction => hookFunction(player));\n  return player;\n}\nvideojs.hooks_ = hooks_;\nvideojs.hooks = hooks;\nvideojs.hook = hook;\nvideojs.hookOnce = hookOnce;\nvideojs.removeHook = removeHook;\n\n// Add default styles\nif (window$1.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\n  let style = $('.vjs-styles-defaults');\n  if (!style) {\n    style = createStyleElement('vjs-styles-defaults');\n    const head = $('head');\n    if (head) {\n      head.insertBefore(style, head.firstChild);\n    }\n    setTextContent(style, `\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    `);\n  }\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your\n// video in the DOM (weird behavior only with minified version)\nautoSetupTimeout(1, videojs);\n\n/**\n * Current Video.js version. Follows [semantic versioning](https://semver.org/).\n *\n * @type {string}\n */\nvideojs.VERSION = version$6;\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object}\n *         The created players\n */\nvideojs.getPlayers = () => Player.players;\n\n/**\n * Get a single player based on an ID or DOM element.\n *\n * This is useful if you want to check if an element or ID has an associated\n * Video.js player, but not create one if it doesn't.\n *\n * @param   {string|Element} id\n *          An HTML element - `<video>`, `<audio>`, or `<video-js>` -\n *          or a string matching the `id` of such an element.\n *\n * @return {Player|undefined}\n *          A player instance or `undefined` if there is no player instance\n *          matching the argument.\n */\nvideojs.getPlayer = id => {\n  const players = Player.players;\n  let tag;\n  if (typeof id === 'string') {\n    const nId = normalizeId(id);\n    const player = players[nId];\n    if (player) {\n      return player;\n    }\n    tag = $('#' + nId);\n  } else {\n    tag = id;\n  }\n  if (isEl(tag)) {\n    const {\n      player,\n      playerId\n    } = tag;\n\n    // Element may have a `player` property referring to an already created\n    // player instance. If so, return that.\n    if (player || players[playerId]) {\n      return player || players[playerId];\n    }\n  }\n};\n\n/**\n * Returns an array of all current players.\n *\n * @return {Array}\n *         An array of all players. The array will be in the order that\n *         `Object.keys` provides, which could potentially vary between\n *         JavaScript engines.\n *\n */\nvideojs.getAllPlayers = () =>\n// Disposed players leave a key with a `null` value, so we need to make sure\n// we filter those out.\nObject.keys(Player.players).map(k => Player.players[k]).filter(Boolean);\nvideojs.players = Player.players;\nvideojs.getComponent = Component$1.getComponent;\n\n/**\n * Register a component so it can referred to by name. Used when adding to other\n * components, either through addChild `component.addChild('myComponent')` or through\n * default children options  `{ children: ['myComponent'] }`.\n *\n * > NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {string} name\n *        The class name of the component\n *\n * @param {typeof Component} comp\n *        The component class\n *\n * @return {typeof Component}\n *         The newly registered component\n */\nvideojs.registerComponent = (name, comp) => {\n  if (Tech.isTech(comp)) {\n    log$1.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n  }\n  return Component$1.registerComponent.call(Component$1, name, comp);\n};\nvideojs.getTech = Tech.getTech;\nvideojs.registerTech = Tech.registerTech;\nvideojs.use = use;\n\n/**\n * An object that can be returned by a middleware to signify\n * that the middleware is being terminated.\n *\n * @type {object}\n * @property {object} middleware.TERMINATOR\n */\nObject.defineProperty(videojs, 'middleware', {\n  value: {},\n  writeable: false,\n  enumerable: true\n});\nObject.defineProperty(videojs.middleware, 'TERMINATOR', {\n  value: TERMINATOR,\n  writeable: false,\n  enumerable: true\n});\n\n/**\n * A reference to the {@link module:browser|browser utility module} as an object.\n *\n * @type {Object}\n * @see  {@link module:browser|browser}\n */\nvideojs.browser = browser;\n\n/**\n * A reference to the {@link module:obj|obj utility module} as an object.\n *\n * @type {Object}\n * @see  {@link module:obj|obj}\n */\nvideojs.obj = Obj;\n\n/**\n * Deprecated reference to the {@link module:obj.merge|merge function}\n *\n * @type {Function}\n * @see {@link module:obj.merge|merge}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.obj.merge instead.\n */\nvideojs.mergeOptions = deprecateForMajor(9, 'videojs.mergeOptions', 'videojs.obj.merge', merge$1);\n\n/**\n * Deprecated reference to the {@link module:obj.defineLazyProperty|defineLazyProperty function}\n *\n * @type {Function}\n * @see {@link module:obj.defineLazyProperty|defineLazyProperty}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.obj.defineLazyProperty instead.\n */\nvideojs.defineLazyProperty = deprecateForMajor(9, 'videojs.defineLazyProperty', 'videojs.obj.defineLazyProperty', defineLazyProperty);\n\n/**\n * Deprecated reference to the {@link module:fn.bind_|fn.bind_ function}\n *\n * @type {Function}\n * @see {@link module:fn.bind_|fn.bind_}\n * @deprecated Deprecated and will be removed in 9.0. Please use native Function.prototype.bind instead.\n */\nvideojs.bind = deprecateForMajor(9, 'videojs.bind', 'native Function.prototype.bind', bind_);\nvideojs.registerPlugin = Plugin.registerPlugin;\nvideojs.deregisterPlugin = Plugin.deregisterPlugin;\n\n/**\n * Deprecated method to register a plugin with Video.js\n *\n * @deprecated Deprecated and will be removed in 9.0. Use videojs.registerPlugin() instead.\n *\n * @param {string} name\n *        The plugin name\n*\n * @param {typeof Plugin|Function} plugin\n *         The plugin sub-class or function\n *\n * @return {typeof Plugin|Function}\n */\nvideojs.plugin = (name, plugin) => {\n  log$1.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\n  return Plugin.registerPlugin(name, plugin);\n};\nvideojs.getPlugins = Plugin.getPlugins;\nvideojs.getPlugin = Plugin.getPlugin;\nvideojs.getPluginVersion = Plugin.getPluginVersion;\n\n/**\n * Adding languages so that they're available to all players.\n * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\n *\n * @param {string} code\n *        The language code or dictionary property\n *\n * @param {Object} data\n *        The data values to be translated\n *\n * @return {Object}\n *         The resulting language dictionary object\n */\nvideojs.addLanguage = function (code, data) {\n  code = ('' + code).toLowerCase();\n  videojs.options.languages = merge$1(videojs.options.languages, {\n    [code]: data\n  });\n  return videojs.options.languages[code];\n};\n\n/**\n * A reference to the {@link module:log|log utility module} as an object.\n *\n * @type {Function}\n * @see  {@link module:log|log}\n */\nvideojs.log = log$1;\nvideojs.createLogger = createLogger;\n\n/**\n * A reference to the {@link module:time|time utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:time|time}\n */\nvideojs.time = Time;\n\n/**\n * Deprecated reference to the {@link module:time.createTimeRanges|createTimeRanges function}\n *\n * @type {Function}\n * @see {@link module:time.createTimeRanges|createTimeRanges}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.createTimeRanges instead.\n */\nvideojs.createTimeRange = deprecateForMajor(9, 'videojs.createTimeRange', 'videojs.time.createTimeRanges', createTimeRanges$1);\n\n/**\n * Deprecated reference to the {@link module:time.createTimeRanges|createTimeRanges function}\n *\n * @type {Function}\n * @see {@link module:time.createTimeRanges|createTimeRanges}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.createTimeRanges instead.\n */\nvideojs.createTimeRanges = deprecateForMajor(9, 'videojs.createTimeRanges', 'videojs.time.createTimeRanges', createTimeRanges$1);\n\n/**\n * Deprecated reference to the {@link module:time.formatTime|formatTime function}\n *\n * @type {Function}\n * @see {@link module:time.formatTime|formatTime}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.format instead.\n */\nvideojs.formatTime = deprecateForMajor(9, 'videojs.formatTime', 'videojs.time.formatTime', formatTime);\n\n/**\n * Deprecated reference to the {@link module:time.setFormatTime|setFormatTime function}\n *\n * @type {Function}\n * @see {@link module:time.setFormatTime|setFormatTime}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.setFormat instead.\n */\nvideojs.setFormatTime = deprecateForMajor(9, 'videojs.setFormatTime', 'videojs.time.setFormatTime', setFormatTime);\n\n/**\n * Deprecated reference to the {@link module:time.resetFormatTime|resetFormatTime function}\n *\n * @type {Function}\n * @see {@link module:time.resetFormatTime|resetFormatTime}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.time.resetFormat instead.\n */\nvideojs.resetFormatTime = deprecateForMajor(9, 'videojs.resetFormatTime', 'videojs.time.resetFormatTime', resetFormatTime);\n\n/**\n * Deprecated reference to the {@link module:url.parseUrl|Url.parseUrl function}\n *\n * @type {Function}\n * @see {@link module:url.parseUrl|parseUrl}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.url.parseUrl instead.\n */\nvideojs.parseUrl = deprecateForMajor(9, 'videojs.parseUrl', 'videojs.url.parseUrl', parseUrl);\n\n/**\n * Deprecated reference to the {@link module:url.isCrossOrigin|Url.isCrossOrigin function}\n *\n * @type {Function}\n * @see {@link module:url.isCrossOrigin|isCrossOrigin}\n * @deprecated Deprecated and will be removed in 9.0. Please use videojs.url.isCrossOrigin instead.\n */\nvideojs.isCrossOrigin = deprecateForMajor(9, 'videojs.isCrossOrigin', 'videojs.url.isCrossOrigin', isCrossOrigin);\nvideojs.EventTarget = EventTarget$2;\nvideojs.any = any;\nvideojs.on = on;\nvideojs.one = one;\nvideojs.off = off;\nvideojs.trigger = trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper.\n *\n * @function\n * @param    {Object} options\n *           Settings for the request.\n *\n * @return   {XMLHttpRequest|XDomainRequest}\n *           The request object.\n *\n * @see      https://github.com/Raynos/xhr\n */\nvideojs.xhr = XHR;\nvideojs.TextTrack = TextTrack;\nvideojs.AudioTrack = AudioTrack;\nvideojs.VideoTrack = VideoTrack;\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(k => {\n  videojs[k] = function () {\n    log$1.warn(`videojs.${k}() is deprecated; use videojs.dom.${k}() instead`);\n    return Dom[k].apply(null, arguments);\n  };\n});\nvideojs.computedStyle = deprecateForMajor(9, 'videojs.computedStyle', 'videojs.dom.computedStyle', computedStyle);\n\n/**\n * A reference to the {@link module:dom|DOM utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:dom|dom}\n */\nvideojs.dom = Dom;\n\n/**\n * A reference to the {@link module:fn|fn utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:fn|fn}\n */\nvideojs.fn = Fn;\n\n/**\n * A reference to the {@link module:num|num utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:num|num}\n */\nvideojs.num = Num;\n\n/**\n * A reference to the {@link module:str|str utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:str|str}\n */\nvideojs.str = Str;\n\n/**\n * A reference to the {@link module:url|URL utility module} as an object.\n *\n * @type {Object}\n * @see {@link module:url|url}\n */\nvideojs.url = Url;\n\n// The list of possible error types to occur in video.js\nvideojs.Error = VjsErrors;\n\n/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */\n\n/**\n * A single QualityLevel.\n *\n * interface QualityLevel {\n *   readonly attribute DOMString id;\n *            attribute DOMString label;\n *   readonly attribute long width;\n *   readonly attribute long height;\n *   readonly attribute long bitrate;\n *            attribute boolean enabled;\n * };\n *\n * @class QualityLevel\n */\nclass QualityLevel {\n  /**\n   * Creates a QualityLevel\n   *\n   * @param {Representation|Object} representation The representation of the quality level\n   * @param {string}   representation.id        Unique id of the QualityLevel\n   * @param {number=}  representation.width     Resolution width of the QualityLevel\n   * @param {number=}  representation.height    Resolution height of the QualityLevel\n   * @param {number}   representation.bandwidth Bitrate of the QualityLevel\n   * @param {number=}  representation.frameRate Frame-rate of the QualityLevel\n   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\n   */\n  constructor(representation) {\n    let level = this; // eslint-disable-line\n\n    level.id = representation.id;\n    level.label = level.id;\n    level.width = representation.width;\n    level.height = representation.height;\n    level.bitrate = representation.bandwidth;\n    level.frameRate = representation.frameRate;\n    level.enabled_ = representation.enabled;\n    Object.defineProperty(level, 'enabled', {\n      /**\n       * Get whether the QualityLevel is enabled.\n       *\n       * @return {boolean} True if the QualityLevel is enabled.\n       */\n      get() {\n        return level.enabled_();\n      },\n      /**\n       * Enable or disable the QualityLevel.\n       *\n       * @param {boolean} enable true to enable QualityLevel, false to disable.\n       */\n      set(enable) {\n        level.enabled_(enable);\n      }\n    });\n    return level;\n  }\n}\n\n/**\n * A list of QualityLevels.\n *\n * interface QualityLevelList : EventTarget {\n *   getter QualityLevel (unsigned long index);\n *   readonly attribute unsigned long length;\n *   readonly attribute long selectedIndex;\n *\n *   void addQualityLevel(QualityLevel qualityLevel)\n *   void removeQualityLevel(QualityLevel remove)\n *   QualityLevel? getQualityLevelById(DOMString id);\n *\n *   attribute EventHandler onchange;\n *   attribute EventHandler onaddqualitylevel;\n *   attribute EventHandler onremovequalitylevel;\n * };\n *\n * @extends videojs.EventTarget\n * @class QualityLevelList\n */\nclass QualityLevelList extends videojs.EventTarget {\n  /**\n   * Creates a QualityLevelList.\n   */\n  constructor() {\n    super();\n    let list = this; // eslint-disable-line\n\n    list.levels_ = [];\n    list.selectedIndex_ = -1;\n\n    /**\n     * Get the index of the currently selected QualityLevel.\n     *\n     * @returns {number} The index of the selected QualityLevel. -1 if none selected.\n     * @readonly\n     */\n    Object.defineProperty(list, 'selectedIndex', {\n      get() {\n        return list.selectedIndex_;\n      }\n    });\n\n    /**\n     * Get the length of the list of QualityLevels.\n     *\n     * @returns {number} The length of the list.\n     * @readonly\n     */\n    Object.defineProperty(list, 'length', {\n      get() {\n        return list.levels_.length;\n      }\n    });\n    list[Symbol.iterator] = () => list.levels_.values();\n    return list;\n  }\n\n  /**\n   * Adds a quality level to the list.\n   *\n   * @param {Representation|Object} representation The representation of the quality level\n   * @param {string}   representation.id        Unique id of the QualityLevel\n   * @param {number=}  representation.width     Resolution width of the QualityLevel\n   * @param {number=}  representation.height    Resolution height of the QualityLevel\n   * @param {number}   representation.bandwidth Bitrate of the QualityLevel\n   * @param {number=}  representation.frameRate Frame-rate of the QualityLevel\n   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\n   * @return {QualityLevel} the QualityLevel added to the list\n   * @method addQualityLevel\n   */\n  addQualityLevel(representation) {\n    let qualityLevel = this.getQualityLevelById(representation.id);\n\n    // Do not add duplicate quality levels\n    if (qualityLevel) {\n      return qualityLevel;\n    }\n    const index = this.levels_.length;\n    qualityLevel = new QualityLevel(representation);\n    if (!('' + index in this)) {\n      Object.defineProperty(this, index, {\n        get() {\n          return this.levels_[index];\n        }\n      });\n    }\n    this.levels_.push(qualityLevel);\n    this.trigger({\n      qualityLevel,\n      type: 'addqualitylevel'\n    });\n    return qualityLevel;\n  }\n\n  /**\n   * Removes a quality level from the list.\n   *\n   * @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.\n   * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed\n   * @method removeQualityLevel\n   */\n  removeQualityLevel(qualityLevel) {\n    let removed = null;\n    for (let i = 0, l = this.length; i < l; i++) {\n      if (this[i] === qualityLevel) {\n        removed = this.levels_.splice(i, 1)[0];\n        if (this.selectedIndex_ === i) {\n          this.selectedIndex_ = -1;\n        } else if (this.selectedIndex_ > i) {\n          this.selectedIndex_--;\n        }\n        break;\n      }\n    }\n    if (removed) {\n      this.trigger({\n        qualityLevel,\n        type: 'removequalitylevel'\n      });\n    }\n    return removed;\n  }\n\n  /**\n   * Searches for a QualityLevel with the given id.\n   *\n   * @param {string} id The id of the QualityLevel to find.\n   * @return {QualityLevel|null} The QualityLevel with id, or null if not found.\n   * @method getQualityLevelById\n   */\n  getQualityLevelById(id) {\n    for (let i = 0, l = this.length; i < l; i++) {\n      const level = this[i];\n      if (level.id === id) {\n        return level;\n      }\n    }\n    return null;\n  }\n\n  /**\n   * Resets the list of QualityLevels to empty\n   *\n   * @method dispose\n   */\n  dispose() {\n    this.selectedIndex_ = -1;\n    this.levels_.length = 0;\n  }\n}\n\n/**\n * change - The selected QualityLevel has changed.\n * addqualitylevel - A QualityLevel has been added to the QualityLevelList.\n * removequalitylevel - A QualityLevel has been removed from the QualityLevelList.\n */\nQualityLevelList.prototype.allowedEvents_ = {\n  change: 'change',\n  addqualitylevel: 'addqualitylevel',\n  removequalitylevel: 'removequalitylevel'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (const event in QualityLevelList.prototype.allowedEvents_) {\n  QualityLevelList.prototype['on' + event] = null;\n}\nvar version$5 = \"4.1.0\";\n\n/**\n * Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and\n * event handlers.\n *\n * @param {Player} player Player object.\n * @param {Object} options Plugin options object.\n * @return {QualityLevelList} a list of QualityLevels\n */\nconst initPlugin$1 = function (player, options) {\n  const originalPluginFn = player.qualityLevels;\n  const qualityLevelList = new QualityLevelList();\n  const disposeHandler = function () {\n    qualityLevelList.dispose();\n    player.qualityLevels = originalPluginFn;\n    player.off('dispose', disposeHandler);\n  };\n  player.on('dispose', disposeHandler);\n  player.qualityLevels = () => qualityLevelList;\n  player.qualityLevels.VERSION = version$5;\n  return qualityLevelList;\n};\n\n/**\n * A video.js plugin.\n *\n * In the plugin function, the value of `this` is a video.js `Player`\n * instance. You cannot rely on the player being in a \"ready\" state here,\n * depending on how the plugin is invoked. This may or may not be important\n * to you; if not, remove the wait for \"ready\"!\n *\n * @param {Object} options Plugin options object\n * @return {QualityLevelList} a list of QualityLevels\n */\nconst qualityLevels = function (options) {\n  return initPlugin$1(this, videojs.obj.merge({}, options));\n};\n\n// Register the plugin with video.js.\nvideojs.registerPlugin('qualityLevels', qualityLevels);\n\n// Include the version number.\nqualityLevels.VERSION = version$5;\n\n/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */\n\n/**\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\n */\nconst resolveUrl = _resolveUrl;\n/**\n * If the xhr request was redirected, return the responseURL, otherwise,\n * return the original url.\n *\n * @api private\n *\n * @param  {string} url - an url being requested\n * @param  {XMLHttpRequest} req - xhr request result\n *\n * @return {string}\n */\n\nconst resolveManifestRedirect = (url, req) => {\n  // To understand how the responseURL below is set and generated:\n  // - https://fetch.spec.whatwg.org/#concept-response-url\n  // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\n  if (req && req.responseURL && url !== req.responseURL) {\n    return req.responseURL;\n  }\n  return url;\n};\nconst logger = source => {\n  if (videojs.log.debug) {\n    return videojs.log.debug.bind(videojs, 'VHS:', `${source} >`);\n  }\n  return function () {};\n};\n\n/**\n * Provides a compatibility layer between Video.js 7 and 8 API changes for VHS.\n */\n/**\n * Delegates to videojs.obj.merge (Video.js 8) or\n * videojs.mergeOptions (Video.js 7).\n */\n\nfunction merge(...args) {\n  const context = videojs.obj || videojs;\n  const fn = context.merge || context.mergeOptions;\n  return fn.apply(context, args);\n}\n/**\n * Delegates to videojs.time.createTimeRanges (Video.js 8) or\n * videojs.createTimeRanges (Video.js 7).\n */\n\nfunction createTimeRanges(...args) {\n  const context = videojs.time || videojs;\n  const fn = context.createTimeRanges || context.createTimeRanges;\n  return fn.apply(context, args);\n}\n/**\n * Converts provided buffered ranges to a descriptive string\n *\n * @param {TimeRanges} buffered - received buffered time ranges\n *\n * @return {string} - descriptive string\n */\n\nfunction bufferedRangesToString(buffered) {\n  if (buffered.length === 0) {\n    return 'Buffered Ranges are empty';\n  }\n  let bufferedRangesStr = 'Buffered Ranges: \\n';\n  for (let i = 0; i < buffered.length; i++) {\n    const start = buffered.start(i);\n    const end = buffered.end(i);\n    bufferedRangesStr += `${start} --> ${end}. Duration (${end - start})\\n`;\n  }\n  return bufferedRangesStr;\n}\n\n/**\n * ranges\n *\n * Utilities for working with TimeRanges.\n *\n */\n\nconst TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\n// can be misleading because of precision differences or when the current media has poorly\n// aligned audio and video, which can cause values to be slightly off from what you would\n// expect. This value is what we consider to be safe to use in such comparisons to account\n// for these scenarios.\n\nconst SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\nconst filterRanges = function (timeRanges, predicate) {\n  const results = [];\n  let i;\n  if (timeRanges && timeRanges.length) {\n    // Search for ranges that match the predicate\n    for (i = 0; i < timeRanges.length; i++) {\n      if (predicate(timeRanges.start(i), timeRanges.end(i))) {\n        results.push([timeRanges.start(i), timeRanges.end(i)]);\n      }\n    }\n  }\n  return createTimeRanges(results);\n};\n/**\n * Attempts to find the buffered TimeRange that contains the specified\n * time.\n *\n * @param {TimeRanges} buffered - the TimeRanges object to query\n * @param {number} time  - the time to filter on.\n * @return {TimeRanges} a new TimeRanges object\n */\n\nconst findRange = function (buffered, time) {\n  return filterRanges(buffered, function (start, end) {\n    return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\n  });\n};\n/**\n * Returns the TimeRanges that begin later than the specified time.\n *\n * @param {TimeRanges} timeRanges - the TimeRanges object to query\n * @param {number} time - the time to filter on.\n * @return {TimeRanges} a new TimeRanges object.\n */\n\nconst findNextRange = function (timeRanges, time) {\n  return filterRanges(timeRanges, function (start) {\n    return start - TIME_FUDGE_FACTOR >= time;\n  });\n};\n/**\n * Returns gaps within a list of TimeRanges\n *\n * @param {TimeRanges} buffered - the TimeRanges object\n * @return {TimeRanges} a TimeRanges object of gaps\n */\n\nconst findGaps = function (buffered) {\n  if (buffered.length < 2) {\n    return createTimeRanges();\n  }\n  const ranges = [];\n  for (let i = 1; i < buffered.length; i++) {\n    const start = buffered.end(i - 1);\n    const end = buffered.start(i);\n    ranges.push([start, end]);\n  }\n  return createTimeRanges(ranges);\n};\n/**\n * Calculate the intersection of two TimeRanges\n *\n * @param {TimeRanges} bufferA\n * @param {TimeRanges} bufferB\n * @return {TimeRanges} The interesection of `bufferA` with `bufferB`\n */\n\nconst bufferIntersection = function (bufferA, bufferB) {\n  let start = null;\n  let end = null;\n  let arity = 0;\n  const extents = [];\n  const ranges = [];\n  if (!bufferA || !bufferA.length || !bufferB || !bufferB.length) {\n    return createTimeRanges();\n  } // Handle the case where we have both buffers and create an\n  // intersection of the two\n\n  let count = bufferA.length; // A) Gather up all start and end times\n\n  while (count--) {\n    extents.push({\n      time: bufferA.start(count),\n      type: 'start'\n    });\n    extents.push({\n      time: bufferA.end(count),\n      type: 'end'\n    });\n  }\n  count = bufferB.length;\n  while (count--) {\n    extents.push({\n      time: bufferB.start(count),\n      type: 'start'\n    });\n    extents.push({\n      time: bufferB.end(count),\n      type: 'end'\n    });\n  } // B) Sort them by time\n\n  extents.sort(function (a, b) {\n    return a.time - b.time;\n  }); // C) Go along one by one incrementing arity for start and decrementing\n  //    arity for ends\n\n  for (count = 0; count < extents.length; count++) {\n    if (extents[count].type === 'start') {\n      arity++; // D) If arity is ever incremented to 2 we are entering an\n      //    overlapping range\n\n      if (arity === 2) {\n        start = extents[count].time;\n      }\n    } else if (extents[count].type === 'end') {\n      arity--; // E) If arity is ever decremented to 1 we leaving an\n      //    overlapping range\n\n      if (arity === 1) {\n        end = extents[count].time;\n      }\n    } // F) Record overlapping ranges\n\n    if (start !== null && end !== null) {\n      ranges.push([start, end]);\n      start = null;\n      end = null;\n    }\n  }\n  return createTimeRanges(ranges);\n};\n/**\n * Gets a human readable string for a TimeRange\n *\n * @param {TimeRange} range\n * @return {string} a human readable string\n */\n\nconst printableRange = range => {\n  const strArr = [];\n  if (!range || !range.length) {\n    return '';\n  }\n  for (let i = 0; i < range.length; i++) {\n    strArr.push(range.start(i) + ' => ' + range.end(i));\n  }\n  return strArr.join(', ');\n};\n/**\n * Calculates the amount of time left in seconds until the player hits the end of the\n * buffer and causes a rebuffer\n *\n * @param {TimeRange} buffered\n *        The state of the buffer\n * @param {Numnber} currentTime\n *        The current time of the player\n * @param {number} playbackRate\n *        The current playback rate of the player. Defaults to 1.\n * @return {number}\n *         Time until the player has to start rebuffering in seconds.\n * @function timeUntilRebuffer\n */\n\nconst timeUntilRebuffer = function (buffered, currentTime, playbackRate = 1) {\n  const bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\n  return (bufferedEnd - currentTime) / playbackRate;\n};\n/**\n * Converts a TimeRanges object into an array representation\n *\n * @param {TimeRanges} timeRanges\n * @return {Array}\n */\n\nconst timeRangesToArray = timeRanges => {\n  const timeRangesList = [];\n  for (let i = 0; i < timeRanges.length; i++) {\n    timeRangesList.push({\n      start: timeRanges.start(i),\n      end: timeRanges.end(i)\n    });\n  }\n  return timeRangesList;\n};\n/**\n * Determines if two time range objects are different.\n *\n * @param {TimeRange} a\n *        the first time range object to check\n *\n * @param {TimeRange} b\n *        the second time range object to check\n *\n * @return {Boolean}\n *         Whether the time range objects differ\n */\n\nconst isRangeDifferent = function (a, b) {\n  // same object\n  if (a === b) {\n    return false;\n  } // one or the other is undefined\n\n  if (!a && b || !b && a) {\n    return true;\n  } // length is different\n\n  if (a.length !== b.length) {\n    return true;\n  } // see if any start/end pair is different\n\n  for (let i = 0; i < a.length; i++) {\n    if (a.start(i) !== b.start(i) || a.end(i) !== b.end(i)) {\n      return true;\n    }\n  } // if the length and every pair is the same\n  // this is the same time range\n\n  return false;\n};\nconst lastBufferedEnd = function (a) {\n  if (!a || !a.length || !a.end) {\n    return;\n  }\n  return a.end(a.length - 1);\n};\n/**\n * A utility function to add up the amount of time in a timeRange\n * after a specified startTime.\n * ie:[[0, 10], [20, 40], [50, 60]] with a startTime 0\n *     would return 40 as there are 40s seconds after 0 in the timeRange\n *\n * @param {TimeRange} range\n *        The range to check against\n * @param {number} startTime\n *        The time in the time range that you should start counting from\n *\n * @return {number}\n *          The number of seconds in the buffer passed the specified time.\n */\n\nconst timeAheadOf = function (range, startTime) {\n  let time = 0;\n  if (!range || !range.length) {\n    return time;\n  }\n  for (let i = 0; i < range.length; i++) {\n    const start = range.start(i);\n    const end = range.end(i); // startTime is after this range entirely\n\n    if (startTime > end) {\n      continue;\n    } // startTime is within this range\n\n    if (startTime > start && startTime <= end) {\n      time += end - startTime;\n      continue;\n    } // startTime is before this range.\n\n    time += end - start;\n  }\n  return time;\n};\n\n/**\n * @file playlist.js\n *\n * Playlist related utilities.\n */\n/**\n * Get the duration of a segment, with special cases for\n * llhls segments that do not have a duration yet.\n *\n * @param {Object} playlist\n *        the playlist that the segment belongs to.\n * @param {Object} segment\n *        the segment to get a duration for.\n *\n * @return {number}\n *          the segment duration\n */\n\nconst segmentDurationWithParts = (playlist, segment) => {\n  // if this isn't a preload segment\n  // then we will have a segment duration that is accurate.\n  if (!segment.preload) {\n    return segment.duration;\n  } // otherwise we have to add up parts and preload hints\n  // to get an up to date duration.\n\n  let result = 0;\n  (segment.parts || []).forEach(function (p) {\n    result += p.duration;\n  }); // for preload hints we have to use partTargetDuration\n  // as they won't even have a duration yet.\n\n  (segment.preloadHints || []).forEach(function (p) {\n    if (p.type === 'PART') {\n      result += playlist.partTargetDuration;\n    }\n  });\n  return result;\n};\n/**\n * A function to get a combined list of parts and segments with durations\n * and indexes.\n *\n * @param {Playlist} playlist the playlist to get the list for.\n *\n * @return {Array} The part/segment list.\n */\n\nconst getPartsAndSegments = playlist => (playlist.segments || []).reduce((acc, segment, si) => {\n  if (segment.parts) {\n    segment.parts.forEach(function (part, pi) {\n      acc.push({\n        duration: part.duration,\n        segmentIndex: si,\n        partIndex: pi,\n        part,\n        segment\n      });\n    });\n  } else {\n    acc.push({\n      duration: segment.duration,\n      segmentIndex: si,\n      partIndex: null,\n      segment,\n      part: null\n    });\n  }\n  return acc;\n}, []);\nconst getLastParts = media => {\n  const lastSegment = media.segments && media.segments.length && media.segments[media.segments.length - 1];\n  return lastSegment && lastSegment.parts || [];\n};\nconst getKnownPartCount = ({\n  preloadSegment\n}) => {\n  if (!preloadSegment) {\n    return;\n  }\n  const {\n    parts,\n    preloadHints\n  } = preloadSegment;\n  let partCount = (preloadHints || []).reduce((count, hint) => count + (hint.type === 'PART' ? 1 : 0), 0);\n  partCount += parts && parts.length ? parts.length : 0;\n  return partCount;\n};\n/**\n * Get the number of seconds to delay from the end of a\n * live playlist.\n *\n * @param {Playlist} main the main playlist\n * @param {Playlist} media the media playlist\n * @return {number} the hold back in seconds.\n */\n\nconst liveEdgeDelay = (main, media) => {\n  if (media.endList) {\n    return 0;\n  } // dash suggestedPresentationDelay trumps everything\n\n  if (main && main.suggestedPresentationDelay) {\n    return main.suggestedPresentationDelay;\n  }\n  const hasParts = getLastParts(media).length > 0; // look for \"part\" delays from ll-hls first\n\n  if (hasParts && media.serverControl && media.serverControl.partHoldBack) {\n    return media.serverControl.partHoldBack;\n  } else if (hasParts && media.partTargetDuration) {\n    return media.partTargetDuration * 3; // finally look for full segment delays\n  } else if (media.serverControl && media.serverControl.holdBack) {\n    return media.serverControl.holdBack;\n  } else if (media.targetDuration) {\n    return media.targetDuration * 3;\n  }\n  return 0;\n};\n/**\n * walk backward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {Number} endSequence the mediaSequence to stop walking on\n */\n\nconst backwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\n  // the interval, use it\n\n  let segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\n  // information that is earlier than endSequence\n\n  if (segment) {\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: segment.start,\n        precise: true\n      };\n    }\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: segment.end - segment.duration,\n        precise: true\n      };\n    }\n  }\n  while (i--) {\n    segment = playlist.segments[i];\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: result + segment.end,\n        precise: true\n      };\n    }\n    result += segmentDurationWithParts(playlist, segment);\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: result + segment.start,\n        precise: true\n      };\n    }\n  }\n  return {\n    result,\n    precise: false\n  };\n};\n/**\n * walk forward until we find a duration we can use\n * or return a failure\n *\n * @param {Playlist} playlist the playlist to walk through\n * @param {number} endSequence the mediaSequence to stop walking on\n */\n\nconst forwardDuration = function (playlist, endSequence) {\n  let result = 0;\n  let segment;\n  let i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\n  // information\n\n  for (; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i];\n    if (typeof segment.start !== 'undefined') {\n      return {\n        result: segment.start - result,\n        precise: true\n      };\n    }\n    result += segmentDurationWithParts(playlist, segment);\n    if (typeof segment.end !== 'undefined') {\n      return {\n        result: segment.end - result,\n        precise: true\n      };\n    }\n  } // indicate we didn't find a useful duration estimate\n\n  return {\n    result: -1,\n    precise: false\n  };\n};\n/**\n  * Calculate the media duration from the segments associated with a\n  * playlist. The duration of a subinterval of the available segments\n  * may be calculated by specifying an end index.\n  *\n  * @param {Object} playlist a media playlist object\n  * @param {number=} endSequence an exclusive upper boundary\n  * for the playlist.  Defaults to playlist length.\n  * @param {number} expired the amount of time that has dropped\n  * off the front of the playlist in a live scenario\n  * @return {number} the duration between the first available segment\n  * and end index.\n  */\n\nconst intervalDuration = function (playlist, endSequence, expired) {\n  if (typeof endSequence === 'undefined') {\n    endSequence = playlist.mediaSequence + playlist.segments.length;\n  }\n  if (endSequence < playlist.mediaSequence) {\n    return 0;\n  } // do a backward walk to estimate the duration\n\n  const backward = backwardDuration(playlist, endSequence);\n  if (backward.precise) {\n    // if we were able to base our duration estimate on timing\n    // information provided directly from the Media Source, return\n    // it\n    return backward.result;\n  } // walk forward to see if a precise duration estimate can be made\n  // that way\n\n  const forward = forwardDuration(playlist, endSequence);\n  if (forward.precise) {\n    // we found a segment that has been buffered and so it's\n    // position is known precisely\n    return forward.result;\n  } // return the less-precise, playlist-based duration estimate\n\n  return backward.result + expired;\n};\n/**\n  * Calculates the duration of a playlist. If a start and end index\n  * are specified, the duration will be for the subset of the media\n  * timeline between those two indices. The total duration for live\n  * playlists is always Infinity.\n  *\n  * @param {Object} playlist a media playlist object\n  * @param {number=} endSequence an exclusive upper\n  * boundary for the playlist. Defaults to the playlist media\n  * sequence number plus its length.\n  * @param {number=} expired the amount of time that has\n  * dropped off the front of the playlist in a live scenario\n  * @return {number} the duration between the start index and end\n  * index.\n  */\n\nconst duration = function (playlist, endSequence, expired) {\n  if (!playlist) {\n    return 0;\n  }\n  if (typeof expired !== 'number') {\n    expired = 0;\n  } // if a slice of the total duration is not requested, use\n  // playlist-level duration indicators when they're present\n\n  if (typeof endSequence === 'undefined') {\n    // if present, use the duration specified in the playlist\n    if (playlist.totalDuration) {\n      return playlist.totalDuration;\n    } // duration should be Infinity for live playlists\n\n    if (!playlist.endList) {\n      return window$1.Infinity;\n    }\n  } // calculate the total duration based on the segment durations\n\n  return intervalDuration(playlist, endSequence, expired);\n};\n/**\n  * Calculate the time between two indexes in the current playlist\n  * neight the start- nor the end-index need to be within the current\n  * playlist in which case, the targetDuration of the playlist is used\n  * to approximate the durations of the segments\n  *\n  * @param {Array} options.durationList list to iterate over for durations.\n  * @param {number} options.defaultDuration duration to use for elements before or after the durationList\n  * @param {number} options.startIndex partsAndSegments index to start\n  * @param {number} options.endIndex partsAndSegments index to end.\n  * @return {number} the number of seconds between startIndex and endIndex\n  */\n\nconst sumDurations = function ({\n  defaultDuration,\n  durationList,\n  startIndex,\n  endIndex\n}) {\n  let durations = 0;\n  if (startIndex > endIndex) {\n    [startIndex, endIndex] = [endIndex, startIndex];\n  }\n  if (startIndex < 0) {\n    for (let i = startIndex; i < Math.min(0, endIndex); i++) {\n      durations += defaultDuration;\n    }\n    startIndex = 0;\n  }\n  for (let i = startIndex; i < endIndex; i++) {\n    durations += durationList[i].duration;\n  }\n  return durations;\n};\n/**\n * Calculates the playlist end time\n *\n * @param {Object} playlist a media playlist object\n * @param {number=} expired the amount of time that has\n *                  dropped off the front of the playlist in a live scenario\n * @param {boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\n *                        playlist end calculation should consider the safe live end\n *                        (truncate the playlist end by three segments). This is normally\n *                        used for calculating the end of the playlist's seekable range.\n *                        This takes into account the value of liveEdgePadding.\n *                        Setting liveEdgePadding to 0 is equivalent to setting this to false.\n * @param {number} liveEdgePadding a number indicating how far from the end of the playlist we should be in seconds.\n *                 If this is provided, it is used in the safe live end calculation.\n *                 Setting useSafeLiveEnd=false or liveEdgePadding=0 are equivalent.\n *                 Corresponds to suggestedPresentationDelay in DASH manifests.\n * @return {number} the end time of playlist\n * @function playlistEnd\n */\n\nconst playlistEnd = function (playlist, expired, useSafeLiveEnd, liveEdgePadding) {\n  if (!playlist || !playlist.segments) {\n    return null;\n  }\n  if (playlist.endList) {\n    return duration(playlist);\n  }\n  if (expired === null) {\n    return null;\n  }\n  expired = expired || 0;\n  let lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);\n  if (useSafeLiveEnd) {\n    liveEdgePadding = typeof liveEdgePadding === 'number' ? liveEdgePadding : liveEdgeDelay(null, playlist);\n    lastSegmentEndTime -= liveEdgePadding;\n  } // don't return a time less than zero\n\n  return Math.max(0, lastSegmentEndTime);\n};\n/**\n  * Calculates the interval of time that is currently seekable in a\n  * playlist. The returned time ranges are relative to the earliest\n  * moment in the specified playlist that is still available. A full\n  * seekable implementation for live streams would need to offset\n  * these values by the duration of content that has expired from the\n  * stream.\n  *\n  * @param {Object} playlist a media playlist object\n  * dropped off the front of the playlist in a live scenario\n  * @param {number=} expired the amount of time that has\n  * dropped off the front of the playlist in a live scenario\n  * @param {number} liveEdgePadding how far from the end of the playlist we should be in seconds.\n  *        Corresponds to suggestedPresentationDelay in DASH manifests.\n  * @return {TimeRanges} the periods of time that are valid targets\n  * for seeking\n  */\n\nconst seekable = function (playlist, expired, liveEdgePadding) {\n  const useSafeLiveEnd = true;\n  const seekableStart = expired || 0;\n  let seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\n  if (seekableEnd === null) {\n    return createTimeRanges();\n  } // Clamp seekable end since it can not be less than the seekable start\n\n  if (seekableEnd < seekableStart) {\n    seekableEnd = seekableStart;\n  }\n  return createTimeRanges(seekableStart, seekableEnd);\n};\n/**\n * Determine the index and estimated starting time of the segment that\n * contains a specified playback position in a media playlist.\n *\n * @param {Object} options.playlist the media playlist to query\n * @param {number} options.currentTime The number of seconds since the earliest\n * possible position to determine the containing segment for\n * @param {number} options.startTime the time when the segment/part starts\n * @param {number} options.startingSegmentIndex the segment index to start looking at.\n * @param {number?} [options.startingPartIndex] the part index to look at within the segment.\n *\n * @return {Object} an object with partIndex, segmentIndex, and startTime.\n */\n\nconst getMediaInfoForTime = function ({\n  playlist,\n  currentTime,\n  startingSegmentIndex,\n  startingPartIndex,\n  startTime,\n  exactManifestTimings\n}) {\n  let time = currentTime - startTime;\n  const partsAndSegments = getPartsAndSegments(playlist);\n  let startIndex = 0;\n  for (let i = 0; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\n    if (startingSegmentIndex !== partAndSegment.segmentIndex) {\n      continue;\n    } // skip this if part index does not match.\n\n    if (typeof startingPartIndex === 'number' && typeof partAndSegment.partIndex === 'number' && startingPartIndex !== partAndSegment.partIndex) {\n      continue;\n    }\n    startIndex = i;\n    break;\n  }\n  if (time < 0) {\n    // Walk backward from startIndex in the playlist, adding durations\n    // until we find a segment that contains `time` and return it\n    if (startIndex > 0) {\n      for (let i = startIndex - 1; i >= 0; i--) {\n        const partAndSegment = partsAndSegments[i];\n        time += partAndSegment.duration;\n        if (exactManifestTimings) {\n          if (time < 0) {\n            continue;\n          }\n        } else if (time + TIME_FUDGE_FACTOR <= 0) {\n          continue;\n        }\n        return {\n          partIndex: partAndSegment.partIndex,\n          segmentIndex: partAndSegment.segmentIndex,\n          startTime: startTime - sumDurations({\n            defaultDuration: playlist.targetDuration,\n            durationList: partsAndSegments,\n            startIndex,\n            endIndex: i\n          })\n        };\n      }\n    } // We were unable to find a good segment within the playlist\n    // so select the first segment\n\n    return {\n      partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n      segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n      startTime: currentTime\n    };\n  } // When startIndex is negative, we first walk forward to first segment\n  // adding target durations. If we \"run out of time\" before getting to\n  // the first segment, return the first segment\n\n  if (startIndex < 0) {\n    for (let i = startIndex; i < 0; i++) {\n      time -= playlist.targetDuration;\n      if (time < 0) {\n        return {\n          partIndex: partsAndSegments[0] && partsAndSegments[0].partIndex || null,\n          segmentIndex: partsAndSegments[0] && partsAndSegments[0].segmentIndex || 0,\n          startTime: currentTime\n        };\n      }\n    }\n    startIndex = 0;\n  } // Walk forward from startIndex in the playlist, subtracting durations\n  // until we find a segment that contains `time` and return it\n\n  for (let i = startIndex; i < partsAndSegments.length; i++) {\n    const partAndSegment = partsAndSegments[i];\n    time -= partAndSegment.duration;\n    const canUseFudgeFactor = partAndSegment.duration > TIME_FUDGE_FACTOR;\n    const isExactlyAtTheEnd = time === 0;\n    const isExtremelyCloseToTheEnd = canUseFudgeFactor && time + TIME_FUDGE_FACTOR >= 0;\n    if (isExactlyAtTheEnd || isExtremelyCloseToTheEnd) {\n      // 1) We are exactly at the end of the current segment.\n      // 2) We are extremely close to the end of the current segment (The difference is less than  1 / 30).\n      //    We may encounter this situation when\n      //    we don't have exact match between segment duration info in the manifest and the actual duration of the segment\n      //    For example:\n      //    We appended 3 segments 10 seconds each, meaning we should have 30 sec buffered,\n      //    but we the actual buffered is 29.99999\n      //\n      // In both cases:\n      // if we passed current time -> it means that we already played current segment\n      // if we passed buffered.end -> it means that this segment is already loaded and buffered\n      // we should select the next segment if we have one:\n      if (i !== partsAndSegments.length - 1) {\n        continue;\n      }\n    }\n    if (exactManifestTimings) {\n      if (time > 0) {\n        continue;\n      }\n    } else if (time - TIME_FUDGE_FACTOR >= 0) {\n      continue;\n    }\n    return {\n      partIndex: partAndSegment.partIndex,\n      segmentIndex: partAndSegment.segmentIndex,\n      startTime: startTime + sumDurations({\n        defaultDuration: playlist.targetDuration,\n        durationList: partsAndSegments,\n        startIndex,\n        endIndex: i\n      })\n    };\n  } // We are out of possible candidates so load the last one...\n\n  return {\n    segmentIndex: partsAndSegments[partsAndSegments.length - 1].segmentIndex,\n    partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex,\n    startTime: currentTime\n  };\n};\n/**\n * Check whether the playlist is excluded or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is excluded or not\n * @function isExcluded\n */\n\nconst isExcluded = function (playlist) {\n  return playlist.excludeUntil && playlist.excludeUntil > Date.now();\n};\n/**\n * Check whether the playlist is compatible with current playback configuration or has\n * been excluded permanently for being incompatible.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is incompatible or not\n * @function isIncompatible\n */\n\nconst isIncompatible = function (playlist) {\n  return playlist.excludeUntil && playlist.excludeUntil === Infinity;\n};\n/**\n * Check whether the playlist is enabled or not.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is enabled or not\n * @function isEnabled\n */\n\nconst isEnabled = function (playlist) {\n  const excluded = isExcluded(playlist);\n  return !playlist.disabled && !excluded;\n};\n/**\n * Check whether the playlist has been manually disabled through the representations api.\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist is disabled manually or not\n * @function isDisabled\n */\n\nconst isDisabled = function (playlist) {\n  return playlist.disabled;\n};\n/**\n * Returns whether the current playlist is an AES encrypted HLS stream\n *\n * @return {boolean} true if it's an AES encrypted HLS stream\n */\n\nconst isAes = function (media) {\n  for (let i = 0; i < media.segments.length; i++) {\n    if (media.segments[i].key) {\n      return true;\n    }\n  }\n  return false;\n};\n/**\n * Checks if the playlist has a value for the specified attribute\n *\n * @param {string} attr\n *        Attribute to check for\n * @param {Object} playlist\n *        The media playlist object\n * @return {boolean}\n *         Whether the playlist contains a value for the attribute or not\n * @function hasAttribute\n */\n\nconst hasAttribute = function (attr, playlist) {\n  return playlist.attributes && playlist.attributes[attr];\n};\n/**\n * Estimates the time required to complete a segment download from the specified playlist\n *\n * @param {number} segmentDuration\n *        Duration of requested segment\n * @param {number} bandwidth\n *        Current measured bandwidth of the player\n * @param {Object} playlist\n *        The media playlist object\n * @param {number=} bytesReceived\n *        Number of bytes already received for the request. Defaults to 0\n * @return {number|NaN}\n *         The estimated time to request the segment. NaN if bandwidth information for\n *         the given playlist is unavailable\n * @function estimateSegmentRequestTime\n */\n\nconst estimateSegmentRequestTime = function (segmentDuration, bandwidth, playlist, bytesReceived = 0) {\n  if (!hasAttribute('BANDWIDTH', playlist)) {\n    return NaN;\n  }\n  const size = segmentDuration * playlist.attributes.BANDWIDTH;\n  return (size - bytesReceived * 8) / bandwidth;\n};\n/*\n * Returns whether the current playlist is the lowest rendition\n *\n * @return {Boolean} true if on lowest rendition\n */\n\nconst isLowestEnabledRendition = (main, media) => {\n  if (main.playlists.length === 1) {\n    return true;\n  }\n  const currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\n  return main.playlists.filter(playlist => {\n    if (!isEnabled(playlist)) {\n      return false;\n    }\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\n  }).length === 0;\n};\nconst playlistMatch = (a, b) => {\n  // both playlits are null\n  // or only one playlist is non-null\n  // no match\n  if (!a && !b || !a && b || a && !b) {\n    return false;\n  } // playlist objects are the same, match\n\n  if (a === b) {\n    return true;\n  } // first try to use id as it should be the most\n  // accurate\n\n  if (a.id && b.id && a.id === b.id) {\n    return true;\n  } // next try to use reslovedUri as it should be the\n  // second most accurate.\n\n  if (a.resolvedUri && b.resolvedUri && a.resolvedUri === b.resolvedUri) {\n    return true;\n  } // finally try to use uri as it should be accurate\n  // but might miss a few cases for relative uris\n\n  if (a.uri && b.uri && a.uri === b.uri) {\n    return true;\n  }\n  return false;\n};\nconst someAudioVariant = function (main, callback) {\n  const AUDIO = main && main.mediaGroups && main.mediaGroups.AUDIO || {};\n  let found = false;\n  for (const groupName in AUDIO) {\n    for (const label in AUDIO[groupName]) {\n      found = callback(AUDIO[groupName][label]);\n      if (found) {\n        break;\n      }\n    }\n    if (found) {\n      break;\n    }\n  }\n  return !!found;\n};\nconst isAudioOnly = main => {\n  // we are audio only if we have no main playlists but do\n  // have media group playlists.\n  if (!main || !main.playlists || !main.playlists.length) {\n    // without audio variants or playlists this\n    // is not an audio only main.\n    const found = someAudioVariant(main, variant => variant.playlists && variant.playlists.length || variant.uri);\n    return found;\n  } // if every playlist has only an audio codec it is audio only\n\n  for (let i = 0; i < main.playlists.length; i++) {\n    const playlist = main.playlists[i];\n    const CODECS = playlist.attributes && playlist.attributes.CODECS; // all codecs are audio, this is an audio playlist.\n\n    if (CODECS && CODECS.split(',').every(c => isAudioCodec(c))) {\n      continue;\n    } // playlist is in an audio group it is audio only\n\n    const found = someAudioVariant(main, variant => playlistMatch(playlist, variant));\n    if (found) {\n      continue;\n    } // if we make it here this playlist isn't audio and we\n    // are not audio only\n\n    return false;\n  } // if we make it past every playlist without returning, then\n  // this is an audio only playlist.\n\n  return true;\n}; // exports\n\nvar Playlist = {\n  liveEdgeDelay,\n  duration,\n  seekable,\n  getMediaInfoForTime,\n  isEnabled,\n  isDisabled,\n  isExcluded,\n  isIncompatible,\n  playlistEnd,\n  isAes,\n  hasAttribute,\n  estimateSegmentRequestTime,\n  isLowestEnabledRendition,\n  isAudioOnly,\n  playlistMatch,\n  segmentDurationWithParts\n};\nconst {\n  log\n} = videojs;\nconst createPlaylistID = (index, uri) => {\n  return `${index}-${uri}`;\n}; // default function for creating a group id\n\nconst groupID = (type, group, label) => {\n  return `placeholder-uri-${type}-${group}-${label}`;\n};\n/**\n * Parses a given m3u8 playlist\n *\n * @param {Function} [onwarn]\n *        a function to call when the parser triggers a warning event.\n * @param {Function} [oninfo]\n *        a function to call when the parser triggers an info event.\n * @param {string} manifestString\n *        The downloaded manifest string\n * @param {Object[]} [customTagParsers]\n *        An array of custom tag parsers for the m3u8-parser instance\n * @param {Object[]} [customTagMappers]\n *        An array of custom tag mappers for the m3u8-parser instance\n * @param {boolean} [llhls]\n *        Whether to keep ll-hls features in the manifest after parsing.\n * @return {Object}\n *         The manifest object\n */\n\nconst parseManifest = ({\n  onwarn,\n  oninfo,\n  manifestString,\n  customTagParsers = [],\n  customTagMappers = [],\n  llhls\n}) => {\n  const parser = new Parser();\n  if (onwarn) {\n    parser.on('warn', onwarn);\n  }\n  if (oninfo) {\n    parser.on('info', oninfo);\n  }\n  customTagParsers.forEach(customParser => parser.addParser(customParser));\n  customTagMappers.forEach(mapper => parser.addTagMapper(mapper));\n  parser.push(manifestString);\n  parser.end();\n  const manifest = parser.manifest; // remove llhls features from the parsed manifest\n  // if we don't want llhls support.\n\n  if (!llhls) {\n    ['preloadSegment', 'skip', 'serverControl', 'renditionReports', 'partInf', 'partTargetDuration'].forEach(function (k) {\n      if (manifest.hasOwnProperty(k)) {\n        delete manifest[k];\n      }\n    });\n    if (manifest.segments) {\n      manifest.segments.forEach(function (segment) {\n        ['parts', 'preloadHints'].forEach(function (k) {\n          if (segment.hasOwnProperty(k)) {\n            delete segment[k];\n          }\n        });\n      });\n    }\n  }\n  if (!manifest.targetDuration) {\n    let targetDuration = 10;\n    if (manifest.segments && manifest.segments.length) {\n      targetDuration = manifest.segments.reduce((acc, s) => Math.max(acc, s.duration), 0);\n    }\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no targetDuration defaulting to ${targetDuration}`\n      });\n    }\n    manifest.targetDuration = targetDuration;\n  }\n  const parts = getLastParts(manifest);\n  if (parts.length && !manifest.partTargetDuration) {\n    const partTargetDuration = parts.reduce((acc, p) => Math.max(acc, p.duration), 0);\n    if (onwarn) {\n      onwarn({\n        message: `manifest has no partTargetDuration defaulting to ${partTargetDuration}`\n      });\n      log.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.');\n    }\n    manifest.partTargetDuration = partTargetDuration;\n  }\n  return manifest;\n};\n/**\n * Loops through all supported media groups in main and calls the provided\n * callback for each group\n *\n * @param {Object} main\n *        The parsed main manifest object\n * @param {Function} callback\n *        Callback to call for each media group\n */\n\nconst forEachMediaGroup = (main, callback) => {\n  if (!main.mediaGroups) {\n    return;\n  }\n  ['AUDIO', 'SUBTITLES'].forEach(mediaType => {\n    if (!main.mediaGroups[mediaType]) {\n      return;\n    }\n    for (const groupKey in main.mediaGroups[mediaType]) {\n      for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n        const mediaProperties = main.mediaGroups[mediaType][groupKey][labelKey];\n        callback(mediaProperties, mediaType, groupKey, labelKey);\n      }\n    }\n  });\n};\n/**\n * Adds properties and attributes to the playlist to keep consistent functionality for\n * playlists throughout VHS.\n *\n * @param {Object} config\n *        Arguments object\n * @param {Object} config.playlist\n *        The media playlist\n * @param {string} [config.uri]\n *        The uri to the media playlist (if media playlist is not from within a main\n *        playlist)\n * @param {string} id\n *        ID to use for the playlist\n */\n\nconst setupMediaPlaylist = ({\n  playlist,\n  uri,\n  id\n}) => {\n  playlist.id = id;\n  playlist.playlistErrors_ = 0;\n  if (uri) {\n    // For media playlists, m3u8-parser does not have access to a URI, as HLS media\n    // playlists do not contain their own source URI, but one is needed for consistency in\n    // VHS.\n    playlist.uri = uri;\n  } // For HLS main playlists, even though certain attributes MUST be defined, the\n  // stream may still be played without them.\n  // For HLS media playlists, m3u8-parser does not attach an attributes object to the\n  // manifest.\n  //\n  // To avoid undefined reference errors through the project, and make the code easier\n  // to write/read, add an empty attributes object for these cases.\n\n  playlist.attributes = playlist.attributes || {};\n};\n/**\n * Adds ID, resolvedUri, and attributes properties to each playlist of the main, where\n * necessary. In addition, creates playlist IDs for each playlist and adds playlist ID to\n * playlist references to the playlists array.\n *\n * @param {Object} main\n *        The main playlist\n */\n\nconst setupMediaPlaylists = main => {\n  let i = main.playlists.length;\n  while (i--) {\n    const playlist = main.playlists[i];\n    setupMediaPlaylist({\n      playlist,\n      id: createPlaylistID(i, playlist.uri)\n    });\n    playlist.resolvedUri = resolveUrl(main.uri, playlist.uri);\n    main.playlists[playlist.id] = playlist; // URI reference added for backwards compatibility\n\n    main.playlists[playlist.uri] = playlist; // Although the spec states an #EXT-X-STREAM-INF tag MUST have a BANDWIDTH attribute,\n    // the stream can be played without it. Although an attributes property may have been\n    // added to the playlist to prevent undefined references, issue a warning to fix the\n    // manifest.\n\n    if (!playlist.attributes.BANDWIDTH) {\n      log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\n    }\n  }\n};\n/**\n * Adds resolvedUri properties to each media group.\n *\n * @param {Object} main\n *        The main playlist\n */\n\nconst resolveMediaGroupUris = main => {\n  forEachMediaGroup(main, properties => {\n    if (properties.uri) {\n      properties.resolvedUri = resolveUrl(main.uri, properties.uri);\n    }\n  });\n};\n/**\n * Creates a main playlist wrapper to insert a sole media playlist into.\n *\n * @param {Object} media\n *        Media playlist\n * @param {string} uri\n *        The media URI\n *\n * @return {Object}\n *         main playlist\n */\n\nconst mainForMedia = (media, uri) => {\n  const id = createPlaylistID(0, uri);\n  const main = {\n    mediaGroups: {\n      'AUDIO': {},\n      'VIDEO': {},\n      'CLOSED-CAPTIONS': {},\n      'SUBTITLES': {}\n    },\n    uri: window$1.location.href,\n    resolvedUri: window$1.location.href,\n    playlists: [{\n      uri,\n      id,\n      resolvedUri: uri,\n      // m3u8-parser does not attach an attributes property to media playlists so make\n      // sure that the property is attached to avoid undefined reference errors\n      attributes: {}\n    }]\n  }; // set up ID reference\n\n  main.playlists[id] = main.playlists[0]; // URI reference added for backwards compatibility\n\n  main.playlists[uri] = main.playlists[0];\n  return main;\n};\n/**\n * Does an in-place update of the main manifest to add updated playlist URI references\n * as well as other properties needed by VHS that aren't included by the parser.\n *\n * @param {Object} main\n *        main manifest object\n * @param {string} uri\n *        The source URI\n * @param {function} createGroupID\n *        A function to determine how to create the groupID for mediaGroups\n */\n\nconst addPropertiesToMain = (main, uri, createGroupID = groupID) => {\n  main.uri = uri;\n  for (let i = 0; i < main.playlists.length; i++) {\n    if (!main.playlists[i].uri) {\n      // Set up phony URIs for the playlists since playlists are referenced by their URIs\n      // throughout VHS, but some formats (e.g., DASH) don't have external URIs\n      // TODO: consider adding dummy URIs in mpd-parser\n      const phonyUri = `placeholder-uri-${i}`;\n      main.playlists[i].uri = phonyUri;\n    }\n  }\n  const audioOnlyMain = isAudioOnly(main);\n  forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n    // add a playlist array under properties\n    if (!properties.playlists || !properties.playlists.length) {\n      // If the manifest is audio only and this media group does not have a uri, check\n      // if the media group is located in the main list of playlists. If it is, don't add\n      // placeholder properties as it shouldn't be considered an alternate audio track.\n      if (audioOnlyMain && mediaType === 'AUDIO' && !properties.uri) {\n        for (let i = 0; i < main.playlists.length; i++) {\n          const p = main.playlists[i];\n          if (p.attributes && p.attributes.AUDIO && p.attributes.AUDIO === groupKey) {\n            return;\n          }\n        }\n      }\n      properties.playlists = [_extends({}, properties)];\n    }\n    properties.playlists.forEach(function (p, i) {\n      const groupId = createGroupID(mediaType, groupKey, labelKey, p);\n      const id = createPlaylistID(i, groupId);\n      if (p.uri) {\n        p.resolvedUri = p.resolvedUri || resolveUrl(main.uri, p.uri);\n      } else {\n        // DEPRECATED, this has been added to prevent a breaking change.\n        // previously we only ever had a single media group playlist, so\n        // we mark the first playlist uri without prepending the index as we used to\n        // ideally we would do all of the playlists the same way.\n        p.uri = i === 0 ? groupId : id; // don't resolve a placeholder uri to an absolute url, just use\n        // the placeholder again\n\n        p.resolvedUri = p.uri;\n      }\n      p.id = p.id || id; // add an empty attributes object, all playlists are\n      // expected to have this.\n\n      p.attributes = p.attributes || {}; // setup ID and URI references (URI for backwards compatibility)\n\n      main.playlists[p.id] = p;\n      main.playlists[p.uri] = p;\n    });\n  });\n  setupMediaPlaylists(main);\n  resolveMediaGroupUris(main);\n};\nclass DateRangesStorage {\n  constructor() {\n    this.offset_ = null;\n    this.pendingDateRanges_ = new Map();\n    this.processedDateRanges_ = new Map();\n  }\n  setOffset(segments = []) {\n    // already set\n    if (this.offset_ !== null) {\n      return;\n    } // no segment to process\n\n    if (!segments.length) {\n      return;\n    }\n    const [firstSegment] = segments; // no program date time\n\n    if (firstSegment.programDateTime === undefined) {\n      return;\n    } // Set offset as ProgramDateTime for the very first segment of the very first playlist load:\n\n    this.offset_ = firstSegment.programDateTime / 1000;\n  }\n  setPendingDateRanges(dateRanges = []) {\n    if (!dateRanges.length) {\n      return;\n    }\n    const [dateRange] = dateRanges;\n    const startTime = dateRange.startDate.getTime();\n    this.trimProcessedDateRanges_(startTime);\n    this.pendingDateRanges_ = dateRanges.reduce((map, pendingDateRange) => {\n      map.set(pendingDateRange.id, pendingDateRange);\n      return map;\n    }, new Map());\n  }\n  processDateRange(dateRange) {\n    this.pendingDateRanges_.delete(dateRange.id);\n    this.processedDateRanges_.set(dateRange.id, dateRange);\n  }\n  getDateRangesToProcess() {\n    if (this.offset_ === null) {\n      return [];\n    }\n    const dateRangeClasses = {};\n    const dateRangesToProcess = [];\n    this.pendingDateRanges_.forEach((dateRange, id) => {\n      if (this.processedDateRanges_.has(id)) {\n        return;\n      }\n      dateRange.startTime = dateRange.startDate.getTime() / 1000 - this.offset_;\n      dateRange.processDateRange = () => this.processDateRange(dateRange);\n      dateRangesToProcess.push(dateRange);\n      if (!dateRange.class) {\n        return;\n      }\n      if (dateRangeClasses[dateRange.class]) {\n        const length = dateRangeClasses[dateRange.class].push(dateRange);\n        dateRange.classListIndex = length - 1;\n      } else {\n        dateRangeClasses[dateRange.class] = [dateRange];\n        dateRange.classListIndex = 0;\n      }\n    });\n    for (const dateRange of dateRangesToProcess) {\n      const classList = dateRangeClasses[dateRange.class] || [];\n      if (dateRange.endDate) {\n        dateRange.endTime = dateRange.endDate.getTime() / 1000 - this.offset_;\n      } else if (dateRange.endOnNext && classList[dateRange.classListIndex + 1]) {\n        dateRange.endTime = classList[dateRange.classListIndex + 1].startTime;\n      } else if (dateRange.duration) {\n        dateRange.endTime = dateRange.startTime + dateRange.duration;\n      } else if (dateRange.plannedDuration) {\n        dateRange.endTime = dateRange.startTime + dateRange.plannedDuration;\n      } else {\n        dateRange.endTime = dateRange.startTime;\n      }\n    }\n    return dateRangesToProcess;\n  }\n  trimProcessedDateRanges_(startTime) {\n    const copy = new Map(this.processedDateRanges_);\n    copy.forEach((dateRange, id) => {\n      if (dateRange.startDate.getTime() < startTime) {\n        this.processedDateRanges_.delete(id);\n      }\n    });\n  }\n}\nconst QUOTA_EXCEEDED_ERR = 22;\nconst getStreamingNetworkErrorMetadata = ({\n  requestType,\n  request,\n  error,\n  parseFailure\n}) => {\n  const isBadStatus = request.status < 200 || request.status > 299;\n  const isFailure = request.status >= 400 && request.status <= 499;\n  const errorMetadata = {\n    uri: request.uri,\n    requestType\n  };\n  const isBadStatusOrParseFailure = isBadStatus && !isFailure || parseFailure;\n  if (error && isFailure) {\n    // copy original error and add to the metadata.\n    errorMetadata.error = _extends({}, error);\n    errorMetadata.errorType = videojs.Error.NetworkRequestFailed;\n  } else if (request.aborted) {\n    errorMetadata.errorType = videojs.Error.NetworkRequestAborted;\n  } else if (request.timedout) {\n    errorMetadata.erroType = videojs.Error.NetworkRequestTimeout;\n  } else if (isBadStatusOrParseFailure) {\n    const errorType = parseFailure ? videojs.Error.NetworkBodyParserFailed : videojs.Error.NetworkBadStatus;\n    errorMetadata.errorType = errorType;\n    errorMetadata.status = request.status;\n    errorMetadata.headers = request.headers;\n  }\n  return errorMetadata;\n};\n\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\nconst logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nconst getCodecs = function (media) {\n  // if the codecs were explicitly specified, use them instead of the\n  // defaults\n  const mediaAttributes = media.attributes || {};\n  if (mediaAttributes.CODECS) {\n    return parseCodecs(mediaAttributes.CODECS);\n  }\n};\nconst isMaat = (main, media) => {\n  const mediaAttributes = media.attributes || {};\n  return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n  if (!isMaat(main, media)) {\n    return true;\n  }\n  const mediaAttributes = media.attributes || {};\n  const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n  for (const groupId in audioGroup) {\n    // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n    // or there are listed playlists (the case for DASH, as the manifest will have already\n    // provided all of the details necessary to generate the audio playlist, as opposed to\n    // HLS' externally requested playlists), then the content is demuxed.\n    if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n      return true;\n    }\n  }\n  return false;\n};\nconst unwrapCodecList = function (codecList) {\n  const codecs = {};\n  codecList.forEach(({\n    mediaType,\n    type,\n    details\n  }) => {\n    codecs[mediaType] = codecs[mediaType] || [];\n    codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n  });\n  Object.keys(codecs).forEach(function (mediaType) {\n    if (codecs[mediaType].length > 1) {\n      logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`);\n      codecs[mediaType] = null;\n      return;\n    }\n    codecs[mediaType] = codecs[mediaType][0];\n  });\n  return codecs;\n};\nconst codecCount = function (codecObj) {\n  let count = 0;\n  if (codecObj.audio) {\n    count++;\n  }\n  if (codecObj.video) {\n    count++;\n  }\n  return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a main playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param main {Object} the m3u8 object for the main playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\nconst codecsForPlaylist = function (main, media) {\n  const mediaAttributes = media.attributes || {};\n  const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n  // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n  if (isMaat(main, media) && !codecInfo.audio) {\n    if (!isMuxed(main, media)) {\n      // It is possible for codecs to be specified on the audio media group playlist but\n      // not on the rendition playlist. This is mostly the case for DASH, where audio and\n      // video are always separate (and separately specified).\n      const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n      if (defaultCodecs.audio) {\n        codecInfo.audio = defaultCodecs.audio;\n      }\n    }\n  }\n  return codecInfo;\n};\nconst {\n  EventTarget: EventTarget$1\n} = videojs;\nconst addLLHLSQueryDirectives = (uri, media) => {\n  if (media.endList || !media.serverControl) {\n    return uri;\n  }\n  const parameters = {};\n  if (media.serverControl.canBlockReload) {\n    const {\n      preloadSegment\n    } = media; // next msn is a zero based value, length is not.\n\n    let nextMSN = media.mediaSequence + media.segments.length; // If preload segment has parts then it is likely\n    // that we are going to request a part of that preload segment.\n    // the logic below is used to determine that.\n\n    if (preloadSegment) {\n      const parts = preloadSegment.parts || []; // _HLS_part is a zero based index\n\n      const nextPart = getKnownPartCount(media) - 1; // if nextPart is > -1 and not equal to just the\n      // length of parts, then we know we had part preload hints\n      // and we need to add the _HLS_part= query\n\n      if (nextPart > -1 && nextPart !== parts.length - 1) {\n        // add existing parts to our preload hints\n        // eslint-disable-next-line\n        parameters._HLS_part = nextPart;\n      } // this if statement makes sure that we request the msn\n      // of the preload segment if:\n      // 1. the preload segment had parts (and was not yet a full segment)\n      //    but was added to our segments array\n      // 2. the preload segment had preload hints for parts that are not in\n      //    the manifest yet.\n      // in all other cases we want the segment after the preload segment\n      // which will be given by using media.segments.length because it is 1 based\n      // rather than 0 based.\n\n      if (nextPart > -1 || parts.length) {\n        nextMSN--;\n      }\n    } // add _HLS_msn= in front of any _HLS_part query\n    // eslint-disable-next-line\n\n    parameters._HLS_msn = nextMSN;\n  }\n  if (media.serverControl && media.serverControl.canSkipUntil) {\n    // add _HLS_skip= infront of all other queries.\n    // eslint-disable-next-line\n    parameters._HLS_skip = media.serverControl.canSkipDateranges ? 'v2' : 'YES';\n  }\n  if (Object.keys(parameters).length) {\n    const parsedUri = new window$1.URL(uri);\n    ['_HLS_skip', '_HLS_msn', '_HLS_part'].forEach(function (name) {\n      if (!parameters.hasOwnProperty(name)) {\n        return;\n      }\n      parsedUri.searchParams.set(name, parameters[name]);\n    });\n    uri = parsedUri.toString();\n  }\n  return uri;\n};\n/**\n * Returns a new segment object with properties and\n * the parts array merged.\n *\n * @param {Object} a the old segment\n * @param {Object} b the new segment\n *\n * @return {Object} the merged segment\n */\n\nconst updateSegment = (a, b) => {\n  if (!a) {\n    return b;\n  }\n  const result = merge(a, b); // if only the old segment has preload hints\n  // and the new one does not, remove preload hints.\n\n  if (a.preloadHints && !b.preloadHints) {\n    delete result.preloadHints;\n  } // if only the old segment has parts\n  // then the parts are no longer valid\n\n  if (a.parts && !b.parts) {\n    delete result.parts; // if both segments have parts\n    // copy part propeties from the old segment\n    // to the new one.\n  } else if (a.parts && b.parts) {\n    for (let i = 0; i < b.parts.length; i++) {\n      if (a.parts && a.parts[i]) {\n        result.parts[i] = merge(a.parts[i], b.parts[i]);\n      }\n    }\n  } // set skipped to false for segments that have\n  // have had information merged from the old segment.\n\n  if (!a.skipped && b.skipped) {\n    result.skipped = false;\n  } // set preload to false for segments that have\n  // had information added in the new segment.\n\n  if (a.preload && !b.preload) {\n    result.preload = false;\n  }\n  return result;\n};\n/**\n * Returns a new array of segments that is the result of merging\n * properties from an older list of segments onto an updated\n * list. No properties on the updated playlist will be ovewritten.\n *\n * @param {Array} original the outdated list of segments\n * @param {Array} update the updated list of segments\n * @param {number=} offset the index of the first update\n * segment in the original segment list. For non-live playlists,\n * this should always be zero and does not need to be\n * specified. For live playlists, it should be the difference\n * between the media sequence numbers in the original and updated\n * playlists.\n * @return {Array} a list of merged segment objects\n */\n\nconst updateSegments = (original, update, offset) => {\n  const oldSegments = original.slice();\n  const newSegments = update.slice();\n  offset = offset || 0;\n  const result = [];\n  let currentMap;\n  for (let newIndex = 0; newIndex < newSegments.length; newIndex++) {\n    const oldSegment = oldSegments[newIndex + offset];\n    const newSegment = newSegments[newIndex];\n    if (oldSegment) {\n      currentMap = oldSegment.map || currentMap;\n      result.push(updateSegment(oldSegment, newSegment));\n    } else {\n      // carry over map to new segment if it is missing\n      if (currentMap && !newSegment.map) {\n        newSegment.map = currentMap;\n      }\n      result.push(newSegment);\n    }\n  }\n  return result;\n};\nconst resolveSegmentUris = (segment, baseUri) => {\n  // preloadSegment will not have a uri at all\n  // as the segment isn't actually in the manifest yet, only parts\n  if (!segment.resolvedUri && segment.uri) {\n    segment.resolvedUri = resolveUrl(baseUri, segment.uri);\n  }\n  if (segment.key && !segment.key.resolvedUri) {\n    segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\n  }\n  if (segment.map && !segment.map.resolvedUri) {\n    segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\n  }\n  if (segment.map && segment.map.key && !segment.map.key.resolvedUri) {\n    segment.map.key.resolvedUri = resolveUrl(baseUri, segment.map.key.uri);\n  }\n  if (segment.parts && segment.parts.length) {\n    segment.parts.forEach(p => {\n      if (p.resolvedUri) {\n        return;\n      }\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n  if (segment.preloadHints && segment.preloadHints.length) {\n    segment.preloadHints.forEach(p => {\n      if (p.resolvedUri) {\n        return;\n      }\n      p.resolvedUri = resolveUrl(baseUri, p.uri);\n    });\n  }\n};\nconst getAllSegments = function (media) {\n  const segments = media.segments || [];\n  const preloadSegment = media.preloadSegment; // a preloadSegment with only preloadHints is not currently\n  // a usable segment, only include a preloadSegment that has\n  // parts.\n\n  if (preloadSegment && preloadSegment.parts && preloadSegment.parts.length) {\n    // if preloadHints has a MAP that means that the\n    // init segment is going to change. We cannot use any of the parts\n    // from this preload segment.\n    if (preloadSegment.preloadHints) {\n      for (let i = 0; i < preloadSegment.preloadHints.length; i++) {\n        if (preloadSegment.preloadHints[i].type === 'MAP') {\n          return segments;\n        }\n      }\n    } // set the duration for our preload segment to target duration.\n\n    preloadSegment.duration = media.targetDuration;\n    preloadSegment.preload = true;\n    segments.push(preloadSegment);\n  }\n  return segments;\n}; // consider the playlist unchanged if the playlist object is the same or\n// the number of segments is equal, the media sequence number is unchanged,\n// and this playlist hasn't become the end of the playlist\n\nconst isPlaylistUnchanged = (a, b) => a === b || a.segments && b.segments && a.segments.length === b.segments.length && a.endList === b.endList && a.mediaSequence === b.mediaSequence && a.preloadSegment === b.preloadSegment;\n/**\n  * Returns a new main playlist that is the result of merging an\n  * updated media playlist into the original version. If the\n  * updated media playlist does not match any of the playlist\n  * entries in the original main playlist, null is returned.\n  *\n  * @param {Object} main a parsed main M3U8 object\n  * @param {Object} media a parsed media M3U8 object\n  * @return {Object} a new object that represents the original\n  * main playlist with the updated media playlist merged in, or\n  * null if the merge produced no change.\n  */\n\nconst updateMain$1 = (main, newMedia, unchangedCheck = isPlaylistUnchanged) => {\n  const result = merge(main, {});\n  const oldMedia = result.playlists[newMedia.id];\n  if (!oldMedia) {\n    return null;\n  }\n  if (unchangedCheck(oldMedia, newMedia)) {\n    return null;\n  }\n  newMedia.segments = getAllSegments(newMedia);\n  const mergedPlaylist = merge(oldMedia, newMedia); // always use the new media's preload segment\n\n  if (mergedPlaylist.preloadSegment && !newMedia.preloadSegment) {\n    delete mergedPlaylist.preloadSegment;\n  } // if the update could overlap existing segment information, merge the two segment lists\n\n  if (oldMedia.segments) {\n    if (newMedia.skip) {\n      newMedia.segments = newMedia.segments || []; // add back in objects for skipped segments, so that we merge\n      // old properties into the new segments\n\n      for (let i = 0; i < newMedia.skip.skippedSegments; i++) {\n        newMedia.segments.unshift({\n          skipped: true\n        });\n      }\n    }\n    mergedPlaylist.segments = updateSegments(oldMedia.segments, newMedia.segments, newMedia.mediaSequence - oldMedia.mediaSequence);\n  } // resolve any segment URIs to prevent us from having to do it later\n\n  mergedPlaylist.segments.forEach(segment => {\n    resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\n  }); // TODO Right now in the playlists array there are two references to each playlist, one\n  // that is referenced by index, and one by URI. The index reference may no longer be\n  // necessary.\n\n  for (let i = 0; i < result.playlists.length; i++) {\n    if (result.playlists[i].id === newMedia.id) {\n      result.playlists[i] = mergedPlaylist;\n    }\n  }\n  result.playlists[newMedia.id] = mergedPlaylist; // URI reference added for backwards compatibility\n\n  result.playlists[newMedia.uri] = mergedPlaylist; // update media group playlist references.\n\n  forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n    if (!properties.playlists) {\n      return;\n    }\n    for (let i = 0; i < properties.playlists.length; i++) {\n      if (newMedia.id === properties.playlists[i].id) {\n        properties.playlists[i] = mergedPlaylist;\n      }\n    }\n  });\n  return result;\n};\n/**\n * Calculates the time to wait before refreshing a live playlist\n *\n * @param {Object} media\n *        The current media\n * @param {boolean} update\n *        True if there were any updates from the last refresh, false otherwise\n * @return {number}\n *         The time in ms to wait before refreshing the live playlist\n */\n\nconst refreshDelay = (media, update) => {\n  const segments = media.segments || [];\n  const lastSegment = segments[segments.length - 1];\n  const lastPart = lastSegment && lastSegment.parts && lastSegment.parts[lastSegment.parts.length - 1];\n  const lastDuration = lastPart && lastPart.duration || lastSegment && lastSegment.duration;\n  if (update && lastDuration) {\n    return lastDuration * 1000;\n  } // if the playlist is unchanged since the last reload or last segment duration\n  // cannot be determined, try again after half the target duration\n\n  return (media.partTargetDuration || media.targetDuration || 10) * 500;\n};\nconst playlistMetadataPayload = (playlists, type, isLive) => {\n  if (!playlists) {\n    return;\n  }\n  const renditions = [];\n  playlists.forEach(playlist => {\n    // we need attributes to populate rendition data.\n    if (!playlist.attributes) {\n      return;\n    }\n    const {\n      BANDWIDTH,\n      RESOLUTION,\n      CODECS\n    } = playlist.attributes;\n    renditions.push({\n      id: playlist.id,\n      bandwidth: BANDWIDTH,\n      resolution: RESOLUTION,\n      codecs: CODECS\n    });\n  });\n  return {\n    type,\n    isLive,\n    renditions\n  };\n};\n/**\n * Load a playlist from a remote location\n *\n * @class PlaylistLoader\n * @extends Stream\n * @param {string|Object} src url or object of manifest\n * @param {boolean} withCredentials the withCredentials xhr option\n * @class\n */\n\nclass PlaylistLoader extends EventTarget$1 {\n  constructor(src, vhs, options = {}) {\n    super();\n    if (!src) {\n      throw new Error('A non-empty playlist URL or object is required');\n    }\n    this.logger_ = logger('PlaylistLoader');\n    const {\n      withCredentials = false\n    } = options;\n    this.src = src;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addDateRangesToTextTrack_ = options.addDateRangesToTextTrack;\n    const vhsOptions = vhs.options_;\n    this.customTagParsers = vhsOptions && vhsOptions.customTagParsers || [];\n    this.customTagMappers = vhsOptions && vhsOptions.customTagMappers || [];\n    this.llhls = vhsOptions && vhsOptions.llhls;\n    this.dateRangesStorage_ = new DateRangesStorage(); // initialize the loader state\n\n    this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\n\n    this.handleMediaupdatetimeout_ = this.handleMediaupdatetimeout_.bind(this);\n    this.on('mediaupdatetimeout', this.handleMediaupdatetimeout_);\n    this.on('loadedplaylist', this.handleLoadedPlaylist_.bind(this));\n  }\n  handleLoadedPlaylist_() {\n    const mediaPlaylist = this.media();\n    if (!mediaPlaylist) {\n      return;\n    }\n    this.dateRangesStorage_.setOffset(mediaPlaylist.segments);\n    this.dateRangesStorage_.setPendingDateRanges(mediaPlaylist.dateRanges);\n    const availableDateRanges = this.dateRangesStorage_.getDateRangesToProcess();\n    if (!availableDateRanges.length || !this.addDateRangesToTextTrack_) {\n      return;\n    }\n    this.addDateRangesToTextTrack_(availableDateRanges);\n  }\n  handleMediaupdatetimeout_() {\n    if (this.state !== 'HAVE_METADATA') {\n      // only refresh the media playlist if no other activity is going on\n      return;\n    }\n    const media = this.media();\n    let uri = resolveUrl(this.main.uri, media.uri);\n    if (this.llhls) {\n      uri = addLLHLSQueryDirectives(uri, media);\n    }\n    this.state = 'HAVE_CURRENT_METADATA';\n    this.request = this.vhs_.xhr({\n      uri,\n      withCredentials: this.withCredentials,\n      requestType: 'hls-playlist'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      if (error) {\n        return this.playlistRequestError(this.request, this.media(), 'HAVE_METADATA');\n      }\n      this.haveMetadata({\n        playlistString: this.request.responseText,\n        url: this.media().uri,\n        id: this.media().id\n      });\n    });\n  }\n  playlistRequestError(xhr, playlist, startingState) {\n    const {\n      uri,\n      id\n    } = playlist; // any in-flight request is now finished\n\n    this.request = null;\n    if (startingState) {\n      this.state = startingState;\n    }\n    this.error = {\n      playlist: this.main.playlists[id],\n      status: xhr.status,\n      message: `HLS playlist request error at URL: ${uri}.`,\n      responseText: xhr.responseText,\n      code: xhr.status >= 500 ? 4 : 2,\n      metadata: getStreamingNetworkErrorMetadata({\n        requestType: xhr.requestType,\n        request: xhr,\n        error: xhr.error\n      })\n    };\n    this.trigger('error');\n  }\n  parseManifest_({\n    url,\n    manifestString\n  }) {\n    try {\n      const parsed = parseManifest({\n        onwarn: ({\n          message\n        }) => this.logger_(`m3u8-parser warn for ${url}: ${message}`),\n        oninfo: ({\n          message\n        }) => this.logger_(`m3u8-parser info for ${url}: ${message}`),\n        manifestString,\n        customTagParsers: this.customTagParsers,\n        customTagMappers: this.customTagMappers,\n        llhls: this.llhls\n      });\n      /**\n       * VHS does not support switching between variants with and without audio and video\n       * so we want to filter out audio-only variants when variants with video and(or) audio are also detected.\n       */\n\n      if (!parsed.playlists || !parsed.playlists.length) {\n        return parsed;\n      }\n      this.excludeAudioOnlyVariants(parsed.playlists);\n      return parsed;\n    } catch (error) {\n      this.error = error;\n      this.error.metadata = {\n        errorType: videojs.Error.StreamingHlsPlaylistParserError,\n        error\n      };\n    }\n  }\n  excludeAudioOnlyVariants(playlists) {\n    // helper function\n    const hasVideo = playlist => {\n      const attributes = playlist.attributes || {};\n      const {\n        width,\n        height\n      } = attributes.RESOLUTION || {};\n      if (width && height) {\n        return true;\n      } // parse codecs string from playlist attributes\n\n      const codecsList = getCodecs(playlist) || []; // unwrap list\n\n      const codecsInfo = unwrapCodecList(codecsList);\n      return Boolean(codecsInfo.video);\n    };\n    if (playlists.some(hasVideo)) {\n      playlists.forEach(playlist => {\n        if (!hasVideo(playlist)) {\n          playlist.excludeUntil = Infinity;\n        }\n      });\n    }\n  }\n  /**\n   * Update the playlist loader's state in response to a new or updated playlist.\n   *\n   * @param {string} [playlistString]\n   *        Playlist string (if playlistObject is not provided)\n   * @param {Object} [playlistObject]\n   *        Playlist object (if playlistString is not provided)\n   * @param {string} url\n   *        URL of playlist\n   * @param {string} id\n   *        ID to use for playlist\n   */\n\n  haveMetadata({\n    playlistString,\n    playlistObject,\n    url,\n    id\n  }) {\n    // any in-flight request is now finished\n    this.request = null;\n    this.state = 'HAVE_METADATA';\n    const metadata = {\n      playlistInfo: {\n        type: 'media',\n        uri: url\n      }\n    };\n    this.trigger({\n      type: 'playlistparsestart',\n      metadata\n    });\n    const playlist = playlistObject || this.parseManifest_({\n      url,\n      manifestString: playlistString\n    });\n    playlist.lastRequest = Date.now();\n    setupMediaPlaylist({\n      playlist,\n      uri: url,\n      id\n    }); // merge this playlist into the main manifest\n\n    const update = updateMain$1(this.main, playlist);\n    this.targetDuration = playlist.partTargetDuration || playlist.targetDuration;\n    this.pendingMedia_ = null;\n    if (update) {\n      this.main = update;\n      this.media_ = this.main.playlists[id];\n    } else {\n      this.trigger('playlistunchanged');\n    }\n    this.updateMediaUpdateTimeout_(refreshDelay(this.media(), !!update));\n    metadata.parsedPlaylist = playlistMetadataPayload(this.main.playlists, metadata.playlistInfo.type, !this.media_.endList);\n    this.trigger({\n      type: 'playlistparsecomplete',\n      metadata\n    });\n    this.trigger('loadedplaylist');\n  }\n  /**\n    * Abort any outstanding work and clean up.\n    */\n\n  dispose() {\n    this.trigger('dispose');\n    this.stopRequest();\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    window$1.clearTimeout(this.finalRenditionTimeout);\n    this.dateRangesStorage_ = new DateRangesStorage();\n    this.off();\n  }\n  stopRequest() {\n    if (this.request) {\n      const oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  }\n  /**\n    * When called without any arguments, returns the currently\n    * active media playlist. When called with a single argument,\n    * triggers the playlist loader to asynchronously switch to the\n    * specified media playlist. Calling this method while the\n    * loader is in the HAVE_NOTHING causes an error to be emitted\n    * but otherwise has no effect.\n    *\n    * @param {Object=} playlist the parsed media playlist\n    * object to switch to\n    * @param {boolean=} shouldDelay whether we should delay the request by half target duration\n    *\n    * @return {Playlist} the current loaded media\n    */\n\n  media(playlist, shouldDelay) {\n    // getter\n    if (!playlist) {\n      return this.media_;\n    } // setter\n\n    if (this.state === 'HAVE_NOTHING') {\n      throw new Error('Cannot switch media playlist from ' + this.state);\n    } // find the playlist object if the target playlist has been\n    // specified by URI\n\n    if (typeof playlist === 'string') {\n      if (!this.main.playlists[playlist]) {\n        throw new Error('Unknown playlist URI: ' + playlist);\n      }\n      playlist = this.main.playlists[playlist];\n    }\n    window$1.clearTimeout(this.finalRenditionTimeout);\n    if (shouldDelay) {\n      const delay = (playlist.partTargetDuration || playlist.targetDuration) / 2 * 1000 || 5 * 1000;\n      this.finalRenditionTimeout = window$1.setTimeout(this.media.bind(this, playlist, false), delay);\n      return;\n    }\n    const startingState = this.state;\n    const mediaChange = !this.media_ || playlist.id !== this.media_.id;\n    const mainPlaylistRef = this.main.playlists[playlist.id]; // switch to fully loaded playlists immediately\n\n    if (mainPlaylistRef && mainPlaylistRef.endList ||\n    // handle the case of a playlist object (e.g., if using vhs-json with a resolved\n    // media playlist or, for the case of demuxed audio, a resolved audio media group)\n    playlist.endList && playlist.segments.length) {\n      // abort outstanding playlist requests\n      if (this.request) {\n        this.request.onreadystatechange = null;\n        this.request.abort();\n        this.request = null;\n      }\n      this.state = 'HAVE_METADATA';\n      this.media_ = playlist; // trigger media change if the active media has been updated\n\n      if (mediaChange) {\n        this.trigger('mediachanging');\n        if (startingState === 'HAVE_MAIN_MANIFEST') {\n          // The initial playlist was a main manifest, and the first media selected was\n          // also provided (in the form of a resolved playlist object) as part of the\n          // source object (rather than just a URL). Therefore, since the media playlist\n          // doesn't need to be requested, loadedmetadata won't trigger as part of the\n          // normal flow, and needs an explicit trigger here.\n          this.trigger('loadedmetadata');\n        } else {\n          this.trigger('mediachange');\n        }\n      }\n      return;\n    } // We update/set the timeout here so that live playlists\n    // that are not a media change will \"start\" the loader as expected.\n    // We expect that this function will start the media update timeout\n    // cycle again. This also prevents a playlist switch failure from\n    // causing us to stall during live.\n\n    this.updateMediaUpdateTimeout_(refreshDelay(playlist, true)); // switching to the active playlist is a no-op\n\n    if (!mediaChange) {\n      return;\n    }\n    this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\n\n    if (this.request) {\n      if (playlist.resolvedUri === this.request.url) {\n        // requesting to switch to the same playlist multiple times\n        // has no effect after the first\n        return;\n      }\n      this.request.onreadystatechange = null;\n      this.request.abort();\n      this.request = null;\n    } // request the new playlist\n\n    if (this.media_) {\n      this.trigger('mediachanging');\n    }\n    this.pendingMedia_ = playlist;\n    const metadata = {\n      playlistInfo: {\n        type: 'media',\n        uri: playlist.uri\n      }\n    };\n    this.trigger({\n      type: 'playlistrequeststart',\n      metadata\n    });\n    this.request = this.vhs_.xhr({\n      uri: playlist.resolvedUri,\n      withCredentials: this.withCredentials,\n      requestType: 'hls-playlist'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      playlist.lastRequest = Date.now();\n      playlist.resolvedUri = resolveManifestRedirect(playlist.resolvedUri, req);\n      if (error) {\n        return this.playlistRequestError(this.request, playlist, startingState);\n      }\n      this.trigger({\n        type: 'playlistrequestcomplete',\n        metadata\n      });\n      this.haveMetadata({\n        playlistString: req.responseText,\n        url: playlist.uri,\n        id: playlist.id\n      }); // fire loadedmetadata the first time a media playlist is loaded\n\n      if (startingState === 'HAVE_MAIN_MANIFEST') {\n        this.trigger('loadedmetadata');\n      } else {\n        this.trigger('mediachange');\n      }\n    });\n  }\n  /**\n   * pause loading of the playlist\n   */\n\n  pause() {\n    if (this.mediaUpdateTimeout) {\n      window$1.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n    this.stopRequest();\n    if (this.state === 'HAVE_NOTHING') {\n      // If we pause the loader before any data has been retrieved, its as if we never\n      // started, so reset to an unstarted state.\n      this.started = false;\n    } // Need to restore state now that no activity is happening\n\n    if (this.state === 'SWITCHING_MEDIA') {\n      // if the loader was in the process of switching media, it should either return to\n      // HAVE_MAIN_MANIFEST or HAVE_METADATA depending on if the loader has loaded a media\n      // playlist yet. This is determined by the existence of loader.media_\n      if (this.media_) {\n        this.state = 'HAVE_METADATA';\n      } else {\n        this.state = 'HAVE_MAIN_MANIFEST';\n      }\n    } else if (this.state === 'HAVE_CURRENT_METADATA') {\n      this.state = 'HAVE_METADATA';\n    }\n  }\n  /**\n   * start loading of the playlist\n   */\n\n  load(shouldDelay) {\n    if (this.mediaUpdateTimeout) {\n      window$1.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    }\n    const media = this.media();\n    if (shouldDelay) {\n      const delay = media ? (media.partTargetDuration || media.targetDuration) / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window$1.setTimeout(() => {\n        this.mediaUpdateTimeout = null;\n        this.load();\n      }, delay);\n      return;\n    }\n    if (!this.started) {\n      this.start();\n      return;\n    }\n    if (media && !media.endList) {\n      this.trigger('mediaupdatetimeout');\n    } else {\n      this.trigger('loadedplaylist');\n    }\n  }\n  updateMediaUpdateTimeout_(delay) {\n    if (this.mediaUpdateTimeout) {\n      window$1.clearTimeout(this.mediaUpdateTimeout);\n      this.mediaUpdateTimeout = null;\n    } // we only have use mediaupdatetimeout for live playlists.\n\n    if (!this.media() || this.media().endList) {\n      return;\n    }\n    this.mediaUpdateTimeout = window$1.setTimeout(() => {\n      this.mediaUpdateTimeout = null;\n      this.trigger('mediaupdatetimeout');\n      this.updateMediaUpdateTimeout_(delay);\n    }, delay);\n  }\n  /**\n   * start loading of the playlist\n   */\n\n  start() {\n    this.started = true;\n    if (typeof this.src === 'object') {\n      // in the case of an entirely constructed manifest object (meaning there's no actual\n      // manifest on a server), default the uri to the page's href\n      if (!this.src.uri) {\n        this.src.uri = window$1.location.href;\n      } // resolvedUri is added on internally after the initial request. Since there's no\n      // request for pre-resolved manifests, add on resolvedUri here.\n\n      this.src.resolvedUri = this.src.uri; // Since a manifest object was passed in as the source (instead of a URL), the first\n      // request can be skipped (since the top level of the manifest, at a minimum, is\n      // already available as a parsed manifest object). However, if the manifest object\n      // represents a main playlist, some media playlists may need to be resolved before\n      // the starting segment list is available. Therefore, go directly to setup of the\n      // initial playlist, and let the normal flow continue from there.\n      //\n      // Note that the call to setup is asynchronous, as other sections of VHS may assume\n      // that the first request is asynchronous.\n\n      setTimeout(() => {\n        this.setupInitialPlaylist(this.src);\n      }, 0);\n      return;\n    }\n    const metadata = {\n      playlistInfo: {\n        type: 'multivariant',\n        uri: this.src\n      }\n    };\n    this.trigger({\n      type: 'playlistrequeststart',\n      metadata\n    }); // request the specified URL\n\n    this.request = this.vhs_.xhr({\n      uri: this.src,\n      withCredentials: this.withCredentials,\n      requestType: 'hls-playlist'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      } // clear the loader's request reference\n\n      this.request = null;\n      if (error) {\n        this.error = {\n          status: req.status,\n          message: `HLS playlist request error at URL: ${this.src}.`,\n          responseText: req.responseText,\n          // MEDIA_ERR_NETWORK\n          code: 2,\n          metadata: getStreamingNetworkErrorMetadata({\n            requestType: req.requestType,\n            request: req,\n            error\n          })\n        };\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n        return this.trigger('error');\n      }\n      this.trigger({\n        type: 'playlistrequestcomplete',\n        metadata\n      });\n      this.src = resolveManifestRedirect(this.src, req);\n      this.trigger({\n        type: 'playlistparsestart',\n        metadata\n      });\n      const manifest = this.parseManifest_({\n        manifestString: req.responseText,\n        url: this.src\n      }); // we haven't loaded any variant playlists here so we default to false for isLive.\n\n      metadata.parsedPlaylist = playlistMetadataPayload(manifest.playlists, metadata.playlistInfo.type, false);\n      this.trigger({\n        type: 'playlistparsecomplete',\n        metadata\n      });\n      this.setupInitialPlaylist(manifest);\n    });\n  }\n  srcUri() {\n    return typeof this.src === 'string' ? this.src : this.src.uri;\n  }\n  /**\n   * Given a manifest object that's either a main or media playlist, trigger the proper\n   * events and set the state of the playlist loader.\n   *\n   * If the manifest object represents a main playlist, `loadedplaylist` will be\n   * triggered to allow listeners to select a playlist. If none is selected, the loader\n   * will default to the first one in the playlists array.\n   *\n   * If the manifest object represents a media playlist, `loadedplaylist` will be\n   * triggered followed by `loadedmetadata`, as the only available playlist is loaded.\n   *\n   * In the case of a media playlist, a main playlist object wrapper with one playlist\n   * will be created so that all logic can handle playlists in the same fashion (as an\n   * assumed manifest object schema).\n   *\n   * @param {Object} manifest\n   *        The parsed manifest object\n   */\n\n  setupInitialPlaylist(manifest) {\n    this.state = 'HAVE_MAIN_MANIFEST';\n    if (manifest.playlists) {\n      this.main = manifest;\n      addPropertiesToMain(this.main, this.srcUri()); // If the initial main playlist has playlists wtih segments already resolved,\n      // then resolve URIs in advance, as they are usually done after a playlist request,\n      // which may not happen if the playlist is resolved.\n\n      manifest.playlists.forEach(playlist => {\n        playlist.segments = getAllSegments(playlist);\n        playlist.segments.forEach(segment => {\n          resolveSegmentUris(segment, playlist.resolvedUri);\n        });\n      });\n      this.trigger('loadedplaylist');\n      if (!this.request) {\n        // no media playlist was specifically selected so start\n        // from the first listed one\n        this.media(this.main.playlists[0]);\n      }\n      return;\n    } // In order to support media playlists passed in as vhs-json, the case where the uri\n    // is not provided as part of the manifest should be considered, and an appropriate\n    // default used.\n\n    const uri = this.srcUri() || window$1.location.href;\n    this.main = mainForMedia(manifest, uri);\n    this.haveMetadata({\n      playlistObject: manifest,\n      url: uri,\n      id: this.main.playlists[0].id\n    });\n    this.trigger('loadedmetadata');\n  }\n  /**\n   * Updates or deletes a preexisting pathway clone.\n   * Ensures that all playlists related to the old pathway clone are\n   * either updated or deleted.\n   *\n   * @param {Object} clone On update, the pathway clone object for the newly updated pathway clone.\n   *        On delete, the old pathway clone object to be deleted.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n  updateOrDeleteClone(clone, isUpdate) {\n    const main = this.main;\n    const pathway = clone.ID;\n    let i = main.playlists.length; // Iterate backwards through the playlist so we can remove playlists if necessary.\n\n    while (i--) {\n      const p = main.playlists[i];\n      if (p.attributes['PATHWAY-ID'] === pathway) {\n        const oldPlaylistUri = p.resolvedUri;\n        const oldPlaylistId = p.id; // update the indexed playlist and add new playlists by ID and URI\n\n        if (isUpdate) {\n          const newPlaylistUri = this.createCloneURI_(p.resolvedUri, clone);\n          const newPlaylistId = createPlaylistID(pathway, newPlaylistUri);\n          const attributes = this.createCloneAttributes_(pathway, p.attributes);\n          const updatedPlaylist = this.createClonePlaylist_(p, newPlaylistId, clone, attributes);\n          main.playlists[i] = updatedPlaylist;\n          main.playlists[newPlaylistId] = updatedPlaylist;\n          main.playlists[newPlaylistUri] = updatedPlaylist;\n        } else {\n          // Remove the indexed playlist.\n          main.playlists.splice(i, 1);\n        } // Remove playlists by the old ID and URI.\n\n        delete main.playlists[oldPlaylistId];\n        delete main.playlists[oldPlaylistUri];\n      }\n    }\n    this.updateOrDeleteCloneMedia(clone, isUpdate);\n  }\n  /**\n   * Updates or deletes media data based on the pathway clone object.\n   * Due to the complexity of the media groups and playlists, in all cases\n   * we remove all of the old media groups and playlists.\n   * On updates, we then create new media groups and playlists based on the\n   * new pathway clone object.\n   *\n   * @param {Object} clone The pathway clone object for the newly updated pathway clone.\n   * @param {boolean} isUpdate True if the pathway is to be updated,\n   *        false if it is meant to be deleted.\n   */\n\n  updateOrDeleteCloneMedia(clone, isUpdate) {\n    const main = this.main;\n    const id = clone.ID;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (!main.mediaGroups[mediaType] || !main.mediaGroups[mediaType][id]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        // Remove all media playlists for the media group for this pathway clone.\n        if (groupKey === id) {\n          for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n            const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n            oldMedia.playlists.forEach((p, i) => {\n              const oldMediaPlaylist = main.playlists[p.id];\n              const oldPlaylistId = oldMediaPlaylist.id;\n              const oldPlaylistUri = oldMediaPlaylist.resolvedUri;\n              delete main.playlists[oldPlaylistId];\n              delete main.playlists[oldPlaylistUri];\n            });\n          } // Delete the old media group.\n\n          delete main.mediaGroups[mediaType][groupKey];\n        }\n      }\n    }); // Create the new media groups and playlists if there is an update.\n\n    if (isUpdate) {\n      this.createClonedMediaGroups_(clone);\n    }\n  }\n  /**\n   * Given a pathway clone object, clones all necessary playlists.\n   *\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} basePlaylist The original playlist to clone from.\n   */\n\n  addClonePathway(clone, basePlaylist = {}) {\n    const main = this.main;\n    const index = main.playlists.length;\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const playlistId = createPlaylistID(clone.ID, uri);\n    const attributes = this.createCloneAttributes_(clone.ID, basePlaylist.attributes);\n    const playlist = this.createClonePlaylist_(basePlaylist, playlistId, clone, attributes);\n    main.playlists[index] = playlist; // add playlist by ID and URI\n\n    main.playlists[playlistId] = playlist;\n    main.playlists[uri] = playlist;\n    this.createClonedMediaGroups_(clone);\n  }\n  /**\n   * Given a pathway clone object we create clones of all media.\n   * In this function, all necessary information and updated playlists\n   * are added to the `mediaGroup` object.\n   * Playlists are also added to the `playlists` array so the media groups\n   * will be properly linked.\n   *\n   * @param {Object} clone The pathway clone object.\n   */\n\n  createClonedMediaGroups_(clone) {\n    const id = clone.ID;\n    const baseID = clone['BASE-ID'];\n    const main = this.main;\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      // If the media type doesn't exist, or there is already a clone, skip\n      // to the next media type.\n      if (!main.mediaGroups[mediaType] || main.mediaGroups[mediaType][id]) {\n        return;\n      }\n      for (const groupKey in main.mediaGroups[mediaType]) {\n        if (groupKey === baseID) {\n          // Create the group.\n          main.mediaGroups[mediaType][id] = {};\n        } else {\n          // There is no need to iterate over label keys in this case.\n          continue;\n        }\n        for (const labelKey in main.mediaGroups[mediaType][groupKey]) {\n          const oldMedia = main.mediaGroups[mediaType][groupKey][labelKey];\n          main.mediaGroups[mediaType][id][labelKey] = _extends({}, oldMedia);\n          const newMedia = main.mediaGroups[mediaType][id][labelKey]; // update URIs on the media\n\n          const newUri = this.createCloneURI_(oldMedia.resolvedUri, clone);\n          newMedia.resolvedUri = newUri;\n          newMedia.uri = newUri; // Reset playlists in the new media group.\n\n          newMedia.playlists = []; // Create new playlists in the newly cloned media group.\n\n          oldMedia.playlists.forEach((p, i) => {\n            const oldMediaPlaylist = main.playlists[p.id];\n            const group = groupID(mediaType, id, labelKey);\n            const newPlaylistID = createPlaylistID(id, group); // Check to see if it already exists\n\n            if (oldMediaPlaylist && !main.playlists[newPlaylistID]) {\n              const newMediaPlaylist = this.createClonePlaylist_(oldMediaPlaylist, newPlaylistID, clone);\n              const newPlaylistUri = newMediaPlaylist.resolvedUri;\n              main.playlists[newPlaylistID] = newMediaPlaylist;\n              main.playlists[newPlaylistUri] = newMediaPlaylist;\n            }\n            newMedia.playlists[i] = this.createClonePlaylist_(p, newPlaylistID, clone);\n          });\n        }\n      }\n    });\n  }\n  /**\n   * Using the original playlist to be cloned, and the pathway clone object\n   * information, we create a new playlist.\n   *\n   * @param {Object} basePlaylist  The original playlist to be cloned from.\n   * @param {string} id The desired id of the newly cloned playlist.\n   * @param {Object} clone The pathway clone object.\n   * @param {Object} attributes An optional object to populate the `attributes` property in the playlist.\n   *\n   * @return {Object} The combined cloned playlist.\n   */\n\n  createClonePlaylist_(basePlaylist, id, clone, attributes) {\n    const uri = this.createCloneURI_(basePlaylist.resolvedUri, clone);\n    const newProps = {\n      resolvedUri: uri,\n      uri,\n      id\n    }; // Remove all segments from previous playlist in the clone.\n\n    if (basePlaylist.segments) {\n      newProps.segments = [];\n    }\n    if (attributes) {\n      newProps.attributes = attributes;\n    }\n    return merge(basePlaylist, newProps);\n  }\n  /**\n   * Generates an updated URI for a cloned pathway based on the original\n   * pathway's URI and the paramaters from the pathway clone object in the\n   * content steering server response.\n   *\n   * @param {string} baseUri URI to be updated in the cloned pathway.\n   * @param {Object} clone The pathway clone object.\n   *\n   * @return {string} The updated URI for the cloned pathway.\n   */\n\n  createCloneURI_(baseURI, clone) {\n    const uri = new URL(baseURI);\n    uri.hostname = clone['URI-REPLACEMENT'].HOST;\n    const params = clone['URI-REPLACEMENT'].PARAMS; // Add params to the cloned URL.\n\n    for (const key of Object.keys(params)) {\n      uri.searchParams.set(key, params[key]);\n    }\n    return uri.href;\n  }\n  /**\n   * Helper function to create the attributes needed for the new clone.\n   * This mainly adds the necessary media attributes.\n   *\n   * @param {string} id The pathway clone object ID.\n   * @param {Object} oldAttributes The old attributes to compare to.\n   * @return {Object} The new attributes to add to the playlist.\n   */\n\n  createCloneAttributes_(id, oldAttributes) {\n    const attributes = {\n      ['PATHWAY-ID']: id\n    };\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(mediaType => {\n      if (oldAttributes[mediaType]) {\n        attributes[mediaType] = id;\n      }\n    });\n    return attributes;\n  }\n  /**\n   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n      for (const keysystem in playlist.contentProtection) {\n        const keyId = playlist.contentProtection[keysystem].attributes.keyId;\n        if (keyId) {\n          keyIds.add(keyId.toLowerCase());\n        }\n      }\n      return keyIds;\n    }\n  }\n}\n\n/**\n * @file xhr.js\n */\n\nconst callbackWrapper = function (request, error, response, callback) {\n  const reqResponse = request.responseType === 'arraybuffer' ? request.response : request.responseText;\n  if (!error && reqResponse) {\n    request.responseTime = Date.now();\n    request.roundTripTime = request.responseTime - request.requestTime;\n    request.bytesReceived = reqResponse.byteLength || reqResponse.length;\n    if (!request.bandwidth) {\n      request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\n    }\n  }\n  if (response.headers) {\n    request.responseHeaders = response.headers;\n  } // videojs.xhr now uses a specific code on the error\n  // object to signal that a request has timed out instead\n  // of setting a boolean on the request object\n\n  if (error && error.code === 'ETIMEDOUT') {\n    request.timedout = true;\n  } // videojs.xhr no longer considers status codes outside of 200 and 0\n  // (for file uris) to be errors, but the old XHR did, so emulate that\n  // behavior. Status 206 may be used in response to byterange requests.\n\n  if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\n    error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\n  }\n  callback(error, request);\n};\n/**\n * Iterates over the request hooks Set and calls them in order\n *\n * @param {Set} hooks the hook Set to iterate over\n * @param {Object} options the request options to pass to the xhr wrapper\n * @return the callback hook function return value, the modified or new options Object.\n */\n\nconst callAllRequestHooks = (requestSet, options) => {\n  if (!requestSet || !requestSet.size) {\n    return;\n  }\n  let newOptions = options;\n  requestSet.forEach(requestCallback => {\n    newOptions = requestCallback(newOptions);\n  });\n  return newOptions;\n};\n/**\n * Iterates over the response hooks Set and calls them in order.\n *\n * @param {Set} hooks the hook Set to iterate over\n * @param {Object} request the xhr request object\n * @param {Object} error the xhr error object\n * @param {Object} response the xhr response object\n */\n\nconst callAllResponseHooks = (responseSet, request, error, response) => {\n  if (!responseSet || !responseSet.size) {\n    return;\n  }\n  responseSet.forEach(responseCallback => {\n    responseCallback(request, error, response);\n  });\n};\nconst xhrFactory = function () {\n  const xhr = function XhrFunction(options, callback) {\n    // Add a default timeout\n    options = merge({\n      timeout: 45e3\n    }, options); // Allow an optional user-specified function to modify the option\n    // object before we construct the xhr request\n    // TODO: Remove beforeRequest in the next major release.\n\n    const beforeRequest = XhrFunction.beforeRequest || videojs.Vhs.xhr.beforeRequest; // onRequest and onResponse hooks as a Set, at either the player or global level.\n    // TODO: new Set added here for beforeRequest alias. Remove this when beforeRequest is removed.\n\n    const _requestCallbackSet = XhrFunction._requestCallbackSet || videojs.Vhs.xhr._requestCallbackSet || new Set();\n    const _responseCallbackSet = XhrFunction._responseCallbackSet || videojs.Vhs.xhr._responseCallbackSet;\n    if (beforeRequest && typeof beforeRequest === 'function') {\n      videojs.log.warn('beforeRequest is deprecated, use onRequest instead.');\n      _requestCallbackSet.add(beforeRequest);\n    } // Use the standard videojs.xhr() method unless `videojs.Vhs.xhr` has been overriden\n    // TODO: switch back to videojs.Vhs.xhr.name === 'XhrFunction' when we drop IE11\n\n    const xhrMethod = videojs.Vhs.xhr.original === true ? videojs.xhr : videojs.Vhs.xhr; // call all registered onRequest hooks, assign new options.\n\n    const beforeRequestOptions = callAllRequestHooks(_requestCallbackSet, options); // Remove the beforeRequest function from the hooks set so stale beforeRequest functions are not called.\n\n    _requestCallbackSet.delete(beforeRequest); // xhrMethod will call XMLHttpRequest.open and XMLHttpRequest.send\n\n    const request = xhrMethod(beforeRequestOptions || options, function (error, response) {\n      // call all registered onResponse hooks\n      callAllResponseHooks(_responseCallbackSet, request, error, response);\n      return callbackWrapper(request, error, response, callback);\n    });\n    const originalAbort = request.abort;\n    request.abort = function () {\n      request.aborted = true;\n      return originalAbort.apply(request, arguments);\n    };\n    request.uri = options.uri;\n    request.requestType = options.requestType;\n    request.requestTime = Date.now();\n    return request;\n  };\n  xhr.original = true;\n  return xhr;\n};\n/**\n * Turns segment byterange into a string suitable for use in\n * HTTP Range requests\n *\n * @param {Object} byterange - an object with two values defining the start and end\n *                             of a byte-range\n */\n\nconst byterangeStr = function (byterange) {\n  // `byterangeEnd` is one less than `offset + length` because the HTTP range\n  // header uses inclusive ranges\n  let byterangeEnd;\n  const byterangeStart = byterange.offset;\n  if (typeof byterange.offset === 'bigint' || typeof byterange.length === 'bigint') {\n    byterangeEnd = window$1.BigInt(byterange.offset) + window$1.BigInt(byterange.length) - window$1.BigInt(1);\n  } else {\n    byterangeEnd = byterange.offset + byterange.length - 1;\n  }\n  return 'bytes=' + byterangeStart + '-' + byterangeEnd;\n};\n/**\n * Defines headers for use in the xhr request for a particular segment.\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n */\n\nconst segmentXhrHeaders = function (segment) {\n  const headers = {};\n  if (segment.byterange) {\n    headers.Range = byterangeStr(segment.byterange);\n  }\n  return headers;\n};\n\n/**\n * @file bin-utils.js\n */\n\n/**\n * convert a TimeRange to text\n *\n * @param {TimeRange} range the timerange to use for conversion\n * @param {number} i the iterator on the range to convert\n * @return {string} the range in string format\n */\n\nconst textRange = function (range, i) {\n  return range.start(i) + '-' + range.end(i);\n};\n/**\n * format a number as hex string\n *\n * @param {number} e The number\n * @param {number} i the iterator\n * @return {string} the hex formatted number as a string\n */\n\nconst formatHexString = function (e, i) {\n  const value = e.toString(16);\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\n};\nconst formatAsciiString = function (e) {\n  if (e >= 0x20 && e < 0x7e) {\n    return String.fromCharCode(e);\n  }\n  return '.';\n};\n/**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n *        Object of properties and values to send to the web worker\n * @return {Object}\n *         Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\nconst createTransferableMessage = function (message) {\n  const transferable = {};\n  Object.keys(message).forEach(key => {\n    const value = message[key];\n    if (isArrayBufferView(value)) {\n      transferable[key] = {\n        bytes: value.buffer,\n        byteOffset: value.byteOffset,\n        byteLength: value.byteLength\n      };\n    } else {\n      transferable[key] = value;\n    }\n  });\n  return transferable;\n};\n/**\n * Returns a unique string identifier for a media initialization\n * segment.\n *\n * @param {Object} initSegment\n *        the init segment object.\n *\n * @return {string} the generated init segment id\n */\n\nconst initSegmentId = function (initSegment) {\n  const byterange = initSegment.byterange || {\n    length: Infinity,\n    offset: 0\n  };\n  return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\n};\n/**\n * Returns a unique string identifier for a media segment key.\n *\n * @param {Object} key the encryption key\n * @return {string} the unique id for the media segment key.\n */\n\nconst segmentKeyId = function (key) {\n  return key.resolvedUri;\n};\n/**\n * utils to help dump binary data to the console\n *\n * @param {Array|TypedArray} data\n *        data to dump to a string\n *\n * @return {string} the data as a hex string.\n */\n\nconst hexDump = data => {\n  const bytes = Array.prototype.slice.call(data);\n  const step = 16;\n  let result = '';\n  let hex;\n  let ascii;\n  for (let j = 0; j < bytes.length / step; j++) {\n    hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\n    ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\n    result += hex + ' ' + ascii + '\\n';\n  }\n  return result;\n};\nconst tagDump = ({\n  bytes\n}) => hexDump(bytes);\nconst textRanges = ranges => {\n  let result = '';\n  let i;\n  for (i = 0; i < ranges.length; i++) {\n    result += textRange(ranges, i) + ' ';\n  }\n  return result;\n};\nvar utils = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  createTransferableMessage: createTransferableMessage,\n  initSegmentId: initSegmentId,\n  segmentKeyId: segmentKeyId,\n  hexDump: hexDump,\n  tagDump: tagDump,\n  textRanges: textRanges\n});\n\n// TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\n// 25% was arbitrarily chosen, and may need to be refined over time.\n\nconst SEGMENT_END_FUDGE_PERCENT = 0.25;\n/**\n * Converts a player time (any time that can be gotten/set from player.currentTime(),\n * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\n * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\n *\n * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \"anchor\n * point\" (a point where we have a mapping from program time to player time, with player\n * time being the post transmux start of the segment).\n *\n * For more details, see [this doc](../../docs/program-time-from-player-time.md).\n *\n * @param {number} playerTime the player time\n * @param {Object} segment the segment which contains the player time\n * @return {Date} program time\n */\n\nconst playerTimeToProgramTime = (playerTime, segment) => {\n  if (!segment.dateTimeObject) {\n    // Can't convert without an \"anchor point\" for the program time (i.e., a time that can\n    // be used to map the start of a segment with a real world time).\n    return null;\n  }\n  const transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\n  const transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\n\n  const startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\n  const offsetFromSegmentStart = playerTime - startOfSegment;\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\n};\nconst originalSegmentVideoDuration = videoTimingInfo => {\n  return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\n};\n/**\n * Finds a segment that contains the time requested given as an ISO-8601 string. The\n * returned segment might be an estimate or an accurate match.\n *\n * @param {string} programTime The ISO-8601 programTime to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\nconst findSegmentForProgramTime = (programTime, playlist) => {\n  // Assumptions:\n  //  - verifyProgramDateTimeTags has already been run\n  //  - live streams have been started\n  let dateTimeObject;\n  try {\n    dateTimeObject = new Date(programTime);\n  } catch (e) {\n    return null;\n  }\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n    return null;\n  }\n  let segment = playlist.segments[0];\n  if (dateTimeObject < new Date(segment.dateTimeObject)) {\n    // Requested time is before stream start.\n    return null;\n  }\n  for (let i = 0; i < playlist.segments.length - 1; i++) {\n    segment = playlist.segments[i];\n    const nextSegmentStart = new Date(playlist.segments[i + 1].dateTimeObject);\n    if (dateTimeObject < nextSegmentStart) {\n      break;\n    }\n  }\n  const lastSegment = playlist.segments[playlist.segments.length - 1];\n  const lastSegmentStart = lastSegment.dateTimeObject;\n  const lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\n  const lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\n  if (dateTimeObject > lastSegmentEnd) {\n    // Beyond the end of the stream, or our best guess of the end of the stream.\n    return null;\n  }\n  if (dateTimeObject > new Date(lastSegmentStart)) {\n    segment = lastSegment;\n  }\n  return {\n    segment,\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\n    // Although, given that all segments have accurate date time objects, the segment\n    // selected should be accurate, unless the video has been transmuxed at some point\n    // (determined by the presence of the videoTimingInfo object), the segment's \"player\n    // time\" (the start time in the player) can't be considered accurate.\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n  };\n};\n/**\n * Finds a segment that contains the given player time(in seconds).\n *\n * @param {number} time The player time to find a match for\n * @param {Object} playlist A playlist object to search within\n */\n\nconst findSegmentForPlayerTime = (time, playlist) => {\n  // Assumptions:\n  // - there will always be a segment.duration\n  // - we can start from zero\n  // - segments are in time order\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\n    return null;\n  }\n  let segmentEnd = 0;\n  let segment;\n  for (let i = 0; i < playlist.segments.length; i++) {\n    segment = playlist.segments[i]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\n    // should contain the most accurate values we have for the segment's player times.\n    //\n    // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\n    // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\n    // calculate an end value.\n\n    segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\n    if (time <= segmentEnd) {\n      break;\n    }\n  }\n  const lastSegment = playlist.segments[playlist.segments.length - 1];\n  if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\n    // The time requested is beyond the stream end.\n    return null;\n  }\n  if (time > segmentEnd) {\n    // The time is within or beyond the last segment.\n    //\n    // Check to see if the time is beyond a reasonable guess of the end of the stream.\n    if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\n      // Technically, because the duration value is only an estimate, the time may still\n      // exist in the last segment, however, there isn't enough information to make even\n      // a reasonable estimate.\n      return null;\n    }\n    segment = lastSegment;\n  }\n  return {\n    segment,\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\n    // Because videoTimingInfo is only set after transmux, it is the only way to get\n    // accurate timing values.\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\n  };\n};\n/**\n * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\n * If the offset returned is positive, the programTime occurs after the\n * comparisonTimestamp.\n * If the offset is negative, the programTime occurs before the comparisonTimestamp.\n *\n * @param {string} comparisonTimeStamp An ISO-8601 timestamp to compare against\n * @param {string} programTime The programTime as an ISO-8601 string\n * @return {number} offset\n */\n\nconst getOffsetFromTimestamp = (comparisonTimeStamp, programTime) => {\n  let segmentDateTime;\n  let programDateTime;\n  try {\n    segmentDateTime = new Date(comparisonTimeStamp);\n    programDateTime = new Date(programTime);\n  } catch (e) {// TODO handle error\n  }\n  const segmentTimeEpoch = segmentDateTime.getTime();\n  const programTimeEpoch = programDateTime.getTime();\n  return (programTimeEpoch - segmentTimeEpoch) / 1000;\n};\n/**\n * Checks that all segments in this playlist have programDateTime tags.\n *\n * @param {Object} playlist A playlist object\n */\n\nconst verifyProgramDateTimeTags = playlist => {\n  if (!playlist.segments || playlist.segments.length === 0) {\n    return false;\n  }\n  for (let i = 0; i < playlist.segments.length; i++) {\n    const segment = playlist.segments[i];\n    if (!segment.dateTimeObject) {\n      return false;\n    }\n  }\n  return true;\n};\n/**\n * Returns the programTime of the media given a playlist and a playerTime.\n * The playlist must have programDateTime tags for a programDateTime tag to be returned.\n * If the segments containing the time requested have not been buffered yet, an estimate\n * may be returned to the callback.\n *\n * @param {Object} args\n * @param {Object} args.playlist A playlist object to search within\n * @param {number} time A playerTime in seconds\n * @param {Function} callback(err, programTime)\n * @return {string} err.message A detailed error message\n * @return {Object} programTime\n * @return {number} programTime.mediaSeconds The streamTime in seconds\n * @return {string} programTime.programDateTime The programTime as an ISO-8601 String\n */\n\nconst getProgramTime = ({\n  playlist,\n  time = undefined,\n  callback\n}) => {\n  if (!callback) {\n    throw new Error('getProgramTime: callback must be provided');\n  }\n  if (!playlist || time === undefined) {\n    return callback({\n      message: 'getProgramTime: playlist and time must be provided'\n    });\n  }\n  const matchedSegment = findSegmentForPlayerTime(time, playlist);\n  if (!matchedSegment) {\n    return callback({\n      message: 'valid programTime was not found'\n    });\n  }\n  if (matchedSegment.type === 'estimate') {\n    return callback({\n      message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\n      seekTime: matchedSegment.estimatedStart\n    });\n  }\n  const programTimeObject = {\n    mediaSeconds: time\n  };\n  const programTime = playerTimeToProgramTime(time, matchedSegment.segment);\n  if (programTime) {\n    programTimeObject.programDateTime = programTime.toISOString();\n  }\n  return callback(null, programTimeObject);\n};\n/**\n * Seeks in the player to a time that matches the given programTime ISO-8601 string.\n *\n * @param {Object} args\n * @param {string} args.programTime A programTime to seek to as an ISO-8601 String\n * @param {Object} args.playlist A playlist to look within\n * @param {number} args.retryCount The number of times to try for an accurate seek. Default is 2.\n * @param {Function} args.seekTo A method to perform a seek\n * @param {boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\n * @param {Object} args.tech The tech to seek on\n * @param {Function} args.callback(err, newTime) A callback to return the new time to\n * @return {string} err.message A detailed error message\n * @return {number} newTime The exact time that was seeked to in seconds\n */\n\nconst seekToProgramTime = ({\n  programTime,\n  playlist,\n  retryCount = 2,\n  seekTo,\n  pauseAfterSeek = true,\n  tech,\n  callback\n}) => {\n  if (!callback) {\n    throw new Error('seekToProgramTime: callback must be provided');\n  }\n  if (typeof programTime === 'undefined' || !playlist || !seekTo) {\n    return callback({\n      message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\n    });\n  }\n  if (!playlist.endList && !tech.hasStarted_) {\n    return callback({\n      message: 'player must be playing a live stream to start buffering'\n    });\n  }\n  if (!verifyProgramDateTimeTags(playlist)) {\n    return callback({\n      message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\n    });\n  }\n  const matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\n\n  if (!matchedSegment) {\n    return callback({\n      message: `${programTime} was not found in the stream`\n    });\n  }\n  const segment = matchedSegment.segment;\n  const mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\n  if (matchedSegment.type === 'estimate') {\n    // we've run out of retries\n    if (retryCount === 0) {\n      return callback({\n        message: `${programTime} is not buffered yet. Try again`\n      });\n    }\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\n    tech.one('seeked', () => {\n      seekToProgramTime({\n        programTime,\n        playlist,\n        retryCount: retryCount - 1,\n        seekTo,\n        pauseAfterSeek,\n        tech,\n        callback\n      });\n    });\n    return;\n  } // Since the segment.start value is determined from the buffered end or ending time\n  // of the prior segment, the seekToTime doesn't need to account for any transmuxer\n  // modifications.\n\n  const seekToTime = segment.start + mediaOffset;\n  const seekedCallback = () => {\n    return callback(null, tech.currentTime());\n  }; // listen for seeked event\n\n  tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\n\n  if (pauseAfterSeek) {\n    tech.pause();\n  }\n  seekTo(seekToTime);\n};\n\n// which will only happen if the request is complete.\n\nconst callbackOnCompleted = (request, cb) => {\n  if (request.readyState === 4) {\n    return cb();\n  }\n  return;\n};\nconst containerRequest = (uri, xhr, cb, requestType) => {\n  let bytes = [];\n  let id3Offset;\n  let finished = false;\n  const endRequestAndCallback = function (err, req, type, _bytes) {\n    req.abort();\n    finished = true;\n    return cb(err, req, type, _bytes);\n  };\n  const progressListener = function (error, request) {\n    if (finished) {\n      return;\n    }\n    if (error) {\n      error.metadata = getStreamingNetworkErrorMetadata({\n        requestType,\n        request,\n        error\n      });\n      return endRequestAndCallback(error, request, '', bytes);\n    } // grap the new part of content that was just downloaded\n\n    const newPart = request.responseText.substring(bytes && bytes.byteLength || 0, request.responseText.length); // add that onto bytes\n\n    bytes = concatTypedArrays(bytes, stringToBytes(newPart, true));\n    id3Offset = id3Offset || getId3Offset(bytes); // we need at least 10 bytes to determine a type\n    // or we need at least two bytes after an id3Offset\n\n    if (bytes.length < 10 || id3Offset && bytes.length < id3Offset + 2) {\n      return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n    }\n    const type = detectContainerForBytes(bytes); // if this looks like a ts segment but we don't have enough data\n    // to see the second sync byte, wait until we have enough data\n    // before declaring it ts\n\n    if (type === 'ts' && bytes.length < 188) {\n      return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n    } // this may be an unsynced ts segment\n    // wait for 376 bytes before detecting no container\n\n    if (!type && bytes.length < 376) {\n      return callbackOnCompleted(request, () => endRequestAndCallback(error, request, '', bytes));\n    }\n    return endRequestAndCallback(null, request, type, bytes);\n  };\n  const options = {\n    uri,\n    beforeSend(request) {\n      // this forces the browser to pass the bytes to us unprocessed\n      request.overrideMimeType('text/plain; charset=x-user-defined');\n      request.addEventListener('progress', function ({\n        total,\n        loaded\n      }) {\n        return callbackWrapper(request, null, {\n          statusCode: request.status\n        }, progressListener);\n      });\n    }\n  };\n  const request = xhr(options, function (error, response) {\n    return callbackWrapper(request, error, response, progressListener);\n  });\n  return request;\n};\nconst {\n  EventTarget\n} = videojs;\nconst dashPlaylistUnchanged = function (a, b) {\n  if (!isPlaylistUnchanged(a, b)) {\n    return false;\n  } // for dash the above check will often return true in scenarios where\n  // the playlist actually has changed because mediaSequence isn't a\n  // dash thing, and we often set it to 1. So if the playlists have the same amount\n  // of segments we return true.\n  // So for dash we need to make sure that the underlying segments are different.\n  // if sidx changed then the playlists are different.\n\n  if (a.sidx && b.sidx && (a.sidx.offset !== b.sidx.offset || a.sidx.length !== b.sidx.length)) {\n    return false;\n  } else if (!a.sidx && b.sidx || a.sidx && !b.sidx) {\n    return false;\n  } // one or the other does not have segments\n  // there was a change.\n\n  if (a.segments && !b.segments || !a.segments && b.segments) {\n    return false;\n  } // neither has segments nothing changed\n\n  if (!a.segments && !b.segments) {\n    return true;\n  } // check segments themselves\n\n  for (let i = 0; i < a.segments.length; i++) {\n    const aSegment = a.segments[i];\n    const bSegment = b.segments[i]; // if uris are different between segments there was a change\n\n    if (aSegment.uri !== bSegment.uri) {\n      return false;\n    } // neither segment has a byterange, there will be no byterange change.\n\n    if (!aSegment.byterange && !bSegment.byterange) {\n      continue;\n    }\n    const aByterange = aSegment.byterange;\n    const bByterange = bSegment.byterange; // if byterange only exists on one of the segments, there was a change.\n\n    if (aByterange && !bByterange || !aByterange && bByterange) {\n      return false;\n    } // if both segments have byterange with different offsets, there was a change.\n\n    if (aByterange.offset !== bByterange.offset || aByterange.length !== bByterange.length) {\n      return false;\n    }\n  } // if everything was the same with segments, this is the same playlist.\n\n  return true;\n};\n/**\n * Use the representation IDs from the mpd object to create groupIDs, the NAME is set to mandatory representation\n * ID in the parser. This allows for continuous playout across periods with the same representation IDs\n * (continuous periods as defined in DASH-IF 3.2.12). This is assumed in the mpd-parser as well. If we want to support\n * periods without continuous playback this function may need modification as well as the parser.\n */\n\nconst dashGroupId = (type, group, label, playlist) => {\n  // If the manifest somehow does not have an ID (non-dash compliant), use the label.\n  const playlistId = playlist.attributes.NAME || label;\n  return `placeholder-uri-${type}-${group}-${playlistId}`;\n};\n/**\n * Parses the main XML string and updates playlist URI references.\n *\n * @param {Object} config\n *        Object of arguments\n * @param {string} config.mainXml\n *        The mpd XML\n * @param {string} config.srcUrl\n *        The mpd URL\n * @param {Date} config.clientOffset\n *         A time difference between server and client\n * @param {Object} config.sidxMapping\n *        SIDX mappings for moof/mdat URIs and byte ranges\n * @return {Object}\n *         The parsed mpd manifest object\n */\n\nconst parseMainXml = ({\n  mainXml,\n  srcUrl,\n  clientOffset,\n  sidxMapping,\n  previousManifest\n}) => {\n  const manifest = parse(mainXml, {\n    manifestUri: srcUrl,\n    clientOffset,\n    sidxMapping,\n    previousManifest\n  });\n  addPropertiesToMain(manifest, srcUrl, dashGroupId);\n  return manifest;\n};\n/**\n * Removes any mediaGroup labels that no longer exist in the newMain\n *\n * @param {Object} update\n *         The previous mpd object being updated\n * @param {Object} newMain\n *         The new mpd object\n */\n\nconst removeOldMediaGroupLabels = (update, newMain) => {\n  forEachMediaGroup(update, (properties, type, group, label) => {\n    if (!newMain.mediaGroups[type][group] || !(label in newMain.mediaGroups[type][group])) {\n      delete update.mediaGroups[type][group][label];\n    }\n  });\n};\n/**\n * Returns a new main manifest that is the result of merging an updated main manifest\n * into the original version.\n *\n * @param {Object} oldMain\n *        The old parsed mpd object\n * @param {Object} newMain\n *        The updated parsed mpd object\n * @return {Object}\n *         A new object representing the original main manifest with the updated media\n *         playlists merged in\n */\n\nconst updateMain = (oldMain, newMain, sidxMapping) => {\n  let noChanges = true;\n  let update = merge(oldMain, {\n    // These are top level properties that can be updated\n    duration: newMain.duration,\n    minimumUpdatePeriod: newMain.minimumUpdatePeriod,\n    timelineStarts: newMain.timelineStarts\n  }); // First update the playlists in playlist list\n\n  for (let i = 0; i < newMain.playlists.length; i++) {\n    const playlist = newMain.playlists[i];\n    if (playlist.sidx) {\n      const sidxKey = generateSidxKey(playlist.sidx); // add sidx segments to the playlist if we have all the sidx info already\n\n      if (sidxMapping && sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx) {\n        addSidxSegmentsToPlaylist(playlist, sidxMapping[sidxKey].sidx, playlist.sidx.resolvedUri);\n      }\n    }\n    const playlistUpdate = updateMain$1(update, playlist, dashPlaylistUnchanged);\n    if (playlistUpdate) {\n      update = playlistUpdate;\n      noChanges = false;\n    }\n  } // Then update media group playlists\n\n  forEachMediaGroup(newMain, (properties, type, group, label) => {\n    if (properties.playlists && properties.playlists.length) {\n      const id = properties.playlists[0].id;\n      const playlistUpdate = updateMain$1(update, properties.playlists[0], dashPlaylistUnchanged);\n      if (playlistUpdate) {\n        update = playlistUpdate; // add new mediaGroup label if it doesn't exist and assign the new mediaGroup.\n\n        if (!(label in update.mediaGroups[type][group])) {\n          update.mediaGroups[type][group][label] = properties;\n        } // update the playlist reference within media groups\n\n        update.mediaGroups[type][group][label].playlists[0] = update.playlists[id];\n        noChanges = false;\n      }\n    }\n  }); // remove mediaGroup labels and references that no longer exist in the newMain\n\n  removeOldMediaGroupLabels(update, newMain);\n  if (newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n    noChanges = false;\n  }\n  if (noChanges) {\n    return null;\n  }\n  return update;\n}; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\n// If the SIDXs have maps, the two maps should match,\n// both `a` and `b` missing SIDXs is considered matching.\n// If `a` or `b` but not both have a map, they aren't matching.\n\nconst equivalentSidx = (a, b) => {\n  const neitherMap = Boolean(!a.map && !b.map);\n  const equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\n  return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\n}; // exported for testing\n\nconst compareSidxEntry = (playlists, oldSidxMapping) => {\n  const newSidxMapping = {};\n  for (const id in playlists) {\n    const playlist = playlists[id];\n    const currentSidxInfo = playlist.sidx;\n    if (currentSidxInfo) {\n      const key = generateSidxKey(currentSidxInfo);\n      if (!oldSidxMapping[key]) {\n        break;\n      }\n      const savedSidxInfo = oldSidxMapping[key].sidxInfo;\n      if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\n        newSidxMapping[key] = oldSidxMapping[key];\n      }\n    }\n  }\n  return newSidxMapping;\n};\n/**\n *  A function that filters out changed items as they need to be requested separately.\n *\n *  The method is exported for testing\n *\n *  @param {Object} main the parsed mpd XML returned via mpd-parser\n *  @param {Object} oldSidxMapping the SIDX to compare against\n */\n\nconst filterChangedSidxMappings = (main, oldSidxMapping) => {\n  const videoSidx = compareSidxEntry(main.playlists, oldSidxMapping);\n  let mediaGroupSidx = videoSidx;\n  forEachMediaGroup(main, (properties, mediaType, groupKey, labelKey) => {\n    if (properties.playlists && properties.playlists.length) {\n      const playlists = properties.playlists;\n      mediaGroupSidx = merge(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\n    }\n  });\n  return mediaGroupSidx;\n};\nclass DashPlaylistLoader extends EventTarget {\n  // DashPlaylistLoader must accept either a src url or a playlist because subsequent\n  // playlist loader setups from media groups will expect to be able to pass a playlist\n  // (since there aren't external URLs to media playlists with DASH)\n  constructor(srcUrlOrPlaylist, vhs, options = {}, mainPlaylistLoader) {\n    super();\n    this.isPaused_ = true;\n    this.mainPlaylistLoader_ = mainPlaylistLoader || this;\n    if (!mainPlaylistLoader) {\n      this.isMain_ = true;\n    }\n    const {\n      withCredentials = false\n    } = options;\n    this.vhs_ = vhs;\n    this.withCredentials = withCredentials;\n    this.addMetadataToTextTrack = options.addMetadataToTextTrack;\n    if (!srcUrlOrPlaylist) {\n      throw new Error('A non-empty playlist URL or object is required');\n    } // event naming?\n\n    this.on('minimumUpdatePeriod', () => {\n      this.refreshXml_();\n    }); // live playlist staleness timeout\n\n    this.on('mediaupdatetimeout', () => {\n      this.refreshMedia_(this.media().id);\n    });\n    this.state = 'HAVE_NOTHING';\n    this.loadedPlaylists_ = {};\n    this.logger_ = logger('DashPlaylistLoader'); // initialize the loader state\n    // The mainPlaylistLoader will be created with a string\n\n    if (this.isMain_) {\n      this.mainPlaylistLoader_.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\n      // once multi-period is refactored\n\n      this.mainPlaylistLoader_.sidxMapping_ = {};\n    } else {\n      this.childPlaylist_ = srcUrlOrPlaylist;\n    }\n  }\n  get isPaused() {\n    return this.isPaused_;\n  }\n  requestErrored_(err, request, startingState) {\n    // disposed\n    if (!this.request) {\n      return true;\n    } // pending request is cleared\n\n    this.request = null;\n    if (err) {\n      // use the provided error object or create one\n      // based on the request/response\n      this.error = typeof err === 'object' && !(err instanceof Error) ? err : {\n        status: request.status,\n        message: 'DASH request error at URL: ' + request.uri,\n        response: request.response,\n        // MEDIA_ERR_NETWORK\n        code: 2,\n        metadata: err.metadata\n      };\n      if (startingState) {\n        this.state = startingState;\n      }\n      this.trigger('error');\n      return true;\n    }\n  }\n  /**\n   * Verify that the container of the sidx segment can be parsed\n   * and if it can, get and parse that segment.\n   */\n\n  addSidxSegments_(playlist, startingState, cb) {\n    const sidxKey = playlist.sidx && generateSidxKey(playlist.sidx); // playlist lacks sidx or sidx segments were added to this playlist already.\n\n    if (!playlist.sidx || !sidxKey || this.mainPlaylistLoader_.sidxMapping_[sidxKey]) {\n      // keep this function async\n      window$1.clearTimeout(this.mediaRequest_);\n      this.mediaRequest_ = window$1.setTimeout(() => cb(false), 0);\n      return;\n    } // resolve the segment URL relative to the playlist\n\n    const uri = resolveManifestRedirect(playlist.sidx.resolvedUri);\n    const fin = (err, request) => {\n      if (this.requestErrored_(err, request, startingState)) {\n        return;\n      }\n      const sidxMapping = this.mainPlaylistLoader_.sidxMapping_;\n      const {\n        requestType\n      } = request;\n      let sidx;\n      try {\n        sidx = parseSidx(toUint8(request.response).subarray(8));\n      } catch (e) {\n        e.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request,\n          parseFailure: true\n        }); // sidx parsing failed.\n\n        this.requestErrored_(e, request, startingState);\n        return;\n      }\n      sidxMapping[sidxKey] = {\n        sidxInfo: playlist.sidx,\n        sidx\n      };\n      addSidxSegmentsToPlaylist(playlist, sidx, playlist.sidx.resolvedUri);\n      return cb(true);\n    };\n    const REQUEST_TYPE = 'dash-sidx';\n    this.request = containerRequest(uri, this.vhs_.xhr, (err, request, container, bytes) => {\n      if (err) {\n        return fin(err, request);\n      }\n      if (!container || container !== 'mp4') {\n        const sidxContainer = container || 'unknown';\n        return fin({\n          status: request.status,\n          message: `Unsupported ${sidxContainer} container type for sidx segment at URL: ${uri}`,\n          // response is just bytes in this case\n          // but we really don't want to return that.\n          response: '',\n          playlist,\n          internal: true,\n          playlistExclusionDuration: Infinity,\n          // MEDIA_ERR_NETWORK\n          code: 2\n        }, request);\n      } // if we already downloaded the sidx bytes in the container request, use them\n\n      const {\n        offset,\n        length\n      } = playlist.sidx.byterange;\n      if (bytes.length >= length + offset) {\n        return fin(err, {\n          response: bytes.subarray(offset, offset + length),\n          status: request.status,\n          uri: request.uri\n        });\n      } // otherwise request sidx bytes\n\n      this.request = this.vhs_.xhr({\n        uri,\n        responseType: 'arraybuffer',\n        requestType: 'dash-sidx',\n        headers: segmentXhrHeaders({\n          byterange: playlist.sidx.byterange\n        })\n      }, fin);\n    }, REQUEST_TYPE);\n  }\n  dispose() {\n    this.isPaused_ = true;\n    this.trigger('dispose');\n    this.stopRequest();\n    this.loadedPlaylists_ = {};\n    window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);\n    window$1.clearTimeout(this.mediaRequest_);\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    this.mediaRequest_ = null;\n    this.minimumUpdatePeriodTimeout_ = null;\n    if (this.mainPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n      this.mainPlaylistLoader_.createMupOnMedia_ = null;\n    }\n    this.off();\n  }\n  hasPendingRequest() {\n    return this.request || this.mediaRequest_;\n  }\n  stopRequest() {\n    if (this.request) {\n      const oldRequest = this.request;\n      this.request = null;\n      oldRequest.onreadystatechange = null;\n      oldRequest.abort();\n    }\n  }\n  media(playlist) {\n    // getter\n    if (!playlist) {\n      return this.media_;\n    } // setter\n\n    if (this.state === 'HAVE_NOTHING') {\n      throw new Error('Cannot switch media playlist from ' + this.state);\n    }\n    const startingState = this.state; // find the playlist object if the target playlist has been specified by URI\n\n    if (typeof playlist === 'string') {\n      if (!this.mainPlaylistLoader_.main.playlists[playlist]) {\n        throw new Error('Unknown playlist URI: ' + playlist);\n      }\n      playlist = this.mainPlaylistLoader_.main.playlists[playlist];\n    }\n    const mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to previously loaded playlists immediately\n\n    if (mediaChange && this.loadedPlaylists_[playlist.id] && this.loadedPlaylists_[playlist.id].endList) {\n      this.state = 'HAVE_METADATA';\n      this.media_ = playlist; // trigger media change if the active media has been updated\n\n      if (mediaChange) {\n        this.trigger('mediachanging');\n        this.trigger('mediachange');\n      }\n      return;\n    } // switching to the active playlist is a no-op\n\n    if (!mediaChange) {\n      return;\n    } // switching from an already loaded playlist\n\n    if (this.media_) {\n      this.trigger('mediachanging');\n    }\n    this.addSidxSegments_(playlist, startingState, sidxChanged => {\n      // everything is ready just continue to haveMetadata\n      this.haveMetadata({\n        startingState,\n        playlist\n      });\n    });\n  }\n  haveMetadata({\n    startingState,\n    playlist\n  }) {\n    this.state = 'HAVE_METADATA';\n    this.loadedPlaylists_[playlist.id] = playlist;\n    window$1.clearTimeout(this.mediaRequest_);\n    this.mediaRequest_ = null; // This will trigger loadedplaylist\n\n    this.refreshMedia_(playlist.id); // fire loadedmetadata the first time a media playlist is loaded\n    // to resolve setup of media groups\n\n    if (startingState === 'HAVE_MAIN_MANIFEST') {\n      this.trigger('loadedmetadata');\n    } else {\n      // trigger media change if the active media has been updated\n      this.trigger('mediachange');\n    }\n  }\n  pause() {\n    this.isPaused_ = true;\n    if (this.mainPlaylistLoader_.createMupOnMedia_) {\n      this.off('loadedmetadata', this.mainPlaylistLoader_.createMupOnMedia_);\n      this.mainPlaylistLoader_.createMupOnMedia_ = null;\n    }\n    this.stopRequest();\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    if (this.isMain_) {\n      window$1.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_);\n      this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_ = null;\n    }\n    if (this.state === 'HAVE_NOTHING') {\n      // If we pause the loader before any data has been retrieved, its as if we never\n      // started, so reset to an unstarted state.\n      this.started = false;\n    }\n  }\n  load(isFinalRendition) {\n    this.isPaused_ = false;\n    window$1.clearTimeout(this.mediaUpdateTimeout);\n    this.mediaUpdateTimeout = null;\n    const media = this.media();\n    if (isFinalRendition) {\n      const delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\n      this.mediaUpdateTimeout = window$1.setTimeout(() => this.load(), delay);\n      return;\n    } // because the playlists are internal to the manifest, load should either load the\n    // main manifest, or do nothing but trigger an event\n\n    if (!this.started) {\n      this.start();\n      return;\n    }\n    if (media && !media.endList) {\n      // Check to see if this is the main loader and the MUP was cleared (this happens\n      // when the loader was paused). `media` should be set at this point since one is always\n      // set during `start()`.\n      if (this.isMain_ && !this.minimumUpdatePeriodTimeout_) {\n        // Trigger minimumUpdatePeriod to refresh the main manifest\n        this.trigger('minimumUpdatePeriod'); // Since there was no prior minimumUpdatePeriodTimeout it should be recreated\n\n        this.updateMinimumUpdatePeriodTimeout_();\n      }\n      this.trigger('mediaupdatetimeout');\n    } else {\n      this.trigger('loadedplaylist');\n    }\n  }\n  start() {\n    this.started = true; // We don't need to request the main manifest again\n    // Call this asynchronously to match the xhr request behavior below\n\n    if (!this.isMain_) {\n      window$1.clearTimeout(this.mediaRequest_);\n      this.mediaRequest_ = window$1.setTimeout(() => this.haveMain_(), 0);\n      return;\n    }\n    this.requestMain_((req, mainChanged) => {\n      this.haveMain_();\n      if (!this.hasPendingRequest() && !this.media_) {\n        this.media(this.mainPlaylistLoader_.main.playlists[0]);\n      }\n    });\n  }\n  requestMain_(cb) {\n    const metadata = {\n      manifestInfo: {\n        uri: this.mainPlaylistLoader_.srcUrl\n      }\n    };\n    this.trigger({\n      type: 'manifestrequeststart',\n      metadata\n    });\n    this.request = this.vhs_.xhr({\n      uri: this.mainPlaylistLoader_.srcUrl,\n      withCredentials: this.withCredentials,\n      requestType: 'dash-manifest'\n    }, (error, req) => {\n      if (error) {\n        const {\n          requestType\n        } = req;\n        error.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request: req,\n          error\n        });\n      }\n      if (this.requestErrored_(error, req)) {\n        if (this.state === 'HAVE_NOTHING') {\n          this.started = false;\n        }\n        return;\n      }\n      this.trigger({\n        type: 'manifestrequestcomplete',\n        metadata\n      });\n      const mainChanged = req.responseText !== this.mainPlaylistLoader_.mainXml_;\n      this.mainPlaylistLoader_.mainXml_ = req.responseText;\n      if (req.responseHeaders && req.responseHeaders.date) {\n        this.mainLoaded_ = Date.parse(req.responseHeaders.date);\n      } else {\n        this.mainLoaded_ = Date.now();\n      }\n      this.mainPlaylistLoader_.srcUrl = resolveManifestRedirect(this.mainPlaylistLoader_.srcUrl, req);\n      if (mainChanged) {\n        this.handleMain_();\n        this.syncClientServerClock_(() => {\n          return cb(req, mainChanged);\n        });\n        return;\n      }\n      return cb(req, mainChanged);\n    });\n  }\n  /**\n   * Parses the main xml for UTCTiming node to sync the client clock to the server\n   * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\n   *\n   * @param {Function} done\n   *        Function to call when clock sync has completed\n   */\n\n  syncClientServerClock_(done) {\n    const utcTiming = parseUTCTiming(this.mainPlaylistLoader_.mainXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\n    // server clock\n\n    if (utcTiming === null) {\n      this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n      return done();\n    }\n    if (utcTiming.method === 'DIRECT') {\n      this.mainPlaylistLoader_.clientOffset_ = utcTiming.value - Date.now();\n      return done();\n    }\n    this.request = this.vhs_.xhr({\n      uri: resolveUrl(this.mainPlaylistLoader_.srcUrl, utcTiming.value),\n      method: utcTiming.method,\n      withCredentials: this.withCredentials,\n      requestType: 'dash-clock-sync'\n    }, (error, req) => {\n      // disposed\n      if (!this.request) {\n        return;\n      }\n      if (error) {\n        const {\n          requestType\n        } = req;\n        this.error.metadata = getStreamingNetworkErrorMetadata({\n          requestType,\n          request: req,\n          error\n        }); // sync request failed, fall back to using date header from mpd\n        // TODO: log warning\n\n        this.mainPlaylistLoader_.clientOffset_ = this.mainLoaded_ - Date.now();\n        return done();\n      }\n      let serverTime;\n      if (utcTiming.method === 'HEAD') {\n        if (!req.responseHeaders || !req.responseHeaders.date) {\n          // expected date header not preset, fall back to using date header from mpd\n          // TODO: log warning\n          serverTime = this.mainLoaded_;\n        } else {\n          serverTime = Date.parse(req.responseHeaders.date);\n        }\n      } else {\n        serverTime = Date.parse(req.responseText);\n      }\n      this.mainPlaylistLoader_.clientOffset_ = serverTime - Date.now();\n      done();\n    });\n  }\n  haveMain_() {\n    this.state = 'HAVE_MAIN_MANIFEST';\n    if (this.isMain_) {\n      // We have the main playlist at this point, so\n      // trigger this to allow PlaylistController\n      // to make an initial playlist selection\n      this.trigger('loadedplaylist');\n    } else if (!this.media_) {\n      // no media playlist was specifically selected so select\n      // the one the child playlist loader was created with\n      this.media(this.childPlaylist_);\n    }\n  }\n  handleMain_() {\n    // clear media request\n    window$1.clearTimeout(this.mediaRequest_);\n    this.mediaRequest_ = null;\n    const oldMain = this.mainPlaylistLoader_.main;\n    const metadata = {\n      manifestInfo: {\n        uri: this.mainPlaylistLoader_.srcUrl\n      }\n    };\n    this.trigger({\n      type: 'manifestparsestart',\n      metadata\n    });\n    let newMain;\n    try {\n      newMain = parseMainXml({\n        mainXml: this.mainPlaylistLoader_.mainXml_,\n        srcUrl: this.mainPlaylistLoader_.srcUrl,\n        clientOffset: this.mainPlaylistLoader_.clientOffset_,\n        sidxMapping: this.mainPlaylistLoader_.sidxMapping_,\n        previousManifest: oldMain\n      });\n    } catch (error) {\n      this.error = error;\n      this.error.metadata = {\n        errorType: videojs.Error.StreamingDashManifestParserError,\n        error\n      };\n      this.trigger('error');\n    } // if we have an old main to compare the new main against\n\n    if (oldMain) {\n      newMain = updateMain(oldMain, newMain, this.mainPlaylistLoader_.sidxMapping_);\n    } // only update main if we have a new main\n\n    this.mainPlaylistLoader_.main = newMain ? newMain : oldMain;\n    const location = this.mainPlaylistLoader_.main.locations && this.mainPlaylistLoader_.main.locations[0];\n    if (location && location !== this.mainPlaylistLoader_.srcUrl) {\n      this.mainPlaylistLoader_.srcUrl = location;\n    }\n    if (!oldMain || newMain && newMain.minimumUpdatePeriod !== oldMain.minimumUpdatePeriod) {\n      this.updateMinimumUpdatePeriodTimeout_();\n    }\n    this.addEventStreamToMetadataTrack_(newMain);\n    if (newMain) {\n      const {\n        duration,\n        endList\n      } = newMain;\n      const renditions = [];\n      newMain.playlists.forEach(playlist => {\n        renditions.push({\n          id: playlist.id,\n          bandwidth: playlist.attributes.BANDWIDTH,\n          resolution: playlist.attributes.RESOLUTION,\n          codecs: playlist.attributes.CODECS\n        });\n      });\n      const parsedManifest = {\n        duration,\n        isLive: !endList,\n        renditions\n      };\n      metadata.parsedManifest = parsedManifest;\n      this.trigger({\n        type: 'manifestparsecomplete',\n        metadata\n      });\n    }\n    return Boolean(newMain);\n  }\n  updateMinimumUpdatePeriodTimeout_() {\n    const mpl = this.mainPlaylistLoader_; // cancel any pending creation of mup on media\n    // a new one will be added if needed.\n\n    if (mpl.createMupOnMedia_) {\n      mpl.off('loadedmetadata', mpl.createMupOnMedia_);\n      mpl.createMupOnMedia_ = null;\n    } // clear any pending timeouts\n\n    if (mpl.minimumUpdatePeriodTimeout_) {\n      window$1.clearTimeout(mpl.minimumUpdatePeriodTimeout_);\n      mpl.minimumUpdatePeriodTimeout_ = null;\n    }\n    let mup = mpl.main && mpl.main.minimumUpdatePeriod; // If the minimumUpdatePeriod has a value of 0, that indicates that the current\n    // MPD has no future validity, so a new one will need to be acquired when new\n    // media segments are to be made available. Thus, we use the target duration\n    // in this case\n\n    if (mup === 0) {\n      if (mpl.media()) {\n        mup = mpl.media().targetDuration * 1000;\n      } else {\n        mpl.createMupOnMedia_ = mpl.updateMinimumUpdatePeriodTimeout_;\n        mpl.one('loadedmetadata', mpl.createMupOnMedia_);\n      }\n    } // if minimumUpdatePeriod is invalid or <= zero, which\n    // can happen when a live video becomes VOD. skip timeout\n    // creation.\n\n    if (typeof mup !== 'number' || mup <= 0) {\n      if (mup < 0) {\n        this.logger_(`found invalid minimumUpdatePeriod of ${mup}, not setting a timeout`);\n      }\n      return;\n    }\n    this.createMUPTimeout_(mup);\n  }\n  createMUPTimeout_(mup) {\n    const mpl = this.mainPlaylistLoader_;\n    mpl.minimumUpdatePeriodTimeout_ = window$1.setTimeout(() => {\n      mpl.minimumUpdatePeriodTimeout_ = null;\n      mpl.trigger('minimumUpdatePeriod');\n      mpl.createMUPTimeout_(mup);\n    }, mup);\n  }\n  /**\n   * Sends request to refresh the main xml and updates the parsed main manifest\n   */\n\n  refreshXml_() {\n    this.requestMain_((req, mainChanged) => {\n      if (!mainChanged) {\n        return;\n      }\n      if (this.media_) {\n        this.media_ = this.mainPlaylistLoader_.main.playlists[this.media_.id];\n      } // This will filter out updated sidx info from the mapping\n\n      this.mainPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.sidxMapping_);\n      this.addSidxSegments_(this.media(), this.state, sidxChanged => {\n        // TODO: do we need to reload the current playlist?\n        this.refreshMedia_(this.media().id);\n      });\n    });\n  }\n  /**\n   * Refreshes the media playlist by re-parsing the main xml and updating playlist\n   * references. If this is an alternate loader, the updated parsed manifest is retrieved\n   * from the main loader.\n   */\n\n  refreshMedia_(mediaID) {\n    if (!mediaID) {\n      throw new Error('refreshMedia_ must take a media id');\n    } // for main we have to reparse the main xml\n    // to re-create segments based on current timing values\n    // which may change media. We only skip updating the main manifest\n    // if this is the first time this.media_ is being set.\n    // as main was just parsed in that case.\n\n    if (this.media_ && this.isMain_) {\n      this.handleMain_();\n    }\n    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const mediaChanged = !this.media_ || this.media_ !== playlists[mediaID];\n    if (mediaChanged) {\n      this.media_ = playlists[mediaID];\n    } else {\n      this.trigger('playlistunchanged');\n    }\n    if (!this.mediaUpdateTimeout) {\n      const createMediaUpdateTimeout = () => {\n        if (this.media().endList) {\n          return;\n        }\n        this.mediaUpdateTimeout = window$1.setTimeout(() => {\n          this.trigger('mediaupdatetimeout');\n          createMediaUpdateTimeout();\n        }, refreshDelay(this.media(), Boolean(mediaChanged)));\n      };\n      createMediaUpdateTimeout();\n    }\n    this.trigger('loadedplaylist');\n  }\n  /**\n   * Takes eventstream data from a parsed DASH manifest and adds it to the metadata text track.\n   *\n   * @param {manifest} newMain the newly parsed manifest\n   */\n\n  addEventStreamToMetadataTrack_(newMain) {\n    // Only add new event stream metadata if we have a new manifest.\n    if (newMain && this.mainPlaylistLoader_.main.eventStream) {\n      // convert EventStream to ID3-like data.\n      const metadataArray = this.mainPlaylistLoader_.main.eventStream.map(eventStreamNode => {\n        return {\n          cueTime: eventStreamNode.start,\n          frames: [{\n            data: eventStreamNode.messageData\n          }]\n        };\n      });\n      this.addMetadataToTextTrack('EventStream', metadataArray, this.mainPlaylistLoader_.main.duration);\n    }\n  }\n  /**\n   * Returns the key ID set from a playlist\n   *\n   * @param {playlist} playlist to fetch the key ID set from.\n   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.\n   */\n\n  getKeyIdSet(playlist) {\n    if (playlist.contentProtection) {\n      const keyIds = new Set();\n      for (const keysystem in playlist.contentProtection) {\n        const defaultKID = playlist.contentProtection[keysystem].attributes['cenc:default_KID'];\n        if (defaultKID) {\n          // DASH keyIds are separated by dashes.\n          keyIds.add(defaultKID.replace(/-/g, '').toLowerCase());\n        }\n      }\n      return keyIds;\n    }\n  }\n}\nvar Config = {\n  GOAL_BUFFER_LENGTH: 30,\n  MAX_GOAL_BUFFER_LENGTH: 60,\n  BACK_BUFFER_LENGTH: 30,\n  GOAL_BUFFER_LENGTH_RATE: 1,\n  // 0.5 MB/s\n  INITIAL_BANDWIDTH: 4194304,\n  // A fudge factor to apply to advertised playlist bitrates to account for\n  // temporary flucations in client bandwidth\n  BANDWIDTH_VARIANCE: 1.2,\n  // How much of the buffer must be filled before we consider upswitching\n  BUFFER_LOW_WATER_LINE: 0,\n  MAX_BUFFER_LOW_WATER_LINE: 30,\n  // TODO: Remove this when experimentalBufferBasedABR is removed\n  EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE: 16,\n  BUFFER_LOW_WATER_LINE_RATE: 1,\n  // If the buffer is greater than the high water line, we won't switch down\n  BUFFER_HIGH_WATER_LINE: 30\n};\nconst stringToArrayBuffer = string => {\n  const view = new Uint8Array(new ArrayBuffer(string.length));\n  for (let i = 0; i < string.length; i++) {\n    view[i] = string.charCodeAt(i);\n  }\n  return view.buffer;\n};\n\n/* global Blob, BlobBuilder, Worker */\n// unify worker interface\nconst browserWorkerPolyFill = function (workerObj) {\n  // node only supports on/off\n  workerObj.on = workerObj.addEventListener;\n  workerObj.off = workerObj.removeEventListener;\n  return workerObj;\n};\nconst createObjectURL = function (str) {\n  try {\n    return URL.createObjectURL(new Blob([str], {\n      type: 'application/javascript'\n    }));\n  } catch (e) {\n    const blob = new BlobBuilder();\n    blob.append(str);\n    return URL.createObjectURL(blob.getBlob());\n  }\n};\nconst factory = function (code) {\n  return function () {\n    const objectUrl = createObjectURL(code);\n    const worker = browserWorkerPolyFill(new Worker(objectUrl));\n    worker.objURL = objectUrl;\n    const terminate = worker.terminate;\n    worker.on = worker.addEventListener;\n    worker.off = worker.removeEventListener;\n    worker.terminate = function () {\n      URL.revokeObjectURL(objectUrl);\n      return terminate.call(this);\n    };\n    return worker;\n  };\n};\nconst transform = function (code) {\n  return `var browserWorkerPolyFill = ${browserWorkerPolyFill.toString()};\\n` + 'browserWorkerPolyFill(self);\\n' + code;\n};\nconst getWorkerString = function (fn) {\n  return fn.toString().replace(/^function.+?{/, '').slice(0, -1);\n};\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\nconst workerCode$1 = transform(getWorkerString(function () {\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * A lightweight readable stream implemention that handles event dispatching.\n   * Objects that inherit from streams should call init in their constructors.\n   */\n\n  var Stream$8 = function () {\n    this.init = function () {\n      var listeners = {};\n      /**\n       * Add a listener for a specified event type.\n       * @param type {string} the event name\n       * @param listener {function} the callback to be invoked when an event of\n       * the specified type occurs\n       */\n\n      this.on = function (type, listener) {\n        if (!listeners[type]) {\n          listeners[type] = [];\n        }\n        listeners[type] = listeners[type].concat(listener);\n      };\n      /**\n       * Remove a listener for a specified event type.\n       * @param type {string} the event name\n       * @param listener {function} a function previously registered for this\n       * type of event through `on`\n       */\n\n      this.off = function (type, listener) {\n        var index;\n        if (!listeners[type]) {\n          return false;\n        }\n        index = listeners[type].indexOf(listener);\n        listeners[type] = listeners[type].slice();\n        listeners[type].splice(index, 1);\n        return index > -1;\n      };\n      /**\n       * Trigger an event of the specified type on this stream. Any additional\n       * arguments to this function are passed as parameters to event listeners.\n       * @param type {string} the event name\n       */\n\n      this.trigger = function (type) {\n        var callbacks, i, length, args;\n        callbacks = listeners[type];\n        if (!callbacks) {\n          return;\n        } // Slicing the arguments on every invocation of this method\n        // can add a significant amount of overhead. Avoid the\n        // intermediate object creation for the common case of a\n        // single callback argument\n\n        if (arguments.length === 2) {\n          length = callbacks.length;\n          for (i = 0; i < length; ++i) {\n            callbacks[i].call(this, arguments[1]);\n          }\n        } else {\n          args = [];\n          i = arguments.length;\n          for (i = 1; i < arguments.length; ++i) {\n            args.push(arguments[i]);\n          }\n          length = callbacks.length;\n          for (i = 0; i < length; ++i) {\n            callbacks[i].apply(this, args);\n          }\n        }\n      };\n      /**\n       * Destroys the stream and cleans up.\n       */\n\n      this.dispose = function () {\n        listeners = {};\n      };\n    };\n  };\n  /**\n   * Forwards all `data` events on this stream to the destination stream. The\n   * destination stream should provide a method `push` to receive the data\n   * events as they arrive.\n   * @param destination {stream} the stream that will receive all `data` events\n   * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n   *                            when the current stream emits a 'done' event\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n   */\n\n  Stream$8.prototype.pipe = function (destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n    this.on('done', function (flushSource) {\n      destination.flush(flushSource);\n    });\n    this.on('partialdone', function (flushSource) {\n      destination.partialFlush(flushSource);\n    });\n    this.on('endedtimeline', function (flushSource) {\n      destination.endTimeline(flushSource);\n    });\n    this.on('reset', function (flushSource) {\n      destination.reset(flushSource);\n    });\n    return destination;\n  }; // Default stream functions that are expected to be overridden to perform\n  // actual work. These are provided by the prototype as a sort of no-op\n  // implementation so that we don't have to check for their existence in the\n  // `pipe` function above.\n\n  Stream$8.prototype.push = function (data) {\n    this.trigger('data', data);\n  };\n  Stream$8.prototype.flush = function (flushSource) {\n    this.trigger('done', flushSource);\n  };\n  Stream$8.prototype.partialFlush = function (flushSource) {\n    this.trigger('partialdone', flushSource);\n  };\n  Stream$8.prototype.endTimeline = function (flushSource) {\n    this.trigger('endedtimeline', flushSource);\n  };\n  Stream$8.prototype.reset = function (flushSource) {\n    this.trigger('reset', flushSource);\n  };\n  var stream = Stream$8;\n  var MAX_UINT32$1 = Math.pow(2, 32);\n  var getUint64$5 = function (uint8) {\n    var dv = new DataView(uint8.buffer, uint8.byteOffset, uint8.byteLength);\n    var value;\n    if (dv.getBigUint64) {\n      value = dv.getBigUint64(0);\n      if (value < Number.MAX_SAFE_INTEGER) {\n        return Number(value);\n      }\n      return value;\n    }\n    return dv.getUint32(0) * MAX_UINT32$1 + dv.getUint32(4);\n  };\n  var numbers = {\n    getUint64: getUint64$5,\n    MAX_UINT32: MAX_UINT32$1\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Functions that generate fragmented MP4s suitable for use with Media\n   * Source Extensions.\n   */\n\n  var MAX_UINT32 = numbers.MAX_UINT32;\n  var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun$1, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\n\n  (function () {\n    var i;\n    types = {\n      avc1: [],\n      // codingname\n      avcC: [],\n      btrt: [],\n      dinf: [],\n      dref: [],\n      esds: [],\n      ftyp: [],\n      hdlr: [],\n      mdat: [],\n      mdhd: [],\n      mdia: [],\n      mfhd: [],\n      minf: [],\n      moof: [],\n      moov: [],\n      mp4a: [],\n      // codingname\n      mvex: [],\n      mvhd: [],\n      pasp: [],\n      sdtp: [],\n      smhd: [],\n      stbl: [],\n      stco: [],\n      stsc: [],\n      stsd: [],\n      stsz: [],\n      stts: [],\n      styp: [],\n      tfdt: [],\n      tfhd: [],\n      traf: [],\n      trak: [],\n      trun: [],\n      trex: [],\n      tkhd: [],\n      vmhd: []\n    }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\n    // don't throw an error\n\n    if (typeof Uint8Array === 'undefined') {\n      return;\n    }\n    for (i in types) {\n      if (types.hasOwnProperty(i)) {\n        types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n      }\n    }\n    MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\n    AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\n    MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\n    VIDEO_HDLR = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x00,\n    // pre_defined\n    0x76, 0x69, 0x64, 0x65,\n    // handler_type: 'vide'\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n    ]);\n    AUDIO_HDLR = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x00,\n    // pre_defined\n    0x73, 0x6f, 0x75, 0x6e,\n    // handler_type: 'soun'\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n    ]);\n    HDLR_TYPES = {\n      video: VIDEO_HDLR,\n      audio: AUDIO_HDLR\n    };\n    DREF = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x01,\n    // entry_count\n    0x00, 0x00, 0x00, 0x0c,\n    // entry_size\n    0x75, 0x72, 0x6c, 0x20,\n    // 'url' type\n    0x00,\n    // version 0\n    0x00, 0x00, 0x01 // entry_flags\n    ]);\n    SMHD = new Uint8Array([0x00,\n    // version\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00,\n    // balance, 0 means centered\n    0x00, 0x00 // reserved\n    ]);\n    STCO = new Uint8Array([0x00,\n    // version\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x00 // entry_count\n    ]);\n    STSC = STCO;\n    STSZ = new Uint8Array([0x00,\n    // version\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x00,\n    // sample_size\n    0x00, 0x00, 0x00, 0x00 // sample_count\n    ]);\n    STTS = STCO;\n    VMHD = new Uint8Array([0x00,\n    // version\n    0x00, 0x00, 0x01,\n    // flags\n    0x00, 0x00,\n    // graphicsmode\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n    ]);\n  })();\n  box = function (type) {\n    var payload = [],\n      size = 0,\n      i,\n      result,\n      view;\n    for (i = 1; i < arguments.length; i++) {\n      payload.push(arguments[i]);\n    }\n    i = payload.length; // calculate the total size we need to allocate\n\n    while (i--) {\n      size += payload[i].byteLength;\n    }\n    result = new Uint8Array(size + 8);\n    view = new DataView(result.buffer, result.byteOffset, result.byteLength);\n    view.setUint32(0, result.byteLength);\n    result.set(type, 4); // copy the payload into the result\n\n    for (i = 0, size = 8; i < payload.length; i++) {\n      result.set(payload[i], size);\n      size += payload[i].byteLength;\n    }\n    return result;\n  };\n  dinf = function () {\n    return box(types.dinf, box(types.dref, DREF));\n  };\n  esds = function (track) {\n    return box(types.esds, new Uint8Array([0x00,\n    // version\n    0x00, 0x00, 0x00,\n    // flags\n    // ES_Descriptor\n    0x03,\n    // tag, ES_DescrTag\n    0x19,\n    // length\n    0x00, 0x00,\n    // ES_ID\n    0x00,\n    // streamDependenceFlag, URL_flag, reserved, streamPriority\n    // DecoderConfigDescriptor\n    0x04,\n    // tag, DecoderConfigDescrTag\n    0x11,\n    // length\n    0x40,\n    // object type\n    0x15,\n    // streamType\n    0x00, 0x06, 0x00,\n    // bufferSizeDB\n    0x00, 0x00, 0xda, 0xc0,\n    // maxBitrate\n    0x00, 0x00, 0xda, 0xc0,\n    // avgBitrate\n    // DecoderSpecificInfo\n    0x05,\n    // tag, DecoderSpecificInfoTag\n    0x02,\n    // length\n    // ISO/IEC 14496-3, AudioSpecificConfig\n    // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\n    track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\n    ]));\n  };\n  ftyp = function () {\n    return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\n  };\n  hdlr = function (type) {\n    return box(types.hdlr, HDLR_TYPES[type]);\n  };\n  mdat = function (data) {\n    return box(types.mdat, data);\n  };\n  mdhd = function (track) {\n    var result = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x02,\n    // creation_time\n    0x00, 0x00, 0x00, 0x03,\n    // modification_time\n    0x00, 0x01, 0x5f, 0x90,\n    // timescale, 90,000 \"ticks\" per second\n    track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF,\n    // duration\n    0x55, 0xc4,\n    // 'und' language (undetermined)\n    0x00, 0x00]); // Use the sample rate from the track metadata, when it is\n    // defined. The sample rate can be parsed out of an ADTS header, for\n    // instance.\n\n    if (track.samplerate) {\n      result[12] = track.samplerate >>> 24 & 0xFF;\n      result[13] = track.samplerate >>> 16 & 0xFF;\n      result[14] = track.samplerate >>> 8 & 0xFF;\n      result[15] = track.samplerate & 0xFF;\n    }\n    return box(types.mdhd, result);\n  };\n  mdia = function (track) {\n    return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n  };\n  mfhd = function (sequenceNumber) {\n    return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00,\n    // flags\n    (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\n    ]));\n  };\n  minf = function (track) {\n    return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\n  };\n  moof = function (sequenceNumber, tracks) {\n    var trackFragments = [],\n      i = tracks.length; // build traf boxes for each track fragment\n\n    while (i--) {\n      trackFragments[i] = traf(tracks[i]);\n    }\n    return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\n  };\n  /**\n   * Returns a movie box.\n   * @param tracks {array} the tracks associated with this movie\n   * @see ISO/IEC 14496-12:2012(E), section 8.2.1\n   */\n\n  moov = function (tracks) {\n    var i = tracks.length,\n      boxes = [];\n    while (i--) {\n      boxes[i] = trak(tracks[i]);\n    }\n    return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\n  };\n  mvex = function (tracks) {\n    var i = tracks.length,\n      boxes = [];\n    while (i--) {\n      boxes[i] = trex(tracks[i]);\n    }\n    return box.apply(null, [types.mvex].concat(boxes));\n  };\n  mvhd = function (duration) {\n    var bytes = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x00,\n    // flags\n    0x00, 0x00, 0x00, 0x01,\n    // creation_time\n    0x00, 0x00, 0x00, 0x02,\n    // modification_time\n    0x00, 0x01, 0x5f, 0x90,\n    // timescale, 90,000 \"ticks\" per second\n    (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF,\n    // duration\n    0x00, 0x01, 0x00, 0x00,\n    // 1.0 rate\n    0x01, 0x00,\n    // 1.0 volume\n    0x00, 0x00,\n    // reserved\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,\n    // transformation: unity matrix\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    // pre_defined\n    0xff, 0xff, 0xff, 0xff // next_track_ID\n    ]);\n    return box(types.mvhd, bytes);\n  };\n  sdtp = function (track) {\n    var samples = track.samples || [],\n      bytes = new Uint8Array(4 + samples.length),\n      flags,\n      i; // leave the full box header (4 bytes) all zero\n    // write the sample table\n\n    for (i = 0; i < samples.length; i++) {\n      flags = samples[i].flags;\n      bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n    }\n    return box(types.sdtp, bytes);\n  };\n  stbl = function (track) {\n    return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\n  };\n  (function () {\n    var videoSample, audioSample;\n    stsd = function (track) {\n      return box(types.stsd, new Uint8Array([0x00,\n      // version 0\n      0x00, 0x00, 0x00,\n      // flags\n      0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\n    };\n    videoSample = function (track) {\n      var sps = track.sps || [],\n        pps = track.pps || [],\n        sequenceParameterSets = [],\n        pictureParameterSets = [],\n        i,\n        avc1Box; // assemble the SPSs\n\n      for (i = 0; i < sps.length; i++) {\n        sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\n        sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\n\n        sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\n      } // assemble the PPSs\n\n      for (i = 0; i < pps.length; i++) {\n        pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\n        pictureParameterSets.push(pps[i].byteLength & 0xFF);\n        pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\n      }\n      avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x01,\n      // data_reference_index\n      0x00, 0x00,\n      // pre_defined\n      0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      // pre_defined\n      (track.width & 0xff00) >> 8, track.width & 0xff,\n      // width\n      (track.height & 0xff00) >> 8, track.height & 0xff,\n      // height\n      0x00, 0x48, 0x00, 0x00,\n      // horizresolution\n      0x00, 0x48, 0x00, 0x00,\n      // vertresolution\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x01,\n      // frame_count\n      0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      // compressorname\n      0x00, 0x18,\n      // depth = 24\n      0x11, 0x11 // pre_defined = -1\n      ]), box(types.avcC, new Uint8Array([0x01,\n      // configurationVersion\n      track.profileIdc,\n      // AVCProfileIndication\n      track.profileCompatibility,\n      // profile_compatibility\n      track.levelIdc,\n      // AVCLevelIndication\n      0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n      ].concat([sps.length],\n      // numOfSequenceParameterSets\n      sequenceParameterSets,\n      // \"SPS\"\n      [pps.length],\n      // numOfPictureParameterSets\n      pictureParameterSets // \"PPS\"\n      ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80,\n      // bufferSizeDB\n      0x00, 0x2d, 0xc6, 0xc0,\n      // maxBitrate\n      0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\n      ]))];\n      if (track.sarRatio) {\n        var hSpacing = track.sarRatio[0],\n          vSpacing = track.sarRatio[1];\n        avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\n      }\n      return box.apply(null, avc1Box);\n    };\n    audioSample = function (track) {\n      return box(types.mp4a, new Uint8Array([\n      // SampleEntry, ISO/IEC 14496-12\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x01,\n      // data_reference_index\n      // AudioSampleEntry, ISO/IEC 14496-12\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      0x00, 0x00, 0x00, 0x00,\n      // reserved\n      (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff,\n      // channelcount\n      (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff,\n      // samplesize\n      0x00, 0x00,\n      // pre_defined\n      0x00, 0x00,\n      // reserved\n      (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\n      // MP4AudioSampleEntry, ISO/IEC 14496-14\n      ]), esds(track));\n    };\n  })();\n  tkhd = function (track) {\n    var result = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x07,\n    // flags\n    0x00, 0x00, 0x00, 0x00,\n    // creation_time\n    0x00, 0x00, 0x00, 0x00,\n    // modification_time\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n    // track_ID\n    0x00, 0x00, 0x00, 0x00,\n    // reserved\n    (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF,\n    // duration\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    // reserved\n    0x00, 0x00,\n    // layer\n    0x00, 0x00,\n    // alternate_group\n    0x01, 0x00,\n    // non-audio track volume\n    0x00, 0x00,\n    // reserved\n    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,\n    // transformation: unity matrix\n    (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00,\n    // width\n    (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\n    ]);\n    return box(types.tkhd, result);\n  };\n  /**\n   * Generate a track fragment (traf) box. A traf box collects metadata\n   * about tracks in a movie fragment (moof) box.\n   */\n\n  traf = function (track) {\n    var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n    trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x3a,\n    // flags\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n    // track_ID\n    0x00, 0x00, 0x00, 0x01,\n    // sample_description_index\n    0x00, 0x00, 0x00, 0x00,\n    // default_sample_duration\n    0x00, 0x00, 0x00, 0x00,\n    // default_sample_size\n    0x00, 0x00, 0x00, 0x00 // default_sample_flags\n    ]));\n    upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / MAX_UINT32);\n    lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % MAX_UINT32);\n    trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01,\n    // version 1\n    0x00, 0x00, 0x00,\n    // flags\n    // baseMediaDecodeTime\n    upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\n    // the containing moof to the first payload byte of the associated\n    // mdat\n\n    dataOffset = 32 +\n    // tfhd\n    20 +\n    // tfdt\n    8 +\n    // traf header\n    16 +\n    // mfhd\n    8 +\n    // moof header\n    8; // mdat header\n    // audio tracks require less metadata\n\n    if (track.type === 'audio') {\n      trackFragmentRun = trun$1(track, dataOffset);\n      return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\n    } // video tracks should contain an independent and disposable samples\n    // box (sdtp)\n    // generate one and adjust offsets to match\n\n    sampleDependencyTable = sdtp(track);\n    trackFragmentRun = trun$1(track, sampleDependencyTable.length + dataOffset);\n    return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\n  };\n  /**\n   * Generate a track box.\n   * @param track {object} a track definition\n   * @return {Uint8Array} the track box\n   */\n\n  trak = function (track) {\n    track.duration = track.duration || 0xffffffff;\n    return box(types.trak, tkhd(track), mdia(track));\n  };\n  trex = function (track) {\n    var result = new Uint8Array([0x00,\n    // version 0\n    0x00, 0x00, 0x00,\n    // flags\n    (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF,\n    // track_ID\n    0x00, 0x00, 0x00, 0x01,\n    // default_sample_description_index\n    0x00, 0x00, 0x00, 0x00,\n    // default_sample_duration\n    0x00, 0x00, 0x00, 0x00,\n    // default_sample_size\n    0x00, 0x01, 0x00, 0x01 // default_sample_flags\n    ]); // the last two bytes of default_sample_flags is the sample\n    // degradation priority, a hint about the importance of this sample\n    // relative to others. Lower the degradation priority for all sample\n    // types other than video.\n\n    if (track.type !== 'video') {\n      result[result.length - 1] = 0x00;\n    }\n    return box(types.trex, result);\n  };\n  (function () {\n    var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\n    // duration is present for the first sample, it will be present for\n    // all subsequent samples.\n    // see ISO/IEC 14496-12:2012, Section 8.8.8.1\n\n    trunHeader = function (samples, offset) {\n      var durationPresent = 0,\n        sizePresent = 0,\n        flagsPresent = 0,\n        compositionTimeOffset = 0; // trun flag constants\n\n      if (samples.length) {\n        if (samples[0].duration !== undefined) {\n          durationPresent = 0x1;\n        }\n        if (samples[0].size !== undefined) {\n          sizePresent = 0x2;\n        }\n        if (samples[0].flags !== undefined) {\n          flagsPresent = 0x4;\n        }\n        if (samples[0].compositionTimeOffset !== undefined) {\n          compositionTimeOffset = 0x8;\n        }\n      }\n      return [0x00,\n      // version 0\n      0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01,\n      // flags\n      (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF,\n      // sample_count\n      (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\n      ];\n    };\n    videoTrun = function (track, offset) {\n      var bytesOffest, bytes, header, samples, sample, i;\n      samples = track.samples || [];\n      offset += 8 + 12 + 16 * samples.length;\n      header = trunHeader(samples, offset);\n      bytes = new Uint8Array(header.length + samples.length * 16);\n      bytes.set(header);\n      bytesOffest = header.length;\n      for (i = 0; i < samples.length; i++) {\n        sample = samples[i];\n        bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n        bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n\n        bytes[bytesOffest++] = sample.flags.isLeading << 2 | sample.flags.dependsOn;\n        bytes[bytesOffest++] = sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample;\n        bytes[bytesOffest++] = sample.flags.degradationPriority & 0xF0 << 8;\n        bytes[bytesOffest++] = sample.flags.degradationPriority & 0x0F; // sample_flags\n\n        bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.compositionTimeOffset & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.compositionTimeOffset & 0xFF; // sample_composition_time_offset\n      }\n      return box(types.trun, bytes);\n    };\n    audioTrun = function (track, offset) {\n      var bytes, bytesOffest, header, samples, sample, i;\n      samples = track.samples || [];\n      offset += 8 + 12 + 8 * samples.length;\n      header = trunHeader(samples, offset);\n      bytes = new Uint8Array(header.length + samples.length * 8);\n      bytes.set(header);\n      bytesOffest = header.length;\n      for (i = 0; i < samples.length; i++) {\n        sample = samples[i];\n        bytes[bytesOffest++] = (sample.duration & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.duration & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.duration & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.duration & 0xFF; // sample_duration\n\n        bytes[bytesOffest++] = (sample.size & 0xFF000000) >>> 24;\n        bytes[bytesOffest++] = (sample.size & 0xFF0000) >>> 16;\n        bytes[bytesOffest++] = (sample.size & 0xFF00) >>> 8;\n        bytes[bytesOffest++] = sample.size & 0xFF; // sample_size\n      }\n      return box(types.trun, bytes);\n    };\n    trun$1 = function (track, offset) {\n      if (track.type === 'audio') {\n        return audioTrun(track, offset);\n      }\n      return videoTrun(track, offset);\n    };\n  })();\n  var mp4Generator = {\n    ftyp: ftyp,\n    mdat: mdat,\n    moof: moof,\n    moov: moov,\n    initSegment: function (tracks) {\n      var fileType = ftyp(),\n        movie = moov(tracks),\n        result;\n      result = new Uint8Array(fileType.byteLength + movie.byteLength);\n      result.set(fileType);\n      result.set(movie, fileType.byteLength);\n      return result;\n    }\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n  // composed of the nal units that make up that frame\n  // Also keep track of cummulative data about the frame from the nal units such\n  // as the frame duration, starting pts, etc.\n\n  var groupNalsIntoFrames = function (nalUnits) {\n    var i,\n      currentNal,\n      currentFrame = [],\n      frames = []; // TODO added for LHLS, make sure this is OK\n\n    frames.byteLength = 0;\n    frames.nalCount = 0;\n    frames.duration = 0;\n    currentFrame.byteLength = 0;\n    for (i = 0; i < nalUnits.length; i++) {\n      currentNal = nalUnits[i]; // Split on 'aud'-type nal units\n\n      if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\n        // Since the very first nal unit is expected to be an AUD\n        // only push to the frames array when currentFrame is not empty\n        if (currentFrame.length) {\n          currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\n\n          frames.byteLength += currentFrame.byteLength;\n          frames.nalCount += currentFrame.length;\n          frames.duration += currentFrame.duration;\n          frames.push(currentFrame);\n        }\n        currentFrame = [currentNal];\n        currentFrame.byteLength = currentNal.data.byteLength;\n        currentFrame.pts = currentNal.pts;\n        currentFrame.dts = currentNal.dts;\n      } else {\n        // Specifically flag key frames for ease of use later\n        if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\n          currentFrame.keyFrame = true;\n        }\n        currentFrame.duration = currentNal.dts - currentFrame.dts;\n        currentFrame.byteLength += currentNal.data.byteLength;\n        currentFrame.push(currentNal);\n      }\n    } // For the last frame, use the duration of the previous frame if we\n    // have nothing better to go on\n\n    if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\n      currentFrame.duration = frames[frames.length - 1].duration;\n    } // Push the final frame\n    // TODO added for LHLS, make sure this is OK\n\n    frames.byteLength += currentFrame.byteLength;\n    frames.nalCount += currentFrame.length;\n    frames.duration += currentFrame.duration;\n    frames.push(currentFrame);\n    return frames;\n  }; // Convert an array of frames into an array of Gop with each Gop being composed\n  // of the frames that make up that Gop\n  // Also keep track of cummulative data about the Gop from the frames such as the\n  // Gop duration, starting pts, etc.\n\n  var groupFramesIntoGops = function (frames) {\n    var i,\n      currentFrame,\n      currentGop = [],\n      gops = []; // We must pre-set some of the values on the Gop since we\n    // keep running totals of these values\n\n    currentGop.byteLength = 0;\n    currentGop.nalCount = 0;\n    currentGop.duration = 0;\n    currentGop.pts = frames[0].pts;\n    currentGop.dts = frames[0].dts; // store some metadata about all the Gops\n\n    gops.byteLength = 0;\n    gops.nalCount = 0;\n    gops.duration = 0;\n    gops.pts = frames[0].pts;\n    gops.dts = frames[0].dts;\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n      if (currentFrame.keyFrame) {\n        // Since the very first frame is expected to be an keyframe\n        // only push to the gops array when currentGop is not empty\n        if (currentGop.length) {\n          gops.push(currentGop);\n          gops.byteLength += currentGop.byteLength;\n          gops.nalCount += currentGop.nalCount;\n          gops.duration += currentGop.duration;\n        }\n        currentGop = [currentFrame];\n        currentGop.nalCount = currentFrame.length;\n        currentGop.byteLength = currentFrame.byteLength;\n        currentGop.pts = currentFrame.pts;\n        currentGop.dts = currentFrame.dts;\n        currentGop.duration = currentFrame.duration;\n      } else {\n        currentGop.duration += currentFrame.duration;\n        currentGop.nalCount += currentFrame.length;\n        currentGop.byteLength += currentFrame.byteLength;\n        currentGop.push(currentFrame);\n      }\n    }\n    if (gops.length && currentGop.duration <= 0) {\n      currentGop.duration = gops[gops.length - 1].duration;\n    }\n    gops.byteLength += currentGop.byteLength;\n    gops.nalCount += currentGop.nalCount;\n    gops.duration += currentGop.duration; // push the final Gop\n\n    gops.push(currentGop);\n    return gops;\n  };\n  /*\n   * Search for the first keyframe in the GOPs and throw away all frames\n   * until that keyframe. Then extend the duration of the pulled keyframe\n   * and pull the PTS and DTS of the keyframe so that it covers the time\n   * range of the frames that were disposed.\n   *\n   * @param {Array} gops video GOPs\n   * @returns {Array} modified video GOPs\n   */\n\n  var extendFirstKeyFrame = function (gops) {\n    var currentGop;\n    if (!gops[0][0].keyFrame && gops.length > 1) {\n      // Remove the first GOP\n      currentGop = gops.shift();\n      gops.byteLength -= currentGop.byteLength;\n      gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\n      // first gop to cover the time period of the\n      // frames we just removed\n\n      gops[0][0].dts = currentGop.dts;\n      gops[0][0].pts = currentGop.pts;\n      gops[0][0].duration += currentGop.duration;\n    }\n    return gops;\n  };\n  /**\n   * Default sample object\n   * see ISO/IEC 14496-12:2012, section 8.6.4.3\n   */\n\n  var createDefaultSample = function () {\n    return {\n      size: 0,\n      flags: {\n        isLeading: 0,\n        dependsOn: 1,\n        isDependedOn: 0,\n        hasRedundancy: 0,\n        degradationPriority: 0,\n        isNonSyncSample: 1\n      }\n    };\n  };\n  /*\n   * Collates information from a video frame into an object for eventual\n   * entry into an MP4 sample table.\n   *\n   * @param {Object} frame the video frame\n   * @param {Number} dataOffset the byte offset to position the sample\n   * @return {Object} object containing sample table info for a frame\n   */\n\n  var sampleForFrame = function (frame, dataOffset) {\n    var sample = createDefaultSample();\n    sample.dataOffset = dataOffset;\n    sample.compositionTimeOffset = frame.pts - frame.dts;\n    sample.duration = frame.duration;\n    sample.size = 4 * frame.length; // Space for nal unit size\n\n    sample.size += frame.byteLength;\n    if (frame.keyFrame) {\n      sample.flags.dependsOn = 2;\n      sample.flags.isNonSyncSample = 0;\n    }\n    return sample;\n  }; // generate the track's sample table from an array of gops\n\n  var generateSampleTable$1 = function (gops, baseDataOffset) {\n    var h,\n      i,\n      sample,\n      currentGop,\n      currentFrame,\n      dataOffset = baseDataOffset || 0,\n      samples = [];\n    for (h = 0; h < gops.length; h++) {\n      currentGop = gops[h];\n      for (i = 0; i < currentGop.length; i++) {\n        currentFrame = currentGop[i];\n        sample = sampleForFrame(currentFrame, dataOffset);\n        dataOffset += sample.size;\n        samples.push(sample);\n      }\n    }\n    return samples;\n  }; // generate the track's raw mdat data from an array of gops\n\n  var concatenateNalData = function (gops) {\n    var h,\n      i,\n      j,\n      currentGop,\n      currentFrame,\n      currentNal,\n      dataOffset = 0,\n      nalsByteLength = gops.byteLength,\n      numberOfNals = gops.nalCount,\n      totalByteLength = nalsByteLength + 4 * numberOfNals,\n      data = new Uint8Array(totalByteLength),\n      view = new DataView(data.buffer); // For each Gop..\n\n    for (h = 0; h < gops.length; h++) {\n      currentGop = gops[h]; // For each Frame..\n\n      for (i = 0; i < currentGop.length; i++) {\n        currentFrame = currentGop[i]; // For each NAL..\n\n        for (j = 0; j < currentFrame.length; j++) {\n          currentNal = currentFrame[j];\n          view.setUint32(dataOffset, currentNal.data.byteLength);\n          dataOffset += 4;\n          data.set(currentNal.data, dataOffset);\n          dataOffset += currentNal.data.byteLength;\n        }\n      }\n    }\n    return data;\n  }; // generate the track's sample table from a frame\n\n  var generateSampleTableForFrame = function (frame, baseDataOffset) {\n    var sample,\n      dataOffset = baseDataOffset || 0,\n      samples = [];\n    sample = sampleForFrame(frame, dataOffset);\n    samples.push(sample);\n    return samples;\n  }; // generate the track's raw mdat data from a frame\n\n  var concatenateNalDataForFrame = function (frame) {\n    var i,\n      currentNal,\n      dataOffset = 0,\n      nalsByteLength = frame.byteLength,\n      numberOfNals = frame.length,\n      totalByteLength = nalsByteLength + 4 * numberOfNals,\n      data = new Uint8Array(totalByteLength),\n      view = new DataView(data.buffer); // For each NAL..\n\n    for (i = 0; i < frame.length; i++) {\n      currentNal = frame[i];\n      view.setUint32(dataOffset, currentNal.data.byteLength);\n      dataOffset += 4;\n      data.set(currentNal.data, dataOffset);\n      dataOffset += currentNal.data.byteLength;\n    }\n    return data;\n  };\n  var frameUtils$1 = {\n    groupNalsIntoFrames: groupNalsIntoFrames,\n    groupFramesIntoGops: groupFramesIntoGops,\n    extendFirstKeyFrame: extendFirstKeyFrame,\n    generateSampleTable: generateSampleTable$1,\n    concatenateNalData: concatenateNalData,\n    generateSampleTableForFrame: generateSampleTableForFrame,\n    concatenateNalDataForFrame: concatenateNalDataForFrame\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var highPrefix = [33, 16, 5, 32, 164, 27];\n  var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\n  var zeroFill = function (count) {\n    var a = [];\n    while (count--) {\n      a.push(0);\n    }\n    return a;\n  };\n  var makeTable = function (metaTable) {\n    return Object.keys(metaTable).reduce(function (obj, key) {\n      obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\n        return arr.concat(part);\n      }, []));\n      return obj;\n    }, {});\n  };\n  var silence;\n  var silence_1 = function () {\n    if (!silence) {\n      // Frames-of-silence to use for filling in missing AAC frames\n      var coneOfSilence = {\n        96000: [highPrefix, [227, 64], zeroFill(154), [56]],\n        88200: [highPrefix, [231], zeroFill(170), [56]],\n        64000: [highPrefix, [248, 192], zeroFill(240), [56]],\n        48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\n        44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\n        32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\n        24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\n        16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\n        12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\n        11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\n        8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\n      };\n      silence = makeTable(coneOfSilence);\n    }\n    return silence;\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var ONE_SECOND_IN_TS$4 = 90000,\n    // 90kHz clock\n    secondsToVideoTs,\n    secondsToAudioTs,\n    videoTsToSeconds,\n    audioTsToSeconds,\n    audioTsToVideoTs,\n    videoTsToAudioTs,\n    metadataTsToSeconds;\n  secondsToVideoTs = function (seconds) {\n    return seconds * ONE_SECOND_IN_TS$4;\n  };\n  secondsToAudioTs = function (seconds, sampleRate) {\n    return seconds * sampleRate;\n  };\n  videoTsToSeconds = function (timestamp) {\n    return timestamp / ONE_SECOND_IN_TS$4;\n  };\n  audioTsToSeconds = function (timestamp, sampleRate) {\n    return timestamp / sampleRate;\n  };\n  audioTsToVideoTs = function (timestamp, sampleRate) {\n    return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\n  };\n  videoTsToAudioTs = function (timestamp, sampleRate) {\n    return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\n  };\n  /**\n   * Adjust ID3 tag or caption timing information by the timeline pts values\n   * (if keepOriginalTimestamps is false) and convert to seconds\n   */\n\n  metadataTsToSeconds = function (timestamp, timelineStartPts, keepOriginalTimestamps) {\n    return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\n  };\n  var clock$2 = {\n    ONE_SECOND_IN_TS: ONE_SECOND_IN_TS$4,\n    secondsToVideoTs: secondsToVideoTs,\n    secondsToAudioTs: secondsToAudioTs,\n    videoTsToSeconds: videoTsToSeconds,\n    audioTsToSeconds: audioTsToSeconds,\n    audioTsToVideoTs: audioTsToVideoTs,\n    videoTsToAudioTs: videoTsToAudioTs,\n    metadataTsToSeconds: metadataTsToSeconds\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var coneOfSilence = silence_1;\n  var clock$1 = clock$2;\n  /**\n   * Sum the `byteLength` properties of the data in each AAC frame\n   */\n\n  var sumFrameByteLengths = function (array) {\n    var i,\n      currentObj,\n      sum = 0; // sum the byteLength's all each nal unit in the frame\n\n    for (i = 0; i < array.length; i++) {\n      currentObj = array[i];\n      sum += currentObj.data.byteLength;\n    }\n    return sum;\n  }; // Possibly pad (prefix) the audio track with silence if appending this track\n  // would lead to the introduction of a gap in the audio buffer\n\n  var prefixWithSilence = function (track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\n    var baseMediaDecodeTimeTs,\n      frameDuration = 0,\n      audioGapDuration = 0,\n      audioFillFrameCount = 0,\n      audioFillDuration = 0,\n      silentFrame,\n      i,\n      firstFrame;\n    if (!frames.length) {\n      return;\n    }\n    baseMediaDecodeTimeTs = clock$1.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\n\n    frameDuration = Math.ceil(clock$1.ONE_SECOND_IN_TS / (track.samplerate / 1024));\n    if (audioAppendStartTs && videoBaseMediaDecodeTime) {\n      // insert the shortest possible amount (audio gap or audio to video gap)\n      audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\n\n      audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\n      audioFillDuration = audioFillFrameCount * frameDuration;\n    } // don't attempt to fill gaps smaller than a single frame or larger\n    // than a half second\n\n    if (audioFillFrameCount < 1 || audioFillDuration > clock$1.ONE_SECOND_IN_TS / 2) {\n      return;\n    }\n    silentFrame = coneOfSilence()[track.samplerate];\n    if (!silentFrame) {\n      // we don't have a silent frame pregenerated for the sample rate, so use a frame\n      // from the content instead\n      silentFrame = frames[0].data;\n    }\n    for (i = 0; i < audioFillFrameCount; i++) {\n      firstFrame = frames[0];\n      frames.splice(0, 0, {\n        data: silentFrame,\n        dts: firstFrame.dts - frameDuration,\n        pts: firstFrame.pts - frameDuration\n      });\n    }\n    track.baseMediaDecodeTime -= Math.floor(clock$1.videoTsToAudioTs(audioFillDuration, track.samplerate));\n    return audioFillDuration;\n  }; // If the audio segment extends before the earliest allowed dts\n  // value, remove AAC frames until starts at or after the earliest\n  // allowed DTS so that we don't end up with a negative baseMedia-\n  // DecodeTime for the audio track\n\n  var trimAdtsFramesByEarliestDts = function (adtsFrames, track, earliestAllowedDts) {\n    if (track.minSegmentDts >= earliestAllowedDts) {\n      return adtsFrames;\n    } // We will need to recalculate the earliest segment Dts\n\n    track.minSegmentDts = Infinity;\n    return adtsFrames.filter(function (currentFrame) {\n      // If this is an allowed frame, keep it and record it's Dts\n      if (currentFrame.dts >= earliestAllowedDts) {\n        track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\n        track.minSegmentPts = track.minSegmentDts;\n        return true;\n      } // Otherwise, discard it\n\n      return false;\n    });\n  }; // generate the track's raw mdat data from an array of frames\n\n  var generateSampleTable = function (frames) {\n    var i,\n      currentFrame,\n      samples = [];\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n      samples.push({\n        size: currentFrame.data.byteLength,\n        duration: 1024 // For AAC audio, all samples contain 1024 samples\n      });\n    }\n    return samples;\n  }; // generate the track's sample table from an array of frames\n\n  var concatenateFrameData = function (frames) {\n    var i,\n      currentFrame,\n      dataOffset = 0,\n      data = new Uint8Array(sumFrameByteLengths(frames));\n    for (i = 0; i < frames.length; i++) {\n      currentFrame = frames[i];\n      data.set(currentFrame.data, dataOffset);\n      dataOffset += currentFrame.data.byteLength;\n    }\n    return data;\n  };\n  var audioFrameUtils$1 = {\n    prefixWithSilence: prefixWithSilence,\n    trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\n    generateSampleTable: generateSampleTable,\n    concatenateFrameData: concatenateFrameData\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var ONE_SECOND_IN_TS$3 = clock$2.ONE_SECOND_IN_TS;\n  /**\n   * Store information about the start and end of the track and the\n   * duration for each frame/sample we process in order to calculate\n   * the baseMediaDecodeTime\n   */\n\n  var collectDtsInfo = function (track, data) {\n    if (typeof data.pts === 'number') {\n      if (track.timelineStartInfo.pts === undefined) {\n        track.timelineStartInfo.pts = data.pts;\n      }\n      if (track.minSegmentPts === undefined) {\n        track.minSegmentPts = data.pts;\n      } else {\n        track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n      }\n      if (track.maxSegmentPts === undefined) {\n        track.maxSegmentPts = data.pts;\n      } else {\n        track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\n      }\n    }\n    if (typeof data.dts === 'number') {\n      if (track.timelineStartInfo.dts === undefined) {\n        track.timelineStartInfo.dts = data.dts;\n      }\n      if (track.minSegmentDts === undefined) {\n        track.minSegmentDts = data.dts;\n      } else {\n        track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n      }\n      if (track.maxSegmentDts === undefined) {\n        track.maxSegmentDts = data.dts;\n      } else {\n        track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\n      }\n    }\n  };\n  /**\n   * Clear values used to calculate the baseMediaDecodeTime between\n   * tracks\n   */\n\n  var clearDtsInfo = function (track) {\n    delete track.minSegmentDts;\n    delete track.maxSegmentDts;\n    delete track.minSegmentPts;\n    delete track.maxSegmentPts;\n  };\n  /**\n   * Calculate the track's baseMediaDecodeTime based on the earliest\n   * DTS the transmuxer has ever seen and the minimum DTS for the\n   * current track\n   * @param track {object} track metadata configuration\n   * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at 0.\n   */\n\n  var calculateTrackBaseMediaDecodeTime = function (track, keepOriginalTimestamps) {\n    var baseMediaDecodeTime,\n      scale,\n      minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\n\n    if (!keepOriginalTimestamps) {\n      minSegmentDts -= track.timelineStartInfo.dts;\n    } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\n    // we want the start of the first segment to be placed\n\n    baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\n\n    baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\n\n    baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\n    if (track.type === 'audio') {\n      // Audio has a different clock equal to the sampling_rate so we need to\n      // scale the PTS values into the clock rate of the track\n      scale = track.samplerate / ONE_SECOND_IN_TS$3;\n      baseMediaDecodeTime *= scale;\n      baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\n    }\n    return baseMediaDecodeTime;\n  };\n  var trackDecodeInfo$1 = {\n    clearDtsInfo: clearDtsInfo,\n    calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\n    collectDtsInfo: collectDtsInfo\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Reads in-band caption information from a video elementary\n   * stream. Captions must follow the CEA-708 standard for injection\n   * into an MPEG-2 transport streams.\n   * @see https://en.wikipedia.org/wiki/CEA-708\n   * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n   */\n  // payload type field to indicate how they are to be\n  // interpreted. CEAS-708 caption content is always transmitted with\n  // payload type 0x04.\n\n  var USER_DATA_REGISTERED_ITU_T_T35 = 4,\n    RBSP_TRAILING_BITS = 128;\n  /**\n    * Parse a supplemental enhancement information (SEI) NAL unit.\n    * Stops parsing once a message of type ITU T T35 has been found.\n    *\n    * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n    * @return {object} the parsed SEI payload\n    * @see Rec. ITU-T H.264, 7.3.2.3.1\n    */\n\n  var parseSei = function (bytes) {\n    var i = 0,\n      result = {\n        payloadType: -1,\n        payloadSize: 0\n      },\n      payloadType = 0,\n      payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\n\n    while (i < bytes.byteLength) {\n      // stop once we have hit the end of the sei_rbsp\n      if (bytes[i] === RBSP_TRAILING_BITS) {\n        break;\n      } // Parse payload type\n\n      while (bytes[i] === 0xFF) {\n        payloadType += 255;\n        i++;\n      }\n      payloadType += bytes[i++]; // Parse payload size\n\n      while (bytes[i] === 0xFF) {\n        payloadSize += 255;\n        i++;\n      }\n      payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\n      // there can only ever be one caption message in a frame's sei\n\n      if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n        var userIdentifier = String.fromCharCode(bytes[i + 3], bytes[i + 4], bytes[i + 5], bytes[i + 6]);\n        if (userIdentifier === 'GA94') {\n          result.payloadType = payloadType;\n          result.payloadSize = payloadSize;\n          result.payload = bytes.subarray(i, i + payloadSize);\n          break;\n        } else {\n          result.payload = void 0;\n        }\n      } // skip the payload and parse the next message\n\n      i += payloadSize;\n      payloadType = 0;\n      payloadSize = 0;\n    }\n    return result;\n  }; // see ANSI/SCTE 128-1 (2013), section 8.1\n\n  var parseUserData = function (sei) {\n    // itu_t_t35_contry_code must be 181 (United States) for\n    // captions\n    if (sei.payload[0] !== 181) {\n      return null;\n    } // itu_t_t35_provider_code should be 49 (ATSC) for captions\n\n    if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\n      return null;\n    } // the user_identifier should be \"GA94\" to indicate ATSC1 data\n\n    if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\n      return null;\n    } // finally, user_data_type_code should be 0x03 for caption data\n\n    if (sei.payload[7] !== 0x03) {\n      return null;\n    } // return the user_data_type_structure and strip the trailing\n    // marker bits\n\n    return sei.payload.subarray(8, sei.payload.length - 1);\n  }; // see CEA-708-D, section 4.4\n\n  var parseCaptionPackets = function (pts, userData) {\n    var results = [],\n      i,\n      count,\n      offset,\n      data; // if this is just filler, return immediately\n\n    if (!(userData[0] & 0x40)) {\n      return results;\n    } // parse out the cc_data_1 and cc_data_2 fields\n\n    count = userData[0] & 0x1f;\n    for (i = 0; i < count; i++) {\n      offset = i * 3;\n      data = {\n        type: userData[offset + 2] & 0x03,\n        pts: pts\n      }; // capture cc data when cc_valid is 1\n\n      if (userData[offset + 2] & 0x04) {\n        data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\n        results.push(data);\n      }\n    }\n    return results;\n  };\n  var discardEmulationPreventionBytes$1 = function (data) {\n    var length = data.byteLength,\n      emulationPreventionBytesPositions = [],\n      i = 1,\n      newLength,\n      newData; // Find all `Emulation Prevention Bytes`\n\n    while (i < length - 2) {\n      if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n        emulationPreventionBytesPositions.push(i + 2);\n        i += 2;\n      } else {\n        i++;\n      }\n    } // If no Emulation Prevention Bytes were found just return the original\n    // array\n\n    if (emulationPreventionBytesPositions.length === 0) {\n      return data;\n    } // Create a new array to hold the NAL unit data\n\n    newLength = length - emulationPreventionBytesPositions.length;\n    newData = new Uint8Array(newLength);\n    var sourceIndex = 0;\n    for (i = 0; i < newLength; sourceIndex++, i++) {\n      if (sourceIndex === emulationPreventionBytesPositions[0]) {\n        // Skip this byte\n        sourceIndex++; // Remove this position index\n\n        emulationPreventionBytesPositions.shift();\n      }\n      newData[i] = data[sourceIndex];\n    }\n    return newData;\n  }; // exports\n\n  var captionPacketParser = {\n    parseSei: parseSei,\n    parseUserData: parseUserData,\n    parseCaptionPackets: parseCaptionPackets,\n    discardEmulationPreventionBytes: discardEmulationPreventionBytes$1,\n    USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Reads in-band caption information from a video elementary\n   * stream. Captions must follow the CEA-708 standard for injection\n   * into an MPEG-2 transport streams.\n   * @see https://en.wikipedia.org/wiki/CEA-708\n   * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\n   */\n  // Link To Transport\n  // -----------------\n\n  var Stream$7 = stream;\n  var cea708Parser = captionPacketParser;\n  var CaptionStream$2 = function (options) {\n    options = options || {};\n    CaptionStream$2.prototype.init.call(this); // parse708captions flag, default to true\n\n    this.parse708captions_ = typeof options.parse708captions === 'boolean' ? options.parse708captions : true;\n    this.captionPackets_ = [];\n    this.ccStreams_ = [new Cea608Stream(0, 0),\n    // eslint-disable-line no-use-before-define\n    new Cea608Stream(0, 1),\n    // eslint-disable-line no-use-before-define\n    new Cea608Stream(1, 0),\n    // eslint-disable-line no-use-before-define\n    new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\n    ];\n    if (this.parse708captions_) {\n      this.cc708Stream_ = new Cea708Stream({\n        captionServices: options.captionServices\n      }); // eslint-disable-line no-use-before-define\n    }\n    this.reset(); // forward data and done events from CCs to this CaptionStream\n\n    this.ccStreams_.forEach(function (cc) {\n      cc.on('data', this.trigger.bind(this, 'data'));\n      cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\n      cc.on('done', this.trigger.bind(this, 'done'));\n    }, this);\n    if (this.parse708captions_) {\n      this.cc708Stream_.on('data', this.trigger.bind(this, 'data'));\n      this.cc708Stream_.on('partialdone', this.trigger.bind(this, 'partialdone'));\n      this.cc708Stream_.on('done', this.trigger.bind(this, 'done'));\n    }\n  };\n  CaptionStream$2.prototype = new Stream$7();\n  CaptionStream$2.prototype.push = function (event) {\n    var sei, userData, newCaptionPackets; // only examine SEI NALs\n\n    if (event.nalUnitType !== 'sei_rbsp') {\n      return;\n    } // parse the sei\n\n    sei = cea708Parser.parseSei(event.escapedRBSP); // no payload data, skip\n\n    if (!sei.payload) {\n      return;\n    } // ignore everything but user_data_registered_itu_t_t35\n\n    if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\n      return;\n    } // parse out the user data payload\n\n    userData = cea708Parser.parseUserData(sei); // ignore unrecognized userData\n\n    if (!userData) {\n      return;\n    } // Sometimes, the same segment # will be downloaded twice. To stop the\n    // caption data from being processed twice, we track the latest dts we've\n    // received and ignore everything with a dts before that. However, since\n    // data for a specific dts can be split across packets on either side of\n    // a segment boundary, we need to make sure we *don't* ignore the packets\n    // from the *next* segment that have dts === this.latestDts_. By constantly\n    // tracking the number of packets received with dts === this.latestDts_, we\n    // know how many should be ignored once we start receiving duplicates.\n\n    if (event.dts < this.latestDts_) {\n      // We've started getting older data, so set the flag.\n      this.ignoreNextEqualDts_ = true;\n      return;\n    } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\n      this.numSameDts_--;\n      if (!this.numSameDts_) {\n        // We've received the last duplicate packet, time to start processing again\n        this.ignoreNextEqualDts_ = false;\n      }\n      return;\n    } // parse out CC data packets and save them for later\n\n    newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\n    this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\n    if (this.latestDts_ !== event.dts) {\n      this.numSameDts_ = 0;\n    }\n    this.numSameDts_++;\n    this.latestDts_ = event.dts;\n  };\n  CaptionStream$2.prototype.flushCCStreams = function (flushType) {\n    this.ccStreams_.forEach(function (cc) {\n      return flushType === 'flush' ? cc.flush() : cc.partialFlush();\n    }, this);\n  };\n  CaptionStream$2.prototype.flushStream = function (flushType) {\n    // make sure we actually parsed captions before proceeding\n    if (!this.captionPackets_.length) {\n      this.flushCCStreams(flushType);\n      return;\n    } // In Chrome, the Array#sort function is not stable so add a\n    // presortIndex that we can use to ensure we get a stable-sort\n\n    this.captionPackets_.forEach(function (elem, idx) {\n      elem.presortIndex = idx;\n    }); // sort caption byte-pairs based on their PTS values\n\n    this.captionPackets_.sort(function (a, b) {\n      if (a.pts === b.pts) {\n        return a.presortIndex - b.presortIndex;\n      }\n      return a.pts - b.pts;\n    });\n    this.captionPackets_.forEach(function (packet) {\n      if (packet.type < 2) {\n        // Dispatch packet to the right Cea608Stream\n        this.dispatchCea608Packet(packet);\n      } else {\n        // Dispatch packet to the Cea708Stream\n        this.dispatchCea708Packet(packet);\n      }\n    }, this);\n    this.captionPackets_.length = 0;\n    this.flushCCStreams(flushType);\n  };\n  CaptionStream$2.prototype.flush = function () {\n    return this.flushStream('flush');\n  }; // Only called if handling partial data\n\n  CaptionStream$2.prototype.partialFlush = function () {\n    return this.flushStream('partialFlush');\n  };\n  CaptionStream$2.prototype.reset = function () {\n    this.latestDts_ = null;\n    this.ignoreNextEqualDts_ = false;\n    this.numSameDts_ = 0;\n    this.activeCea608Channel_ = [null, null];\n    this.ccStreams_.forEach(function (ccStream) {\n      ccStream.reset();\n    });\n  }; // From the CEA-608 spec:\n\n  /*\n   * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\n   * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\n   * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\n   * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\n   * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\n   * to switch to captioning or Text.\n  */\n  // With that in mind, we ignore any data between an XDS control code and a\n  // subsequent closed-captioning control code.\n\n  CaptionStream$2.prototype.dispatchCea608Packet = function (packet) {\n    // NOTE: packet.type is the CEA608 field\n    if (this.setsTextOrXDSActive(packet)) {\n      this.activeCea608Channel_[packet.type] = null;\n    } else if (this.setsChannel1Active(packet)) {\n      this.activeCea608Channel_[packet.type] = 0;\n    } else if (this.setsChannel2Active(packet)) {\n      this.activeCea608Channel_[packet.type] = 1;\n    }\n    if (this.activeCea608Channel_[packet.type] === null) {\n      // If we haven't received anything to set the active channel, or the\n      // packets are Text/XDS data, discard the data; we don't want jumbled\n      // captions\n      return;\n    }\n    this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\n  };\n  CaptionStream$2.prototype.setsChannel1Active = function (packet) {\n    return (packet.ccData & 0x7800) === 0x1000;\n  };\n  CaptionStream$2.prototype.setsChannel2Active = function (packet) {\n    return (packet.ccData & 0x7800) === 0x1800;\n  };\n  CaptionStream$2.prototype.setsTextOrXDSActive = function (packet) {\n    return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\n  };\n  CaptionStream$2.prototype.dispatchCea708Packet = function (packet) {\n    if (this.parse708captions_) {\n      this.cc708Stream_.push(packet);\n    }\n  }; // ----------------------\n  // Session to Application\n  // ----------------------\n  // This hash maps special and extended character codes to their\n  // proper Unicode equivalent. The first one-byte key is just a\n  // non-standard character code. The two-byte keys that follow are\n  // the extended CEA708 character codes, along with the preceding\n  // 0x10 extended character byte to distinguish these codes from\n  // non-extended character codes. Every CEA708 character code that\n  // is not in this object maps directly to a standard unicode\n  // character code.\n  // The transparent space and non-breaking transparent space are\n  // technically not fully supported since there is no code to\n  // make them transparent, so they have normal non-transparent\n  // stand-ins.\n  // The special closed caption (CC) character isn't a standard\n  // unicode character, so a fairly similar unicode character was\n  // chosen in it's place.\n\n  var CHARACTER_TRANSLATION_708 = {\n    0x7f: 0x266a,\n    // ♪\n    0x1020: 0x20,\n    // Transparent Space\n    0x1021: 0xa0,\n    // Nob-breaking Transparent Space\n    0x1025: 0x2026,\n    // …\n    0x102a: 0x0160,\n    // Š\n    0x102c: 0x0152,\n    // Œ\n    0x1030: 0x2588,\n    // █\n    0x1031: 0x2018,\n    // ‘\n    0x1032: 0x2019,\n    // ’\n    0x1033: 0x201c,\n    // “\n    0x1034: 0x201d,\n    // ”\n    0x1035: 0x2022,\n    // •\n    0x1039: 0x2122,\n    // ™\n    0x103a: 0x0161,\n    // š\n    0x103c: 0x0153,\n    // œ\n    0x103d: 0x2120,\n    // ℠\n    0x103f: 0x0178,\n    // Ÿ\n    0x1076: 0x215b,\n    // ⅛\n    0x1077: 0x215c,\n    // ⅜\n    0x1078: 0x215d,\n    // ⅝\n    0x1079: 0x215e,\n    // ⅞\n    0x107a: 0x23d0,\n    // ⏐\n    0x107b: 0x23a4,\n    // ⎤\n    0x107c: 0x23a3,\n    // ⎣\n    0x107d: 0x23af,\n    // ⎯\n    0x107e: 0x23a6,\n    // ⎦\n    0x107f: 0x23a1,\n    // ⎡\n    0x10a0: 0x3138 // ㄸ (CC char)\n  };\n  var get708CharFromCode = function (code) {\n    var newCode = CHARACTER_TRANSLATION_708[code] || code;\n    if (code & 0x1000 && code === newCode) {\n      // Invalid extended code\n      return '';\n    }\n    return String.fromCharCode(newCode);\n  };\n  var within708TextBlock = function (b) {\n    return 0x20 <= b && b <= 0x7f || 0xa0 <= b && b <= 0xff;\n  };\n  var Cea708Window = function (windowNum) {\n    this.windowNum = windowNum;\n    this.reset();\n  };\n  Cea708Window.prototype.reset = function () {\n    this.clearText();\n    this.pendingNewLine = false;\n    this.winAttr = {};\n    this.penAttr = {};\n    this.penLoc = {};\n    this.penColor = {}; // These default values are arbitrary,\n    // defineWindow will usually override them\n\n    this.visible = 0;\n    this.rowLock = 0;\n    this.columnLock = 0;\n    this.priority = 0;\n    this.relativePositioning = 0;\n    this.anchorVertical = 0;\n    this.anchorHorizontal = 0;\n    this.anchorPoint = 0;\n    this.rowCount = 1;\n    this.virtualRowCount = this.rowCount + 1;\n    this.columnCount = 41;\n    this.windowStyle = 0;\n    this.penStyle = 0;\n  };\n  Cea708Window.prototype.getText = function () {\n    return this.rows.join('\\n');\n  };\n  Cea708Window.prototype.clearText = function () {\n    this.rows = [''];\n    this.rowIdx = 0;\n  };\n  Cea708Window.prototype.newLine = function (pts) {\n    if (this.rows.length >= this.virtualRowCount && typeof this.beforeRowOverflow === 'function') {\n      this.beforeRowOverflow(pts);\n    }\n    if (this.rows.length > 0) {\n      this.rows.push('');\n      this.rowIdx++;\n    } // Show all virtual rows since there's no visible scrolling\n\n    while (this.rows.length > this.virtualRowCount) {\n      this.rows.shift();\n      this.rowIdx--;\n    }\n  };\n  Cea708Window.prototype.isEmpty = function () {\n    if (this.rows.length === 0) {\n      return true;\n    } else if (this.rows.length === 1) {\n      return this.rows[0] === '';\n    }\n    return false;\n  };\n  Cea708Window.prototype.addText = function (text) {\n    this.rows[this.rowIdx] += text;\n  };\n  Cea708Window.prototype.backspace = function () {\n    if (!this.isEmpty()) {\n      var row = this.rows[this.rowIdx];\n      this.rows[this.rowIdx] = row.substr(0, row.length - 1);\n    }\n  };\n  var Cea708Service = function (serviceNum, encoding, stream) {\n    this.serviceNum = serviceNum;\n    this.text = '';\n    this.currentWindow = new Cea708Window(-1);\n    this.windows = [];\n    this.stream = stream; // Try to setup a TextDecoder if an `encoding` value was provided\n\n    if (typeof encoding === 'string') {\n      this.createTextDecoder(encoding);\n    }\n  };\n  /**\n   * Initialize service windows\n   * Must be run before service use\n   *\n   * @param  {Integer}  pts               PTS value\n   * @param  {Function} beforeRowOverflow Function to execute before row overflow of a window\n   */\n\n  Cea708Service.prototype.init = function (pts, beforeRowOverflow) {\n    this.startPts = pts;\n    for (var win = 0; win < 8; win++) {\n      this.windows[win] = new Cea708Window(win);\n      if (typeof beforeRowOverflow === 'function') {\n        this.windows[win].beforeRowOverflow = beforeRowOverflow;\n      }\n    }\n  };\n  /**\n   * Set current window of service to be affected by commands\n   *\n   * @param  {Integer} windowNum Window number\n   */\n\n  Cea708Service.prototype.setCurrentWindow = function (windowNum) {\n    this.currentWindow = this.windows[windowNum];\n  };\n  /**\n   * Try to create a TextDecoder if it is natively supported\n   */\n\n  Cea708Service.prototype.createTextDecoder = function (encoding) {\n    if (typeof TextDecoder === 'undefined') {\n      this.stream.trigger('log', {\n        level: 'warn',\n        message: 'The `encoding` option is unsupported without TextDecoder support'\n      });\n    } else {\n      try {\n        this.textDecoder_ = new TextDecoder(encoding);\n      } catch (error) {\n        this.stream.trigger('log', {\n          level: 'warn',\n          message: 'TextDecoder could not be created with ' + encoding + ' encoding. ' + error\n        });\n      }\n    }\n  };\n  var Cea708Stream = function (options) {\n    options = options || {};\n    Cea708Stream.prototype.init.call(this);\n    var self = this;\n    var captionServices = options.captionServices || {};\n    var captionServiceEncodings = {};\n    var serviceProps; // Get service encodings from captionServices option block\n\n    Object.keys(captionServices).forEach(serviceName => {\n      serviceProps = captionServices[serviceName];\n      if (/^SERVICE/.test(serviceName)) {\n        captionServiceEncodings[serviceName] = serviceProps.encoding;\n      }\n    });\n    this.serviceEncodings = captionServiceEncodings;\n    this.current708Packet = null;\n    this.services = {};\n    this.push = function (packet) {\n      if (packet.type === 3) {\n        // 708 packet start\n        self.new708Packet();\n        self.add708Bytes(packet);\n      } else {\n        if (self.current708Packet === null) {\n          // This should only happen at the start of a file if there's no packet start.\n          self.new708Packet();\n        }\n        self.add708Bytes(packet);\n      }\n    };\n  };\n  Cea708Stream.prototype = new Stream$7();\n  /**\n   * Push current 708 packet, create new 708 packet.\n   */\n\n  Cea708Stream.prototype.new708Packet = function () {\n    if (this.current708Packet !== null) {\n      this.push708Packet();\n    }\n    this.current708Packet = {\n      data: [],\n      ptsVals: []\n    };\n  };\n  /**\n   * Add pts and both bytes from packet into current 708 packet.\n   */\n\n  Cea708Stream.prototype.add708Bytes = function (packet) {\n    var data = packet.ccData;\n    var byte0 = data >>> 8;\n    var byte1 = data & 0xff; // I would just keep a list of packets instead of bytes, but it isn't clear in the spec\n    // that service blocks will always line up with byte pairs.\n\n    this.current708Packet.ptsVals.push(packet.pts);\n    this.current708Packet.data.push(byte0);\n    this.current708Packet.data.push(byte1);\n  };\n  /**\n   * Parse completed 708 packet into service blocks and push each service block.\n   */\n\n  Cea708Stream.prototype.push708Packet = function () {\n    var packet708 = this.current708Packet;\n    var packetData = packet708.data;\n    var serviceNum = null;\n    var blockSize = null;\n    var i = 0;\n    var b = packetData[i++];\n    packet708.seq = b >> 6;\n    packet708.sizeCode = b & 0x3f; // 0b00111111;\n\n    for (; i < packetData.length; i++) {\n      b = packetData[i++];\n      serviceNum = b >> 5;\n      blockSize = b & 0x1f; // 0b00011111\n\n      if (serviceNum === 7 && blockSize > 0) {\n        // Extended service num\n        b = packetData[i++];\n        serviceNum = b;\n      }\n      this.pushServiceBlock(serviceNum, i, blockSize);\n      if (blockSize > 0) {\n        i += blockSize - 1;\n      }\n    }\n  };\n  /**\n   * Parse service block, execute commands, read text.\n   *\n   * Note: While many of these commands serve important purposes,\n   * many others just parse out the parameters or attributes, but\n   * nothing is done with them because this is not a full and complete\n   * implementation of the entire 708 spec.\n   *\n   * @param  {Integer} serviceNum Service number\n   * @param  {Integer} start      Start index of the 708 packet data\n   * @param  {Integer} size       Block size\n   */\n\n  Cea708Stream.prototype.pushServiceBlock = function (serviceNum, start, size) {\n    var b;\n    var i = start;\n    var packetData = this.current708Packet.data;\n    var service = this.services[serviceNum];\n    if (!service) {\n      service = this.initService(serviceNum, i);\n    }\n    for (; i < start + size && i < packetData.length; i++) {\n      b = packetData[i];\n      if (within708TextBlock(b)) {\n        i = this.handleText(i, service);\n      } else if (b === 0x18) {\n        i = this.multiByteCharacter(i, service);\n      } else if (b === 0x10) {\n        i = this.extendedCommands(i, service);\n      } else if (0x80 <= b && b <= 0x87) {\n        i = this.setCurrentWindow(i, service);\n      } else if (0x98 <= b && b <= 0x9f) {\n        i = this.defineWindow(i, service);\n      } else if (b === 0x88) {\n        i = this.clearWindows(i, service);\n      } else if (b === 0x8c) {\n        i = this.deleteWindows(i, service);\n      } else if (b === 0x89) {\n        i = this.displayWindows(i, service);\n      } else if (b === 0x8a) {\n        i = this.hideWindows(i, service);\n      } else if (b === 0x8b) {\n        i = this.toggleWindows(i, service);\n      } else if (b === 0x97) {\n        i = this.setWindowAttributes(i, service);\n      } else if (b === 0x90) {\n        i = this.setPenAttributes(i, service);\n      } else if (b === 0x91) {\n        i = this.setPenColor(i, service);\n      } else if (b === 0x92) {\n        i = this.setPenLocation(i, service);\n      } else if (b === 0x8f) {\n        service = this.reset(i, service);\n      } else if (b === 0x08) {\n        // BS: Backspace\n        service.currentWindow.backspace();\n      } else if (b === 0x0c) {\n        // FF: Form feed\n        service.currentWindow.clearText();\n      } else if (b === 0x0d) {\n        // CR: Carriage return\n        service.currentWindow.pendingNewLine = true;\n      } else if (b === 0x0e) {\n        // HCR: Horizontal carriage return\n        service.currentWindow.clearText();\n      } else if (b === 0x8d) {\n        // DLY: Delay, nothing to do\n        i++;\n      } else ;\n    }\n  };\n  /**\n   * Execute an extended command\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.extendedCommands = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    if (within708TextBlock(b)) {\n      i = this.handleText(i, service, {\n        isExtended: true\n      });\n    }\n    return i;\n  };\n  /**\n   * Get PTS value of a given byte index\n   *\n   * @param  {Integer} byteIndex  Index of the byte\n   * @return {Integer}            PTS\n   */\n\n  Cea708Stream.prototype.getPts = function (byteIndex) {\n    // There's 1 pts value per 2 bytes\n    return this.current708Packet.ptsVals[Math.floor(byteIndex / 2)];\n  };\n  /**\n   * Initializes a service\n   *\n   * @param  {Integer} serviceNum Service number\n   * @return {Service}            Initialized service object\n   */\n\n  Cea708Stream.prototype.initService = function (serviceNum, i) {\n    var serviceName = 'SERVICE' + serviceNum;\n    var self = this;\n    var serviceName;\n    var encoding;\n    if (serviceName in this.serviceEncodings) {\n      encoding = this.serviceEncodings[serviceName];\n    }\n    this.services[serviceNum] = new Cea708Service(serviceNum, encoding, self);\n    this.services[serviceNum].init(this.getPts(i), function (pts) {\n      self.flushDisplayed(pts, self.services[serviceNum]);\n    });\n    return this.services[serviceNum];\n  };\n  /**\n   * Execute text writing to current window\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.handleText = function (i, service, options) {\n    var isExtended = options && options.isExtended;\n    var isMultiByte = options && options.isMultiByte;\n    var packetData = this.current708Packet.data;\n    var extended = isExtended ? 0x1000 : 0x0000;\n    var currentByte = packetData[i];\n    var nextByte = packetData[i + 1];\n    var win = service.currentWindow;\n    var char;\n    var charCodeArray; // Converts an array of bytes to a unicode hex string.\n\n    function toHexString(byteArray) {\n      return byteArray.map(byte => {\n        return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n      }).join('');\n    }\n    if (isMultiByte) {\n      charCodeArray = [currentByte, nextByte];\n      i++;\n    } else {\n      charCodeArray = [currentByte];\n    } // Use the TextDecoder if one was created for this service\n\n    if (service.textDecoder_ && !isExtended) {\n      char = service.textDecoder_.decode(new Uint8Array(charCodeArray));\n    } else {\n      // We assume any multi-byte char without a decoder is unicode.\n      if (isMultiByte) {\n        const unicode = toHexString(charCodeArray); // Takes a unicode hex string and creates a single character.\n\n        char = String.fromCharCode(parseInt(unicode, 16));\n      } else {\n        char = get708CharFromCode(extended | currentByte);\n      }\n    }\n    if (win.pendingNewLine && !win.isEmpty()) {\n      win.newLine(this.getPts(i));\n    }\n    win.pendingNewLine = false;\n    win.addText(char);\n    return i;\n  };\n  /**\n   * Handle decoding of multibyte character\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.multiByteCharacter = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var firstByte = packetData[i + 1];\n    var secondByte = packetData[i + 2];\n    if (within708TextBlock(firstByte) && within708TextBlock(secondByte)) {\n      i = this.handleText(++i, service, {\n        isMultiByte: true\n      });\n    }\n    return i;\n  };\n  /**\n   * Parse and execute the CW# command.\n   *\n   * Set the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.setCurrentWindow = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var windowNum = b & 0x07;\n    service.setCurrentWindow(windowNum);\n    return i;\n  };\n  /**\n   * Parse and execute the DF# command.\n   *\n   * Define a window and set it as the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.defineWindow = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var windowNum = b & 0x07;\n    service.setCurrentWindow(windowNum);\n    var win = service.currentWindow;\n    b = packetData[++i];\n    win.visible = (b & 0x20) >> 5; // v\n\n    win.rowLock = (b & 0x10) >> 4; // rl\n\n    win.columnLock = (b & 0x08) >> 3; // cl\n\n    win.priority = b & 0x07; // p\n\n    b = packetData[++i];\n    win.relativePositioning = (b & 0x80) >> 7; // rp\n\n    win.anchorVertical = b & 0x7f; // av\n\n    b = packetData[++i];\n    win.anchorHorizontal = b; // ah\n\n    b = packetData[++i];\n    win.anchorPoint = (b & 0xf0) >> 4; // ap\n\n    win.rowCount = b & 0x0f; // rc\n\n    b = packetData[++i];\n    win.columnCount = b & 0x3f; // cc\n\n    b = packetData[++i];\n    win.windowStyle = (b & 0x38) >> 3; // ws\n\n    win.penStyle = b & 0x07; // ps\n    // The spec says there are (rowCount+1) \"virtual rows\"\n\n    win.virtualRowCount = win.rowCount + 1;\n    return i;\n  };\n  /**\n   * Parse and execute the SWA command.\n   *\n   * Set attributes of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.setWindowAttributes = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var winAttr = service.currentWindow.winAttr;\n    b = packetData[++i];\n    winAttr.fillOpacity = (b & 0xc0) >> 6; // fo\n\n    winAttr.fillRed = (b & 0x30) >> 4; // fr\n\n    winAttr.fillGreen = (b & 0x0c) >> 2; // fg\n\n    winAttr.fillBlue = b & 0x03; // fb\n\n    b = packetData[++i];\n    winAttr.borderType = (b & 0xc0) >> 6; // bt\n\n    winAttr.borderRed = (b & 0x30) >> 4; // br\n\n    winAttr.borderGreen = (b & 0x0c) >> 2; // bg\n\n    winAttr.borderBlue = b & 0x03; // bb\n\n    b = packetData[++i];\n    winAttr.borderType += (b & 0x80) >> 5; // bt\n\n    winAttr.wordWrap = (b & 0x40) >> 6; // ww\n\n    winAttr.printDirection = (b & 0x30) >> 4; // pd\n\n    winAttr.scrollDirection = (b & 0x0c) >> 2; // sd\n\n    winAttr.justify = b & 0x03; // j\n\n    b = packetData[++i];\n    winAttr.effectSpeed = (b & 0xf0) >> 4; // es\n\n    winAttr.effectDirection = (b & 0x0c) >> 2; // ed\n\n    winAttr.displayEffect = b & 0x03; // de\n\n    return i;\n  };\n  /**\n   * Gather text from all displayed windows and push a caption to output.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   */\n\n  Cea708Stream.prototype.flushDisplayed = function (pts, service) {\n    var displayedText = []; // TODO: Positioning not supported, displaying multiple windows will not necessarily\n    // display text in the correct order, but sample files so far have not shown any issue.\n\n    for (var winId = 0; winId < 8; winId++) {\n      if (service.windows[winId].visible && !service.windows[winId].isEmpty()) {\n        displayedText.push(service.windows[winId].getText());\n      }\n    }\n    service.endPts = pts;\n    service.text = displayedText.join('\\n\\n');\n    this.pushCaption(service);\n    service.startPts = pts;\n  };\n  /**\n   * Push a caption to output if the caption contains text.\n   *\n   * @param  {Service} service  The service object to be affected\n   */\n\n  Cea708Stream.prototype.pushCaption = function (service) {\n    if (service.text !== '') {\n      this.trigger('data', {\n        startPts: service.startPts,\n        endPts: service.endPts,\n        text: service.text,\n        stream: 'cc708_' + service.serviceNum\n      });\n      service.text = '';\n      service.startPts = service.endPts;\n    }\n  };\n  /**\n   * Parse and execute the DSW command.\n   *\n   * Set visible property of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.displayWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible = 1;\n      }\n    }\n    return i;\n  };\n  /**\n   * Parse and execute the HDW command.\n   *\n   * Set visible property of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.hideWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible = 0;\n      }\n    }\n    return i;\n  };\n  /**\n   * Parse and execute the TGW command.\n   *\n   * Set visible property of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.toggleWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].visible ^= 1;\n      }\n    }\n    return i;\n  };\n  /**\n   * Parse and execute the CLW command.\n   *\n   * Clear text of windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.clearWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].clearText();\n      }\n    }\n    return i;\n  };\n  /**\n   * Parse and execute the DLW command.\n   *\n   * Re-initialize windows based on the parsed bitmask.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.deleteWindows = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[++i];\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    for (var winId = 0; winId < 8; winId++) {\n      if (b & 0x01 << winId) {\n        service.windows[winId].reset();\n      }\n    }\n    return i;\n  };\n  /**\n   * Parse and execute the SPA command.\n   *\n   * Set pen attributes of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.setPenAttributes = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var penAttr = service.currentWindow.penAttr;\n    b = packetData[++i];\n    penAttr.textTag = (b & 0xf0) >> 4; // tt\n\n    penAttr.offset = (b & 0x0c) >> 2; // o\n\n    penAttr.penSize = b & 0x03; // s\n\n    b = packetData[++i];\n    penAttr.italics = (b & 0x80) >> 7; // i\n\n    penAttr.underline = (b & 0x40) >> 6; // u\n\n    penAttr.edgeType = (b & 0x38) >> 3; // et\n\n    penAttr.fontStyle = b & 0x07; // fs\n\n    return i;\n  };\n  /**\n   * Parse and execute the SPC command.\n   *\n   * Set pen color of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.setPenColor = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var penColor = service.currentWindow.penColor;\n    b = packetData[++i];\n    penColor.fgOpacity = (b & 0xc0) >> 6; // fo\n\n    penColor.fgRed = (b & 0x30) >> 4; // fr\n\n    penColor.fgGreen = (b & 0x0c) >> 2; // fg\n\n    penColor.fgBlue = b & 0x03; // fb\n\n    b = packetData[++i];\n    penColor.bgOpacity = (b & 0xc0) >> 6; // bo\n\n    penColor.bgRed = (b & 0x30) >> 4; // br\n\n    penColor.bgGreen = (b & 0x0c) >> 2; // bg\n\n    penColor.bgBlue = b & 0x03; // bb\n\n    b = packetData[++i];\n    penColor.edgeRed = (b & 0x30) >> 4; // er\n\n    penColor.edgeGreen = (b & 0x0c) >> 2; // eg\n\n    penColor.edgeBlue = b & 0x03; // eb\n\n    return i;\n  };\n  /**\n   * Parse and execute the SPL command.\n   *\n   * Set pen location of the current window.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Integer}          New index after parsing\n   */\n\n  Cea708Stream.prototype.setPenLocation = function (i, service) {\n    var packetData = this.current708Packet.data;\n    var b = packetData[i];\n    var penLoc = service.currentWindow.penLoc; // Positioning isn't really supported at the moment, so this essentially just inserts a linebreak\n\n    service.currentWindow.pendingNewLine = true;\n    b = packetData[++i];\n    penLoc.row = b & 0x0f; // r\n\n    b = packetData[++i];\n    penLoc.column = b & 0x3f; // c\n\n    return i;\n  };\n  /**\n   * Execute the RST command.\n   *\n   * Reset service to a clean slate. Re-initialize.\n   *\n   * @param  {Integer} i        Current index in the 708 packet\n   * @param  {Service} service  The service object to be affected\n   * @return {Service}          Re-initialized service\n   */\n\n  Cea708Stream.prototype.reset = function (i, service) {\n    var pts = this.getPts(i);\n    this.flushDisplayed(pts, service);\n    return this.initService(service.serviceNum, i);\n  }; // This hash maps non-ASCII, special, and extended character codes to their\n  // proper Unicode equivalent. The first keys that are only a single byte\n  // are the non-standard ASCII characters, which simply map the CEA608 byte\n  // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\n  // character codes, but have their MSB bitmasked with 0x03 so that a lookup\n  // can be performed regardless of the field and data channel on which the\n  // character code was received.\n\n  var CHARACTER_TRANSLATION = {\n    0x2a: 0xe1,\n    // á\n    0x5c: 0xe9,\n    // é\n    0x5e: 0xed,\n    // í\n    0x5f: 0xf3,\n    // ó\n    0x60: 0xfa,\n    // ú\n    0x7b: 0xe7,\n    // ç\n    0x7c: 0xf7,\n    // ÷\n    0x7d: 0xd1,\n    // Ñ\n    0x7e: 0xf1,\n    // ñ\n    0x7f: 0x2588,\n    // █\n    0x0130: 0xae,\n    // ®\n    0x0131: 0xb0,\n    // °\n    0x0132: 0xbd,\n    // ½\n    0x0133: 0xbf,\n    // ¿\n    0x0134: 0x2122,\n    // ™\n    0x0135: 0xa2,\n    // ¢\n    0x0136: 0xa3,\n    // £\n    0x0137: 0x266a,\n    // ♪\n    0x0138: 0xe0,\n    // à\n    0x0139: 0xa0,\n    //\n    0x013a: 0xe8,\n    // è\n    0x013b: 0xe2,\n    // â\n    0x013c: 0xea,\n    // ê\n    0x013d: 0xee,\n    // î\n    0x013e: 0xf4,\n    // ô\n    0x013f: 0xfb,\n    // û\n    0x0220: 0xc1,\n    // Á\n    0x0221: 0xc9,\n    // É\n    0x0222: 0xd3,\n    // Ó\n    0x0223: 0xda,\n    // Ú\n    0x0224: 0xdc,\n    // Ü\n    0x0225: 0xfc,\n    // ü\n    0x0226: 0x2018,\n    // ‘\n    0x0227: 0xa1,\n    // ¡\n    0x0228: 0x2a,\n    // *\n    0x0229: 0x27,\n    // '\n    0x022a: 0x2014,\n    // —\n    0x022b: 0xa9,\n    // ©\n    0x022c: 0x2120,\n    // ℠\n    0x022d: 0x2022,\n    // •\n    0x022e: 0x201c,\n    // “\n    0x022f: 0x201d,\n    // ”\n    0x0230: 0xc0,\n    // À\n    0x0231: 0xc2,\n    // Â\n    0x0232: 0xc7,\n    // Ç\n    0x0233: 0xc8,\n    // È\n    0x0234: 0xca,\n    // Ê\n    0x0235: 0xcb,\n    // Ë\n    0x0236: 0xeb,\n    // ë\n    0x0237: 0xce,\n    // Î\n    0x0238: 0xcf,\n    // Ï\n    0x0239: 0xef,\n    // ï\n    0x023a: 0xd4,\n    // Ô\n    0x023b: 0xd9,\n    // Ù\n    0x023c: 0xf9,\n    // ù\n    0x023d: 0xdb,\n    // Û\n    0x023e: 0xab,\n    // «\n    0x023f: 0xbb,\n    // »\n    0x0320: 0xc3,\n    // Ã\n    0x0321: 0xe3,\n    // ã\n    0x0322: 0xcd,\n    // Í\n    0x0323: 0xcc,\n    // Ì\n    0x0324: 0xec,\n    // ì\n    0x0325: 0xd2,\n    // Ò\n    0x0326: 0xf2,\n    // ò\n    0x0327: 0xd5,\n    // Õ\n    0x0328: 0xf5,\n    // õ\n    0x0329: 0x7b,\n    // {\n    0x032a: 0x7d,\n    // }\n    0x032b: 0x5c,\n    // \\\n    0x032c: 0x5e,\n    // ^\n    0x032d: 0x5f,\n    // _\n    0x032e: 0x7c,\n    // |\n    0x032f: 0x7e,\n    // ~\n    0x0330: 0xc4,\n    // Ä\n    0x0331: 0xe4,\n    // ä\n    0x0332: 0xd6,\n    // Ö\n    0x0333: 0xf6,\n    // ö\n    0x0334: 0xdf,\n    // ß\n    0x0335: 0xa5,\n    // ¥\n    0x0336: 0xa4,\n    // ¤\n    0x0337: 0x2502,\n    // │\n    0x0338: 0xc5,\n    // Å\n    0x0339: 0xe5,\n    // å\n    0x033a: 0xd8,\n    // Ø\n    0x033b: 0xf8,\n    // ø\n    0x033c: 0x250c,\n    // ┌\n    0x033d: 0x2510,\n    // ┐\n    0x033e: 0x2514,\n    // └\n    0x033f: 0x2518 // ┘\n  };\n  var getCharFromCode = function (code) {\n    if (code === null) {\n      return '';\n    }\n    code = CHARACTER_TRANSLATION[code] || code;\n    return String.fromCharCode(code);\n  }; // the index of the last row in a CEA-608 display buffer\n\n  var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\n  // getting it through bit logic.\n\n  var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\n  // cells. The \"bottom\" row is the last element in the outer array.\n  // We keep track of positioning information as we go by storing the\n  // number of indentations and the tab offset in this buffer.\n\n  var createDisplayBuffer = function () {\n    var result = [],\n      i = BOTTOM_ROW + 1;\n    while (i--) {\n      result.push({\n        text: '',\n        indent: 0,\n        offset: 0\n      });\n    }\n    return result;\n  };\n  var Cea608Stream = function (field, dataChannel) {\n    Cea608Stream.prototype.init.call(this);\n    this.field_ = field || 0;\n    this.dataChannel_ = dataChannel || 0;\n    this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\n    this.setConstants();\n    this.reset();\n    this.push = function (packet) {\n      var data, swap, char0, char1, text; // remove the parity bits\n\n      data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\n\n      if (data === this.lastControlCode_) {\n        this.lastControlCode_ = null;\n        return;\n      } // Store control codes\n\n      if ((data & 0xf000) === 0x1000) {\n        this.lastControlCode_ = data;\n      } else if (data !== this.PADDING_) {\n        this.lastControlCode_ = null;\n      }\n      char0 = data >>> 8;\n      char1 = data & 0xff;\n      if (data === this.PADDING_) {\n        return;\n      } else if (data === this.RESUME_CAPTION_LOADING_) {\n        this.mode_ = 'popOn';\n      } else if (data === this.END_OF_CAPTION_) {\n        // If an EOC is received while in paint-on mode, the displayed caption\n        // text should be swapped to non-displayed memory as if it was a pop-on\n        // caption. Because of that, we should explicitly switch back to pop-on\n        // mode\n        this.mode_ = 'popOn';\n        this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\n\n        this.flushDisplayed(packet.pts); // flip memory\n\n        swap = this.displayed_;\n        this.displayed_ = this.nonDisplayed_;\n        this.nonDisplayed_ = swap; // start measuring the time to display the caption\n\n        this.startPts_ = packet.pts;\n      } else if (data === this.ROLL_UP_2_ROWS_) {\n        this.rollUpRows_ = 2;\n        this.setRollUp(packet.pts);\n      } else if (data === this.ROLL_UP_3_ROWS_) {\n        this.rollUpRows_ = 3;\n        this.setRollUp(packet.pts);\n      } else if (data === this.ROLL_UP_4_ROWS_) {\n        this.rollUpRows_ = 4;\n        this.setRollUp(packet.pts);\n      } else if (data === this.CARRIAGE_RETURN_) {\n        this.clearFormatting(packet.pts);\n        this.flushDisplayed(packet.pts);\n        this.shiftRowsUp_();\n        this.startPts_ = packet.pts;\n      } else if (data === this.BACKSPACE_) {\n        if (this.mode_ === 'popOn') {\n          this.nonDisplayed_[this.row_].text = this.nonDisplayed_[this.row_].text.slice(0, -1);\n        } else {\n          this.displayed_[this.row_].text = this.displayed_[this.row_].text.slice(0, -1);\n        }\n      } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\n        this.flushDisplayed(packet.pts);\n        this.displayed_ = createDisplayBuffer();\n      } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\n        this.nonDisplayed_ = createDisplayBuffer();\n      } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\n        if (this.mode_ !== 'paintOn') {\n          // NOTE: This should be removed when proper caption positioning is\n          // implemented\n          this.flushDisplayed(packet.pts);\n          this.displayed_ = createDisplayBuffer();\n        }\n        this.mode_ = 'paintOn';\n        this.startPts_ = packet.pts; // Append special characters to caption text\n      } else if (this.isSpecialCharacter(char0, char1)) {\n        // Bitmask char0 so that we can apply character transformations\n        // regardless of field and data channel.\n        // Then byte-shift to the left and OR with char1 so we can pass the\n        // entire character code to `getCharFromCode`.\n        char0 = (char0 & 0x03) << 8;\n        text = getCharFromCode(char0 | char1);\n        this[this.mode_](packet.pts, text);\n        this.column_++; // Append extended characters to caption text\n      } else if (this.isExtCharacter(char0, char1)) {\n        // Extended characters always follow their \"non-extended\" equivalents.\n        // IE if a \"è\" is desired, you'll always receive \"eè\"; non-compliant\n        // decoders are supposed to drop the \"è\", while compliant decoders\n        // backspace the \"e\" and insert \"è\".\n        // Delete the previous character\n        if (this.mode_ === 'popOn') {\n          this.nonDisplayed_[this.row_].text = this.nonDisplayed_[this.row_].text.slice(0, -1);\n        } else {\n          this.displayed_[this.row_].text = this.displayed_[this.row_].text.slice(0, -1);\n        } // Bitmask char0 so that we can apply character transformations\n        // regardless of field and data channel.\n        // Then byte-shift to the left and OR with char1 so we can pass the\n        // entire character code to `getCharFromCode`.\n\n        char0 = (char0 & 0x03) << 8;\n        text = getCharFromCode(char0 | char1);\n        this[this.mode_](packet.pts, text);\n        this.column_++; // Process mid-row codes\n      } else if (this.isMidRowCode(char0, char1)) {\n        // Attributes are not additive, so clear all formatting\n        this.clearFormatting(packet.pts); // According to the standard, mid-row codes\n        // should be replaced with spaces, so add one now\n\n        this[this.mode_](packet.pts, ' ');\n        this.column_++;\n        if ((char1 & 0xe) === 0xe) {\n          this.addFormatting(packet.pts, ['i']);\n        }\n        if ((char1 & 0x1) === 0x1) {\n          this.addFormatting(packet.pts, ['u']);\n        } // Detect offset control codes and adjust cursor\n      } else if (this.isOffsetControlCode(char0, char1)) {\n        // Cursor position is set by indent PAC (see below) in 4-column\n        // increments, with an additional offset code of 1-3 to reach any\n        // of the 32 columns specified by CEA-608. So all we need to do\n        // here is increment the column cursor by the given offset.\n        const offset = char1 & 0x03; // For an offest value 1-3, set the offset for that caption\n        // in the non-displayed array.\n\n        this.nonDisplayed_[this.row_].offset = offset;\n        this.column_ += offset; // Detect PACs (Preamble Address Codes)\n      } else if (this.isPAC(char0, char1)) {\n        // There's no logic for PAC -> row mapping, so we have to just\n        // find the row code in an array and use its index :(\n        var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\n\n        if (this.mode_ === 'rollUp') {\n          // This implies that the base row is incorrectly set.\n          // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\n          // of roll-up rows set.\n          if (row - this.rollUpRows_ + 1 < 0) {\n            row = this.rollUpRows_ - 1;\n          }\n          this.setRollUp(packet.pts, row);\n        } // Ensure the row is between 0 and 14, otherwise use the most\n        // recent or default row.\n\n        if (row !== this.row_ && row >= 0 && row <= 14) {\n          // formatting is only persistent for current row\n          this.clearFormatting(packet.pts);\n          this.row_ = row;\n        } // All PACs can apply underline, so detect and apply\n        // (All odd-numbered second bytes set underline)\n\n        if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\n          this.addFormatting(packet.pts, ['u']);\n        }\n        if ((data & 0x10) === 0x10) {\n          // We've got an indent level code. Each successive even number\n          // increments the column cursor by 4, so we can get the desired\n          // column position by bit-shifting to the right (to get n/2)\n          // and multiplying by 4.\n          const indentations = (data & 0xe) >> 1;\n          this.column_ = indentations * 4; // add to the number of indentations for positioning\n\n          this.nonDisplayed_[this.row_].indent += indentations;\n        }\n        if (this.isColorPAC(char1)) {\n          // it's a color code, though we only support white, which\n          // can be either normal or italicized. white italics can be\n          // either 0x4e or 0x6e depending on the row, so we just\n          // bitwise-and with 0xe to see if italics should be turned on\n          if ((char1 & 0xe) === 0xe) {\n            this.addFormatting(packet.pts, ['i']);\n          }\n        } // We have a normal character in char0, and possibly one in char1\n      } else if (this.isNormalChar(char0)) {\n        if (char1 === 0x00) {\n          char1 = null;\n        }\n        text = getCharFromCode(char0);\n        text += getCharFromCode(char1);\n        this[this.mode_](packet.pts, text);\n        this.column_ += text.length;\n      } // finish data processing\n    };\n  };\n  Cea608Stream.prototype = new Stream$7(); // Trigger a cue point that captures the current state of the\n  // display buffer\n\n  Cea608Stream.prototype.flushDisplayed = function (pts) {\n    const logWarning = index => {\n      this.trigger('log', {\n        level: 'warn',\n        message: 'Skipping a malformed 608 caption at index ' + index + '.'\n      });\n    };\n    const content = [];\n    this.displayed_.forEach((row, i) => {\n      if (row && row.text && row.text.length) {\n        try {\n          // remove spaces from the start and end of the string\n          row.text = row.text.trim();\n        } catch (e) {\n          // Ordinarily, this shouldn't happen. However, caption\n          // parsing errors should not throw exceptions and\n          // break playback.\n          logWarning(i);\n        } // See the below link for more details on the following fields:\n        // https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608\n\n        if (row.text.length) {\n          content.push({\n            // The text to be displayed in the caption from this specific row, with whitespace removed.\n            text: row.text,\n            // Value between 1 and 15 representing the PAC row used to calculate line height.\n            line: i + 1,\n            // A number representing the indent position by percentage (CEA-608 PAC indent code).\n            // The value will be a number between 10 and 80. Offset is used to add an aditional\n            // value to the position if necessary.\n            position: 10 + Math.min(70, row.indent * 10) + row.offset * 2.5\n          });\n        }\n      } else if (row === undefined || row === null) {\n        logWarning(i);\n      }\n    });\n    if (content.length) {\n      this.trigger('data', {\n        startPts: this.startPts_,\n        endPts: pts,\n        content,\n        stream: this.name_\n      });\n    }\n  };\n  /**\n   * Zero out the data, used for startup and on seek\n   */\n\n  Cea608Stream.prototype.reset = function () {\n    this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\n    // actually display captions. If a caption is shifted to a row\n    // with a lower index than this, it is cleared from the display\n    // buffer\n\n    this.topRow_ = 0;\n    this.startPts_ = 0;\n    this.displayed_ = createDisplayBuffer();\n    this.nonDisplayed_ = createDisplayBuffer();\n    this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\n\n    this.column_ = 0;\n    this.row_ = BOTTOM_ROW;\n    this.rollUpRows_ = 2; // This variable holds currently-applied formatting\n\n    this.formatting_ = [];\n  };\n  /**\n   * Sets up control code and related constants for this instance\n   */\n\n  Cea608Stream.prototype.setConstants = function () {\n    // The following attributes have these uses:\n    // ext_ :    char0 for mid-row codes, and the base for extended\n    //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\n    //           extended codes)\n    // control_: char0 for control codes, except byte-shifted to the\n    //           left so that we can do this.control_ | CONTROL_CODE\n    // offset_:  char0 for tab offset codes\n    //\n    // It's also worth noting that control codes, and _only_ control codes,\n    // differ between field 1 and field2. Field 2 control codes are always\n    // their field 1 value plus 1. That's why there's the \"| field\" on the\n    // control value.\n    if (this.dataChannel_ === 0) {\n      this.BASE_ = 0x10;\n      this.EXT_ = 0x11;\n      this.CONTROL_ = (0x14 | this.field_) << 8;\n      this.OFFSET_ = 0x17;\n    } else if (this.dataChannel_ === 1) {\n      this.BASE_ = 0x18;\n      this.EXT_ = 0x19;\n      this.CONTROL_ = (0x1c | this.field_) << 8;\n      this.OFFSET_ = 0x1f;\n    } // Constants for the LSByte command codes recognized by Cea608Stream. This\n    // list is not exhaustive. For a more comprehensive listing and semantics see\n    // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\n    // Padding\n\n    this.PADDING_ = 0x0000; // Pop-on Mode\n\n    this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\n    this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\n\n    this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\n    this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\n    this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\n    this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\n\n    this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\n\n    this.BACKSPACE_ = this.CONTROL_ | 0x21;\n    this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\n    this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\n  };\n  /**\n   * Detects if the 2-byte packet data is a special character\n   *\n   * Special characters have a second byte in the range 0x30 to 0x3f,\n   * with the first byte being 0x11 (for data channel 1) or 0x19 (for\n   * data channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are an special character\n   */\n\n  Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\n    return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\n  };\n  /**\n   * Detects if the 2-byte packet data is an extended character\n   *\n   * Extended characters have a second byte in the range 0x20 to 0x3f,\n   * with the first byte being 0x12 or 0x13 (for data channel 1) or\n   * 0x1a or 0x1b (for data channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are an extended character\n   */\n\n  Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\n    return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\n  };\n  /**\n   * Detects if the 2-byte packet is a mid-row code\n   *\n   * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\n   * the first byte being 0x11 (for data channel 1) or 0x19 (for data\n   * channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are a mid-row code\n   */\n\n  Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\n    return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\n  };\n  /**\n   * Detects if the 2-byte packet is an offset control code\n   *\n   * Offset control codes have a second byte in the range 0x21 to 0x23,\n   * with the first byte being 0x17 (for data channel 1) or 0x1f (for\n   * data channel 2).\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are an offset control code\n   */\n\n  Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\n    return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\n  };\n  /**\n   * Detects if the 2-byte packet is a Preamble Address Code\n   *\n   * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\n   * or 0x18 to 0x1f (for data channel 2), with the second byte in the\n   * range 0x40 to 0x7f.\n   *\n   * @param  {Integer} char0 The first byte\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the 2 bytes are a PAC\n   */\n\n  Cea608Stream.prototype.isPAC = function (char0, char1) {\n    return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\n  };\n  /**\n   * Detects if a packet's second byte is in the range of a PAC color code\n   *\n   * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\n   * 0x60 to 0x6f.\n   *\n   * @param  {Integer} char1 The second byte\n   * @return {Boolean}       Whether the byte is a color PAC\n   */\n\n  Cea608Stream.prototype.isColorPAC = function (char1) {\n    return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\n  };\n  /**\n   * Detects if a single byte is in the range of a normal character\n   *\n   * Normal text bytes are in the range 0x20 to 0x7f.\n   *\n   * @param  {Integer} char  The byte\n   * @return {Boolean}       Whether the byte is a normal character\n   */\n\n  Cea608Stream.prototype.isNormalChar = function (char) {\n    return char >= 0x20 && char <= 0x7f;\n  };\n  /**\n   * Configures roll-up\n   *\n   * @param  {Integer} pts         Current PTS\n   * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\n   *                               a new position\n   */\n\n  Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\n    // Reset the base row to the bottom row when switching modes\n    if (this.mode_ !== 'rollUp') {\n      this.row_ = BOTTOM_ROW;\n      this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\n\n      this.flushDisplayed(pts);\n      this.nonDisplayed_ = createDisplayBuffer();\n      this.displayed_ = createDisplayBuffer();\n    }\n    if (newBaseRow !== undefined && newBaseRow !== this.row_) {\n      // move currently displayed captions (up or down) to the new base row\n      for (var i = 0; i < this.rollUpRows_; i++) {\n        this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\n        this.displayed_[this.row_ - i] = {\n          text: '',\n          indent: 0,\n          offset: 0\n        };\n      }\n    }\n    if (newBaseRow === undefined) {\n      newBaseRow = this.row_;\n    }\n    this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\n  }; // Adds the opening HTML tag for the passed character to the caption text,\n  // and keeps track of it for later closing\n\n  Cea608Stream.prototype.addFormatting = function (pts, format) {\n    this.formatting_ = this.formatting_.concat(format);\n    var text = format.reduce(function (text, format) {\n      return text + '<' + format + '>';\n    }, '');\n    this[this.mode_](pts, text);\n  }; // Adds HTML closing tags for current formatting to caption text and\n  // clears remembered formatting\n\n  Cea608Stream.prototype.clearFormatting = function (pts) {\n    if (!this.formatting_.length) {\n      return;\n    }\n    var text = this.formatting_.reverse().reduce(function (text, format) {\n      return text + '</' + format + '>';\n    }, '');\n    this.formatting_ = [];\n    this[this.mode_](pts, text);\n  }; // Mode Implementations\n\n  Cea608Stream.prototype.popOn = function (pts, text) {\n    var baseRow = this.nonDisplayed_[this.row_].text; // buffer characters\n\n    baseRow += text;\n    this.nonDisplayed_[this.row_].text = baseRow;\n  };\n  Cea608Stream.prototype.rollUp = function (pts, text) {\n    var baseRow = this.displayed_[this.row_].text;\n    baseRow += text;\n    this.displayed_[this.row_].text = baseRow;\n  };\n  Cea608Stream.prototype.shiftRowsUp_ = function () {\n    var i; // clear out inactive rows\n\n    for (i = 0; i < this.topRow_; i++) {\n      this.displayed_[i] = {\n        text: '',\n        indent: 0,\n        offset: 0\n      };\n    }\n    for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\n      this.displayed_[i] = {\n        text: '',\n        indent: 0,\n        offset: 0\n      };\n    } // shift displayed rows up\n\n    for (i = this.topRow_; i < this.row_; i++) {\n      this.displayed_[i] = this.displayed_[i + 1];\n    } // clear out the bottom row\n\n    this.displayed_[this.row_] = {\n      text: '',\n      indent: 0,\n      offset: 0\n    };\n  };\n  Cea608Stream.prototype.paintOn = function (pts, text) {\n    var baseRow = this.displayed_[this.row_].text;\n    baseRow += text;\n    this.displayed_[this.row_].text = baseRow;\n  }; // exports\n\n  var captionStream = {\n    CaptionStream: CaptionStream$2,\n    Cea608Stream: Cea608Stream,\n    Cea708Stream: Cea708Stream\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var streamTypes = {\n    H264_STREAM_TYPE: 0x1B,\n    ADTS_STREAM_TYPE: 0x0F,\n    METADATA_STREAM_TYPE: 0x15\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Accepts program elementary stream (PES) data events and corrects\n   * decode and presentation time stamps to account for a rollover\n   * of the 33 bit value.\n   */\n\n  var Stream$6 = stream;\n  var MAX_TS = 8589934592;\n  var RO_THRESH = 4294967296;\n  var TYPE_SHARED = 'shared';\n  var handleRollover$1 = function (value, reference) {\n    var direction = 1;\n    if (value > reference) {\n      // If the current timestamp value is greater than our reference timestamp and we detect a\n      // timestamp rollover, this means the roll over is happening in the opposite direction.\n      // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n      // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n      // rollover point. In loading this segment, the timestamp values will be very large,\n      // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n      // the time stamp to be `value - 2^33`.\n      direction = -1;\n    } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n    // cause an incorrect adjustment.\n\n    while (Math.abs(reference - value) > RO_THRESH) {\n      value += direction * MAX_TS;\n    }\n    return value;\n  };\n  var TimestampRolloverStream$1 = function (type) {\n    var lastDTS, referenceDTS;\n    TimestampRolloverStream$1.prototype.init.call(this); // The \"shared\" type is used in cases where a stream will contain muxed\n    // video and audio. We could use `undefined` here, but having a string\n    // makes debugging a little clearer.\n\n    this.type_ = type || TYPE_SHARED;\n    this.push = function (data) {\n      /**\n       * Rollover stream expects data from elementary stream.\n       * Elementary stream can push forward 2 types of data\n       * - Parsed Video/Audio/Timed-metadata PES (packetized elementary stream) packets\n       * - Tracks metadata from PMT (Program Map Table)\n       * Rollover stream expects pts/dts info to be available, since it stores lastDTS\n       * We should ignore non-PES packets since they may override lastDTS to undefined.\n       * lastDTS is important to signal the next segments\n       * about rollover from the previous segments.\n       */\n      if (data.type === 'metadata') {\n        this.trigger('data', data);\n        return;\n      } // Any \"shared\" rollover streams will accept _all_ data. Otherwise,\n      // streams will only accept data that matches their type.\n\n      if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\n        return;\n      }\n      if (referenceDTS === undefined) {\n        referenceDTS = data.dts;\n      }\n      data.dts = handleRollover$1(data.dts, referenceDTS);\n      data.pts = handleRollover$1(data.pts, referenceDTS);\n      lastDTS = data.dts;\n      this.trigger('data', data);\n    };\n    this.flush = function () {\n      referenceDTS = lastDTS;\n      this.trigger('done');\n    };\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n    this.discontinuity = function () {\n      referenceDTS = void 0;\n      lastDTS = void 0;\n    };\n    this.reset = function () {\n      this.discontinuity();\n      this.trigger('reset');\n    };\n  };\n  TimestampRolloverStream$1.prototype = new Stream$6();\n  var timestampRolloverStream = {\n    TimestampRolloverStream: TimestampRolloverStream$1,\n    handleRollover: handleRollover$1\n  }; // Once IE11 support is dropped, this function should be removed.\n\n  var typedArrayIndexOf$1 = (typedArray, element, fromIndex) => {\n    if (!typedArray) {\n      return -1;\n    }\n    var currentIndex = fromIndex;\n    for (; currentIndex < typedArray.length; currentIndex++) {\n      if (typedArray[currentIndex] === element) {\n        return currentIndex;\n      }\n    }\n    return -1;\n  };\n  var typedArray = {\n    typedArrayIndexOf: typedArrayIndexOf$1\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Tools for parsing ID3 frame data\n   * @see http://id3.org/id3v2.3.0\n   */\n\n  var typedArrayIndexOf = typedArray.typedArrayIndexOf,\n    // Frames that allow different types of text encoding contain a text\n    // encoding description byte [ID3v2.4.0 section 4.]\n    textEncodingDescriptionByte = {\n      Iso88591: 0x00,\n      // ISO-8859-1, terminated with \\0.\n      Utf16: 0x01,\n      // UTF-16 encoded Unicode BOM, terminated with \\0\\0\n      Utf16be: 0x02,\n      // UTF-16BE encoded Unicode, without BOM, terminated with \\0\\0\n      Utf8: 0x03 // UTF-8 encoded Unicode, terminated with \\0\n    },\n    // return a percent-encoded representation of the specified byte range\n    // @see http://en.wikipedia.org/wiki/Percent-encoding \n    percentEncode$1 = function (bytes, start, end) {\n      var i,\n        result = '';\n      for (i = start; i < end; i++) {\n        result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n      }\n      return result;\n    },\n    // return the string representation of the specified byte range,\n    // interpreted as UTf-8.\n    parseUtf8 = function (bytes, start, end) {\n      return decodeURIComponent(percentEncode$1(bytes, start, end));\n    },\n    // return the string representation of the specified byte range,\n    // interpreted as ISO-8859-1.\n    parseIso88591$1 = function (bytes, start, end) {\n      return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\n    },\n    parseSyncSafeInteger$1 = function (data) {\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n    },\n    frameParsers = {\n      'APIC': function (frame) {\n        var i = 1,\n          mimeTypeEndIndex,\n          descriptionEndIndex,\n          LINK_MIME_TYPE = '-->';\n        if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n          // ignore frames with unrecognized character encodings\n          return;\n        } // parsing fields [ID3v2.4.0 section 4.14.]\n\n        mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n        if (mimeTypeEndIndex < 0) {\n          // malformed frame\n          return;\n        } // parsing Mime type field (terminated with \\0)\n\n        frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n        i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n        frame.pictureType = frame.data[i];\n        i++;\n        descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n        if (descriptionEndIndex < 0) {\n          // malformed frame\n          return;\n        } // parsing Description field (terminated with \\0)\n\n        frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n        i = descriptionEndIndex + 1;\n        if (frame.mimeType === LINK_MIME_TYPE) {\n          // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n          frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n        } else {\n          // parsing Picture Data field as binary data\n          frame.pictureData = frame.data.subarray(i, frame.data.length);\n        }\n      },\n      'T*': function (frame) {\n        if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n          // ignore frames with unrecognized character encodings\n          return;\n        } // parse text field, do not include null terminator in the frame value\n        // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n        frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n        frame.values = frame.value.split('\\0');\n      },\n      'TXXX': function (frame) {\n        var descriptionEndIndex;\n        if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n          // ignore frames with unrecognized character encodings\n          return;\n        }\n        descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n        if (descriptionEndIndex === -1) {\n          return;\n        } // parse the text fields\n\n        frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n        // frames that allow different types of encoding contain terminated text\n        // [ID3v2.4.0 section 4.]\n\n        frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n        frame.data = frame.value;\n      },\n      'W*': function (frame) {\n        // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n        // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n        frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n      },\n      'WXXX': function (frame) {\n        var descriptionEndIndex;\n        if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n          // ignore frames with unrecognized character encodings\n          return;\n        }\n        descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n        if (descriptionEndIndex === -1) {\n          return;\n        } // parse the description and URL fields\n\n        frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n        // if the value is followed by a string termination all the following information\n        // should be ignored [ID3v2.4.0 section 4.3]\n\n        frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n      },\n      'PRIV': function (frame) {\n        var i;\n        for (i = 0; i < frame.data.length; i++) {\n          if (frame.data[i] === 0) {\n            // parse the description and URL fields\n            frame.owner = parseIso88591$1(frame.data, 0, i);\n            break;\n          }\n        }\n        frame.privateData = frame.data.subarray(i + 1);\n        frame.data = frame.privateData;\n      }\n    };\n  var parseId3Frames$1 = function (data) {\n    var frameSize,\n      frameHeader,\n      frameStart = 10,\n      tagSize = 0,\n      frames = []; // If we don't have enough data for a header, 10 bytes, \n    // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n    if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n      return;\n    } // the frame size is transmitted as a 28-bit integer in the\n    // last four bytes of the ID3 header.\n    // The most significant bit of each byte is dropped and the\n    // results concatenated to recover the actual value.\n\n    tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n    // convenient for our comparisons to include it\n\n    tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n    var hasExtendedHeader = data[5] & 0x40;\n    if (hasExtendedHeader) {\n      // advance the frame start past the extended header\n      frameStart += 4; // header size field\n\n      frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n      tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n    } // parse one or more ID3 frames\n    // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n    do {\n      // determine the number of bytes in this frame\n      frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n      if (frameSize < 1) {\n        break;\n      }\n      frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n      var frame = {\n        id: frameHeader,\n        data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n      };\n      frame.key = frame.id; // parse frame values\n\n      if (frameParsers[frame.id]) {\n        // use frame specific parser\n        frameParsers[frame.id](frame);\n      } else if (frame.id[0] === 'T') {\n        // use text frame generic parser\n        frameParsers['T*'](frame);\n      } else if (frame.id[0] === 'W') {\n        // use URL link frame generic parser\n        frameParsers['W*'](frame);\n      }\n      frames.push(frame);\n      frameStart += 10; // advance past the frame header\n\n      frameStart += frameSize; // advance past the frame body\n    } while (frameStart < tagSize);\n    return frames;\n  };\n  var parseId3 = {\n    parseId3Frames: parseId3Frames$1,\n    parseSyncSafeInteger: parseSyncSafeInteger$1,\n    frameParsers: frameParsers\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Accepts program elementary stream (PES) data events and parses out\n   * ID3 metadata from them, if present.\n   * @see http://id3.org/id3v2.3.0\n   */\n\n  var Stream$5 = stream,\n    StreamTypes$3 = streamTypes,\n    id3 = parseId3,\n    MetadataStream;\n  MetadataStream = function (options) {\n    var settings = {\n        // the bytes of the program-level descriptor field in MP2T\n        // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n        // program element descriptors\"\n        descriptor: options && options.descriptor\n      },\n      // the total size in bytes of the ID3 tag being parsed\n      tagSize = 0,\n      // tag data that is not complete enough to be parsed\n      buffer = [],\n      // the total number of bytes currently in the buffer\n      bufferSize = 0,\n      i;\n    MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n    // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n    this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n    if (settings.descriptor) {\n      for (i = 0; i < settings.descriptor.length; i++) {\n        this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n      }\n    }\n    this.push = function (chunk) {\n      var tag, frameStart, frameSize, frame, i, frameHeader;\n      if (chunk.type !== 'timed-metadata') {\n        return;\n      } // if data_alignment_indicator is set in the PES header,\n      // we must have the start of a new ID3 tag. Assume anything\n      // remaining in the buffer was malformed and throw it out\n\n      if (chunk.dataAlignmentIndicator) {\n        bufferSize = 0;\n        buffer.length = 0;\n      } // ignore events that don't look like ID3 data\n\n      if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n        this.trigger('log', {\n          level: 'warn',\n          message: 'Skipping unrecognized metadata packet'\n        });\n        return;\n      } // add this chunk to the data we've collected so far\n\n      buffer.push(chunk);\n      bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n      if (buffer.length === 1) {\n        // the frame size is transmitted as a 28-bit integer in the\n        // last four bytes of the ID3 header.\n        // The most significant bit of each byte is dropped and the\n        // results concatenated to recover the actual value.\n        tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n        // convenient for our comparisons to include it\n\n        tagSize += 10;\n      } // if the entire frame has not arrived, wait for more data\n\n      if (bufferSize < tagSize) {\n        return;\n      } // collect the entire frame so it can be parsed\n\n      tag = {\n        data: new Uint8Array(tagSize),\n        frames: [],\n        pts: buffer[0].pts,\n        dts: buffer[0].dts\n      };\n      for (i = 0; i < tagSize;) {\n        tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n        i += buffer[0].data.byteLength;\n        bufferSize -= buffer[0].data.byteLength;\n        buffer.shift();\n      } // find the start of the first frame and the end of the tag\n\n      frameStart = 10;\n      if (tag.data[5] & 0x40) {\n        // advance the frame start past the extended header\n        frameStart += 4; // header size field\n\n        frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n        tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n      } // parse one or more ID3 frames\n      // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n      do {\n        // determine the number of bytes in this frame\n        frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n        if (frameSize < 1) {\n          this.trigger('log', {\n            level: 'warn',\n            message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n          }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n          // to be sent along.\n\n          break;\n        }\n        frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n        frame = {\n          id: frameHeader,\n          data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n        };\n        frame.key = frame.id; // parse frame values\n\n        if (id3.frameParsers[frame.id]) {\n          // use frame specific parser\n          id3.frameParsers[frame.id](frame);\n        } else if (frame.id[0] === 'T') {\n          // use text frame generic parser\n          id3.frameParsers['T*'](frame);\n        } else if (frame.id[0] === 'W') {\n          // use URL link frame generic parser\n          id3.frameParsers['W*'](frame);\n        } // handle the special PRIV frame used to indicate the start\n        // time for raw AAC data\n\n        if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n          var d = frame.data,\n            size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n          size *= 4;\n          size += d[7] & 0x03;\n          frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n          // on the value of this frame\n          // we couldn't have known the appropriate pts and dts before\n          // parsing this ID3 tag so set those values now\n\n          if (tag.pts === undefined && tag.dts === undefined) {\n            tag.pts = frame.timeStamp;\n            tag.dts = frame.timeStamp;\n          }\n          this.trigger('timestamp', frame);\n        }\n        tag.frames.push(frame);\n        frameStart += 10; // advance past the frame header\n\n        frameStart += frameSize; // advance past the frame body\n      } while (frameStart < tagSize);\n      this.trigger('data', tag);\n    };\n  };\n  MetadataStream.prototype = new Stream$5();\n  var metadataStream = MetadataStream;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * A stream-based mp2t to mp4 converter. This utility can be used to\n   * deliver mp4s to a SourceBuffer on platforms that support native\n   * Media Source Extensions.\n   */\n\n  var Stream$4 = stream,\n    CaptionStream$1 = captionStream,\n    StreamTypes$2 = streamTypes,\n    TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n  var TransportPacketStream, TransportParseStream, ElementaryStream; // constants\n\n  var MP2T_PACKET_LENGTH$1 = 188,\n    // bytes\n    SYNC_BYTE$1 = 0x47;\n  /**\n   * Splits an incoming stream of binary data into MPEG-2 Transport\n   * Stream packets.\n   */\n\n  TransportPacketStream = function () {\n    var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n      bytesInBuffer = 0;\n    TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n    /**\n     * Split a stream of data into M2TS packets\n    **/\n\n    this.push = function (bytes) {\n      var startIndex = 0,\n        endIndex = MP2T_PACKET_LENGTH$1,\n        everything; // If there are bytes remaining from the last segment, prepend them to the\n      // bytes that were pushed in\n\n      if (bytesInBuffer) {\n        everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n        everything.set(buffer.subarray(0, bytesInBuffer));\n        everything.set(bytes, bytesInBuffer);\n        bytesInBuffer = 0;\n      } else {\n        everything = bytes;\n      } // While we have enough data for a packet\n\n      while (endIndex < everything.byteLength) {\n        // Look for a pair of start and end sync bytes in the data..\n        if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n          // We found a packet so emit it and jump one whole packet forward in\n          // the stream\n          this.trigger('data', everything.subarray(startIndex, endIndex));\n          startIndex += MP2T_PACKET_LENGTH$1;\n          endIndex += MP2T_PACKET_LENGTH$1;\n          continue;\n        } // If we get here, we have somehow become de-synchronized and we need to step\n        // forward one byte at a time until we find a pair of sync bytes that denote\n        // a packet\n\n        startIndex++;\n        endIndex++;\n      } // If there was some data left over at the end of the segment that couldn't\n      // possibly be a whole packet, keep it because it might be the start of a packet\n      // that continues in the next segment\n\n      if (startIndex < everything.byteLength) {\n        buffer.set(everything.subarray(startIndex), 0);\n        bytesInBuffer = everything.byteLength - startIndex;\n      }\n    };\n    /**\n     * Passes identified M2TS packets to the TransportParseStream to be parsed\n    **/\n\n    this.flush = function () {\n      // If the buffer contains a whole packet when we are being flushed, emit it\n      // and empty the buffer. Otherwise hold onto the data because it may be\n      // important for decoding the next segment\n      if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n        this.trigger('data', buffer);\n        bytesInBuffer = 0;\n      }\n      this.trigger('done');\n    };\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n    this.reset = function () {\n      bytesInBuffer = 0;\n      this.trigger('reset');\n    };\n  };\n  TransportPacketStream.prototype = new Stream$4();\n  /**\n   * Accepts an MP2T TransportPacketStream and emits data events with parsed\n   * forms of the individual transport stream packets.\n   */\n\n  TransportParseStream = function () {\n    var parsePsi, parsePat, parsePmt, self;\n    TransportParseStream.prototype.init.call(this);\n    self = this;\n    this.packetsWaitingForPmt = [];\n    this.programMapTable = undefined;\n    parsePsi = function (payload, psi) {\n      var offset = 0; // PSI packets may be split into multiple sections and those\n      // sections may be split into multiple packets. If a PSI\n      // section starts in this packet, the payload_unit_start_indicator\n      // will be true and the first byte of the payload will indicate\n      // the offset from the current position to the start of the\n      // section.\n\n      if (psi.payloadUnitStartIndicator) {\n        offset += payload[offset] + 1;\n      }\n      if (psi.type === 'pat') {\n        parsePat(payload.subarray(offset), psi);\n      } else {\n        parsePmt(payload.subarray(offset), psi);\n      }\n    };\n    parsePat = function (payload, pat) {\n      pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n      pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n      // skip the PSI header and parse the first PMT entry\n\n      self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n      pat.pmtPid = self.pmtPid;\n    };\n    /**\n     * Parse out the relevant fields of a Program Map Table (PMT).\n     * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n     * packet. The first byte in this array should be the table_id\n     * field.\n     * @param pmt {object} the object that should be decorated with\n     * fields parsed from the PMT.\n     */\n\n    parsePmt = function (payload, pmt) {\n      var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n      // take effect. We don't believe this should ever be the case\n      // for HLS but we'll ignore \"forward\" PMT declarations if we see\n      // them. Future PMT declarations have the current_next_indicator\n      // set to zero.\n\n      if (!(payload[5] & 0x01)) {\n        return;\n      } // overwrite any existing program map table\n\n      self.programMapTable = {\n        video: null,\n        audio: null,\n        'timed-metadata': {}\n      }; // the mapping table ends at the end of the current section\n\n      sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n      tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n      // long the program info descriptors are\n\n      programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n      offset = 12 + programInfoLength;\n      while (offset < tableEnd) {\n        var streamType = payload[offset];\n        var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n        // TODO: should this be done for metadata too? for now maintain behavior of\n        //       multiple metadata streams\n\n        if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n          self.programMapTable.video = pid;\n        } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n          self.programMapTable.audio = pid;\n        } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n          // map pid to stream type for metadata streams\n          self.programMapTable['timed-metadata'][pid] = streamType;\n        } // move to the next table entry\n        // skip past the elementary stream descriptors, if present\n\n        offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n      } // record the map on the packet as well\n\n      pmt.programMapTable = self.programMapTable;\n    };\n    /**\n     * Deliver a new MP2T packet to the next stream in the pipeline.\n     */\n\n    this.push = function (packet) {\n      var result = {},\n        offset = 4;\n      result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n      result.pid = packet[1] & 0x1f;\n      result.pid <<= 8;\n      result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n      // fifth byte of the TS packet header. The adaptation field is\n      // used to add stuffing to PES packets that don't fill a complete\n      // TS packet, and to specify some forms of timing and control data\n      // that we do not currently use.\n\n      if ((packet[3] & 0x30) >>> 4 > 0x01) {\n        offset += packet[offset] + 1;\n      } // parse the rest of the packet based on the type\n\n      if (result.pid === 0) {\n        result.type = 'pat';\n        parsePsi(packet.subarray(offset), result);\n        this.trigger('data', result);\n      } else if (result.pid === this.pmtPid) {\n        result.type = 'pmt';\n        parsePsi(packet.subarray(offset), result);\n        this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n        while (this.packetsWaitingForPmt.length) {\n          this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n        }\n      } else if (this.programMapTable === undefined) {\n        // When we have not seen a PMT yet, defer further processing of\n        // PES packets until one has been parsed\n        this.packetsWaitingForPmt.push([packet, offset, result]);\n      } else {\n        this.processPes_(packet, offset, result);\n      }\n    };\n    this.processPes_ = function (packet, offset, result) {\n      // set the appropriate stream type\n      if (result.pid === this.programMapTable.video) {\n        result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n      } else if (result.pid === this.programMapTable.audio) {\n        result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n      } else {\n        // if not video or audio, it is timed-metadata or unknown\n        // if unknown, streamType will be undefined\n        result.streamType = this.programMapTable['timed-metadata'][result.pid];\n      }\n      result.type = 'pes';\n      result.data = packet.subarray(offset);\n      this.trigger('data', result);\n    };\n  };\n  TransportParseStream.prototype = new Stream$4();\n  TransportParseStream.STREAM_TYPES = {\n    h264: 0x1b,\n    adts: 0x0f\n  };\n  /**\n   * Reconsistutes program elementary stream (PES) packets from parsed\n   * transport stream packets. That is, if you pipe an\n   * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n   * events will be events which capture the bytes for individual PES\n   * packets plus relevant metadata that has been extracted from the\n   * container.\n   */\n\n  ElementaryStream = function () {\n    var self = this,\n      segmentHadPmt = false,\n      // PES packet fragments\n      video = {\n        data: [],\n        size: 0\n      },\n      audio = {\n        data: [],\n        size: 0\n      },\n      timedMetadata = {\n        data: [],\n        size: 0\n      },\n      programMapTable,\n      parsePes = function (payload, pes) {\n        var ptsDtsFlags;\n        const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n        pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n        // that are frame data that is continuing from the previous fragment. This\n        // is to check that the pes data is the start of a new pes payload\n\n        if (startPrefix !== 1) {\n          return;\n        } // get the packet length, this will be 0 for video\n\n        pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n        pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n        // and a DTS value. Determine what combination of values is\n        // available to work with.\n\n        ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\n        // performs all bitwise operations on 32-bit integers but javascript\n        // supports a much greater range (52-bits) of integer using standard\n        // mathematical operations.\n        // We construct a 31-bit value using bitwise operators over the 31\n        // most significant bits and then multiply by 4 (equal to a left-shift\n        // of 2) before we add the final 2 least significant bits of the\n        // timestamp (equal to an OR.)\n\n        if (ptsDtsFlags & 0xC0) {\n          // the PTS and DTS are not written out directly. For information\n          // on how they are encoded, see\n          // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n          pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n          pes.pts *= 4; // Left shift by 2\n\n          pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n          pes.dts = pes.pts;\n          if (ptsDtsFlags & 0x40) {\n            pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n            pes.dts *= 4; // Left shift by 2\n\n            pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n          }\n        } // the data section starts immediately after the PES header.\n        // pes_header_data_length specifies the number of header bytes\n        // that follow the last byte of the field.\n\n        pes.data = payload.subarray(9 + payload[8]);\n      },\n      /**\n        * Pass completely parsed PES packets to the next stream in the pipeline\n       **/\n      flushStream = function (stream, type, forceFlush) {\n        var packetData = new Uint8Array(stream.size),\n          event = {\n            type: type\n          },\n          i = 0,\n          offset = 0,\n          packetFlushable = false,\n          fragment; // do nothing if there is not enough buffered data for a complete\n        // PES header\n\n        if (!stream.data.length || stream.size < 9) {\n          return;\n        }\n        event.trackId = stream.data[0].pid; // reassemble the packet\n\n        for (i = 0; i < stream.data.length; i++) {\n          fragment = stream.data[i];\n          packetData.set(fragment.data, offset);\n          offset += fragment.data.byteLength;\n        } // parse assembled packet's PES header\n\n        parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n        // check that there is enough stream data to fill the packet\n\n        packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n        if (forceFlush || packetFlushable) {\n          stream.size = 0;\n          stream.data.length = 0;\n        } // only emit packets that are complete. this is to avoid assembling\n        // incomplete PES packets due to poor segmentation\n\n        if (packetFlushable) {\n          self.trigger('data', event);\n        }\n      };\n    ElementaryStream.prototype.init.call(this);\n    /**\n     * Identifies M2TS packet types and parses PES packets using metadata\n     * parsed from the PMT\n     **/\n\n    this.push = function (data) {\n      ({\n        pat: function () {// we have to wait for the PMT to arrive as well before we\n          // have any meaningful metadata\n        },\n        pes: function () {\n          var stream, streamType;\n          switch (data.streamType) {\n            case StreamTypes$2.H264_STREAM_TYPE:\n              stream = video;\n              streamType = 'video';\n              break;\n            case StreamTypes$2.ADTS_STREAM_TYPE:\n              stream = audio;\n              streamType = 'audio';\n              break;\n            case StreamTypes$2.METADATA_STREAM_TYPE:\n              stream = timedMetadata;\n              streamType = 'timed-metadata';\n              break;\n            default:\n              // ignore unknown stream types\n              return;\n          } // if a new packet is starting, we can flush the completed\n          // packet\n\n          if (data.payloadUnitStartIndicator) {\n            flushStream(stream, streamType, true);\n          } // buffer this fragment until we are sure we've received the\n          // complete payload\n\n          stream.data.push(data);\n          stream.size += data.data.byteLength;\n        },\n        pmt: function () {\n          var event = {\n            type: 'metadata',\n            tracks: []\n          };\n          programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n          if (programMapTable.video !== null) {\n            event.tracks.push({\n              timelineStartInfo: {\n                baseMediaDecodeTime: 0\n              },\n              id: +programMapTable.video,\n              codec: 'avc',\n              type: 'video'\n            });\n          }\n          if (programMapTable.audio !== null) {\n            event.tracks.push({\n              timelineStartInfo: {\n                baseMediaDecodeTime: 0\n              },\n              id: +programMapTable.audio,\n              codec: 'adts',\n              type: 'audio'\n            });\n          }\n          segmentHadPmt = true;\n          self.trigger('data', event);\n        }\n      })[data.type]();\n    };\n    this.reset = function () {\n      video.size = 0;\n      video.data.length = 0;\n      audio.size = 0;\n      audio.data.length = 0;\n      this.trigger('reset');\n    };\n    /**\n     * Flush any remaining input. Video PES packets may be of variable\n     * length. Normally, the start of a new video packet can trigger the\n     * finalization of the previous packet. That is not possible if no\n     * more video is forthcoming, however. In that case, some other\n     * mechanism (like the end of the file) has to be employed. When it is\n     * clear that no additional data is forthcoming, calling this method\n     * will flush the buffered packets.\n     */\n\n    this.flushStreams_ = function () {\n      // !!THIS ORDER IS IMPORTANT!!\n      // video first then audio\n      flushStream(video, 'video');\n      flushStream(audio, 'audio');\n      flushStream(timedMetadata, 'timed-metadata');\n    };\n    this.flush = function () {\n      // if on flush we haven't had a pmt emitted\n      // and we have a pmt to emit. emit the pmt\n      // so that we trigger a trackinfo downstream.\n      if (!segmentHadPmt && programMapTable) {\n        var pmt = {\n          type: 'metadata',\n          tracks: []\n        }; // translate audio and video streams to tracks\n\n        if (programMapTable.video !== null) {\n          pmt.tracks.push({\n            timelineStartInfo: {\n              baseMediaDecodeTime: 0\n            },\n            id: +programMapTable.video,\n            codec: 'avc',\n            type: 'video'\n          });\n        }\n        if (programMapTable.audio !== null) {\n          pmt.tracks.push({\n            timelineStartInfo: {\n              baseMediaDecodeTime: 0\n            },\n            id: +programMapTable.audio,\n            codec: 'adts',\n            type: 'audio'\n          });\n        }\n        self.trigger('data', pmt);\n      }\n      segmentHadPmt = false;\n      this.flushStreams_();\n      this.trigger('done');\n    };\n  };\n  ElementaryStream.prototype = new Stream$4();\n  var m2ts$1 = {\n    PAT_PID: 0x0000,\n    MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n    TransportPacketStream: TransportPacketStream,\n    TransportParseStream: TransportParseStream,\n    ElementaryStream: ElementaryStream,\n    TimestampRolloverStream: TimestampRolloverStream,\n    CaptionStream: CaptionStream$1.CaptionStream,\n    Cea608Stream: CaptionStream$1.Cea608Stream,\n    Cea708Stream: CaptionStream$1.Cea708Stream,\n    MetadataStream: metadataStream\n  };\n  for (var type in StreamTypes$2) {\n    if (StreamTypes$2.hasOwnProperty(type)) {\n      m2ts$1[type] = StreamTypes$2[type];\n    }\n  }\n  var m2ts_1 = m2ts$1;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var Stream$3 = stream;\n  var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n  var AdtsStream$1;\n  var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n  /*\n   * Accepts a ElementaryStream and emits data events with parsed\n   * AAC Audio Frames of the individual packets. Input audio in ADTS\n   * format is unpacked and re-emitted as AAC frames.\n   *\n   * @see http://wiki.multimedia.cx/index.php?title=ADTS\n   * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n   */\n\n  AdtsStream$1 = function (handlePartialSegments) {\n    var buffer,\n      frameNum = 0;\n    AdtsStream$1.prototype.init.call(this);\n    this.skipWarn_ = function (start, end) {\n      this.trigger('log', {\n        level: 'warn',\n        message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n      });\n    };\n    this.push = function (packet) {\n      var i = 0,\n        frameLength,\n        protectionSkipBytes,\n        oldBuffer,\n        sampleCount,\n        adtsFrameDuration;\n      if (!handlePartialSegments) {\n        frameNum = 0;\n      }\n      if (packet.type !== 'audio') {\n        // ignore non-audio data\n        return;\n      } // Prepend any data in the buffer to the input data so that we can parse\n      // aac frames the cross a PES packet boundary\n\n      if (buffer && buffer.length) {\n        oldBuffer = buffer;\n        buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n        buffer.set(oldBuffer);\n        buffer.set(packet.data, oldBuffer.byteLength);\n      } else {\n        buffer = packet.data;\n      } // unpack any ADTS frames which have been fully received\n      // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n      var skip; // We use i + 7 here because we want to be able to parse the entire header.\n      // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n      while (i + 7 < buffer.length) {\n        // Look for the start of an ADTS header..\n        if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n          if (typeof skip !== 'number') {\n            skip = i;\n          } // If a valid header was not found,  jump one forward and attempt to\n          // find a valid ADTS header starting at the next byte\n\n          i++;\n          continue;\n        }\n        if (typeof skip === 'number') {\n          this.skipWarn_(skip, i);\n          skip = null;\n        } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n        // end of the ADTS header\n\n        protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n        // end of the sync sequence\n        // NOTE: frame length includes the size of the header\n\n        frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n        sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n        adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n        // then we have to wait for more data\n\n        if (buffer.byteLength - i < frameLength) {\n          break;\n        } // Otherwise, deliver the complete AAC frame\n\n        this.trigger('data', {\n          pts: packet.pts + frameNum * adtsFrameDuration,\n          dts: packet.dts + frameNum * adtsFrameDuration,\n          sampleCount: sampleCount,\n          audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n          channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n          samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n          samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n          // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n          samplesize: 16,\n          // data is the frame without it's header\n          data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n        });\n        frameNum++;\n        i += frameLength;\n      }\n      if (typeof skip === 'number') {\n        this.skipWarn_(skip, i);\n        skip = null;\n      } // remove processed bytes from the buffer.\n\n      buffer = buffer.subarray(i);\n    };\n    this.flush = function () {\n      frameNum = 0;\n      this.trigger('done');\n    };\n    this.reset = function () {\n      buffer = void 0;\n      this.trigger('reset');\n    };\n    this.endTimeline = function () {\n      buffer = void 0;\n      this.trigger('endedtimeline');\n    };\n  };\n  AdtsStream$1.prototype = new Stream$3();\n  var adts = AdtsStream$1;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var ExpGolomb$1;\n  /**\n   * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n   * scheme used by h264.\n   */\n\n  ExpGolomb$1 = function (workingData) {\n    var\n      // the number of bytes left to examine in workingData\n      workingBytesAvailable = workingData.byteLength,\n      // the current word being examined\n      workingWord = 0,\n      // :uint\n      // the number of bits left to examine in the current word\n      workingBitsAvailable = 0; // :uint;\n    // ():uint\n\n    this.length = function () {\n      return 8 * workingBytesAvailable;\n    }; // ():uint\n\n    this.bitsAvailable = function () {\n      return 8 * workingBytesAvailable + workingBitsAvailable;\n    }; // ():void\n\n    this.loadWord = function () {\n      var position = workingData.byteLength - workingBytesAvailable,\n        workingBytes = new Uint8Array(4),\n        availableBytes = Math.min(4, workingBytesAvailable);\n      if (availableBytes === 0) {\n        throw new Error('no bytes available');\n      }\n      workingBytes.set(workingData.subarray(position, position + availableBytes));\n      workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n      workingBitsAvailable = availableBytes * 8;\n      workingBytesAvailable -= availableBytes;\n    }; // (count:int):void\n\n    this.skipBits = function (count) {\n      var skipBytes; // :int\n\n      if (workingBitsAvailable > count) {\n        workingWord <<= count;\n        workingBitsAvailable -= count;\n      } else {\n        count -= workingBitsAvailable;\n        skipBytes = Math.floor(count / 8);\n        count -= skipBytes * 8;\n        workingBytesAvailable -= skipBytes;\n        this.loadWord();\n        workingWord <<= count;\n        workingBitsAvailable -= count;\n      }\n    }; // (size:int):uint\n\n    this.readBits = function (size) {\n      var bits = Math.min(workingBitsAvailable, size),\n        // :uint\n        valu = workingWord >>> 32 - bits; // :uint\n      // if size > 31, handle error\n\n      workingBitsAvailable -= bits;\n      if (workingBitsAvailable > 0) {\n        workingWord <<= bits;\n      } else if (workingBytesAvailable > 0) {\n        this.loadWord();\n      }\n      bits = size - bits;\n      if (bits > 0) {\n        return valu << bits | this.readBits(bits);\n      }\n      return valu;\n    }; // ():uint\n\n    this.skipLeadingZeros = function () {\n      var leadingZeroCount; // :uint\n\n      for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n        if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n          // the first bit of working word is 1\n          workingWord <<= leadingZeroCount;\n          workingBitsAvailable -= leadingZeroCount;\n          return leadingZeroCount;\n        }\n      } // we exhausted workingWord and still have not found a 1\n\n      this.loadWord();\n      return leadingZeroCount + this.skipLeadingZeros();\n    }; // ():void\n\n    this.skipUnsignedExpGolomb = function () {\n      this.skipBits(1 + this.skipLeadingZeros());\n    }; // ():void\n\n    this.skipExpGolomb = function () {\n      this.skipBits(1 + this.skipLeadingZeros());\n    }; // ():uint\n\n    this.readUnsignedExpGolomb = function () {\n      var clz = this.skipLeadingZeros(); // :uint\n\n      return this.readBits(clz + 1) - 1;\n    }; // ():int\n\n    this.readExpGolomb = function () {\n      var valu = this.readUnsignedExpGolomb(); // :int\n\n      if (0x01 & valu) {\n        // the number is odd if the low order bit is set\n        return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n      }\n      return -1 * (valu >>> 1); // divide by two then make it negative\n    }; // Some convenience functions\n    // :Boolean\n\n    this.readBoolean = function () {\n      return this.readBits(1) === 1;\n    }; // ():int\n\n    this.readUnsignedByte = function () {\n      return this.readBits(8);\n    };\n    this.loadWord();\n  };\n  var expGolomb = ExpGolomb$1;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var Stream$2 = stream;\n  var ExpGolomb = expGolomb;\n  var H264Stream$1, NalByteStream;\n  var PROFILES_WITH_OPTIONAL_SPS_DATA;\n  /**\n   * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n   */\n\n  NalByteStream = function () {\n    var syncPoint = 0,\n      i,\n      buffer;\n    NalByteStream.prototype.init.call(this);\n    /*\n     * Scans a byte stream and triggers a data event with the NAL units found.\n     * @param {Object} data Event received from H264Stream\n     * @param {Uint8Array} data.data The h264 byte stream to be scanned\n     *\n     * @see H264Stream.push\n     */\n\n    this.push = function (data) {\n      var swapBuffer;\n      if (!buffer) {\n        buffer = data.data;\n      } else {\n        swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n        swapBuffer.set(buffer);\n        swapBuffer.set(data.data, buffer.byteLength);\n        buffer = swapBuffer;\n      }\n      var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n      // scan for NAL unit boundaries\n      // a match looks like this:\n      // 0 0 1 .. NAL .. 0 0 1\n      // ^ sync point        ^ i\n      // or this:\n      // 0 0 1 .. NAL .. 0 0 0\n      // ^ sync point        ^ i\n      // advance the sync point to a NAL start, if necessary\n\n      for (; syncPoint < len - 3; syncPoint++) {\n        if (buffer[syncPoint + 2] === 1) {\n          // the sync point is properly aligned\n          i = syncPoint + 5;\n          break;\n        }\n      }\n      while (i < len) {\n        // look at the current byte to determine if we've hit the end of\n        // a NAL unit boundary\n        switch (buffer[i]) {\n          case 0:\n            // skip past non-sync sequences\n            if (buffer[i - 1] !== 0) {\n              i += 2;\n              break;\n            } else if (buffer[i - 2] !== 0) {\n              i++;\n              break;\n            } // deliver the NAL unit if it isn't empty\n\n            if (syncPoint + 3 !== i - 2) {\n              this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n            } // drop trailing zeroes\n\n            do {\n              i++;\n            } while (buffer[i] !== 1 && i < len);\n            syncPoint = i - 2;\n            i += 3;\n            break;\n          case 1:\n            // skip past non-sync sequences\n            if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n              i += 3;\n              break;\n            } // deliver the NAL unit\n\n            this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n            syncPoint = i - 2;\n            i += 3;\n            break;\n          default:\n            // the current byte isn't a one or zero, so it cannot be part\n            // of a sync sequence\n            i += 3;\n            break;\n        }\n      } // filter out the NAL units that were delivered\n\n      buffer = buffer.subarray(syncPoint);\n      i -= syncPoint;\n      syncPoint = 0;\n    };\n    this.reset = function () {\n      buffer = null;\n      syncPoint = 0;\n      this.trigger('reset');\n    };\n    this.flush = function () {\n      // deliver the last buffered NAL unit\n      if (buffer && buffer.byteLength > 3) {\n        this.trigger('data', buffer.subarray(syncPoint + 3));\n      } // reset the stream state\n\n      buffer = null;\n      syncPoint = 0;\n      this.trigger('done');\n    };\n    this.endTimeline = function () {\n      this.flush();\n      this.trigger('endedtimeline');\n    };\n  };\n  NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n  // see Recommendation ITU-T H.264 (4/2013),\n  // 7.3.2.1.1 Sequence parameter set data syntax\n\n  PROFILES_WITH_OPTIONAL_SPS_DATA = {\n    100: true,\n    110: true,\n    122: true,\n    244: true,\n    44: true,\n    83: true,\n    86: true,\n    118: true,\n    128: true,\n    // TODO: the three profiles below don't\n    // appear to have sps data in the specificiation anymore?\n    138: true,\n    139: true,\n    134: true\n  };\n  /**\n   * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n   * events.\n   */\n\n  H264Stream$1 = function () {\n    var nalByteStream = new NalByteStream(),\n      self,\n      trackId,\n      currentPts,\n      currentDts,\n      discardEmulationPreventionBytes,\n      readSequenceParameterSet,\n      skipScalingList;\n    H264Stream$1.prototype.init.call(this);\n    self = this;\n    /*\n     * Pushes a packet from a stream onto the NalByteStream\n     *\n     * @param {Object} packet - A packet received from a stream\n     * @param {Uint8Array} packet.data - The raw bytes of the packet\n     * @param {Number} packet.dts - Decode timestamp of the packet\n     * @param {Number} packet.pts - Presentation timestamp of the packet\n     * @param {Number} packet.trackId - The id of the h264 track this packet came from\n     * @param {('video'|'audio')} packet.type - The type of packet\n     *\n     */\n\n    this.push = function (packet) {\n      if (packet.type !== 'video') {\n        return;\n      }\n      trackId = packet.trackId;\n      currentPts = packet.pts;\n      currentDts = packet.dts;\n      nalByteStream.push(packet);\n    };\n    /*\n     * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n     * for the NALUs to the next stream component.\n     * Also, preprocess caption and sequence parameter NALUs.\n     *\n     * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n     * @see NalByteStream.push\n     */\n\n    nalByteStream.on('data', function (data) {\n      var event = {\n        trackId: trackId,\n        pts: currentPts,\n        dts: currentDts,\n        data: data,\n        nalUnitTypeCode: data[0] & 0x1f\n      };\n      switch (event.nalUnitTypeCode) {\n        case 0x05:\n          event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n          break;\n        case 0x06:\n          event.nalUnitType = 'sei_rbsp';\n          event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n          break;\n        case 0x07:\n          event.nalUnitType = 'seq_parameter_set_rbsp';\n          event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n          event.config = readSequenceParameterSet(event.escapedRBSP);\n          break;\n        case 0x08:\n          event.nalUnitType = 'pic_parameter_set_rbsp';\n          break;\n        case 0x09:\n          event.nalUnitType = 'access_unit_delimiter_rbsp';\n          break;\n      } // This triggers data on the H264Stream\n\n      self.trigger('data', event);\n    });\n    nalByteStream.on('done', function () {\n      self.trigger('done');\n    });\n    nalByteStream.on('partialdone', function () {\n      self.trigger('partialdone');\n    });\n    nalByteStream.on('reset', function () {\n      self.trigger('reset');\n    });\n    nalByteStream.on('endedtimeline', function () {\n      self.trigger('endedtimeline');\n    });\n    this.flush = function () {\n      nalByteStream.flush();\n    };\n    this.partialFlush = function () {\n      nalByteStream.partialFlush();\n    };\n    this.reset = function () {\n      nalByteStream.reset();\n    };\n    this.endTimeline = function () {\n      nalByteStream.endTimeline();\n    };\n    /**\n     * Advance the ExpGolomb decoder past a scaling list. The scaling\n     * list is optionally transmitted as part of a sequence parameter\n     * set and is not relevant to transmuxing.\n     * @param count {number} the number of entries in this scaling list\n     * @param expGolombDecoder {object} an ExpGolomb pointed to the\n     * start of a scaling list\n     * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n     */\n\n    skipScalingList = function (count, expGolombDecoder) {\n      var lastScale = 8,\n        nextScale = 8,\n        j,\n        deltaScale;\n      for (j = 0; j < count; j++) {\n        if (nextScale !== 0) {\n          deltaScale = expGolombDecoder.readExpGolomb();\n          nextScale = (lastScale + deltaScale + 256) % 256;\n        }\n        lastScale = nextScale === 0 ? lastScale : nextScale;\n      }\n    };\n    /**\n     * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n     * Sequence Payload\"\n     * @param data {Uint8Array} the bytes of a RBSP from a NAL\n     * unit\n     * @return {Uint8Array} the RBSP without any Emulation\n     * Prevention Bytes\n     */\n\n    discardEmulationPreventionBytes = function (data) {\n      var length = data.byteLength,\n        emulationPreventionBytesPositions = [],\n        i = 1,\n        newLength,\n        newData; // Find all `Emulation Prevention Bytes`\n\n      while (i < length - 2) {\n        if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n          emulationPreventionBytesPositions.push(i + 2);\n          i += 2;\n        } else {\n          i++;\n        }\n      } // If no Emulation Prevention Bytes were found just return the original\n      // array\n\n      if (emulationPreventionBytesPositions.length === 0) {\n        return data;\n      } // Create a new array to hold the NAL unit data\n\n      newLength = length - emulationPreventionBytesPositions.length;\n      newData = new Uint8Array(newLength);\n      var sourceIndex = 0;\n      for (i = 0; i < newLength; sourceIndex++, i++) {\n        if (sourceIndex === emulationPreventionBytesPositions[0]) {\n          // Skip this byte\n          sourceIndex++; // Remove this position index\n\n          emulationPreventionBytesPositions.shift();\n        }\n        newData[i] = data[sourceIndex];\n      }\n      return newData;\n    };\n    /**\n     * Read a sequence parameter set and return some interesting video\n     * properties. A sequence parameter set is the H264 metadata that\n     * describes the properties of upcoming video frames.\n     * @param data {Uint8Array} the bytes of a sequence parameter set\n     * @return {object} an object with configuration parsed from the\n     * sequence parameter set, including the dimensions of the\n     * associated video frames.\n     */\n\n    readSequenceParameterSet = function (data) {\n      var frameCropLeftOffset = 0,\n        frameCropRightOffset = 0,\n        frameCropTopOffset = 0,\n        frameCropBottomOffset = 0,\n        expGolombDecoder,\n        profileIdc,\n        levelIdc,\n        profileCompatibility,\n        chromaFormatIdc,\n        picOrderCntType,\n        numRefFramesInPicOrderCntCycle,\n        picWidthInMbsMinus1,\n        picHeightInMapUnitsMinus1,\n        frameMbsOnlyFlag,\n        scalingListCount,\n        sarRatio = [1, 1],\n        aspectRatioIdc,\n        i;\n      expGolombDecoder = new ExpGolomb(data);\n      profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n      profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n      levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n      expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n      // some profiles have more optional data we don't need\n\n      if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n        chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n        if (chromaFormatIdc === 3) {\n          expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n        }\n        expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n        expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n        expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n        if (expGolombDecoder.readBoolean()) {\n          // seq_scaling_matrix_present_flag\n          scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n          for (i = 0; i < scalingListCount; i++) {\n            if (expGolombDecoder.readBoolean()) {\n              // seq_scaling_list_present_flag[ i ]\n              if (i < 6) {\n                skipScalingList(16, expGolombDecoder);\n              } else {\n                skipScalingList(64, expGolombDecoder);\n              }\n            }\n          }\n        }\n      }\n      expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n      picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n      if (picOrderCntType === 0) {\n        expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n      } else if (picOrderCntType === 1) {\n        expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n        expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n        expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n        numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n        for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n          expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n        }\n      }\n      expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n      expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n      picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n      picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n      frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n      if (frameMbsOnlyFlag === 0) {\n        expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n      }\n      expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n      if (expGolombDecoder.readBoolean()) {\n        // frame_cropping_flag\n        frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n        frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n        frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n        frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n      }\n      if (expGolombDecoder.readBoolean()) {\n        // vui_parameters_present_flag\n        if (expGolombDecoder.readBoolean()) {\n          // aspect_ratio_info_present_flag\n          aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n          switch (aspectRatioIdc) {\n            case 1:\n              sarRatio = [1, 1];\n              break;\n            case 2:\n              sarRatio = [12, 11];\n              break;\n            case 3:\n              sarRatio = [10, 11];\n              break;\n            case 4:\n              sarRatio = [16, 11];\n              break;\n            case 5:\n              sarRatio = [40, 33];\n              break;\n            case 6:\n              sarRatio = [24, 11];\n              break;\n            case 7:\n              sarRatio = [20, 11];\n              break;\n            case 8:\n              sarRatio = [32, 11];\n              break;\n            case 9:\n              sarRatio = [80, 33];\n              break;\n            case 10:\n              sarRatio = [18, 11];\n              break;\n            case 11:\n              sarRatio = [15, 11];\n              break;\n            case 12:\n              sarRatio = [64, 33];\n              break;\n            case 13:\n              sarRatio = [160, 99];\n              break;\n            case 14:\n              sarRatio = [4, 3];\n              break;\n            case 15:\n              sarRatio = [3, 2];\n              break;\n            case 16:\n              sarRatio = [2, 1];\n              break;\n            case 255:\n              {\n                sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n                break;\n              }\n          }\n          if (sarRatio) {\n            sarRatio[0] / sarRatio[1];\n          }\n        }\n      }\n      return {\n        profileIdc: profileIdc,\n        levelIdc: levelIdc,\n        profileCompatibility: profileCompatibility,\n        width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n        height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n        // sar is sample aspect ratio\n        sarRatio: sarRatio\n      };\n    };\n  };\n  H264Stream$1.prototype = new Stream$2();\n  var h264 = {\n    H264Stream: H264Stream$1,\n    NalByteStream: NalByteStream\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Utilities to detect basic properties and metadata about Aac data.\n   */\n\n  var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n  var parseId3TagSize = function (header, byteIndex) {\n    var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n      flags = header[byteIndex + 5],\n      footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n    returnSize = returnSize >= 0 ? returnSize : 0;\n    if (footerPresent) {\n      return returnSize + 20;\n    }\n    return returnSize + 10;\n  };\n  var getId3Offset = function (data, offset) {\n    if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n      return offset;\n    }\n    offset += parseId3TagSize(data, offset);\n    return getId3Offset(data, offset);\n  }; // TODO: use vhs-utils\n\n  var isLikelyAacData$1 = function (data) {\n    var offset = getId3Offset(data, 0);\n    return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n    // verify that the 2 layer bits are 0, aka this\n    // is not mp3 data but aac data.\n    (data[offset + 1] & 0x16) === 0x10;\n  };\n  var parseSyncSafeInteger = function (data) {\n    return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n  }; // return a percent-encoded representation of the specified byte range\n  // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n  var percentEncode = function (bytes, start, end) {\n    var i,\n      result = '';\n    for (i = start; i < end; i++) {\n      result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n    }\n    return result;\n  }; // return the string representation of the specified byte range,\n  // interpreted as ISO-8859-1.\n\n  var parseIso88591 = function (bytes, start, end) {\n    return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n  };\n  var parseAdtsSize = function (header, byteIndex) {\n    var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n      middle = header[byteIndex + 4] << 3,\n      highTwo = header[byteIndex + 3] & 0x3 << 11;\n    return highTwo | middle | lowThree;\n  };\n  var parseType$5 = function (header, byteIndex) {\n    if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n      return 'timed-metadata';\n    } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n      return 'audio';\n    }\n    return null;\n  };\n  var parseSampleRate = function (packet) {\n    var i = 0;\n    while (i + 5 < packet.length) {\n      if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n        // If a valid header was not found,  jump one forward and attempt to\n        // find a valid ADTS header starting at the next byte\n        i++;\n        continue;\n      }\n      return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n    }\n    return null;\n  };\n  var parseAacTimestamp = function (packet) {\n    var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n    frameStart = 10;\n    if (packet[5] & 0x40) {\n      // advance the frame start past the extended header\n      frameStart += 4; // header size field\n\n      frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n    } // parse one or more ID3 frames\n    // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n    do {\n      // determine the number of bytes in this frame\n      frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n      if (frameSize < 1) {\n        return null;\n      }\n      frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n      if (frameHeader === 'PRIV') {\n        frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n        for (var i = 0; i < frame.byteLength; i++) {\n          if (frame[i] === 0) {\n            var owner = parseIso88591(frame, 0, i);\n            if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n              var d = frame.subarray(i + 1);\n              var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n              size *= 4;\n              size += d[7] & 0x03;\n              return size;\n            }\n            break;\n          }\n        }\n      }\n      frameStart += 10; // advance past the frame header\n\n      frameStart += frameSize; // advance past the frame body\n    } while (frameStart < packet.byteLength);\n    return null;\n  };\n  var utils = {\n    isLikelyAacData: isLikelyAacData$1,\n    parseId3TagSize: parseId3TagSize,\n    parseAdtsSize: parseAdtsSize,\n    parseType: parseType$5,\n    parseSampleRate: parseSampleRate,\n    parseAacTimestamp: parseAacTimestamp\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * A stream-based aac to mp4 converter. This utility can be used to\n   * deliver mp4s to a SourceBuffer on platforms that support native\n   * Media Source Extensions.\n   */\n\n  var Stream$1 = stream;\n  var aacUtils = utils; // Constants\n\n  var AacStream$1;\n  /**\n   * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n   */\n\n  AacStream$1 = function () {\n    var everything = new Uint8Array(),\n      timeStamp = 0;\n    AacStream$1.prototype.init.call(this);\n    this.setTimestamp = function (timestamp) {\n      timeStamp = timestamp;\n    };\n    this.push = function (bytes) {\n      var frameSize = 0,\n        byteIndex = 0,\n        bytesLeft,\n        chunk,\n        packet,\n        tempLength; // If there are bytes remaining from the last segment, prepend them to the\n      // bytes that were pushed in\n\n      if (everything.length) {\n        tempLength = everything.length;\n        everything = new Uint8Array(bytes.byteLength + tempLength);\n        everything.set(everything.subarray(0, tempLength));\n        everything.set(bytes, tempLength);\n      } else {\n        everything = bytes;\n      }\n      while (everything.length - byteIndex >= 3) {\n        if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n          // Exit early because we don't have enough to parse\n          // the ID3 tag header\n          if (everything.length - byteIndex < 10) {\n            break;\n          } // check framesize\n\n          frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n          // Add to byteIndex to support multiple ID3 tags in sequence\n\n          if (byteIndex + frameSize > everything.length) {\n            break;\n          }\n          chunk = {\n            type: 'timed-metadata',\n            data: everything.subarray(byteIndex, byteIndex + frameSize)\n          };\n          this.trigger('data', chunk);\n          byteIndex += frameSize;\n          continue;\n        } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n          // Exit early because we don't have enough to parse\n          // the ADTS frame header\n          if (everything.length - byteIndex < 7) {\n            break;\n          }\n          frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n\n          if (byteIndex + frameSize > everything.length) {\n            break;\n          }\n          packet = {\n            type: 'audio',\n            data: everything.subarray(byteIndex, byteIndex + frameSize),\n            pts: timeStamp,\n            dts: timeStamp\n          };\n          this.trigger('data', packet);\n          byteIndex += frameSize;\n          continue;\n        }\n        byteIndex++;\n      }\n      bytesLeft = everything.length - byteIndex;\n      if (bytesLeft > 0) {\n        everything = everything.subarray(byteIndex);\n      } else {\n        everything = new Uint8Array();\n      }\n    };\n    this.reset = function () {\n      everything = new Uint8Array();\n      this.trigger('reset');\n    };\n    this.endTimeline = function () {\n      everything = new Uint8Array();\n      this.trigger('endedtimeline');\n    };\n  };\n  AacStream$1.prototype = new Stream$1();\n  var aac = AacStream$1;\n  var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n  var audioProperties = AUDIO_PROPERTIES$1;\n  var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n  var videoProperties = VIDEO_PROPERTIES$1;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * A stream-based mp2t to mp4 converter. This utility can be used to\n   * deliver mp4s to a SourceBuffer on platforms that support native\n   * Media Source Extensions.\n   */\n\n  var Stream = stream;\n  var mp4 = mp4Generator;\n  var frameUtils = frameUtils$1;\n  var audioFrameUtils = audioFrameUtils$1;\n  var trackDecodeInfo = trackDecodeInfo$1;\n  var m2ts = m2ts_1;\n  var clock = clock$2;\n  var AdtsStream = adts;\n  var H264Stream = h264.H264Stream;\n  var AacStream = aac;\n  var isLikelyAacData = utils.isLikelyAacData;\n  var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n  var AUDIO_PROPERTIES = audioProperties;\n  var VIDEO_PROPERTIES = videoProperties; // object types\n\n  var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream;\n  var retriggerForStream = function (key, event) {\n    event.stream = key;\n    this.trigger('log', event);\n  };\n  var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n    var keys = Object.keys(pipeline);\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i]; // skip non-stream keys and headOfPipeline\n      // which is just a duplicate\n\n      if (key === 'headOfPipeline' || !pipeline[key].on) {\n        continue;\n      }\n      pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n    }\n  };\n  /**\n   * Compare two arrays (even typed) for same-ness\n   */\n\n  var arrayEquals = function (a, b) {\n    var i;\n    if (a.length !== b.length) {\n      return false;\n    } // compare the value of each element in the array\n\n    for (i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) {\n        return false;\n      }\n    }\n    return true;\n  };\n  var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n    var ptsOffsetFromDts = startPts - startDts,\n      decodeDuration = endDts - startDts,\n      presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n    // however, the player time values will reflect a start from the baseMediaDecodeTime.\n    // In order to provide relevant values for the player times, base timing info on the\n    // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n    return {\n      start: {\n        dts: baseMediaDecodeTime,\n        pts: baseMediaDecodeTime + ptsOffsetFromDts\n      },\n      end: {\n        dts: baseMediaDecodeTime + decodeDuration,\n        pts: baseMediaDecodeTime + presentationDuration\n      },\n      prependedContentDuration: prependedContentDuration,\n      baseMediaDecodeTime: baseMediaDecodeTime\n    };\n  };\n  /**\n   * Constructs a single-track, ISO BMFF media segment from AAC data\n   * events. The output of this stream can be fed to a SourceBuffer\n   * configured with a suitable initialization segment.\n   * @param track {object} track metadata configuration\n   * @param options {object} transmuxer options object\n   * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at 0.\n   */\n\n  AudioSegmentStream = function (track, options) {\n    var adtsFrames = [],\n      sequenceNumber,\n      earliestAllowedDts = 0,\n      audioAppendStartTs = 0,\n      videoBaseMediaDecodeTime = Infinity;\n    options = options || {};\n    sequenceNumber = options.firstSequenceNumber || 0;\n    AudioSegmentStream.prototype.init.call(this);\n    this.push = function (data) {\n      trackDecodeInfo.collectDtsInfo(track, data);\n      if (track) {\n        AUDIO_PROPERTIES.forEach(function (prop) {\n          track[prop] = data[prop];\n        });\n      } // buffer audio data until end() is called\n\n      adtsFrames.push(data);\n    };\n    this.setEarliestDts = function (earliestDts) {\n      earliestAllowedDts = earliestDts;\n    };\n    this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n      videoBaseMediaDecodeTime = baseMediaDecodeTime;\n    };\n    this.setAudioAppendStart = function (timestamp) {\n      audioAppendStartTs = timestamp;\n    };\n    this.flush = function () {\n      var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n      if (adtsFrames.length === 0) {\n        this.trigger('done', 'AudioSegmentStream');\n        return;\n      }\n      frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n      track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n      videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n      // samples (that is, adts frames) in the audio data\n\n      track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n      mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n      adtsFrames = [];\n      moof = mp4.moof(sequenceNumber, [track]);\n      boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n      sequenceNumber++;\n      boxes.set(moof);\n      boxes.set(mdat, moof.byteLength);\n      trackDecodeInfo.clearDtsInfo(track);\n      frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n      // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n      // valid use-case where an init segment/data should be triggered without associated\n      // frames. Leaving for now, but should be looked into.\n\n      if (frames.length) {\n        segmentDuration = frames.length * frameDuration;\n        this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n        // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n        // frame info is in video clock cycles. Convert to match expectation of\n        // listeners (that all timestamps will be based on video clock cycles).\n        clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n        // frame times are already in video clock, as is segment duration\n        frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n        this.trigger('timingInfo', {\n          start: frames[0].pts,\n          end: frames[0].pts + segmentDuration\n        });\n      }\n      this.trigger('data', {\n        track: track,\n        boxes: boxes\n      });\n      this.trigger('done', 'AudioSegmentStream');\n    };\n    this.reset = function () {\n      trackDecodeInfo.clearDtsInfo(track);\n      adtsFrames = [];\n      this.trigger('reset');\n    };\n  };\n  AudioSegmentStream.prototype = new Stream();\n  /**\n   * Constructs a single-track, ISO BMFF media segment from H264 data\n   * events. The output of this stream can be fed to a SourceBuffer\n   * configured with a suitable initialization segment.\n   * @param track {object} track metadata configuration\n   * @param options {object} transmuxer options object\n   * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n   *        gopsToAlignWith list when attempting to align gop pts\n   * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at 0.\n   */\n\n  VideoSegmentStream = function (track, options) {\n    var sequenceNumber,\n      nalUnits = [],\n      gopsToAlignWith = [],\n      config,\n      pps;\n    options = options || {};\n    sequenceNumber = options.firstSequenceNumber || 0;\n    VideoSegmentStream.prototype.init.call(this);\n    delete track.minPTS;\n    this.gopCache_ = [];\n    /**\n      * Constructs a ISO BMFF segment given H264 nalUnits\n      * @param {Object} nalUnit A data event representing a nalUnit\n      * @param {String} nalUnit.nalUnitType\n      * @param {Object} nalUnit.config Properties for a mp4 track\n      * @param {Uint8Array} nalUnit.data The nalUnit bytes\n      * @see lib/codecs/h264.js\n     **/\n\n    this.push = function (nalUnit) {\n      trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n      if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n        config = nalUnit.config;\n        track.sps = [nalUnit.data];\n        VIDEO_PROPERTIES.forEach(function (prop) {\n          track[prop] = config[prop];\n        }, this);\n      }\n      if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n        pps = nalUnit.data;\n        track.pps = [nalUnit.data];\n      } // buffer video until flush() is called\n\n      nalUnits.push(nalUnit);\n    };\n    /**\n      * Pass constructed ISO BMFF track and boxes on to the\n      * next stream in the pipeline\n     **/\n\n    this.flush = function () {\n      var frames,\n        gopForFusion,\n        gops,\n        moof,\n        mdat,\n        boxes,\n        prependedContentDuration = 0,\n        firstGop,\n        lastGop; // Throw away nalUnits at the start of the byte stream until\n      // we find the first AUD\n\n      while (nalUnits.length) {\n        if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n          break;\n        }\n        nalUnits.shift();\n      } // Return early if no video data has been observed\n\n      if (nalUnits.length === 0) {\n        this.resetStream_();\n        this.trigger('done', 'VideoSegmentStream');\n        return;\n      } // Organize the raw nal-units into arrays that represent\n      // higher-level constructs such as frames and gops\n      // (group-of-pictures)\n\n      frames = frameUtils.groupNalsIntoFrames(nalUnits);\n      gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n      // a problem since MSE (on Chrome) requires a leading keyframe.\n      //\n      // We have two approaches to repairing this situation:\n      // 1) GOP-FUSION:\n      //    This is where we keep track of the GOPS (group-of-pictures)\n      //    from previous fragments and attempt to find one that we can\n      //    prepend to the current fragment in order to create a valid\n      //    fragment.\n      // 2) KEYFRAME-PULLING:\n      //    Here we search for the first keyframe in the fragment and\n      //    throw away all the frames between the start of the fragment\n      //    and that keyframe. We then extend the duration and pull the\n      //    PTS of the keyframe forward so that it covers the time range\n      //    of the frames that were disposed of.\n      //\n      // #1 is far prefereable over #2 which can cause \"stuttering\" but\n      // requires more things to be just right.\n\n      if (!gops[0][0].keyFrame) {\n        // Search for a gop for fusion from our gopCache\n        gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n        if (gopForFusion) {\n          // in order to provide more accurate timing information about the segment, save\n          // the number of seconds prepended to the original segment due to GOP fusion\n          prependedContentDuration = gopForFusion.duration;\n          gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n          // new gop at the beginning\n\n          gops.byteLength += gopForFusion.byteLength;\n          gops.nalCount += gopForFusion.nalCount;\n          gops.pts = gopForFusion.pts;\n          gops.dts = gopForFusion.dts;\n          gops.duration += gopForFusion.duration;\n        } else {\n          // If we didn't find a candidate gop fall back to keyframe-pulling\n          gops = frameUtils.extendFirstKeyFrame(gops);\n        }\n      } // Trim gops to align with gopsToAlignWith\n\n      if (gopsToAlignWith.length) {\n        var alignedGops;\n        if (options.alignGopsAtEnd) {\n          alignedGops = this.alignGopsAtEnd_(gops);\n        } else {\n          alignedGops = this.alignGopsAtStart_(gops);\n        }\n        if (!alignedGops) {\n          // save all the nals in the last GOP into the gop cache\n          this.gopCache_.unshift({\n            gop: gops.pop(),\n            pps: track.pps,\n            sps: track.sps\n          }); // Keep a maximum of 6 GOPs in the cache\n\n          this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n          nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n          this.resetStream_();\n          this.trigger('done', 'VideoSegmentStream');\n          return;\n        } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n        // when recalculated before sending off to CoalesceStream\n\n        trackDecodeInfo.clearDtsInfo(track);\n        gops = alignedGops;\n      }\n      trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n      // samples (that is, frames) in the video data\n\n      track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n      mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n      track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n      this.trigger('processedGopsInfo', gops.map(function (gop) {\n        return {\n          pts: gop.pts,\n          dts: gop.dts,\n          byteLength: gop.byteLength\n        };\n      }));\n      firstGop = gops[0];\n      lastGop = gops[gops.length - 1];\n      this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n      this.trigger('timingInfo', {\n        start: gops[0].pts,\n        end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n      }); // save all the nals in the last GOP into the gop cache\n\n      this.gopCache_.unshift({\n        gop: gops.pop(),\n        pps: track.pps,\n        sps: track.sps\n      }); // Keep a maximum of 6 GOPs in the cache\n\n      this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n      nalUnits = [];\n      this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n      this.trigger('timelineStartInfo', track.timelineStartInfo);\n      moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n      // throwing away hundreds of media segment fragments\n\n      boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n      sequenceNumber++;\n      boxes.set(moof);\n      boxes.set(mdat, moof.byteLength);\n      this.trigger('data', {\n        track: track,\n        boxes: boxes\n      });\n      this.resetStream_(); // Continue with the flush process now\n\n      this.trigger('done', 'VideoSegmentStream');\n    };\n    this.reset = function () {\n      this.resetStream_();\n      nalUnits = [];\n      this.gopCache_.length = 0;\n      gopsToAlignWith.length = 0;\n      this.trigger('reset');\n    };\n    this.resetStream_ = function () {\n      trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n      // for instance, when we are rendition switching\n\n      config = undefined;\n      pps = undefined;\n    }; // Search for a candidate Gop for gop-fusion from the gop cache and\n    // return it or return null if no good candidate was found\n\n    this.getGopForFusion_ = function (nalUnit) {\n      var halfSecond = 45000,\n        // Half-a-second in a 90khz clock\n        allowableOverlap = 10000,\n        // About 3 frames @ 30fps\n        nearestDistance = Infinity,\n        dtsDistance,\n        nearestGopObj,\n        currentGop,\n        currentGopObj,\n        i; // Search for the GOP nearest to the beginning of this nal unit\n\n      for (i = 0; i < this.gopCache_.length; i++) {\n        currentGopObj = this.gopCache_[i];\n        currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n        if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n          continue;\n        } // Reject Gops that would require a negative baseMediaDecodeTime\n\n        if (currentGop.dts < track.timelineStartInfo.dts) {\n          continue;\n        } // The distance between the end of the gop and the start of the nalUnit\n\n        dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n        // a half-second of the nal unit\n\n        if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n          // Always use the closest GOP we found if there is more than\n          // one candidate\n          if (!nearestGopObj || nearestDistance > dtsDistance) {\n            nearestGopObj = currentGopObj;\n            nearestDistance = dtsDistance;\n          }\n        }\n      }\n      if (nearestGopObj) {\n        return nearestGopObj.gop;\n      }\n      return null;\n    }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n    // of gopsToAlignWith starting from the START of the list\n\n    this.alignGopsAtStart_ = function (gops) {\n      var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n      byteLength = gops.byteLength;\n      nalCount = gops.nalCount;\n      duration = gops.duration;\n      alignIndex = gopIndex = 0;\n      while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n        align = gopsToAlignWith[alignIndex];\n        gop = gops[gopIndex];\n        if (align.pts === gop.pts) {\n          break;\n        }\n        if (gop.pts > align.pts) {\n          // this current gop starts after the current gop we want to align on, so increment\n          // align index\n          alignIndex++;\n          continue;\n        } // current gop starts before the current gop we want to align on. so increment gop\n        // index\n\n        gopIndex++;\n        byteLength -= gop.byteLength;\n        nalCount -= gop.nalCount;\n        duration -= gop.duration;\n      }\n      if (gopIndex === 0) {\n        // no gops to trim\n        return gops;\n      }\n      if (gopIndex === gops.length) {\n        // all gops trimmed, skip appending all gops\n        return null;\n      }\n      alignedGops = gops.slice(gopIndex);\n      alignedGops.byteLength = byteLength;\n      alignedGops.duration = duration;\n      alignedGops.nalCount = nalCount;\n      alignedGops.pts = alignedGops[0].pts;\n      alignedGops.dts = alignedGops[0].dts;\n      return alignedGops;\n    }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n    // of gopsToAlignWith starting from the END of the list\n\n    this.alignGopsAtEnd_ = function (gops) {\n      var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n      alignIndex = gopsToAlignWith.length - 1;\n      gopIndex = gops.length - 1;\n      alignEndIndex = null;\n      matchFound = false;\n      while (alignIndex >= 0 && gopIndex >= 0) {\n        align = gopsToAlignWith[alignIndex];\n        gop = gops[gopIndex];\n        if (align.pts === gop.pts) {\n          matchFound = true;\n          break;\n        }\n        if (align.pts > gop.pts) {\n          alignIndex--;\n          continue;\n        }\n        if (alignIndex === gopsToAlignWith.length - 1) {\n          // gop.pts is greater than the last alignment candidate. If no match is found\n          // by the end of this loop, we still want to append gops that come after this\n          // point\n          alignEndIndex = gopIndex;\n        }\n        gopIndex--;\n      }\n      if (!matchFound && alignEndIndex === null) {\n        return null;\n      }\n      var trimIndex;\n      if (matchFound) {\n        trimIndex = gopIndex;\n      } else {\n        trimIndex = alignEndIndex;\n      }\n      if (trimIndex === 0) {\n        return gops;\n      }\n      var alignedGops = gops.slice(trimIndex);\n      var metadata = alignedGops.reduce(function (total, gop) {\n        total.byteLength += gop.byteLength;\n        total.duration += gop.duration;\n        total.nalCount += gop.nalCount;\n        return total;\n      }, {\n        byteLength: 0,\n        duration: 0,\n        nalCount: 0\n      });\n      alignedGops.byteLength = metadata.byteLength;\n      alignedGops.duration = metadata.duration;\n      alignedGops.nalCount = metadata.nalCount;\n      alignedGops.pts = alignedGops[0].pts;\n      alignedGops.dts = alignedGops[0].dts;\n      return alignedGops;\n    };\n    this.alignGopsWith = function (newGopsToAlignWith) {\n      gopsToAlignWith = newGopsToAlignWith;\n    };\n  };\n  VideoSegmentStream.prototype = new Stream();\n  /**\n   * A Stream that can combine multiple streams (ie. audio & video)\n   * into a single output segment for MSE. Also supports audio-only\n   * and video-only streams.\n   * @param options {object} transmuxer options object\n   * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n   *        in the source; false to adjust the first segment to start at media timeline start.\n   */\n\n  CoalesceStream = function (options, metadataStream) {\n    // Number of Tracks per output segment\n    // If greater than 1, we combine multiple\n    // tracks into a single segment\n    this.numberOfTracks = 0;\n    this.metadataStream = metadataStream;\n    options = options || {};\n    if (typeof options.remux !== 'undefined') {\n      this.remuxTracks = !!options.remux;\n    } else {\n      this.remuxTracks = true;\n    }\n    if (typeof options.keepOriginalTimestamps === 'boolean') {\n      this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n    } else {\n      this.keepOriginalTimestamps = false;\n    }\n    this.pendingTracks = [];\n    this.videoTrack = null;\n    this.pendingBoxes = [];\n    this.pendingCaptions = [];\n    this.pendingMetadata = [];\n    this.pendingBytes = 0;\n    this.emittedTracks = 0;\n    CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n    this.push = function (output) {\n      // buffer incoming captions until the associated video segment\n      // finishes\n      if (output.content || output.text) {\n        return this.pendingCaptions.push(output);\n      } // buffer incoming id3 tags until the final flush\n\n      if (output.frames) {\n        return this.pendingMetadata.push(output);\n      } // Add this track to the list of pending tracks and store\n      // important information required for the construction of\n      // the final segment\n\n      this.pendingTracks.push(output.track);\n      this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n      // We unshift audio and push video because\n      // as of Chrome 75 when switching from\n      // one init segment to another if the video\n      // mdat does not appear after the audio mdat\n      // only audio will play for the duration of our transmux.\n\n      if (output.track.type === 'video') {\n        this.videoTrack = output.track;\n        this.pendingBoxes.push(output.boxes);\n      }\n      if (output.track.type === 'audio') {\n        this.audioTrack = output.track;\n        this.pendingBoxes.unshift(output.boxes);\n      }\n    };\n  };\n  CoalesceStream.prototype = new Stream();\n  CoalesceStream.prototype.flush = function (flushSource) {\n    var offset = 0,\n      event = {\n        captions: [],\n        captionStreams: {},\n        metadata: [],\n        info: {}\n      },\n      caption,\n      id3,\n      initSegment,\n      timelineStartPts = 0,\n      i;\n    if (this.pendingTracks.length < this.numberOfTracks) {\n      if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n        // Return because we haven't received a flush from a data-generating\n        // portion of the segment (meaning that we have only recieved meta-data\n        // or captions.)\n        return;\n      } else if (this.remuxTracks) {\n        // Return until we have enough tracks from the pipeline to remux (if we\n        // are remuxing audio and video into a single MP4)\n        return;\n      } else if (this.pendingTracks.length === 0) {\n        // In the case where we receive a flush without any data having been\n        // received we consider it an emitted track for the purposes of coalescing\n        // `done` events.\n        // We do this for the case where there is an audio and video track in the\n        // segment but no audio data. (seen in several playlists with alternate\n        // audio tracks and no audio present in the main TS segments.)\n        this.emittedTracks++;\n        if (this.emittedTracks >= this.numberOfTracks) {\n          this.trigger('done');\n          this.emittedTracks = 0;\n        }\n        return;\n      }\n    }\n    if (this.videoTrack) {\n      timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n      VIDEO_PROPERTIES.forEach(function (prop) {\n        event.info[prop] = this.videoTrack[prop];\n      }, this);\n    } else if (this.audioTrack) {\n      timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n      AUDIO_PROPERTIES.forEach(function (prop) {\n        event.info[prop] = this.audioTrack[prop];\n      }, this);\n    }\n    if (this.videoTrack || this.audioTrack) {\n      if (this.pendingTracks.length === 1) {\n        event.type = this.pendingTracks[0].type;\n      } else {\n        event.type = 'combined';\n      }\n      this.emittedTracks += this.pendingTracks.length;\n      initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n      event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n      // and track definitions\n\n      event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n      event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n      for (i = 0; i < this.pendingBoxes.length; i++) {\n        event.data.set(this.pendingBoxes[i], offset);\n        offset += this.pendingBoxes[i].byteLength;\n      } // Translate caption PTS times into second offsets to match the\n      // video timeline for the segment, and add track info\n\n      for (i = 0; i < this.pendingCaptions.length; i++) {\n        caption = this.pendingCaptions[i];\n        caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n        caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n        event.captionStreams[caption.stream] = true;\n        event.captions.push(caption);\n      } // Translate ID3 frame PTS times into second offsets to match the\n      // video timeline for the segment\n\n      for (i = 0; i < this.pendingMetadata.length; i++) {\n        id3 = this.pendingMetadata[i];\n        id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n        event.metadata.push(id3);\n      } // We add this to every single emitted segment even though we only need\n      // it for the first\n\n      event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n      this.pendingTracks.length = 0;\n      this.videoTrack = null;\n      this.pendingBoxes.length = 0;\n      this.pendingCaptions.length = 0;\n      this.pendingBytes = 0;\n      this.pendingMetadata.length = 0; // Emit the built segment\n      // We include captions and ID3 tags for backwards compatibility,\n      // ideally we should send only video and audio in the data event\n\n      this.trigger('data', event); // Emit each caption to the outside world\n      // Ideally, this would happen immediately on parsing captions,\n      // but we need to ensure that video data is sent back first\n      // so that caption timing can be adjusted to match video timing\n\n      for (i = 0; i < event.captions.length; i++) {\n        caption = event.captions[i];\n        this.trigger('caption', caption);\n      } // Emit each id3 tag to the outside world\n      // Ideally, this would happen immediately on parsing the tag,\n      // but we need to ensure that video data is sent back first\n      // so that ID3 frame timing can be adjusted to match video timing\n\n      for (i = 0; i < event.metadata.length; i++) {\n        id3 = event.metadata[i];\n        this.trigger('id3Frame', id3);\n      }\n    } // Only emit `done` if all tracks have been flushed and emitted\n\n    if (this.emittedTracks >= this.numberOfTracks) {\n      this.trigger('done');\n      this.emittedTracks = 0;\n    }\n  };\n  CoalesceStream.prototype.setRemux = function (val) {\n    this.remuxTracks = val;\n  };\n  /**\n   * A Stream that expects MP2T binary data as input and produces\n   * corresponding media segments, suitable for use with Media Source\n   * Extension (MSE) implementations that support the ISO BMFF byte\n   * stream format, like Chrome.\n   */\n\n  Transmuxer = function (options) {\n    var self = this,\n      hasFlushed = true,\n      videoTrack,\n      audioTrack;\n    Transmuxer.prototype.init.call(this);\n    options = options || {};\n    this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n    this.transmuxPipeline_ = {};\n    this.setupAacPipeline = function () {\n      var pipeline = {};\n      this.transmuxPipeline_ = pipeline;\n      pipeline.type = 'aac';\n      pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n      pipeline.aacStream = new AacStream();\n      pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n      pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n      pipeline.adtsStream = new AdtsStream();\n      pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n      pipeline.headOfPipeline = pipeline.aacStream;\n      pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n      pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n      pipeline.metadataStream.on('timestamp', function (frame) {\n        pipeline.aacStream.setTimestamp(frame.timeStamp);\n      });\n      pipeline.aacStream.on('data', function (data) {\n        if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n          return;\n        }\n        audioTrack = audioTrack || {\n          timelineStartInfo: {\n            baseMediaDecodeTime: self.baseMediaDecodeTime\n          },\n          codec: 'adts',\n          type: 'audio'\n        }; // hook up the audio segment stream to the first track with aac data\n\n        pipeline.coalesceStream.numberOfTracks++;\n        pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n        pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n        pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n        pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n        self.trigger('trackinfo', {\n          hasAudio: !!audioTrack,\n          hasVideo: !!videoTrack\n        });\n      }); // Re-emit any data coming from the coalesce stream to the outside world\n\n      pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n      pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n      addPipelineLogRetriggers(this, pipeline);\n    };\n    this.setupTsPipeline = function () {\n      var pipeline = {};\n      this.transmuxPipeline_ = pipeline;\n      pipeline.type = 'ts';\n      pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n      pipeline.packetStream = new m2ts.TransportPacketStream();\n      pipeline.parseStream = new m2ts.TransportParseStream();\n      pipeline.elementaryStream = new m2ts.ElementaryStream();\n      pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n      pipeline.adtsStream = new AdtsStream();\n      pipeline.h264Stream = new H264Stream();\n      pipeline.captionStream = new m2ts.CaptionStream(options);\n      pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n      pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n      pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n      // demux the streams\n\n      pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n      pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n      pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n      pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n      pipeline.elementaryStream.on('data', function (data) {\n        var i;\n        if (data.type === 'metadata') {\n          i = data.tracks.length; // scan the tracks listed in the metadata\n\n          while (i--) {\n            if (!videoTrack && data.tracks[i].type === 'video') {\n              videoTrack = data.tracks[i];\n              videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n            } else if (!audioTrack && data.tracks[i].type === 'audio') {\n              audioTrack = data.tracks[i];\n              audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n            }\n          } // hook up the video segment stream to the first track with h264 data\n\n          if (videoTrack && !pipeline.videoSegmentStream) {\n            pipeline.coalesceStream.numberOfTracks++;\n            pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options);\n            pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n            pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n              // When video emits timelineStartInfo data after a flush, we forward that\n              // info to the AudioSegmentStream, if it exists, because video timeline\n              // data takes precedence.  Do not do this if keepOriginalTimestamps is set,\n              // because this is a particularly subtle form of timestamp alteration.\n              if (audioTrack && !options.keepOriginalTimestamps) {\n                audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n                // very earliest DTS we have seen in video because Chrome will\n                // interpret any video track with a baseMediaDecodeTime that is\n                // non-zero as a gap.\n\n                pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n              }\n            });\n            pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n            pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n            pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n              if (audioTrack) {\n                pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n              }\n            });\n            pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n            pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n          }\n          if (audioTrack && !pipeline.audioSegmentStream) {\n            // hook up the audio segment stream to the first track with aac data\n            pipeline.coalesceStream.numberOfTracks++;\n            pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n            pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n            pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n            pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n            pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n          } // emit pmt info\n\n          self.trigger('trackinfo', {\n            hasAudio: !!audioTrack,\n            hasVideo: !!videoTrack\n          });\n        }\n      }); // Re-emit any data coming from the coalesce stream to the outside world\n\n      pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n      pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n        id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n        self.trigger('id3Frame', id3Frame);\n      });\n      pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n      pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n      addPipelineLogRetriggers(this, pipeline);\n    }; // hook up the segment streams once track metadata is delivered\n\n    this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n      var pipeline = this.transmuxPipeline_;\n      if (!options.keepOriginalTimestamps) {\n        this.baseMediaDecodeTime = baseMediaDecodeTime;\n      }\n      if (audioTrack) {\n        audioTrack.timelineStartInfo.dts = undefined;\n        audioTrack.timelineStartInfo.pts = undefined;\n        trackDecodeInfo.clearDtsInfo(audioTrack);\n        if (pipeline.audioTimestampRolloverStream) {\n          pipeline.audioTimestampRolloverStream.discontinuity();\n        }\n      }\n      if (videoTrack) {\n        if (pipeline.videoSegmentStream) {\n          pipeline.videoSegmentStream.gopCache_ = [];\n        }\n        videoTrack.timelineStartInfo.dts = undefined;\n        videoTrack.timelineStartInfo.pts = undefined;\n        trackDecodeInfo.clearDtsInfo(videoTrack);\n        pipeline.captionStream.reset();\n      }\n      if (pipeline.timestampRolloverStream) {\n        pipeline.timestampRolloverStream.discontinuity();\n      }\n    };\n    this.setAudioAppendStart = function (timestamp) {\n      if (audioTrack) {\n        this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n      }\n    };\n    this.setRemux = function (val) {\n      var pipeline = this.transmuxPipeline_;\n      options.remux = val;\n      if (pipeline && pipeline.coalesceStream) {\n        pipeline.coalesceStream.setRemux(val);\n      }\n    };\n    this.alignGopsWith = function (gopsToAlignWith) {\n      if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n        this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n      }\n    };\n    this.getLogTrigger_ = function (key) {\n      var self = this;\n      return function (event) {\n        event.stream = key;\n        self.trigger('log', event);\n      };\n    }; // feed incoming data to the front of the parsing pipeline\n\n    this.push = function (data) {\n      if (hasFlushed) {\n        var isAac = isLikelyAacData(data);\n        if (isAac && this.transmuxPipeline_.type !== 'aac') {\n          this.setupAacPipeline();\n        } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n          this.setupTsPipeline();\n        }\n        hasFlushed = false;\n      }\n      this.transmuxPipeline_.headOfPipeline.push(data);\n    }; // flush any buffered data\n\n    this.flush = function () {\n      hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n      this.transmuxPipeline_.headOfPipeline.flush();\n    };\n    this.endTimeline = function () {\n      this.transmuxPipeline_.headOfPipeline.endTimeline();\n    };\n    this.reset = function () {\n      if (this.transmuxPipeline_.headOfPipeline) {\n        this.transmuxPipeline_.headOfPipeline.reset();\n      }\n    }; // Caption data has to be reset when seeking outside buffered range\n\n    this.resetCaptions = function () {\n      if (this.transmuxPipeline_.captionStream) {\n        this.transmuxPipeline_.captionStream.reset();\n      }\n    };\n  };\n  Transmuxer.prototype = new Stream();\n  var transmuxer = {\n    Transmuxer: Transmuxer,\n    VideoSegmentStream: VideoSegmentStream,\n    AudioSegmentStream: AudioSegmentStream,\n    AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n    VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n    // exported for testing\n    generateSegmentTimingInfo: generateSegmentTimingInfo\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   */\n\n  var toUnsigned$3 = function (value) {\n    return value >>> 0;\n  };\n  var toHexString$1 = function (value) {\n    return ('00' + value.toString(16)).slice(-2);\n  };\n  var bin = {\n    toUnsigned: toUnsigned$3,\n    toHexString: toHexString$1\n  };\n  var parseType$4 = function (buffer) {\n    var result = '';\n    result += String.fromCharCode(buffer[0]);\n    result += String.fromCharCode(buffer[1]);\n    result += String.fromCharCode(buffer[2]);\n    result += String.fromCharCode(buffer[3]);\n    return result;\n  };\n  var parseType_1 = parseType$4;\n  var toUnsigned$2 = bin.toUnsigned;\n  var parseType$3 = parseType_1;\n  var findBox$5 = function (data, path) {\n    var results = [],\n      i,\n      size,\n      type,\n      end,\n      subresults;\n    if (!path.length) {\n      // short-circuit the search for empty paths\n      return null;\n    }\n    for (i = 0; i < data.byteLength;) {\n      size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n      type = parseType$3(data.subarray(i + 4, i + 8));\n      end = size > 1 ? i + size : data.byteLength;\n      if (type === path[0]) {\n        if (path.length === 1) {\n          // this is the end of the path and we've found the box we were\n          // looking for\n          results.push(data.subarray(i + 8, end));\n        } else {\n          // recursively search for the next box along the path\n          subresults = findBox$5(data.subarray(i + 8, end), path.slice(1));\n          if (subresults.length) {\n            results = results.concat(subresults);\n          }\n        }\n      }\n      i = end;\n    } // we've finished searching all of data\n\n    return results;\n  };\n  var findBox_1 = findBox$5;\n  var toUnsigned$1 = bin.toUnsigned;\n  var getUint64$4 = numbers.getUint64;\n  var tfdt = function (data) {\n    var result = {\n      version: data[0],\n      flags: new Uint8Array(data.subarray(1, 4))\n    };\n    if (result.version === 1) {\n      result.baseMediaDecodeTime = getUint64$4(data.subarray(4));\n    } else {\n      result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n    }\n    return result;\n  };\n  var parseTfdt$3 = tfdt;\n  var tfhd = function (data) {\n    var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n      result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4)),\n        trackId: view.getUint32(4)\n      },\n      baseDataOffsetPresent = result.flags[2] & 0x01,\n      sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n      defaultSampleDurationPresent = result.flags[2] & 0x08,\n      defaultSampleSizePresent = result.flags[2] & 0x10,\n      defaultSampleFlagsPresent = result.flags[2] & 0x20,\n      durationIsEmpty = result.flags[0] & 0x010000,\n      defaultBaseIsMoof = result.flags[0] & 0x020000,\n      i;\n    i = 8;\n    if (baseDataOffsetPresent) {\n      i += 4; // truncate top 4 bytes\n      // FIXME: should we read the full 64 bits?\n\n      result.baseDataOffset = view.getUint32(12);\n      i += 4;\n    }\n    if (sampleDescriptionIndexPresent) {\n      result.sampleDescriptionIndex = view.getUint32(i);\n      i += 4;\n    }\n    if (defaultSampleDurationPresent) {\n      result.defaultSampleDuration = view.getUint32(i);\n      i += 4;\n    }\n    if (defaultSampleSizePresent) {\n      result.defaultSampleSize = view.getUint32(i);\n      i += 4;\n    }\n    if (defaultSampleFlagsPresent) {\n      result.defaultSampleFlags = view.getUint32(i);\n    }\n    if (durationIsEmpty) {\n      result.durationIsEmpty = true;\n    }\n    if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n      result.baseDataOffsetIsMoof = true;\n    }\n    return result;\n  };\n  var parseTfhd$2 = tfhd;\n  var getUint64$3 = numbers.getUint64;\n  var parseSidx = function (data) {\n    var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n      result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4)),\n        references: [],\n        referenceId: view.getUint32(4),\n        timescale: view.getUint32(8)\n      },\n      i = 12;\n    if (result.version === 0) {\n      result.earliestPresentationTime = view.getUint32(i);\n      result.firstOffset = view.getUint32(i + 4);\n      i += 8;\n    } else {\n      // read 64 bits\n      result.earliestPresentationTime = getUint64$3(data.subarray(i));\n      result.firstOffset = getUint64$3(data.subarray(i + 8));\n      i += 16;\n    }\n    i += 2; // reserved\n\n    var referenceCount = view.getUint16(i);\n    i += 2; // start of references\n\n    for (; referenceCount > 0; i += 12, referenceCount--) {\n      result.references.push({\n        referenceType: (data[i] & 0x80) >>> 7,\n        referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n        subsegmentDuration: view.getUint32(i + 4),\n        startsWithSap: !!(data[i + 8] & 0x80),\n        sapType: (data[i + 8] & 0x70) >>> 4,\n        sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n      });\n    }\n    return result;\n  };\n  var parseSidx_1 = parseSidx;\n  var parseSampleFlags$1 = function (flags) {\n    return {\n      isLeading: (flags[0] & 0x0c) >>> 2,\n      dependsOn: flags[0] & 0x03,\n      isDependedOn: (flags[1] & 0xc0) >>> 6,\n      hasRedundancy: (flags[1] & 0x30) >>> 4,\n      paddingValue: (flags[1] & 0x0e) >>> 1,\n      isNonSyncSample: flags[1] & 0x01,\n      degradationPriority: flags[2] << 8 | flags[3]\n    };\n  };\n  var parseSampleFlags_1 = parseSampleFlags$1;\n  var parseSampleFlags = parseSampleFlags_1;\n  var trun = function (data) {\n    var result = {\n        version: data[0],\n        flags: new Uint8Array(data.subarray(1, 4)),\n        samples: []\n      },\n      view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n      // Flag interpretation\n      dataOffsetPresent = result.flags[2] & 0x01,\n      // compare with 2nd byte of 0x1\n      firstSampleFlagsPresent = result.flags[2] & 0x04,\n      // compare with 2nd byte of 0x4\n      sampleDurationPresent = result.flags[1] & 0x01,\n      // compare with 2nd byte of 0x100\n      sampleSizePresent = result.flags[1] & 0x02,\n      // compare with 2nd byte of 0x200\n      sampleFlagsPresent = result.flags[1] & 0x04,\n      // compare with 2nd byte of 0x400\n      sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n      // compare with 2nd byte of 0x800\n      sampleCount = view.getUint32(4),\n      offset = 8,\n      sample;\n    if (dataOffsetPresent) {\n      // 32 bit signed integer\n      result.dataOffset = view.getInt32(offset);\n      offset += 4;\n    } // Overrides the flags for the first sample only. The order of\n    // optional values will be: duration, size, compositionTimeOffset\n\n    if (firstSampleFlagsPresent && sampleCount) {\n      sample = {\n        flags: parseSampleFlags(data.subarray(offset, offset + 4))\n      };\n      offset += 4;\n      if (sampleDurationPresent) {\n        sample.duration = view.getUint32(offset);\n        offset += 4;\n      }\n      if (sampleSizePresent) {\n        sample.size = view.getUint32(offset);\n        offset += 4;\n      }\n      if (sampleCompositionTimeOffsetPresent) {\n        if (result.version === 1) {\n          sample.compositionTimeOffset = view.getInt32(offset);\n        } else {\n          sample.compositionTimeOffset = view.getUint32(offset);\n        }\n        offset += 4;\n      }\n      result.samples.push(sample);\n      sampleCount--;\n    }\n    while (sampleCount--) {\n      sample = {};\n      if (sampleDurationPresent) {\n        sample.duration = view.getUint32(offset);\n        offset += 4;\n      }\n      if (sampleSizePresent) {\n        sample.size = view.getUint32(offset);\n        offset += 4;\n      }\n      if (sampleFlagsPresent) {\n        sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n        offset += 4;\n      }\n      if (sampleCompositionTimeOffsetPresent) {\n        if (result.version === 1) {\n          sample.compositionTimeOffset = view.getInt32(offset);\n        } else {\n          sample.compositionTimeOffset = view.getUint32(offset);\n        }\n        offset += 4;\n      }\n      result.samples.push(sample);\n    }\n    return result;\n  };\n  var parseTrun$2 = trun;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Parse the internal MP4 structure into an equivalent javascript\n   * object.\n   */\n\n  var numberHelpers = numbers;\n  var getUint64$2 = numberHelpers.getUint64;\n  var inspectMp4,\n    textifyMp4,\n    parseMp4Date = function (seconds) {\n      return new Date(seconds * 1000 - 2082844800000);\n    },\n    parseType$2 = parseType_1,\n    findBox$4 = findBox_1,\n    nalParse = function (avcStream) {\n      var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n        result = [],\n        i,\n        length;\n      for (i = 0; i + 4 < avcStream.length; i += length) {\n        length = avcView.getUint32(i);\n        i += 4; // bail if this doesn't appear to be an H264 stream\n\n        if (length <= 0) {\n          result.push('<span style=\\'color:red;\\'>MALFORMED DATA</span>');\n          continue;\n        }\n        switch (avcStream[i] & 0x1F) {\n          case 0x01:\n            result.push('slice_layer_without_partitioning_rbsp');\n            break;\n          case 0x05:\n            result.push('slice_layer_without_partitioning_rbsp_idr');\n            break;\n          case 0x06:\n            result.push('sei_rbsp');\n            break;\n          case 0x07:\n            result.push('seq_parameter_set_rbsp');\n            break;\n          case 0x08:\n            result.push('pic_parameter_set_rbsp');\n            break;\n          case 0x09:\n            result.push('access_unit_delimiter_rbsp');\n            break;\n          default:\n            result.push('UNKNOWN NAL - ' + avcStream[i] & 0x1F);\n            break;\n        }\n      }\n      return result;\n    },\n    // registry of handlers for individual mp4 box types\n    parse = {\n      // codingname, not a first-class box type. stsd entries share the\n      // same format as real boxes so the parsing infrastructure can be\n      // shared\n      avc1: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n        return {\n          dataReferenceIndex: view.getUint16(6),\n          width: view.getUint16(24),\n          height: view.getUint16(26),\n          horizresolution: view.getUint16(28) + view.getUint16(30) / 16,\n          vertresolution: view.getUint16(32) + view.getUint16(34) / 16,\n          frameCount: view.getUint16(40),\n          depth: view.getUint16(74),\n          config: inspectMp4(data.subarray(78, data.byteLength))\n        };\n      },\n      avcC: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            configurationVersion: data[0],\n            avcProfileIndication: data[1],\n            profileCompatibility: data[2],\n            avcLevelIndication: data[3],\n            lengthSizeMinusOne: data[4] & 0x03,\n            sps: [],\n            pps: []\n          },\n          numOfSequenceParameterSets = data[5] & 0x1f,\n          numOfPictureParameterSets,\n          nalSize,\n          offset,\n          i; // iterate past any SPSs\n\n        offset = 6;\n        for (i = 0; i < numOfSequenceParameterSets; i++) {\n          nalSize = view.getUint16(offset);\n          offset += 2;\n          result.sps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n          offset += nalSize;\n        } // iterate past any PPSs\n\n        numOfPictureParameterSets = data[offset];\n        offset++;\n        for (i = 0; i < numOfPictureParameterSets; i++) {\n          nalSize = view.getUint16(offset);\n          offset += 2;\n          result.pps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n          offset += nalSize;\n        }\n        return result;\n      },\n      btrt: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n        return {\n          bufferSizeDB: view.getUint32(0),\n          maxBitrate: view.getUint32(4),\n          avgBitrate: view.getUint32(8)\n        };\n      },\n      edts: function edts(data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      elst: function elst(data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4)),\n            edits: []\n          },\n          entryCount = view.getUint32(4),\n          i;\n        for (i = 8; entryCount; entryCount--) {\n          if (result.version === 0) {\n            result.edits.push({\n              segmentDuration: view.getUint32(i),\n              mediaTime: view.getInt32(i + 4),\n              mediaRate: view.getUint16(i + 8) + view.getUint16(i + 10) / (256 * 256)\n            });\n            i += 12;\n          } else {\n            result.edits.push({\n              segmentDuration: getUint64$2(data.subarray(i)),\n              mediaTime: getUint64$2(data.subarray(i + 8)),\n              mediaRate: view.getUint16(i + 16) + view.getUint16(i + 18) / (256 * 256)\n            });\n            i += 20;\n          }\n        }\n        return result;\n      },\n      esds: function (data) {\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          esId: data[6] << 8 | data[7],\n          streamPriority: data[8] & 0x1f,\n          decoderConfig: {\n            objectProfileIndication: data[11],\n            streamType: data[12] >>> 2 & 0x3f,\n            bufferSize: data[13] << 16 | data[14] << 8 | data[15],\n            maxBitrate: data[16] << 24 | data[17] << 16 | data[18] << 8 | data[19],\n            avgBitrate: data[20] << 24 | data[21] << 16 | data[22] << 8 | data[23],\n            decoderConfigDescriptor: {\n              tag: data[24],\n              length: data[25],\n              audioObjectType: data[26] >>> 3 & 0x1f,\n              samplingFrequencyIndex: (data[26] & 0x07) << 1 | data[27] >>> 7 & 0x01,\n              channelConfiguration: data[27] >>> 3 & 0x0f\n            }\n          }\n        };\n      },\n      ftyp: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            majorBrand: parseType$2(data.subarray(0, 4)),\n            minorVersion: view.getUint32(4),\n            compatibleBrands: []\n          },\n          i = 8;\n        while (i < data.byteLength) {\n          result.compatibleBrands.push(parseType$2(data.subarray(i, i + 4)));\n          i += 4;\n        }\n        return result;\n      },\n      dinf: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      dref: function (data) {\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          dataReferences: inspectMp4(data.subarray(8))\n        };\n      },\n      hdlr: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4)),\n            handlerType: parseType$2(data.subarray(8, 12)),\n            name: ''\n          },\n          i = 8; // parse out the name field\n\n        for (i = 24; i < data.byteLength; i++) {\n          if (data[i] === 0x00) {\n            // the name field is null-terminated\n            i++;\n            break;\n          }\n          result.name += String.fromCharCode(data[i]);\n        } // decode UTF-8 to javascript's internal representation\n        // see http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\n\n        result.name = decodeURIComponent(escape(result.name));\n        return result;\n      },\n      mdat: function (data) {\n        return {\n          byteLength: data.byteLength,\n          nals: nalParse(data)\n        };\n      },\n      mdhd: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          i = 4,\n          language,\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4)),\n            language: ''\n          };\n        if (result.version === 1) {\n          i += 4;\n          result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n          i += 8;\n          result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n          i += 4;\n          result.timescale = view.getUint32(i);\n          i += 8;\n          result.duration = view.getUint32(i); // truncating top 4 bytes\n        } else {\n          result.creationTime = parseMp4Date(view.getUint32(i));\n          i += 4;\n          result.modificationTime = parseMp4Date(view.getUint32(i));\n          i += 4;\n          result.timescale = view.getUint32(i);\n          i += 4;\n          result.duration = view.getUint32(i);\n        }\n        i += 4; // language is stored as an ISO-639-2/T code in an array of three 5-bit fields\n        // each field is the packed difference between its ASCII value and 0x60\n\n        language = view.getUint16(i);\n        result.language += String.fromCharCode((language >> 10) + 0x60);\n        result.language += String.fromCharCode(((language & 0x03e0) >> 5) + 0x60);\n        result.language += String.fromCharCode((language & 0x1f) + 0x60);\n        return result;\n      },\n      mdia: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      mfhd: function (data) {\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          sequenceNumber: data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]\n        };\n      },\n      minf: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      // codingname, not a first-class box type. stsd entries share the\n      // same format as real boxes so the parsing infrastructure can be\n      // shared\n      mp4a: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            // 6 bytes reserved\n            dataReferenceIndex: view.getUint16(6),\n            // 4 + 4 bytes reserved\n            channelcount: view.getUint16(16),\n            samplesize: view.getUint16(18),\n            // 2 bytes pre_defined\n            // 2 bytes reserved\n            samplerate: view.getUint16(24) + view.getUint16(26) / 65536\n          }; // if there are more bytes to process, assume this is an ISO/IEC\n        // 14496-14 MP4AudioSampleEntry and parse the ESDBox\n\n        if (data.byteLength > 28) {\n          result.streamDescriptor = inspectMp4(data.subarray(28))[0];\n        }\n        return result;\n      },\n      moof: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      moov: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      mvex: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      mvhd: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          i = 4,\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4))\n          };\n        if (result.version === 1) {\n          i += 4;\n          result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n          i += 8;\n          result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n          i += 4;\n          result.timescale = view.getUint32(i);\n          i += 8;\n          result.duration = view.getUint32(i); // truncating top 4 bytes\n        } else {\n          result.creationTime = parseMp4Date(view.getUint32(i));\n          i += 4;\n          result.modificationTime = parseMp4Date(view.getUint32(i));\n          i += 4;\n          result.timescale = view.getUint32(i);\n          i += 4;\n          result.duration = view.getUint32(i);\n        }\n        i += 4; // convert fixed-point, base 16 back to a number\n\n        result.rate = view.getUint16(i) + view.getUint16(i + 2) / 16;\n        i += 4;\n        result.volume = view.getUint8(i) + view.getUint8(i + 1) / 8;\n        i += 2;\n        i += 2;\n        i += 2 * 4;\n        result.matrix = new Uint32Array(data.subarray(i, i + 9 * 4));\n        i += 9 * 4;\n        i += 6 * 4;\n        result.nextTrackId = view.getUint32(i);\n        return result;\n      },\n      pdin: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n        return {\n          version: view.getUint8(0),\n          flags: new Uint8Array(data.subarray(1, 4)),\n          rate: view.getUint32(4),\n          initialDelay: view.getUint32(8)\n        };\n      },\n      sdtp: function (data) {\n        var result = {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            samples: []\n          },\n          i;\n        for (i = 4; i < data.byteLength; i++) {\n          result.samples.push({\n            dependsOn: (data[i] & 0x30) >> 4,\n            isDependedOn: (data[i] & 0x0c) >> 2,\n            hasRedundancy: data[i] & 0x03\n          });\n        }\n        return result;\n      },\n      sidx: parseSidx_1,\n      smhd: function (data) {\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          balance: data[4] + data[5] / 256\n        };\n      },\n      stbl: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      ctts: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4)),\n            compositionOffsets: []\n          },\n          entryCount = view.getUint32(4),\n          i;\n        for (i = 8; entryCount; i += 8, entryCount--) {\n          result.compositionOffsets.push({\n            sampleCount: view.getUint32(i),\n            sampleOffset: view[result.version === 0 ? 'getUint32' : 'getInt32'](i + 4)\n          });\n        }\n        return result;\n      },\n      stss: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4)),\n            syncSamples: []\n          },\n          entryCount = view.getUint32(4),\n          i;\n        for (i = 8; entryCount; i += 4, entryCount--) {\n          result.syncSamples.push(view.getUint32(i));\n        }\n        return result;\n      },\n      stco: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            chunkOffsets: []\n          },\n          entryCount = view.getUint32(4),\n          i;\n        for (i = 8; entryCount; i += 4, entryCount--) {\n          result.chunkOffsets.push(view.getUint32(i));\n        }\n        return result;\n      },\n      stsc: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          entryCount = view.getUint32(4),\n          result = {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            sampleToChunks: []\n          },\n          i;\n        for (i = 8; entryCount; i += 12, entryCount--) {\n          result.sampleToChunks.push({\n            firstChunk: view.getUint32(i),\n            samplesPerChunk: view.getUint32(i + 4),\n            sampleDescriptionIndex: view.getUint32(i + 8)\n          });\n        }\n        return result;\n      },\n      stsd: function (data) {\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          sampleDescriptions: inspectMp4(data.subarray(8))\n        };\n      },\n      stsz: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            sampleSize: view.getUint32(4),\n            entries: []\n          },\n          i;\n        for (i = 12; i < data.byteLength; i += 4) {\n          result.entries.push(view.getUint32(i));\n        }\n        return result;\n      },\n      stts: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          result = {\n            version: data[0],\n            flags: new Uint8Array(data.subarray(1, 4)),\n            timeToSamples: []\n          },\n          entryCount = view.getUint32(4),\n          i;\n        for (i = 8; entryCount; i += 8, entryCount--) {\n          result.timeToSamples.push({\n            sampleCount: view.getUint32(i),\n            sampleDelta: view.getUint32(i + 4)\n          });\n        }\n        return result;\n      },\n      styp: function (data) {\n        return parse.ftyp(data);\n      },\n      tfdt: parseTfdt$3,\n      tfhd: parseTfhd$2,\n      tkhd: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n          i = 4,\n          result = {\n            version: view.getUint8(0),\n            flags: new Uint8Array(data.subarray(1, 4))\n          };\n        if (result.version === 1) {\n          i += 4;\n          result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n          i += 8;\n          result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n\n          i += 4;\n          result.trackId = view.getUint32(i);\n          i += 4;\n          i += 8;\n          result.duration = view.getUint32(i); // truncating top 4 bytes\n        } else {\n          result.creationTime = parseMp4Date(view.getUint32(i));\n          i += 4;\n          result.modificationTime = parseMp4Date(view.getUint32(i));\n          i += 4;\n          result.trackId = view.getUint32(i);\n          i += 4;\n          i += 4;\n          result.duration = view.getUint32(i);\n        }\n        i += 4;\n        i += 2 * 4;\n        result.layer = view.getUint16(i);\n        i += 2;\n        result.alternateGroup = view.getUint16(i);\n        i += 2; // convert fixed-point, base 16 back to a number\n\n        result.volume = view.getUint8(i) + view.getUint8(i + 1) / 8;\n        i += 2;\n        i += 2;\n        result.matrix = new Uint32Array(data.subarray(i, i + 9 * 4));\n        i += 9 * 4;\n        result.width = view.getUint16(i) + view.getUint16(i + 2) / 65536;\n        i += 4;\n        result.height = view.getUint16(i) + view.getUint16(i + 2) / 65536;\n        return result;\n      },\n      traf: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      trak: function (data) {\n        return {\n          boxes: inspectMp4(data)\n        };\n      },\n      trex: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          trackId: view.getUint32(4),\n          defaultSampleDescriptionIndex: view.getUint32(8),\n          defaultSampleDuration: view.getUint32(12),\n          defaultSampleSize: view.getUint32(16),\n          sampleDependsOn: data[20] & 0x03,\n          sampleIsDependedOn: (data[21] & 0xc0) >> 6,\n          sampleHasRedundancy: (data[21] & 0x30) >> 4,\n          samplePaddingValue: (data[21] & 0x0e) >> 1,\n          sampleIsDifferenceSample: !!(data[21] & 0x01),\n          sampleDegradationPriority: view.getUint16(22)\n        };\n      },\n      trun: parseTrun$2,\n      'url ': function (data) {\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4))\n        };\n      },\n      vmhd: function (data) {\n        var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n        return {\n          version: data[0],\n          flags: new Uint8Array(data.subarray(1, 4)),\n          graphicsmode: view.getUint16(4),\n          opcolor: new Uint16Array([view.getUint16(6), view.getUint16(8), view.getUint16(10)])\n        };\n      }\n    };\n  /**\n   * Return a javascript array of box objects parsed from an ISO base\n   * media file.\n   * @param data {Uint8Array} the binary data of the media to be inspected\n   * @return {array} a javascript array of potentially nested box objects\n   */\n\n  inspectMp4 = function (data) {\n    var i = 0,\n      result = [],\n      view,\n      size,\n      type,\n      end,\n      box; // Convert data from Uint8Array to ArrayBuffer, to follow Dataview API\n\n    var ab = new ArrayBuffer(data.length);\n    var v = new Uint8Array(ab);\n    for (var z = 0; z < data.length; ++z) {\n      v[z] = data[z];\n    }\n    view = new DataView(ab);\n    while (i < data.byteLength) {\n      // parse box data\n      size = view.getUint32(i);\n      type = parseType$2(data.subarray(i + 4, i + 8));\n      end = size > 1 ? i + size : data.byteLength; // parse type-specific data\n\n      box = (parse[type] || function (data) {\n        return {\n          data: data\n        };\n      })(data.subarray(i + 8, end));\n      box.size = size;\n      box.type = type; // store this box and move to the next\n\n      result.push(box);\n      i = end;\n    }\n    return result;\n  };\n  /**\n   * Returns a textual representation of the javascript represtentation\n   * of an MP4 file. You can use it as an alternative to\n   * JSON.stringify() to compare inspected MP4s.\n   * @param inspectedMp4 {array} the parsed array of boxes in an MP4\n   * file\n   * @param depth {number} (optional) the number of ancestor boxes of\n   * the elements of inspectedMp4. Assumed to be zero if unspecified.\n   * @return {string} a text representation of the parsed MP4\n   */\n\n  textifyMp4 = function (inspectedMp4, depth) {\n    var indent;\n    depth = depth || 0;\n    indent = new Array(depth * 2 + 1).join(' '); // iterate over all the boxes\n\n    return inspectedMp4.map(function (box, index) {\n      // list the box type first at the current indentation level\n      return indent + box.type + '\\n' +\n      // the type is already included and handle child boxes separately\n      Object.keys(box).filter(function (key) {\n        return key !== 'type' && key !== 'boxes'; // output all the box properties\n      }).map(function (key) {\n        var prefix = indent + '  ' + key + ': ',\n          value = box[key]; // print out raw bytes as hexademical\n\n        if (value instanceof Uint8Array || value instanceof Uint32Array) {\n          var bytes = Array.prototype.slice.call(new Uint8Array(value.buffer, value.byteOffset, value.byteLength)).map(function (byte) {\n            return ' ' + ('00' + byte.toString(16)).slice(-2);\n          }).join('').match(/.{1,24}/g);\n          if (!bytes) {\n            return prefix + '<>';\n          }\n          if (bytes.length === 1) {\n            return prefix + '<' + bytes.join('').slice(1) + '>';\n          }\n          return prefix + '<\\n' + bytes.map(function (line) {\n            return indent + '  ' + line;\n          }).join('\\n') + '\\n' + indent + '  >';\n        } // stringify generic objects\n\n        return prefix + JSON.stringify(value, null, 2).split('\\n').map(function (line, index) {\n          if (index === 0) {\n            return line;\n          }\n          return indent + '  ' + line;\n        }).join('\\n');\n      }).join('\\n') + (\n      // recursively textify the child boxes\n      box.boxes ? '\\n' + textifyMp4(box.boxes, depth + 1) : '');\n    }).join('\\n');\n  };\n  var mp4Inspector = {\n    inspect: inspectMp4,\n    textify: textifyMp4,\n    parseType: parseType$2,\n    findBox: findBox$4,\n    parseTraf: parse.traf,\n    parseTfdt: parse.tfdt,\n    parseHdlr: parse.hdlr,\n    parseTfhd: parse.tfhd,\n    parseTrun: parse.trun,\n    parseSidx: parse.sidx\n  };\n  /**\n   * Returns the first string in the data array ending with a null char '\\0'\n   * @param {UInt8} data \n   * @returns the string with the null char\n   */\n\n  var uint8ToCString$1 = function (data) {\n    var index = 0;\n    var curChar = String.fromCharCode(data[index]);\n    var retString = '';\n    while (curChar !== '\\0') {\n      retString += curChar;\n      index++;\n      curChar = String.fromCharCode(data[index]);\n    } // Add nullChar\n\n    retString += curChar;\n    return retString;\n  };\n  var string = {\n    uint8ToCString: uint8ToCString$1\n  };\n  var uint8ToCString = string.uint8ToCString;\n  var getUint64$1 = numbers.getUint64;\n  /**\n   * Based on: ISO/IEC 23009 Section: 5.10.3.3\n   * References:\n   * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n   * https://aomediacodec.github.io/id3-emsg/\n   * \n   * Takes emsg box data as a uint8 array and returns a emsg box object\n   * @param {UInt8Array} boxData data from emsg box\n   * @returns A parsed emsg box object\n   */\n\n  var parseEmsgBox = function (boxData) {\n    // version + flags\n    var offset = 4;\n    var version = boxData[0];\n    var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n    if (version === 0) {\n      scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n      offset += scheme_id_uri.length;\n      value = uint8ToCString(boxData.subarray(offset));\n      offset += value.length;\n      var dv = new DataView(boxData.buffer);\n      timescale = dv.getUint32(offset);\n      offset += 4;\n      presentation_time_delta = dv.getUint32(offset);\n      offset += 4;\n      event_duration = dv.getUint32(offset);\n      offset += 4;\n      id = dv.getUint32(offset);\n      offset += 4;\n    } else if (version === 1) {\n      var dv = new DataView(boxData.buffer);\n      timescale = dv.getUint32(offset);\n      offset += 4;\n      presentation_time = getUint64$1(boxData.subarray(offset));\n      offset += 8;\n      event_duration = dv.getUint32(offset);\n      offset += 4;\n      id = dv.getUint32(offset);\n      offset += 4;\n      scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n      offset += scheme_id_uri.length;\n      value = uint8ToCString(boxData.subarray(offset));\n      offset += value.length;\n    }\n    message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n    var emsgBox = {\n      scheme_id_uri,\n      value,\n      // if timescale is undefined or 0 set to 1 \n      timescale: timescale ? timescale : 1,\n      presentation_time,\n      presentation_time_delta,\n      event_duration,\n      id,\n      message_data\n    };\n    return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n  };\n  /**\n   * Scales a presentation time or time delta with an offset with a provided timescale\n   * @param {number} presentationTime \n   * @param {number} timescale \n   * @param {number} timeDelta \n   * @param {number} offset \n   * @returns the scaled time as a number\n   */\n\n  var scaleTime = function (presentationTime, timescale, timeDelta, offset) {\n    return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n  };\n  /**\n   * Checks the emsg box data for validity based on the version\n   * @param {number} version of the emsg box to validate\n   * @param {Object} emsg the emsg data to validate\n   * @returns if the box is valid as a boolean\n   */\n\n  var isValidEmsgBox = function (version, emsg) {\n    var hasScheme = emsg.scheme_id_uri !== '\\0';\n    var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n    var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n    return !(version > 1) && isValidV0Box || isValidV1Box;\n  }; // Utility function to check if an object is defined\n\n  var isDefined = function (data) {\n    return data !== undefined || data !== null;\n  };\n  var emsg$1 = {\n    parseEmsgBox: parseEmsgBox,\n    scaleTime: scaleTime\n  };\n  var win;\n  if (typeof window !== \"undefined\") {\n    win = window;\n  } else if (typeof commonjsGlobal !== \"undefined\") {\n    win = commonjsGlobal;\n  } else if (typeof self !== \"undefined\") {\n    win = self;\n  } else {\n    win = {};\n  }\n  var window_1 = win;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Utilities to detect basic properties and metadata about MP4s.\n   */\n\n  var toUnsigned = bin.toUnsigned;\n  var toHexString = bin.toHexString;\n  var findBox$3 = findBox_1;\n  var parseType$1 = parseType_1;\n  var emsg = emsg$1;\n  var parseTfhd$1 = parseTfhd$2;\n  var parseTrun$1 = parseTrun$2;\n  var parseTfdt$2 = parseTfdt$3;\n  var getUint64 = numbers.getUint64;\n  var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader$1, getEmsgID3;\n  var window$2 = window_1;\n  var parseId3Frames = parseId3.parseId3Frames;\n  /**\n   * Parses an MP4 initialization segment and extracts the timescale\n   * values for any declared tracks. Timescale values indicate the\n   * number of clock ticks per second to assume for time-based values\n   * elsewhere in the MP4.\n   *\n   * To determine the start time of an MP4, you need two pieces of\n   * information: the timescale unit and the earliest base media decode\n   * time. Multiple timescales can be specified within an MP4 but the\n   * base media decode time is always expressed in the timescale from\n   * the media header box for the track:\n   * ```\n   * moov > trak > mdia > mdhd.timescale\n   * ```\n   * @param init {Uint8Array} the bytes of the init segment\n   * @return {object} a hash of track ids to timescale values or null if\n   * the init segment is malformed.\n   */\n\n  timescale = function (init) {\n    var result = {},\n      traks = findBox$3(init, ['moov', 'trak']); // mdhd timescale\n\n    return traks.reduce(function (result, trak) {\n      var tkhd, version, index, id, mdhd;\n      tkhd = findBox$3(trak, ['tkhd'])[0];\n      if (!tkhd) {\n        return null;\n      }\n      version = tkhd[0];\n      index = version === 0 ? 12 : 20;\n      id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n      mdhd = findBox$3(trak, ['mdia', 'mdhd'])[0];\n      if (!mdhd) {\n        return null;\n      }\n      version = mdhd[0];\n      index = version === 0 ? 12 : 20;\n      result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n      return result;\n    }, result);\n  };\n  /**\n   * Determine the base media decode start time, in seconds, for an MP4\n   * fragment. If multiple fragments are specified, the earliest time is\n   * returned.\n   *\n   * The base media decode time can be parsed from track fragment\n   * metadata:\n   * ```\n   * moof > traf > tfdt.baseMediaDecodeTime\n   * ```\n   * It requires the timescale value from the mdhd to interpret.\n   *\n   * @param timescale {object} a hash of track ids to timescale values.\n   * @return {number} the earliest base media decode start time for the\n   * fragment, in seconds\n   */\n\n  startTime = function (timescale, fragment) {\n    var trafs; // we need info from two childrend of each track fragment box\n\n    trafs = findBox$3(fragment, ['moof', 'traf']); // determine the start times for each track\n\n    var lowestTime = trafs.reduce(function (acc, traf) {\n      var tfhd = findBox$3(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n      var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n      var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n      var tfdt = findBox$3(traf, ['tfdt'])[0];\n      var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n      var baseTime; // version 1 is 64 bit\n\n      if (tfdt[0] === 1) {\n        baseTime = getUint64(tfdt.subarray(4, 12));\n      } else {\n        baseTime = dv.getUint32(4);\n      } // convert base time to seconds if it is a valid number.\n\n      let seconds;\n      if (typeof baseTime === 'bigint') {\n        seconds = baseTime / window$2.BigInt(scale);\n      } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n        seconds = baseTime / scale;\n      }\n      if (seconds < Number.MAX_SAFE_INTEGER) {\n        seconds = Number(seconds);\n      }\n      if (seconds < acc) {\n        acc = seconds;\n      }\n      return acc;\n    }, Infinity);\n    return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n  };\n  /**\n   * Determine the composition start, in seconds, for an MP4\n   * fragment.\n   *\n   * The composition start time of a fragment can be calculated using the base\n   * media decode time, composition time offset, and timescale, as follows:\n   *\n   * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n   *\n   * All of the aforementioned information is contained within a media fragment's\n   * `traf` box, except for timescale info, which comes from the initialization\n   * segment, so a track id (also contained within a `traf`) is also necessary to\n   * associate it with a timescale\n   *\n   *\n   * @param timescales {object} - a hash of track ids to timescale values.\n   * @param fragment {Unit8Array} - the bytes of a media segment\n   * @return {number} the composition start time for the fragment, in seconds\n   **/\n\n  compositionStartTime = function (timescales, fragment) {\n    var trafBoxes = findBox$3(fragment, ['moof', 'traf']);\n    var baseMediaDecodeTime = 0;\n    var compositionTimeOffset = 0;\n    var trackId;\n    if (trafBoxes && trafBoxes.length) {\n      // The spec states that track run samples contained within a `traf` box are contiguous, but\n      // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n      // We will assume that they are, so we only need the first to calculate start time.\n      var tfhd = findBox$3(trafBoxes[0], ['tfhd'])[0];\n      var trun = findBox$3(trafBoxes[0], ['trun'])[0];\n      var tfdt = findBox$3(trafBoxes[0], ['tfdt'])[0];\n      if (tfhd) {\n        var parsedTfhd = parseTfhd$1(tfhd);\n        trackId = parsedTfhd.trackId;\n      }\n      if (tfdt) {\n        var parsedTfdt = parseTfdt$2(tfdt);\n        baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n      }\n      if (trun) {\n        var parsedTrun = parseTrun$1(trun);\n        if (parsedTrun.samples && parsedTrun.samples.length) {\n          compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n        }\n      }\n    } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n    // specified.\n\n    var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n    if (typeof baseMediaDecodeTime === 'bigint') {\n      compositionTimeOffset = window$2.BigInt(compositionTimeOffset);\n      timescale = window$2.BigInt(timescale);\n    }\n    var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n    if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n      result = Number(result);\n    }\n    return result;\n  };\n  /**\n    * Find the trackIds of the video tracks in this source.\n    * Found by parsing the Handler Reference and Track Header Boxes:\n    *   moov > trak > mdia > hdlr\n    *   moov > trak > tkhd\n    *\n    * @param {Uint8Array} init - The bytes of the init segment for this source\n    * @return {Number[]} A list of trackIds\n    *\n    * @see ISO-BMFF-12/2015, Section 8.4.3\n   **/\n\n  getVideoTrackIds = function (init) {\n    var traks = findBox$3(init, ['moov', 'trak']);\n    var videoTrackIds = [];\n    traks.forEach(function (trak) {\n      var hdlrs = findBox$3(trak, ['mdia', 'hdlr']);\n      var tkhds = findBox$3(trak, ['tkhd']);\n      hdlrs.forEach(function (hdlr, index) {\n        var handlerType = parseType$1(hdlr.subarray(8, 12));\n        var tkhd = tkhds[index];\n        var view;\n        var version;\n        var trackId;\n        if (handlerType === 'vide') {\n          view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n          version = view.getUint8(0);\n          trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n          videoTrackIds.push(trackId);\n        }\n      });\n    });\n    return videoTrackIds;\n  };\n  getTimescaleFromMediaHeader$1 = function (mdhd) {\n    // mdhd is a FullBox, meaning it will have its own version as the first byte\n    var version = mdhd[0];\n    var index = version === 0 ? 12 : 20;\n    return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n  };\n  /**\n   * Get all the video, audio, and hint tracks from a non fragmented\n   * mp4 segment\n   */\n\n  getTracks = function (init) {\n    var traks = findBox$3(init, ['moov', 'trak']);\n    var tracks = [];\n    traks.forEach(function (trak) {\n      var track = {};\n      var tkhd = findBox$3(trak, ['tkhd'])[0];\n      var view, tkhdVersion; // id\n\n      if (tkhd) {\n        view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n        tkhdVersion = view.getUint8(0);\n        track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n      }\n      var hdlr = findBox$3(trak, ['mdia', 'hdlr'])[0]; // type\n\n      if (hdlr) {\n        var type = parseType$1(hdlr.subarray(8, 12));\n        if (type === 'vide') {\n          track.type = 'video';\n        } else if (type === 'soun') {\n          track.type = 'audio';\n        } else {\n          track.type = type;\n        }\n      } // codec\n\n      var stsd = findBox$3(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n      if (stsd) {\n        var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n        track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n        var codecBox = findBox$3(sampleDescriptions, [track.codec])[0];\n        var codecConfig, codecConfigType;\n        if (codecBox) {\n          // https://tools.ietf.org/html/rfc6381#section-3.3\n          if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n            // we don't need anything but the \"config\" parameter of the\n            // avc1 codecBox\n            codecConfig = codecBox.subarray(78);\n            codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n            if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n              track.codec += '.'; // left padded with zeroes for single digit hex\n              // profile idc\n\n              track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n              track.codec += toHexString(codecConfig[10]); // level idc\n\n              track.codec += toHexString(codecConfig[11]);\n            } else {\n              // TODO: show a warning that we couldn't parse the codec\n              // and are using the default\n              track.codec = 'avc1.4d400d';\n            }\n          } else if (/^mp4[a,v]$/i.test(track.codec)) {\n            // we do not need anything but the streamDescriptor of the mp4a codecBox\n            codecConfig = codecBox.subarray(28);\n            codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n            if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n              track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n              track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n            } else {\n              // TODO: show a warning that we couldn't parse the codec\n              // and are using the default\n              track.codec = 'mp4a.40.2';\n            }\n          } else {\n            // flac, opus, etc\n            track.codec = track.codec.toLowerCase();\n          }\n        }\n      }\n      var mdhd = findBox$3(trak, ['mdia', 'mdhd'])[0];\n      if (mdhd) {\n        track.timescale = getTimescaleFromMediaHeader$1(mdhd);\n      }\n      tracks.push(track);\n    });\n    return tracks;\n  };\n  /**\n   * Returns an array of emsg ID3 data from the provided segmentData.\n   * An offset can also be provided as the Latest Arrival Time to calculate \n   * the Event Start Time of v0 EMSG boxes. \n   * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n   * \n   * @param {Uint8Array} segmentData the segment byte array.\n   * @param {number} offset the segment start time or Latest Arrival Time, \n   * @return {Object[]} an array of ID3 parsed from EMSG boxes\n   */\n\n  getEmsgID3 = function (segmentData, offset = 0) {\n    var emsgBoxes = findBox$3(segmentData, ['emsg']);\n    return emsgBoxes.map(data => {\n      var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n      var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n      return {\n        cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n        duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n        frames: parsedId3Frames\n      };\n    });\n  };\n  var probe$2 = {\n    // export mp4 inspector's findBox and parseType for backwards compatibility\n    findBox: findBox$3,\n    parseType: parseType$1,\n    timescale: timescale,\n    startTime: startTime,\n    compositionStartTime: compositionStartTime,\n    videoTrackIds: getVideoTrackIds,\n    tracks: getTracks,\n    getTimescaleFromMediaHeader: getTimescaleFromMediaHeader$1,\n    getEmsgID3: getEmsgID3\n  };\n  const {\n    parseTrun\n  } = mp4Inspector;\n  const {\n    findBox: findBox$2\n  } = probe$2;\n  var window$1 = window_1;\n  /**\n   * Utility function for parsing data from mdat boxes.\n   * @param {Array<Uint8Array>} segment the segment data to create mdat/traf pairs from.\n   * @returns mdat and traf boxes paired up for easier parsing.\n   */\n\n  var getMdatTrafPairs$2 = function (segment) {\n    var trafs = findBox$2(segment, ['moof', 'traf']);\n    var mdats = findBox$2(segment, ['mdat']);\n    var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n    mdats.forEach(function (mdat, index) {\n      var matchingTraf = trafs[index];\n      mdatTrafPairs.push({\n        mdat: mdat,\n        traf: matchingTraf\n      });\n    });\n    return mdatTrafPairs;\n  };\n  /**\n    * Parses sample information out of Track Run Boxes and calculates\n    * the absolute presentation and decode timestamps of each sample.\n    *\n    * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\n    * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n        @see ISO-BMFF-12/2015, Section 8.8.12\n    * @param {Object} tfhd - The parsed Track Fragment Header\n    *   @see inspect.parseTfhd\n    * @return {Object[]} the parsed samples\n    *\n    * @see ISO-BMFF-12/2015, Section 8.8.8\n   **/\n\n  var parseSamples$2 = function (truns, baseMediaDecodeTime, tfhd) {\n    var currentDts = baseMediaDecodeTime;\n    var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n    var defaultSampleSize = tfhd.defaultSampleSize || 0;\n    var trackId = tfhd.trackId;\n    var allSamples = [];\n    truns.forEach(function (trun) {\n      // Note: We currently do not parse the sample table as well\n      // as the trun. It's possible some sources will require this.\n      // moov > trak > mdia > minf > stbl\n      var trackRun = parseTrun(trun);\n      var samples = trackRun.samples;\n      samples.forEach(function (sample) {\n        if (sample.duration === undefined) {\n          sample.duration = defaultSampleDuration;\n        }\n        if (sample.size === undefined) {\n          sample.size = defaultSampleSize;\n        }\n        sample.trackId = trackId;\n        sample.dts = currentDts;\n        if (sample.compositionTimeOffset === undefined) {\n          sample.compositionTimeOffset = 0;\n        }\n        if (typeof currentDts === 'bigint') {\n          sample.pts = currentDts + window$1.BigInt(sample.compositionTimeOffset);\n          currentDts += window$1.BigInt(sample.duration);\n        } else {\n          sample.pts = currentDts + sample.compositionTimeOffset;\n          currentDts += sample.duration;\n        }\n      });\n      allSamples = allSamples.concat(samples);\n    });\n    return allSamples;\n  };\n  var samples = {\n    getMdatTrafPairs: getMdatTrafPairs$2,\n    parseSamples: parseSamples$2\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Reads in-band CEA-708 captions out of FMP4 segments.\n   * @see https://en.wikipedia.org/wiki/CEA-708\n   */\n\n  var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n  var CaptionStream = captionStream.CaptionStream;\n  var findBox$1 = findBox_1;\n  var parseTfdt$1 = parseTfdt$3;\n  var parseTfhd = parseTfhd$2;\n  var {\n    getMdatTrafPairs: getMdatTrafPairs$1,\n    parseSamples: parseSamples$1\n  } = samples;\n  /**\n    * Maps an offset in the mdat to a sample based on the the size of the samples.\n    * Assumes that `parseSamples` has been called first.\n    *\n    * @param {Number} offset - The offset into the mdat\n    * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n    * @return {?Object} The matching sample, or null if no match was found.\n    *\n    * @see ISO-BMFF-12/2015, Section 8.8.8\n   **/\n\n  var mapToSample = function (offset, samples) {\n    var approximateOffset = offset;\n    for (var i = 0; i < samples.length; i++) {\n      var sample = samples[i];\n      if (approximateOffset < sample.size) {\n        return sample;\n      }\n      approximateOffset -= sample.size;\n    }\n    return null;\n  };\n  /**\n    * Finds SEI nal units contained in a Media Data Box.\n    * Assumes that `parseSamples` has been called first.\n    *\n    * @param {Uint8Array} avcStream - The bytes of the mdat\n    * @param {Object[]} samples - The samples parsed out by `parseSamples`\n    * @param {Number} trackId - The trackId of this video track\n    * @return {Object[]} seiNals - the parsed SEI NALUs found.\n    *   The contents of the seiNal should match what is expected by\n    *   CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n    *\n    * @see ISO-BMFF-12/2015, Section 8.1.1\n    * @see Rec. ITU-T H.264, 7.3.2.3.1\n   **/\n\n  var findSeiNals = function (avcStream, samples, trackId) {\n    var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n      result = {\n        logs: [],\n        seiNals: []\n      },\n      seiNal,\n      i,\n      length,\n      lastMatchedSample;\n    for (i = 0; i + 4 < avcStream.length; i += length) {\n      length = avcView.getUint32(i);\n      i += 4; // Bail if this doesn't appear to be an H264 stream\n\n      if (length <= 0) {\n        continue;\n      }\n      switch (avcStream[i] & 0x1F) {\n        case 0x06:\n          var data = avcStream.subarray(i + 1, i + 1 + length);\n          var matchingSample = mapToSample(i, samples);\n          seiNal = {\n            nalUnitType: 'sei_rbsp',\n            size: length,\n            data: data,\n            escapedRBSP: discardEmulationPreventionBytes(data),\n            trackId: trackId\n          };\n          if (matchingSample) {\n            seiNal.pts = matchingSample.pts;\n            seiNal.dts = matchingSample.dts;\n            lastMatchedSample = matchingSample;\n          } else if (lastMatchedSample) {\n            // If a matching sample cannot be found, use the last\n            // sample's values as they should be as close as possible\n            seiNal.pts = lastMatchedSample.pts;\n            seiNal.dts = lastMatchedSample.dts;\n          } else {\n            result.logs.push({\n              level: 'warn',\n              message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n            });\n            break;\n          }\n          result.seiNals.push(seiNal);\n          break;\n      }\n    }\n    return result;\n  };\n  /**\n    * Parses out caption nals from an FMP4 segment's video tracks.\n    *\n    * @param {Uint8Array} segment - The bytes of a single segment\n    * @param {Number} videoTrackId - The trackId of a video track in the segment\n    * @return {Object.<Number, Object[]>} A mapping of video trackId to\n    *   a list of seiNals found in that track\n   **/\n\n  var parseCaptionNals = function (segment, videoTrackId) {\n    var captionNals = {};\n    var mdatTrafPairs = getMdatTrafPairs$1(segment);\n    mdatTrafPairs.forEach(function (pair) {\n      var mdat = pair.mdat;\n      var traf = pair.traf;\n      var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n      var headerInfo = parseTfhd(tfhd[0]);\n      var trackId = headerInfo.trackId;\n      var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n      var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n      var truns = findBox$1(traf, ['trun']);\n      var samples;\n      var result; // Only parse video data for the chosen video track\n\n      if (videoTrackId === trackId && truns.length > 0) {\n        samples = parseSamples$1(truns, baseMediaDecodeTime, headerInfo);\n        result = findSeiNals(mdat, samples, trackId);\n        if (!captionNals[trackId]) {\n          captionNals[trackId] = {\n            seiNals: [],\n            logs: []\n          };\n        }\n        captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n        captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n      }\n    });\n    return captionNals;\n  };\n  /**\n    * Parses out inband captions from an MP4 container and returns\n    * caption objects that can be used by WebVTT and the TextTrack API.\n    * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n    * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n    * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n    *\n    * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n    * @param {Number} trackId - The id of the video track to parse\n    * @param {Number} timescale - The timescale for the video track from the init segment\n    *\n    * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n    * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n    * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n    * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n    * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n    * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n    * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n   **/\n\n  var parseEmbeddedCaptions = function (segment, trackId, timescale) {\n    var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n    if (trackId === null) {\n      return null;\n    }\n    captionNals = parseCaptionNals(segment, trackId);\n    var trackNals = captionNals[trackId] || {};\n    return {\n      seiNals: trackNals.seiNals,\n      logs: trackNals.logs,\n      timescale: timescale\n    };\n  };\n  /**\n    * Converts SEI NALUs into captions that can be used by video.js\n   **/\n\n  var CaptionParser = function () {\n    var isInitialized = false;\n    var captionStream; // Stores segments seen before trackId and timescale are set\n\n    var segmentCache; // Stores video track ID of the track being parsed\n\n    var trackId; // Stores the timescale of the track being parsed\n\n    var timescale; // Stores captions parsed so far\n\n    var parsedCaptions; // Stores whether we are receiving partial data or not\n\n    var parsingPartial;\n    /**\n      * A method to indicate whether a CaptionParser has been initalized\n      * @returns {Boolean}\n     **/\n\n    this.isInitialized = function () {\n      return isInitialized;\n    };\n    /**\n      * Initializes the underlying CaptionStream, SEI NAL parsing\n      * and management, and caption collection\n     **/\n\n    this.init = function (options) {\n      captionStream = new CaptionStream();\n      isInitialized = true;\n      parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n      captionStream.on('data', function (event) {\n        // Convert to seconds in the source's timescale\n        event.startTime = event.startPts / timescale;\n        event.endTime = event.endPts / timescale;\n        parsedCaptions.captions.push(event);\n        parsedCaptions.captionStreams[event.stream] = true;\n      });\n      captionStream.on('log', function (log) {\n        parsedCaptions.logs.push(log);\n      });\n    };\n    /**\n      * Determines if a new video track will be selected\n      * or if the timescale changed\n      * @return {Boolean}\n     **/\n\n    this.isNewInit = function (videoTrackIds, timescales) {\n      if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n        return false;\n      }\n      return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n    };\n    /**\n      * Parses out SEI captions and interacts with underlying\n      * CaptionStream to return dispatched captions\n      *\n      * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n      * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n      * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\n      * @see parseEmbeddedCaptions\n      * @see m2ts/caption-stream.js\n     **/\n\n    this.parse = function (segment, videoTrackIds, timescales) {\n      var parsedData;\n      if (!this.isInitialized()) {\n        return null; // This is not likely to be a video segment\n      } else if (!videoTrackIds || !timescales) {\n        return null;\n      } else if (this.isNewInit(videoTrackIds, timescales)) {\n        // Use the first video track only as there is no\n        // mechanism to switch to other video tracks\n        trackId = videoTrackIds[0];\n        timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n        // data until we have one.\n        // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n      } else if (trackId === null || !timescale) {\n        segmentCache.push(segment);\n        return null;\n      } // Now that a timescale and trackId is set, parse cached segments\n\n      while (segmentCache.length > 0) {\n        var cachedSegment = segmentCache.shift();\n        this.parse(cachedSegment, videoTrackIds, timescales);\n      }\n      parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n      if (parsedData && parsedData.logs) {\n        parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n      }\n      if (parsedData === null || !parsedData.seiNals) {\n        if (parsedCaptions.logs.length) {\n          return {\n            logs: parsedCaptions.logs,\n            captions: [],\n            captionStreams: []\n          };\n        }\n        return null;\n      }\n      this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n      this.flushStream();\n      return parsedCaptions;\n    };\n    /**\n      * Pushes SEI NALUs onto CaptionStream\n      * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n      * Assumes that `parseCaptionNals` has been called first\n      * @see m2ts/caption-stream.js\n      **/\n\n    this.pushNals = function (nals) {\n      if (!this.isInitialized() || !nals || nals.length === 0) {\n        return null;\n      }\n      nals.forEach(function (nal) {\n        captionStream.push(nal);\n      });\n    };\n    /**\n      * Flushes underlying CaptionStream to dispatch processed, displayable captions\n      * @see m2ts/caption-stream.js\n     **/\n\n    this.flushStream = function () {\n      if (!this.isInitialized()) {\n        return null;\n      }\n      if (!parsingPartial) {\n        captionStream.flush();\n      } else {\n        captionStream.partialFlush();\n      }\n    };\n    /**\n      * Reset caption buckets for new data\n     **/\n\n    this.clearParsedCaptions = function () {\n      parsedCaptions.captions = [];\n      parsedCaptions.captionStreams = {};\n      parsedCaptions.logs = [];\n    };\n    /**\n      * Resets underlying CaptionStream\n      * @see m2ts/caption-stream.js\n     **/\n\n    this.resetCaptionStream = function () {\n      if (!this.isInitialized()) {\n        return null;\n      }\n      captionStream.reset();\n    };\n    /**\n      * Convenience method to clear all captions flushed from the\n      * CaptionStream and still being parsed\n      * @see m2ts/caption-stream.js\n     **/\n\n    this.clearAllCaptions = function () {\n      this.clearParsedCaptions();\n      this.resetCaptionStream();\n    };\n    /**\n      * Reset caption parser\n     **/\n\n    this.reset = function () {\n      segmentCache = [];\n      trackId = null;\n      timescale = null;\n      if (!parsedCaptions) {\n        parsedCaptions = {\n          captions: [],\n          // CC1, CC2, CC3, CC4\n          captionStreams: {},\n          logs: []\n        };\n      } else {\n        this.clearParsedCaptions();\n      }\n      this.resetCaptionStream();\n    };\n    this.reset();\n  };\n  var captionParser = CaptionParser;\n  const {\n    parseTfdt\n  } = mp4Inspector;\n  const findBox = findBox_1;\n  const {\n    getTimescaleFromMediaHeader\n  } = probe$2;\n  const {\n    parseSamples,\n    getMdatTrafPairs\n  } = samples;\n  /**\n   * Module for parsing WebVTT text and styles from FMP4 segments.\n   * Based on the ISO/IEC 14496-30.\n   */\n\n  const WebVttParser = function () {\n    // default timescale to 90k\n    let timescale = 90e3;\n    /**\n     * Parses the timescale from the init segment.\n     * @param {Array<Uint8Array>} segment The initialization segment to parse the timescale from.\n     */\n\n    this.init = function (segment) {\n      // We just need the timescale from the init segment.\n      const mdhd = findBox(segment, ['moov', 'trak', 'mdia', 'mdhd'])[0];\n      if (mdhd) {\n        timescale = getTimescaleFromMediaHeader(mdhd);\n      }\n    };\n    /**\n     * Parses a WebVTT FMP4 segment.\n     * @param {Array<Uint8Array>} segment The content segment to parse the WebVTT cues from.\n     * @returns The WebVTT cue text, styling, and timing info as an array of cue objects.\n     */\n\n    this.parseSegment = function (segment) {\n      const vttCues = [];\n      const mdatTrafPairs = getMdatTrafPairs(segment);\n      let baseMediaDecodeTime = 0;\n      mdatTrafPairs.forEach(function (pair) {\n        const mdatBox = pair.mdat;\n        const trafBox = pair.traf; // zero or one.\n\n        const tfdtBox = findBox(trafBox, ['tfdt'])[0]; // zero or one.\n\n        const tfhdBox = findBox(trafBox, ['tfhd'])[0]; // zero or more.\n\n        const trunBoxes = findBox(trafBox, ['trun']);\n        if (tfdtBox) {\n          const tfdt = parseTfdt(tfdtBox);\n          baseMediaDecodeTime = tfdt.baseMediaDecodeTime;\n        }\n        if (trunBoxes.length && tfhdBox) {\n          const samples = parseSamples(trunBoxes, baseMediaDecodeTime, tfhdBox);\n          let mdatOffset = 0;\n          samples.forEach(function (sample) {\n            // decode utf8 payload\n            const UTF_8 = 'utf-8';\n            const textDecoder = new TextDecoder(UTF_8); // extract sample data from the mdat box.\n            // WebVTT Sample format:\n            // Exactly one VTTEmptyCueBox box\n            // OR one or more VTTCueBox boxes.\n\n            const sampleData = mdatBox.slice(mdatOffset, mdatOffset + sample.size); // single vtte box.\n\n            const vtteBox = findBox(sampleData, ['vtte'])[0]; // empty box\n\n            if (vtteBox) {\n              mdatOffset += sample.size;\n              return;\n            } // TODO: Support 'vtta' boxes.\n            // VTTAdditionalTextBoxes can be interleaved between VTTCueBoxes.\n\n            const vttcBoxes = findBox(sampleData, ['vttc']);\n            vttcBoxes.forEach(function (vttcBox) {\n              // mandatory payload box.\n              const paylBox = findBox(vttcBox, ['payl'])[0]; // optional settings box\n\n              const sttgBox = findBox(vttcBox, ['sttg'])[0];\n              const start = sample.pts / timescale;\n              const end = (sample.pts + sample.duration) / timescale;\n              let cueText, settings; // contains cue text.\n\n              if (paylBox) {\n                try {\n                  cueText = textDecoder.decode(paylBox);\n                } catch (e) {\n                  console.error(e);\n                }\n              } // settings box contains styling.\n\n              if (sttgBox) {\n                try {\n                  settings = textDecoder.decode(sttgBox);\n                } catch (e) {\n                  console.error(e);\n                }\n              }\n              if (sample.duration && cueText) {\n                vttCues.push({\n                  cueText,\n                  start,\n                  end,\n                  settings\n                });\n              }\n            });\n            mdatOffset += sample.size;\n          });\n        }\n      });\n      return vttCues;\n    };\n  };\n  var webvttParser = WebVttParser;\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Utilities to detect basic properties and metadata about TS Segments.\n   */\n\n  var StreamTypes$1 = streamTypes;\n  var parsePid = function (packet) {\n    var pid = packet[1] & 0x1f;\n    pid <<= 8;\n    pid |= packet[2];\n    return pid;\n  };\n  var parsePayloadUnitStartIndicator = function (packet) {\n    return !!(packet[1] & 0x40);\n  };\n  var parseAdaptionField = function (packet) {\n    var offset = 0; // if an adaption field is present, its length is specified by the\n    // fifth byte of the TS packet header. The adaptation field is\n    // used to add stuffing to PES packets that don't fill a complete\n    // TS packet, and to specify some forms of timing and control data\n    // that we do not currently use.\n\n    if ((packet[3] & 0x30) >>> 4 > 0x01) {\n      offset += packet[4] + 1;\n    }\n    return offset;\n  };\n  var parseType = function (packet, pmtPid) {\n    var pid = parsePid(packet);\n    if (pid === 0) {\n      return 'pat';\n    } else if (pid === pmtPid) {\n      return 'pmt';\n    } else if (pmtPid) {\n      return 'pes';\n    }\n    return null;\n  };\n  var parsePat = function (packet) {\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    var offset = 4 + parseAdaptionField(packet);\n    if (pusi) {\n      offset += packet[offset] + 1;\n    }\n    return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n  };\n  var parsePmt = function (packet) {\n    var programMapTable = {};\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    var payloadOffset = 4 + parseAdaptionField(packet);\n    if (pusi) {\n      payloadOffset += packet[payloadOffset] + 1;\n    } // PMTs can be sent ahead of the time when they should actually\n    // take effect. We don't believe this should ever be the case\n    // for HLS but we'll ignore \"forward\" PMT declarations if we see\n    // them. Future PMT declarations have the current_next_indicator\n    // set to zero.\n\n    if (!(packet[payloadOffset + 5] & 0x01)) {\n      return;\n    }\n    var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n    sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n    tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n    // long the program info descriptors are\n\n    programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n    var offset = 12 + programInfoLength;\n    while (offset < tableEnd) {\n      var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n      programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n      // skip past the elementary stream descriptors, if present\n\n      offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n    }\n    return programMapTable;\n  };\n  var parsePesType = function (packet, programMapTable) {\n    var pid = parsePid(packet);\n    var type = programMapTable[pid];\n    switch (type) {\n      case StreamTypes$1.H264_STREAM_TYPE:\n        return 'video';\n      case StreamTypes$1.ADTS_STREAM_TYPE:\n        return 'audio';\n      case StreamTypes$1.METADATA_STREAM_TYPE:\n        return 'timed-metadata';\n      default:\n        return null;\n    }\n  };\n  var parsePesTime = function (packet) {\n    var pusi = parsePayloadUnitStartIndicator(packet);\n    if (!pusi) {\n      return null;\n    }\n    var offset = 4 + parseAdaptionField(packet);\n    if (offset >= packet.byteLength) {\n      // From the H 222.0 MPEG-TS spec\n      // \"For transport stream packets carrying PES packets, stuffing is needed when there\n      //  is insufficient PES packet data to completely fill the transport stream packet\n      //  payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n      //  the sum of the lengths of the data elements in it, so that the payload bytes\n      //  remaining after the adaptation field exactly accommodates the available PES packet\n      //  data.\"\n      //\n      // If the offset is >= the length of the packet, then the packet contains no data\n      // and instead is just adaption field stuffing bytes\n      return null;\n    }\n    var pes = null;\n    var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n    // and a DTS value. Determine what combination of values is\n    // available to work with.\n\n    ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\n    // performs all bitwise operations on 32-bit integers but javascript\n    // supports a much greater range (52-bits) of integer using standard\n    // mathematical operations.\n    // We construct a 31-bit value using bitwise operators over the 31\n    // most significant bits and then multiply by 4 (equal to a left-shift\n    // of 2) before we add the final 2 least significant bits of the\n    // timestamp (equal to an OR.)\n\n    if (ptsDtsFlags & 0xC0) {\n      pes = {}; // the PTS and DTS are not written out directly. For information\n      // on how they are encoded, see\n      // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n      pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n      pes.pts *= 4; // Left shift by 2\n\n      pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n      pes.dts = pes.pts;\n      if (ptsDtsFlags & 0x40) {\n        pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n        pes.dts *= 4; // Left shift by 2\n\n        pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n      }\n    }\n    return pes;\n  };\n  var parseNalUnitType = function (type) {\n    switch (type) {\n      case 0x05:\n        return 'slice_layer_without_partitioning_rbsp_idr';\n      case 0x06:\n        return 'sei_rbsp';\n      case 0x07:\n        return 'seq_parameter_set_rbsp';\n      case 0x08:\n        return 'pic_parameter_set_rbsp';\n      case 0x09:\n        return 'access_unit_delimiter_rbsp';\n      default:\n        return null;\n    }\n  };\n  var videoPacketContainsKeyFrame = function (packet) {\n    var offset = 4 + parseAdaptionField(packet);\n    var frameBuffer = packet.subarray(offset);\n    var frameI = 0;\n    var frameSyncPoint = 0;\n    var foundKeyFrame = false;\n    var nalType; // advance the sync point to a NAL start, if necessary\n\n    for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n      if (frameBuffer[frameSyncPoint + 2] === 1) {\n        // the sync point is properly aligned\n        frameI = frameSyncPoint + 5;\n        break;\n      }\n    }\n    while (frameI < frameBuffer.byteLength) {\n      // look at the current byte to determine if we've hit the end of\n      // a NAL unit boundary\n      switch (frameBuffer[frameI]) {\n        case 0:\n          // skip past non-sync sequences\n          if (frameBuffer[frameI - 1] !== 0) {\n            frameI += 2;\n            break;\n          } else if (frameBuffer[frameI - 2] !== 0) {\n            frameI++;\n            break;\n          }\n          if (frameSyncPoint + 3 !== frameI - 2) {\n            nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n            if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n              foundKeyFrame = true;\n            }\n          } // drop trailing zeroes\n\n          do {\n            frameI++;\n          } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n          frameSyncPoint = frameI - 2;\n          frameI += 3;\n          break;\n        case 1:\n          // skip past non-sync sequences\n          if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n            frameI += 3;\n            break;\n          }\n          nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n          if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n            foundKeyFrame = true;\n          }\n          frameSyncPoint = frameI - 2;\n          frameI += 3;\n          break;\n        default:\n          // the current byte isn't a one or zero, so it cannot be part\n          // of a sync sequence\n          frameI += 3;\n          break;\n      }\n    }\n    frameBuffer = frameBuffer.subarray(frameSyncPoint);\n    frameI -= frameSyncPoint;\n    frameSyncPoint = 0; // parse the final nal\n\n    if (frameBuffer && frameBuffer.byteLength > 3) {\n      nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n      if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n        foundKeyFrame = true;\n      }\n    }\n    return foundKeyFrame;\n  };\n  var probe$1 = {\n    parseType: parseType,\n    parsePat: parsePat,\n    parsePmt: parsePmt,\n    parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n    parsePesType: parsePesType,\n    parsePesTime: parsePesTime,\n    videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n  };\n  /**\n   * mux.js\n   *\n   * Copyright (c) Brightcove\n   * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n   *\n   * Parse mpeg2 transport stream packets to extract basic timing information\n   */\n\n  var StreamTypes = streamTypes;\n  var handleRollover = timestampRolloverStream.handleRollover;\n  var probe = {};\n  probe.ts = probe$1;\n  probe.aac = utils;\n  var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n  var MP2T_PACKET_LENGTH = 188,\n    // bytes\n    SYNC_BYTE = 0x47;\n  /**\n   * walks through segment data looking for pat and pmt packets to parse out\n   * program map table information\n   */\n\n  var parsePsi_ = function (bytes, pmt) {\n    var startIndex = 0,\n      endIndex = MP2T_PACKET_LENGTH,\n      packet,\n      type;\n    while (endIndex < bytes.byteLength) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n        switch (type) {\n          case 'pat':\n            pmt.pid = probe.ts.parsePat(packet);\n            break;\n          case 'pmt':\n            var table = probe.ts.parsePmt(packet);\n            pmt.table = pmt.table || {};\n            Object.keys(table).forEach(function (key) {\n              pmt.table[key] = table[key];\n            });\n            break;\n        }\n        startIndex += MP2T_PACKET_LENGTH;\n        endIndex += MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n      startIndex++;\n      endIndex++;\n    }\n  };\n  /**\n   * walks through the segment data from the start and end to get timing information\n   * for the first and last audio pes packets\n   */\n\n  var parseAudioPes_ = function (bytes, pmt, result) {\n    var startIndex = 0,\n      endIndex = MP2T_PACKET_LENGTH,\n      packet,\n      type,\n      pesType,\n      pusi,\n      parsed;\n    var endLoop = false; // Start walking from start of segment to get first audio packet\n\n    while (endIndex <= bytes.byteLength) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n            if (pesType === 'audio' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n              if (parsed) {\n                parsed.type = 'audio';\n                result.audio.push(parsed);\n                endLoop = true;\n              }\n            }\n            break;\n        }\n        if (endLoop) {\n          break;\n        }\n        startIndex += MP2T_PACKET_LENGTH;\n        endIndex += MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n      startIndex++;\n      endIndex++;\n    } // Start walking from end of segment to get last audio packet\n\n    endIndex = bytes.byteLength;\n    startIndex = endIndex - MP2T_PACKET_LENGTH;\n    endLoop = false;\n    while (startIndex >= 0) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n            if (pesType === 'audio' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n              if (parsed) {\n                parsed.type = 'audio';\n                result.audio.push(parsed);\n                endLoop = true;\n              }\n            }\n            break;\n        }\n        if (endLoop) {\n          break;\n        }\n        startIndex -= MP2T_PACKET_LENGTH;\n        endIndex -= MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n      startIndex--;\n      endIndex--;\n    }\n  };\n  /**\n   * walks through the segment data from the start and end to get timing information\n   * for the first and last video pes packets as well as timing information for the first\n   * key frame.\n   */\n\n  var parseVideoPes_ = function (bytes, pmt, result) {\n    var startIndex = 0,\n      endIndex = MP2T_PACKET_LENGTH,\n      packet,\n      type,\n      pesType,\n      pusi,\n      parsed,\n      frame,\n      i,\n      pes;\n    var endLoop = false;\n    var currentFrame = {\n      data: [],\n      size: 0\n    }; // Start walking from start of segment to get first video packet\n\n    while (endIndex < bytes.byteLength) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n            if (pesType === 'video') {\n              if (pusi && !endLoop) {\n                parsed = probe.ts.parsePesTime(packet);\n                if (parsed) {\n                  parsed.type = 'video';\n                  result.video.push(parsed);\n                  endLoop = true;\n                }\n              }\n              if (!result.firstKeyFrame) {\n                if (pusi) {\n                  if (currentFrame.size !== 0) {\n                    frame = new Uint8Array(currentFrame.size);\n                    i = 0;\n                    while (currentFrame.data.length) {\n                      pes = currentFrame.data.shift();\n                      frame.set(pes, i);\n                      i += pes.byteLength;\n                    }\n                    if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n                      var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n                      // the keyframe seems to work fine with HLS playback\n                      // and definitely preferable to a crash with TypeError...\n\n                      if (firstKeyFrame) {\n                        result.firstKeyFrame = firstKeyFrame;\n                        result.firstKeyFrame.type = 'video';\n                      } else {\n                        // eslint-disable-next-line\n                        console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n                      }\n                    }\n                    currentFrame.size = 0;\n                  }\n                }\n                currentFrame.data.push(packet);\n                currentFrame.size += packet.byteLength;\n              }\n            }\n            break;\n        }\n        if (endLoop && result.firstKeyFrame) {\n          break;\n        }\n        startIndex += MP2T_PACKET_LENGTH;\n        endIndex += MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n      startIndex++;\n      endIndex++;\n    } // Start walking from end of segment to get last video packet\n\n    endIndex = bytes.byteLength;\n    startIndex = endIndex - MP2T_PACKET_LENGTH;\n    endLoop = false;\n    while (startIndex >= 0) {\n      // Look for a pair of start and end sync bytes in the data..\n      if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n        // We found a packet\n        packet = bytes.subarray(startIndex, endIndex);\n        type = probe.ts.parseType(packet, pmt.pid);\n        switch (type) {\n          case 'pes':\n            pesType = probe.ts.parsePesType(packet, pmt.table);\n            pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n            if (pesType === 'video' && pusi) {\n              parsed = probe.ts.parsePesTime(packet);\n              if (parsed) {\n                parsed.type = 'video';\n                result.video.push(parsed);\n                endLoop = true;\n              }\n            }\n            break;\n        }\n        if (endLoop) {\n          break;\n        }\n        startIndex -= MP2T_PACKET_LENGTH;\n        endIndex -= MP2T_PACKET_LENGTH;\n        continue;\n      } // If we get here, we have somehow become de-synchronized and we need to step\n      // forward one byte at a time until we find a pair of sync bytes that denote\n      // a packet\n\n      startIndex--;\n      endIndex--;\n    }\n  };\n  /**\n   * Adjusts the timestamp information for the segment to account for\n   * rollover and convert to seconds based on pes packet timescale (90khz clock)\n   */\n\n  var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n    if (segmentInfo.audio && segmentInfo.audio.length) {\n      var audioBaseTimestamp = baseTimestamp;\n      if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n        audioBaseTimestamp = segmentInfo.audio[0].dts;\n      }\n      segmentInfo.audio.forEach(function (info) {\n        info.dts = handleRollover(info.dts, audioBaseTimestamp);\n        info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n        info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n        info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n      });\n    }\n    if (segmentInfo.video && segmentInfo.video.length) {\n      var videoBaseTimestamp = baseTimestamp;\n      if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n        videoBaseTimestamp = segmentInfo.video[0].dts;\n      }\n      segmentInfo.video.forEach(function (info) {\n        info.dts = handleRollover(info.dts, videoBaseTimestamp);\n        info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n        info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n        info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n      });\n      if (segmentInfo.firstKeyFrame) {\n        var frame = segmentInfo.firstKeyFrame;\n        frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n        frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n        frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n        frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n      }\n    }\n  };\n  /**\n   * inspects the aac data stream for start and end time information\n   */\n\n  var inspectAac_ = function (bytes) {\n    var endLoop = false,\n      audioCount = 0,\n      sampleRate = null,\n      timestamp = null,\n      frameSize = 0,\n      byteIndex = 0,\n      packet;\n    while (bytes.length - byteIndex >= 3) {\n      var type = probe.aac.parseType(bytes, byteIndex);\n      switch (type) {\n        case 'timed-metadata':\n          // Exit early because we don't have enough to parse\n          // the ID3 tag header\n          if (bytes.length - byteIndex < 10) {\n            endLoop = true;\n            break;\n          }\n          frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n\n          if (frameSize > bytes.length) {\n            endLoop = true;\n            break;\n          }\n          if (timestamp === null) {\n            packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n            timestamp = probe.aac.parseAacTimestamp(packet);\n          }\n          byteIndex += frameSize;\n          break;\n        case 'audio':\n          // Exit early because we don't have enough to parse\n          // the ADTS frame header\n          if (bytes.length - byteIndex < 7) {\n            endLoop = true;\n            break;\n          }\n          frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n          // to emit a full packet\n\n          if (frameSize > bytes.length) {\n            endLoop = true;\n            break;\n          }\n          if (sampleRate === null) {\n            packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n            sampleRate = probe.aac.parseSampleRate(packet);\n          }\n          audioCount++;\n          byteIndex += frameSize;\n          break;\n        default:\n          byteIndex++;\n          break;\n      }\n      if (endLoop) {\n        return null;\n      }\n    }\n    if (sampleRate === null || timestamp === null) {\n      return null;\n    }\n    var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n    var result = {\n      audio: [{\n        type: 'audio',\n        dts: timestamp,\n        pts: timestamp\n      }, {\n        type: 'audio',\n        dts: timestamp + audioCount * 1024 * audioTimescale,\n        pts: timestamp + audioCount * 1024 * audioTimescale\n      }]\n    };\n    return result;\n  };\n  /**\n   * inspects the transport stream segment data for start and end time information\n   * of the audio and video tracks (when present) as well as the first key frame's\n   * start time.\n   */\n\n  var inspectTs_ = function (bytes) {\n    var pmt = {\n      pid: null,\n      table: null\n    };\n    var result = {};\n    parsePsi_(bytes, pmt);\n    for (var pid in pmt.table) {\n      if (pmt.table.hasOwnProperty(pid)) {\n        var type = pmt.table[pid];\n        switch (type) {\n          case StreamTypes.H264_STREAM_TYPE:\n            result.video = [];\n            parseVideoPes_(bytes, pmt, result);\n            if (result.video.length === 0) {\n              delete result.video;\n            }\n            break;\n          case StreamTypes.ADTS_STREAM_TYPE:\n            result.audio = [];\n            parseAudioPes_(bytes, pmt, result);\n            if (result.audio.length === 0) {\n              delete result.audio;\n            }\n            break;\n        }\n      }\n    }\n    return result;\n  };\n  /**\n   * Inspects segment byte data and returns an object with start and end timing information\n   *\n   * @param {Uint8Array} bytes The segment byte data\n   * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n   *  timestamps for rollover. This value must be in 90khz clock.\n   * @return {Object} Object containing start and end frame timing info of segment.\n   */\n\n  var inspect = function (bytes, baseTimestamp) {\n    var isAacData = probe.aac.isLikelyAacData(bytes);\n    var result;\n    if (isAacData) {\n      result = inspectAac_(bytes);\n    } else {\n      result = inspectTs_(bytes);\n    }\n    if (!result || !result.audio && !result.video) {\n      return null;\n    }\n    adjustTimestamp_(result, baseTimestamp);\n    return result;\n  };\n  var tsInspector = {\n    inspect: inspect,\n    parseAudioPes_: parseAudioPes_\n  };\n  /* global self */\n\n  /**\n   * Re-emits transmuxer events by converting them into messages to the\n   * world outside the worker.\n   *\n   * @param {Object} transmuxer the transmuxer to wire events on\n   * @private\n   */\n\n  const wireTransmuxerEvents = function (self, transmuxer) {\n    transmuxer.on('data', function (segment) {\n      // transfer ownership of the underlying ArrayBuffer\n      // instead of doing a copy to save memory\n      // ArrayBuffers are transferable but generic TypedArrays are not\n      // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n      const initArray = segment.initSegment;\n      segment.initSegment = {\n        data: initArray.buffer,\n        byteOffset: initArray.byteOffset,\n        byteLength: initArray.byteLength\n      };\n      const typedArray = segment.data;\n      segment.data = typedArray.buffer;\n      self.postMessage({\n        action: 'data',\n        segment,\n        byteOffset: typedArray.byteOffset,\n        byteLength: typedArray.byteLength\n      }, [segment.data]);\n    });\n    transmuxer.on('done', function (data) {\n      self.postMessage({\n        action: 'done'\n      });\n    });\n    transmuxer.on('gopInfo', function (gopInfo) {\n      self.postMessage({\n        action: 'gopInfo',\n        gopInfo\n      });\n    });\n    transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n      const videoSegmentTimingInfo = {\n        start: {\n          decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n          presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n        },\n        end: {\n          decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n          presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n        },\n        baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n      };\n      if (timingInfo.prependedContentDuration) {\n        videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n      }\n      self.postMessage({\n        action: 'videoSegmentTimingInfo',\n        videoSegmentTimingInfo\n      });\n    });\n    transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n      // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n      const audioSegmentTimingInfo = {\n        start: {\n          decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n          presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n        },\n        end: {\n          decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n          presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n        },\n        baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n      };\n      if (timingInfo.prependedContentDuration) {\n        audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n      }\n      self.postMessage({\n        action: 'audioSegmentTimingInfo',\n        audioSegmentTimingInfo\n      });\n    });\n    transmuxer.on('id3Frame', function (id3Frame) {\n      self.postMessage({\n        action: 'id3Frame',\n        id3Frame\n      });\n    });\n    transmuxer.on('caption', function (caption) {\n      self.postMessage({\n        action: 'caption',\n        caption\n      });\n    });\n    transmuxer.on('trackinfo', function (trackInfo) {\n      self.postMessage({\n        action: 'trackinfo',\n        trackInfo\n      });\n    });\n    transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n      // convert to video TS since we prioritize video time over audio\n      self.postMessage({\n        action: 'audioTimingInfo',\n        audioTimingInfo: {\n          start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n          end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n        }\n      });\n    });\n    transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n      self.postMessage({\n        action: 'videoTimingInfo',\n        videoTimingInfo: {\n          start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n          end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n        }\n      });\n    });\n    transmuxer.on('log', function (log) {\n      self.postMessage({\n        action: 'log',\n        log\n      });\n    });\n  };\n  /**\n   * All incoming messages route through this hash. If no function exists\n   * to handle an incoming message, then we ignore the message.\n   *\n   * @class MessageHandlers\n   * @param {Object} options the options to initialize with\n   */\n\n  class MessageHandlers {\n    constructor(self, options) {\n      this.options = options || {};\n      this.self = self;\n      this.init();\n    }\n    /**\n     * initialize our web worker and wire all the events.\n     */\n\n    init() {\n      if (this.transmuxer) {\n        this.transmuxer.dispose();\n      }\n      this.transmuxer = new transmuxer.Transmuxer(this.options);\n      wireTransmuxerEvents(this.self, this.transmuxer);\n    }\n    pushMp4Captions(data) {\n      if (!this.captionParser) {\n        this.captionParser = new captionParser();\n        this.captionParser.init();\n      }\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n      this.self.postMessage({\n        action: 'mp4Captions',\n        captions: parsed && parsed.captions || [],\n        logs: parsed && parsed.logs || [],\n        data: segment.buffer\n      }, [segment.buffer]);\n    }\n    /**\n     * Initializes the WebVttParser and passes the init segment.\n     *\n     * @param {Uint8Array} data mp4 boxed WebVTT init segment data\n     */\n\n    initMp4WebVttParser(data) {\n      if (!this.webVttParser) {\n        this.webVttParser = new webvttParser();\n      }\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength); // Set the timescale for the parser.\n      // This can be called repeatedly in order to set and re-set the timescale.\n\n      this.webVttParser.init(segment);\n    }\n    /**\n     * Parse an mp4 encapsulated WebVTT segment and return an array of cues.\n     *\n     * @param {Uint8Array} data a text/webvtt segment\n     * @return {Object[]} an array of parsed cue objects\n     */\n\n    getMp4WebVttText(data) {\n      if (!this.webVttParser) {\n        // timescale might not be set yet if the parser is created before an init segment is passed.\n        // default timescale is 90k.\n        this.webVttParser = new webvttParser();\n      }\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      const parsed = this.webVttParser.parseSegment(segment);\n      this.self.postMessage({\n        action: 'getMp4WebVttText',\n        mp4VttCues: parsed || [],\n        data: segment.buffer\n      }, [segment.buffer]);\n    }\n    probeMp4StartTime({\n      timescales,\n      data\n    }) {\n      const startTime = probe$2.startTime(timescales, data);\n      this.self.postMessage({\n        action: 'probeMp4StartTime',\n        startTime,\n        data\n      }, [data.buffer]);\n    }\n    probeMp4Tracks({\n      data\n    }) {\n      const tracks = probe$2.tracks(data);\n      this.self.postMessage({\n        action: 'probeMp4Tracks',\n        tracks,\n        data\n      }, [data.buffer]);\n    }\n    /**\n     * Probes an mp4 segment for EMSG boxes containing ID3 data.\n     * https://aomediacodec.github.io/id3-emsg/\n     *\n     * @param {Uint8Array} data segment data\n     * @param {number} offset segment start time\n     * @return {Object[]} an array of ID3 frames\n     */\n\n    probeEmsgID3({\n      data,\n      offset\n    }) {\n      const id3Frames = probe$2.getEmsgID3(data, offset);\n      this.self.postMessage({\n        action: 'probeEmsgID3',\n        id3Frames,\n        emsgData: data\n      }, [data.buffer]);\n    }\n    /**\n     * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n     * internal \"media time,\" as well as whether it contains video and/or audio.\n     *\n     * @private\n     * @param {Uint8Array} bytes - segment bytes\n     * @param {number} baseStartTime\n     *        Relative reference timestamp used when adjusting frame timestamps for rollover.\n     *        This value should be in seconds, as it's converted to a 90khz clock within the\n     *        function body.\n     * @return {Object} The start time of the current segment in \"media time\" as well as\n     *                  whether it contains video and/or audio\n     */\n\n    probeTs({\n      data,\n      baseStartTime\n    }) {\n      const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n      const timeInfo = tsInspector.inspect(data, tsStartTime);\n      let result = null;\n      if (timeInfo) {\n        result = {\n          // each type's time info comes back as an array of 2 times, start and end\n          hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n          hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n        };\n        if (result.hasVideo) {\n          result.videoStart = timeInfo.video[0].ptsTime;\n        }\n        if (result.hasAudio) {\n          result.audioStart = timeInfo.audio[0].ptsTime;\n        }\n      }\n      this.self.postMessage({\n        action: 'probeTs',\n        result,\n        data\n      }, [data.buffer]);\n    }\n    clearAllMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearAllCaptions();\n      }\n    }\n    clearParsedMp4Captions() {\n      if (this.captionParser) {\n        this.captionParser.clearParsedCaptions();\n      }\n    }\n    /**\n     * Adds data (a ts segment) to the start of the transmuxer pipeline for\n     * processing.\n     *\n     * @param {ArrayBuffer} data data to push into the muxer\n     */\n\n    push(data) {\n      // Cast array buffer to correct type for transmuxer\n      const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n      this.transmuxer.push(segment);\n    }\n    /**\n     * Recreate the transmuxer so that the next segment added via `push`\n     * start with a fresh transmuxer.\n     */\n\n    reset() {\n      this.transmuxer.reset();\n    }\n    /**\n     * Set the value that will be used as the `baseMediaDecodeTime` time for the\n     * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n     * set relative to the first based on the PTS values.\n     *\n     * @param {Object} data used to set the timestamp offset in the muxer\n     */\n\n    setTimestampOffset(data) {\n      const timestampOffset = data.timestampOffset || 0;\n      this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n    }\n    setAudioAppendStart(data) {\n      this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n    }\n    setRemux(data) {\n      this.transmuxer.setRemux(data.remux);\n    }\n    /**\n     * Forces the pipeline to finish processing the last segment and emit it's\n     * results.\n     *\n     * @param {Object} data event data, not really used\n     */\n\n    flush(data) {\n      this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n      self.postMessage({\n        action: 'done',\n        type: 'transmuxed'\n      });\n    }\n    endTimeline() {\n      this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n      // timelines\n\n      self.postMessage({\n        action: 'endedtimeline',\n        type: 'transmuxed'\n      });\n    }\n    alignGopsWith(data) {\n      this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n    }\n  }\n  /**\n   * Our web worker interface so that things can talk to mux.js\n   * that will be running in a web worker. the scope is passed to this by\n   * webworkify.\n   *\n   * @param {Object} self the scope for the web worker\n   */\n\n  self.onmessage = function (event) {\n    if (event.data.action === 'init' && event.data.options) {\n      this.messageHandlers = new MessageHandlers(self, event.data.options);\n      return;\n    }\n    if (!this.messageHandlers) {\n      this.messageHandlers = new MessageHandlers(self);\n    }\n    if (event.data && event.data.action && event.data.action !== 'init') {\n      if (this.messageHandlers[event.data.action]) {\n        this.messageHandlers[event.data.action](event.data);\n      }\n    }\n  };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nconst handleData_ = (event, transmuxedData, callback) => {\n  const {\n    type,\n    initSegment,\n    captions,\n    captionStreams,\n    metadata,\n    videoFrameDtsTime,\n    videoFramePtsTime\n  } = event.data.segment;\n  transmuxedData.buffer.push({\n    captions,\n    captionStreams,\n    metadata\n  });\n  const boxes = event.data.segment.boxes || {\n    data: event.data.segment.data\n  };\n  const result = {\n    type,\n    // cast ArrayBuffer to TypedArray\n    data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n    initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n  };\n  if (typeof videoFrameDtsTime !== 'undefined') {\n    result.videoFrameDtsTime = videoFrameDtsTime;\n  }\n  if (typeof videoFramePtsTime !== 'undefined') {\n    result.videoFramePtsTime = videoFramePtsTime;\n  }\n  callback(result);\n};\nconst handleDone_ = ({\n  transmuxedData,\n  callback\n}) => {\n  // Previously we only returned data on data events,\n  // not on done events. Clear out the buffer to keep that consistent.\n  transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n  // have received\n\n  callback(transmuxedData);\n};\nconst handleGopInfo_ = (event, transmuxedData) => {\n  transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n  const {\n    transmuxer,\n    bytes,\n    audioAppendStart,\n    gopsToAlignWith,\n    remux,\n    onData,\n    onTrackInfo,\n    onAudioTimingInfo,\n    onVideoTimingInfo,\n    onVideoSegmentTimingInfo,\n    onAudioSegmentTimingInfo,\n    onId3,\n    onCaptions,\n    onDone,\n    onEndedTimeline,\n    onTransmuxerLog,\n    isEndOfTimeline,\n    segment,\n    triggerSegmentEventFn\n  } = options;\n  const transmuxedData = {\n    buffer: []\n  };\n  let waitForEndedTimelineEvent = isEndOfTimeline;\n  const handleMessage = event => {\n    if (transmuxer.currentTransmux !== options) {\n      // disposed\n      return;\n    }\n    if (event.data.action === 'data') {\n      handleData_(event, transmuxedData, onData);\n    }\n    if (event.data.action === 'trackinfo') {\n      onTrackInfo(event.data.trackInfo);\n    }\n    if (event.data.action === 'gopInfo') {\n      handleGopInfo_(event, transmuxedData);\n    }\n    if (event.data.action === 'audioTimingInfo') {\n      onAudioTimingInfo(event.data.audioTimingInfo);\n    }\n    if (event.data.action === 'videoTimingInfo') {\n      onVideoTimingInfo(event.data.videoTimingInfo);\n    }\n    if (event.data.action === 'videoSegmentTimingInfo') {\n      onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n    }\n    if (event.data.action === 'audioSegmentTimingInfo') {\n      onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n    }\n    if (event.data.action === 'id3Frame') {\n      onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n    }\n    if (event.data.action === 'caption') {\n      onCaptions(event.data.caption);\n    }\n    if (event.data.action === 'endedtimeline') {\n      waitForEndedTimelineEvent = false;\n      onEndedTimeline();\n    }\n    if (event.data.action === 'log') {\n      onTransmuxerLog(event.data.log);\n    } // wait for the transmuxed event since we may have audio and video\n\n    if (event.data.type !== 'transmuxed') {\n      return;\n    } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n    // of a timeline, that means there may still be data events before the segment\n    // processing can be considerred complete. In that case, the final event should be\n    // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n    if (waitForEndedTimelineEvent) {\n      return;\n    }\n    transmuxer.onmessage = null;\n    handleDone_({\n      transmuxedData,\n      callback: onDone\n    });\n    /* eslint-disable no-use-before-define */\n\n    dequeue(transmuxer);\n    /* eslint-enable */\n  };\n  const handleError = () => {\n    const error = {\n      message: 'Received an error message from the transmuxer worker',\n      metadata: {\n        errorType: videojs.Error.StreamingFailedToTransmuxSegment,\n        segmentInfo: segmentInfoPayload({\n          segment\n        })\n      }\n    };\n    onDone(null, error);\n  };\n  transmuxer.onmessage = handleMessage;\n  transmuxer.onerror = handleError;\n  if (audioAppendStart) {\n    transmuxer.postMessage({\n      action: 'setAudioAppendStart',\n      appendStart: audioAppendStart\n    });\n  } // allow empty arrays to be passed to clear out GOPs\n\n  if (Array.isArray(gopsToAlignWith)) {\n    transmuxer.postMessage({\n      action: 'alignGopsWith',\n      gopsToAlignWith\n    });\n  }\n  if (typeof remux !== 'undefined') {\n    transmuxer.postMessage({\n      action: 'setRemux',\n      remux\n    });\n  }\n  if (bytes.byteLength) {\n    const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n    const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n    triggerSegmentEventFn({\n      type: 'segmenttransmuxingstart',\n      segment\n    });\n    transmuxer.postMessage({\n      action: 'push',\n      // Send the typed-array of data as an ArrayBuffer so that\n      // it can be sent as a \"Transferable\" and avoid the costly\n      // memory copy\n      data: buffer,\n      // To recreate the original typed-array, we need information\n      // about what portion of the ArrayBuffer it was a view into\n      byteOffset,\n      byteLength: bytes.byteLength\n    }, [buffer]);\n  }\n  if (isEndOfTimeline) {\n    transmuxer.postMessage({\n      action: 'endTimeline'\n    });\n  } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n  // the end of the segment\n\n  transmuxer.postMessage({\n    action: 'flush'\n  });\n};\nconst dequeue = transmuxer => {\n  transmuxer.currentTransmux = null;\n  if (transmuxer.transmuxQueue.length) {\n    transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n    if (typeof transmuxer.currentTransmux === 'function') {\n      transmuxer.currentTransmux();\n    } else {\n      processTransmux(transmuxer.currentTransmux);\n    }\n  }\n};\nconst processAction = (transmuxer, action) => {\n  transmuxer.postMessage({\n    action\n  });\n  dequeue(transmuxer);\n};\nconst enqueueAction = (action, transmuxer) => {\n  if (!transmuxer.currentTransmux) {\n    transmuxer.currentTransmux = action;\n    processAction(transmuxer, action);\n    return;\n  }\n  transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nconst reset = transmuxer => {\n  enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n  enqueueAction('endTimeline', transmuxer);\n};\nconst transmux = options => {\n  if (!options.transmuxer.currentTransmux) {\n    options.transmuxer.currentTransmux = options;\n    processTransmux(options);\n    return;\n  }\n  options.transmuxer.transmuxQueue.push(options);\n};\nconst createTransmuxer = options => {\n  const transmuxer = new TransmuxWorker();\n  transmuxer.currentTransmux = null;\n  transmuxer.transmuxQueue = [];\n  const term = transmuxer.terminate;\n  transmuxer.terminate = () => {\n    transmuxer.currentTransmux = null;\n    transmuxer.transmuxQueue.length = 0;\n    return term.call(transmuxer);\n  };\n  transmuxer.postMessage({\n    action: 'init',\n    options\n  });\n  return transmuxer;\n};\nvar segmentTransmuxer = {\n  reset,\n  endTimeline,\n  transmux,\n  createTransmuxer\n};\nconst workerCallback = function (options) {\n  const transmuxer = options.transmuxer;\n  const endAction = options.endAction || options.action;\n  const callback = options.callback;\n  const message = _extends({}, options, {\n    endAction: null,\n    transmuxer: null,\n    callback: null\n  });\n  const listenForEndEvent = event => {\n    if (event.data.action !== endAction) {\n      return;\n    }\n    transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n    if (event.data.data) {\n      event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n      if (options.data) {\n        options.data = event.data.data;\n      }\n    }\n    callback(event.data);\n  };\n  transmuxer.addEventListener('message', listenForEndEvent);\n  if (options.data) {\n    const isArrayBuffer = options.data instanceof ArrayBuffer;\n    message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n    message.byteLength = options.data.byteLength;\n    const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n    transmuxer.postMessage(message, transfers);\n  } else {\n    transmuxer.postMessage(message);\n  }\n};\nconst REQUEST_ERRORS = {\n  FAILURE: 2,\n  TIMEOUT: -101,\n  ABORTED: -102\n};\nconst WEB_VTT_CODEC = 'wvtt';\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nconst abortAll = activeXhrs => {\n  activeXhrs.forEach(xhr => {\n    xhr.abort();\n  });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\nconst getRequestStats = request => {\n  return {\n    bandwidth: request.bandwidth,\n    bytesReceived: request.bytesReceived || 0,\n    roundTripTime: request.roundTripTime || 0\n  };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\nconst getProgressStats = progressEvent => {\n  const request = progressEvent.target;\n  const roundTripTime = Date.now() - request.requestTime;\n  const stats = {\n    bandwidth: Infinity,\n    bytesReceived: 0,\n    roundTripTime: roundTripTime || 0\n  };\n  stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n  // because we should only use bandwidth stats on progress to determine when\n  // abort a request early due to insufficient bandwidth\n\n  stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n  return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request -  the XHR request that possibly generated the error\n */\n\nconst handleErrors = (error, request) => {\n  const {\n    requestType\n  } = request;\n  const metadata = getStreamingNetworkErrorMetadata({\n    requestType,\n    request,\n    error\n  });\n  if (request.timedout) {\n    return {\n      status: request.status,\n      message: 'HLS request timed-out at URL: ' + request.uri,\n      code: REQUEST_ERRORS.TIMEOUT,\n      xhr: request,\n      metadata\n    };\n  }\n  if (request.aborted) {\n    return {\n      status: request.status,\n      message: 'HLS request aborted at URL: ' + request.uri,\n      code: REQUEST_ERRORS.ABORTED,\n      xhr: request,\n      metadata\n    };\n  }\n  if (error) {\n    return {\n      status: request.status,\n      message: 'HLS request errored at URL: ' + request.uri,\n      code: REQUEST_ERRORS.FAILURE,\n      xhr: request,\n      metadata\n    };\n  }\n  if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n    return {\n      status: request.status,\n      message: 'Empty HLS response at URL: ' + request.uri,\n      code: REQUEST_ERRORS.FAILURE,\n      xhr: request,\n      metadata\n    };\n  }\n  return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n *                                        this request\n */\n\nconst handleKeyResponse = (segment, objects, finishProcessingFn, triggerSegmentEventFn) => (error, request) => {\n  const response = request.response;\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  if (response.byteLength !== 16) {\n    return finishProcessingFn({\n      status: request.status,\n      message: 'Invalid HLS key at URL: ' + request.uri,\n      code: REQUEST_ERRORS.FAILURE,\n      xhr: request\n    }, segment);\n  }\n  const view = new DataView(response);\n  const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n  for (let i = 0; i < objects.length; i++) {\n    objects[i].bytes = bytes;\n  }\n  const keyInfo = {\n    uri: request.uri\n  };\n  triggerSegmentEventFn({\n    type: 'segmentkeyloadcomplete',\n    segment,\n    keyInfo\n  });\n  return finishProcessingFn(null, segment);\n};\n/**\n * Processes an mp4 init segment depending on the codec through the transmuxer.\n *\n * @param {Object} segment init segment to process\n * @param {string} codec the codec of the text segments\n */\n\nconst initMp4Text = (segment, codec) => {\n  if (codec === WEB_VTT_CODEC) {\n    segment.transmuxer.postMessage({\n      action: 'initMp4WebVttParser',\n      data: segment.map.bytes\n    });\n  }\n};\n/**\n * Parses an mp4 text segment with the transmuxer and calls the doneFn from\n * the segment loader.\n *\n * @param {Object} segment the text segment to parse\n * @param {string} codec the codec of the text segment\n * @param {Function} doneFn the doneFn passed from the segment loader\n */\n\nconst parseMp4TextSegment = (segment, codec, doneFn) => {\n  if (codec === WEB_VTT_CODEC) {\n    workerCallback({\n      action: 'getMp4WebVttText',\n      data: segment.bytes,\n      transmuxer: segment.transmuxer,\n      callback: ({\n        data,\n        mp4VttCues\n      }) => {\n        segment.bytes = data;\n        doneFn(null, segment, {\n          mp4VttCues\n        });\n      }\n    });\n  }\n};\nconst parseInitSegment = (segment, callback) => {\n  const type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n  // only know how to parse mp4 init segments at the moment\n\n  if (type !== 'mp4') {\n    const uri = segment.map.resolvedUri || segment.map.uri;\n    const mediaType = type || 'unknown';\n    return callback({\n      internal: true,\n      message: `Found unsupported ${mediaType} container for initialization segment at URL: ${uri}`,\n      code: REQUEST_ERRORS.FAILURE,\n      metadata: {\n        mediaType\n      }\n    });\n  }\n  workerCallback({\n    action: 'probeMp4Tracks',\n    data: segment.map.bytes,\n    transmuxer: segment.transmuxer,\n    callback: ({\n      tracks,\n      data\n    }) => {\n      // transfer bytes back to us\n      segment.map.bytes = data;\n      tracks.forEach(function (track) {\n        segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n        if (segment.map.tracks[track.type]) {\n          return;\n        }\n        segment.map.tracks[track.type] = track;\n        if (typeof track.id === 'number' && track.timescale) {\n          segment.map.timescales = segment.map.timescales || {};\n          segment.map.timescales[track.id] = track.timescale;\n        }\n        if (track.type === 'text') {\n          initMp4Text(segment, track.codec);\n        }\n      });\n      return callback(null);\n    }\n  });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n *                                        this request\n */\n\nconst handleInitSegmentResponse = ({\n  segment,\n  finishProcessingFn,\n  triggerSegmentEventFn\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  const bytes = new Uint8Array(request.response);\n  triggerSegmentEventFn({\n    type: 'segmentloaded',\n    segment\n  }); // init segment is encypted, we will have to wait\n  // until the key request is done to decrypt.\n\n  if (segment.map.key) {\n    segment.map.encryptedBytes = bytes;\n    return finishProcessingFn(null, segment);\n  }\n  segment.map.bytes = bytes;\n  parseInitSegment(segment, function (parseError) {\n    if (parseError) {\n      parseError.xhr = request;\n      parseError.status = request.status;\n      return finishProcessingFn(parseError, segment);\n    }\n    finishProcessingFn(null, segment);\n  });\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n *                                        this request\n */\n\nconst handleSegmentResponse = ({\n  segment,\n  finishProcessingFn,\n  responseType,\n  triggerSegmentEventFn\n}) => (error, request) => {\n  const errorObj = handleErrors(error, request);\n  if (errorObj) {\n    return finishProcessingFn(errorObj, segment);\n  }\n  triggerSegmentEventFn({\n    type: 'segmentloaded',\n    segment\n  });\n  const newBytes =\n  // although responseText \"should\" exist, this guard serves to prevent an error being\n  // thrown for two primary cases:\n  // 1. the mime type override stops working, or is not implemented for a specific\n  //    browser\n  // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n  responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n  segment.stats = getRequestStats(request);\n  if (segment.key) {\n    segment.encryptedBytes = new Uint8Array(newBytes);\n  } else {\n    segment.bytes = new Uint8Array(newBytes);\n  }\n  return finishProcessingFn(null, segment);\n};\nconst transmuxAndNotify = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  const fmp4Tracks = segment.map && segment.map.tracks || {};\n  const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n  // One reason for this is that in the case of full segments, we want to trust start\n  // times from the probe, rather than the transmuxer.\n\n  let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n  const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n  let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n  const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n  const finish = () => transmux({\n    bytes,\n    transmuxer: segment.transmuxer,\n    audioAppendStart: segment.audioAppendStart,\n    gopsToAlignWith: segment.gopsToAlignWith,\n    remux: isMuxed,\n    onData: result => {\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      dataFn(segment, result);\n    },\n    onTrackInfo: trackInfo => {\n      if (trackInfoFn) {\n        if (isMuxed) {\n          trackInfo.isMuxed = true;\n        }\n        trackInfoFn(segment, trackInfo);\n      }\n    },\n    onAudioTimingInfo: audioTimingInfo => {\n      // we only want the first start value we encounter\n      if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n        audioStartFn(audioTimingInfo.start);\n        audioStartFn = null;\n      } // we want to continually update the end time\n\n      if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n        audioEndFn(audioTimingInfo.end);\n      }\n    },\n    onVideoTimingInfo: videoTimingInfo => {\n      // we only want the first start value we encounter\n      if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n        videoStartFn(videoTimingInfo.start);\n        videoStartFn = null;\n      } // we want to continually update the end time\n\n      if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n        videoEndFn(videoTimingInfo.end);\n      }\n    },\n    onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n      const timingInfo = {\n        pts: {\n          start: videoSegmentTimingInfo.start.presentation,\n          end: videoSegmentTimingInfo.end.presentation\n        },\n        dts: {\n          start: videoSegmentTimingInfo.start.decode,\n          end: videoSegmentTimingInfo.end.decode\n        }\n      };\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingtiminginfoavailable',\n        segment,\n        timingInfo\n      });\n      videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n    },\n    onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n      const timingInfo = {\n        pts: {\n          start: audioSegmentTimingInfo.start.pts,\n          end: audioSegmentTimingInfo.end.pts\n        },\n        dts: {\n          start: audioSegmentTimingInfo.start.dts,\n          end: audioSegmentTimingInfo.end.dts\n        }\n      };\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingtiminginfoavailable',\n        segment,\n        timingInfo\n      });\n      audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n    },\n    onId3: (id3Frames, dispatchType) => {\n      id3Fn(segment, id3Frames, dispatchType);\n    },\n    onCaptions: captions => {\n      captionsFn(segment, [captions]);\n    },\n    isEndOfTimeline,\n    onEndedTimeline: () => {\n      endedTimelineFn();\n    },\n    onTransmuxerLog,\n    onDone: (result, error) => {\n      if (!doneFn) {\n        return;\n      }\n      result.type = result.type === 'combined' ? 'video' : result.type;\n      triggerSegmentEventFn({\n        type: 'segmenttransmuxingcomplete',\n        segment\n      });\n      doneFn(error, segment, result);\n    },\n    segment,\n    triggerSegmentEventFn\n  }); // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n  // Meaning cached frame data may corrupt our notion of where this segment\n  // really starts. To get around this, probe for the info needed.\n\n  workerCallback({\n    action: 'probeTs',\n    transmuxer: segment.transmuxer,\n    data: bytes,\n    baseStartTime: segment.baseStartTime,\n    callback: data => {\n      segment.bytes = bytes = data.data;\n      const probeResult = data.result;\n      if (probeResult) {\n        trackInfoFn(segment, {\n          hasAudio: probeResult.hasAudio,\n          hasVideo: probeResult.hasVideo,\n          isMuxed\n        });\n        trackInfoFn = null;\n      }\n      finish();\n    }\n  });\n};\nconst handleSegmentBytes = ({\n  segment,\n  bytes,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  let bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n  // We should have a handler that fetches the number of bytes required\n  // to check if something is fmp4. This will allow us to save bandwidth\n  // because we can only exclude a playlist and abort requests\n  // by codec after trackinfo triggers.\n\n  if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n    segment.isFmp4 = true;\n    const {\n      tracks\n    } = segment.map;\n    const isMp4TextSegment = tracks.text && (!tracks.audio || !tracks.video);\n    if (isMp4TextSegment) {\n      dataFn(segment, {\n        data: bytesAsUint8Array,\n        type: 'text'\n      });\n      parseMp4TextSegment(segment, tracks.text.codec, doneFn);\n      return;\n    }\n    const trackInfo = {\n      isFmp4: true,\n      hasVideo: !!tracks.video,\n      hasAudio: !!tracks.audio\n    }; // if we have a audio track, with a codec that is not set to\n    // encrypted audio\n\n    if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n      trackInfo.audioCodec = tracks.audio.codec;\n    } // if we have a video track, with a codec that is not set to\n    // encrypted video\n\n    if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n      trackInfo.videoCodec = tracks.video.codec;\n    }\n    if (tracks.video && tracks.audio) {\n      trackInfo.isMuxed = true;\n    } // since we don't support appending fmp4 data on progress, we know we have the full\n    // segment here\n\n    trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n    // time. The end time can be roughly calculated by the receiver using the duration.\n    //\n    // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n    // that is the true start of the segment (where the playback engine should begin\n    // decoding).\n\n    const finishLoading = (captions, id3Frames) => {\n      // if the track still has audio at this point it is only possible\n      // for it to be audio only. See `tracks.video && tracks.audio` if statement\n      // above.\n      // we make sure to use segment.bytes here as that\n      dataFn(segment, {\n        data: bytesAsUint8Array,\n        type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n      });\n      if (id3Frames && id3Frames.length) {\n        id3Fn(segment, id3Frames);\n      }\n      if (captions && captions.length) {\n        captionsFn(segment, captions);\n      }\n      doneFn(null, segment, {});\n    };\n    workerCallback({\n      action: 'probeMp4StartTime',\n      timescales: segment.map.timescales,\n      data: bytesAsUint8Array,\n      transmuxer: segment.transmuxer,\n      callback: ({\n        data,\n        startTime\n      }) => {\n        // transfer bytes back to us\n        bytes = data.buffer;\n        segment.bytes = bytesAsUint8Array = data;\n        if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n          timingInfoFn(segment, 'audio', 'start', startTime);\n        }\n        if (trackInfo.hasVideo) {\n          timingInfoFn(segment, 'video', 'start', startTime);\n        }\n        workerCallback({\n          action: 'probeEmsgID3',\n          data: bytesAsUint8Array,\n          transmuxer: segment.transmuxer,\n          offset: startTime,\n          callback: ({\n            emsgData,\n            id3Frames\n          }) => {\n            // transfer bytes back to us\n            bytes = emsgData.buffer;\n            segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n            // Initialize CaptionParser if it hasn't been yet\n\n            if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n              finishLoading(undefined, id3Frames);\n              return;\n            }\n            workerCallback({\n              action: 'pushMp4Captions',\n              endAction: 'mp4Captions',\n              transmuxer: segment.transmuxer,\n              data: bytesAsUint8Array,\n              timescales: segment.map.timescales,\n              trackIds: [tracks.video.id],\n              callback: message => {\n                // transfer bytes back to us\n                bytes = message.data.buffer;\n                segment.bytes = bytesAsUint8Array = message.data;\n                message.logs.forEach(function (log) {\n                  onTransmuxerLog(merge(log, {\n                    stream: 'mp4CaptionParser'\n                  }));\n                });\n                finishLoading(message.captions, id3Frames);\n              }\n            });\n          }\n        });\n      }\n    });\n    return;\n  } // VTT or other segments that don't need processing\n\n  if (!segment.transmuxer) {\n    doneFn(null, segment, {});\n    return;\n  }\n  if (typeof segment.container === 'undefined') {\n    segment.container = detectContainerForBytes(bytesAsUint8Array);\n  }\n  if (segment.container !== 'ts' && segment.container !== 'aac') {\n    trackInfoFn(segment, {\n      hasAudio: false,\n      hasVideo: false\n    });\n    doneFn(null, segment, {});\n    return;\n  } // ts or aac\n\n  transmuxAndNotify({\n    segment,\n    bytes,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  });\n};\nconst decrypt = function ({\n  id,\n  key,\n  encryptedBytes,\n  decryptionWorker,\n  segment,\n  doneFn\n}, callback) {\n  const decryptionHandler = event => {\n    if (event.data.source === id) {\n      decryptionWorker.removeEventListener('message', decryptionHandler);\n      const decrypted = event.data.decrypted;\n      callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n    }\n  };\n  decryptionWorker.onerror = () => {\n    const message = 'An error occurred in the decryption worker';\n    const segmentInfo = segmentInfoPayload({\n      segment\n    });\n    const decryptError = {\n      message,\n      metadata: {\n        error: new Error(message),\n        errorType: videojs.Error.StreamingFailedToDecryptSegment,\n        segmentInfo,\n        keyInfo: {\n          uri: segment.key.resolvedUri || segment.map.key.resolvedUri\n        }\n      }\n    };\n    doneFn(decryptError, segment);\n  };\n  decryptionWorker.addEventListener('message', decryptionHandler);\n  let keyBytes;\n  if (key.bytes.slice) {\n    keyBytes = key.bytes.slice();\n  } else {\n    keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n  } // incrementally decrypt the bytes\n\n  decryptionWorker.postMessage(createTransferableMessage({\n    source: id,\n    encrypted: encryptedBytes,\n    key: keyBytes,\n    iv: key.iv\n  }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n *                                       routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n *                            and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\nconst decryptSegment = ({\n  decryptionWorker,\n  segment,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  triggerSegmentEventFn({\n    type: 'segmentdecryptionstart'\n  });\n  decrypt({\n    id: segment.requestId,\n    key: segment.key,\n    encryptedBytes: segment.encryptedBytes,\n    decryptionWorker,\n    segment,\n    doneFn\n  }, decryptedBytes => {\n    segment.bytes = decryptedBytes;\n    triggerSegmentEventFn({\n      type: 'segmentdecryptioncomplete',\n      segment\n    });\n    handleSegmentBytes({\n      segment,\n      bytes: segment.bytes,\n      trackInfoFn,\n      timingInfoFn,\n      videoSegmentTimingInfoFn,\n      audioSegmentTimingInfoFn,\n      id3Fn,\n      captionsFn,\n      isEndOfTimeline,\n      endedTimelineFn,\n      dataFn,\n      doneFn,\n      onTransmuxerLog,\n      triggerSegmentEventFn\n    });\n  });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n *                                       routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n *                            and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n *                            downloaded and any decryption completed\n */\n\nconst waitForCompletion = ({\n  activeXhrs,\n  decryptionWorker,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  let count = 0;\n  let didError = false;\n  return (error, segment) => {\n    if (didError) {\n      return;\n    }\n    if (error) {\n      didError = true; // If there are errors, we have to abort any outstanding requests\n\n      abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n      // handle the aborted events from those requests, there are some cases where we may\n      // never get an aborted event. For instance, if the network connection is lost and\n      // there were two requests, the first may have triggered an error immediately, while\n      // the second request remains unsent. In that case, the aborted algorithm will not\n      // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n      //\n      // We also can't rely on the ready state of the XHR, since the request that\n      // triggered the connection error may also show as a ready state of 0 (unsent).\n      // Therefore, we have to finish this group of requests immediately after the first\n      // seen error.\n\n      return doneFn(error, segment);\n    }\n    count += 1;\n    if (count === activeXhrs.length) {\n      const segmentFinish = function () {\n        if (segment.encryptedBytes) {\n          return decryptSegment({\n            decryptionWorker,\n            segment,\n            trackInfoFn,\n            timingInfoFn,\n            videoSegmentTimingInfoFn,\n            audioSegmentTimingInfoFn,\n            id3Fn,\n            captionsFn,\n            isEndOfTimeline,\n            endedTimelineFn,\n            dataFn,\n            doneFn,\n            onTransmuxerLog,\n            triggerSegmentEventFn\n          });\n        } // Otherwise, everything is ready just continue\n\n        handleSegmentBytes({\n          segment,\n          bytes: segment.bytes,\n          trackInfoFn,\n          timingInfoFn,\n          videoSegmentTimingInfoFn,\n          audioSegmentTimingInfoFn,\n          id3Fn,\n          captionsFn,\n          isEndOfTimeline,\n          endedTimelineFn,\n          dataFn,\n          doneFn,\n          onTransmuxerLog,\n          triggerSegmentEventFn\n        });\n      }; // Keep track of when *all* of the requests have completed\n\n      segment.endOfAllRequests = Date.now();\n      if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n        triggerSegmentEventFn({\n          type: 'segmentdecryptionstart',\n          segment\n        });\n        return decrypt({\n          decryptionWorker,\n          // add -init to the \"id\" to differentiate between segment\n          // and init segment decryption, just in case they happen\n          // at the same time at some point in the future.\n          id: segment.requestId + '-init',\n          encryptedBytes: segment.map.encryptedBytes,\n          key: segment.map.key,\n          segment,\n          doneFn\n        }, decryptedBytes => {\n          segment.map.bytes = decryptedBytes;\n          triggerSegmentEventFn({\n            type: 'segmentdecryptioncomplete',\n            segment\n          });\n          parseInitSegment(segment, parseError => {\n            if (parseError) {\n              abortAll(activeXhrs);\n              return doneFn(parseError, segment);\n            }\n            segmentFinish();\n          });\n        });\n      }\n      segmentFinish();\n    }\n  };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\nconst handleLoadEnd = ({\n  loadendState,\n  abortFn\n}) => event => {\n  const request = event.target;\n  if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n    abortFn();\n    loadendState.calledAbortFn = true;\n  }\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n *                                is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n *                            and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\nconst handleProgress = ({\n  segment,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn\n}) => event => {\n  const request = event.target;\n  if (request.aborted) {\n    return;\n  }\n  segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n  if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n    segment.stats.firstBytesReceivedAt = Date.now();\n  }\n  return progressFn(event, segment);\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n *   decrypts the media-segment if it has a key uri and an iv\n *   aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n *   resolvedUri: String,\n *   [transmuxer]: Object,\n *   [byterange]: {\n *     offset: Number,\n *     length: Number\n *   },\n *   [key]: {\n *     resolvedUri: String\n *     [byterange]: {\n *       offset: Number,\n *       length: Number\n *     },\n *     iv: {\n *       bytes: Uint32Array\n *     }\n *   },\n *   [map]: {\n *     resolvedUri: String,\n *     [byterange]: {\n *       offset: Number,\n *       length: Number\n *     },\n *     [bytes]: Uint8Array\n *   }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n *                                       decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n *                           from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n *                             aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n *                                segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n *                   a callback that receives video timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n *                   a callback that receives audio timing info based on media times and\n *                   any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean}  isEndOfTimeline\n *                   true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n *                   a callback made when a timeline is ended, will only be called if\n *                   isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n *                            request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n *                            succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n *                     outstanding requests\n */\n\nconst mediaSegmentRequest = ({\n  xhr,\n  xhrOptions,\n  decryptionWorker,\n  segment,\n  abortFn,\n  progressFn,\n  trackInfoFn,\n  timingInfoFn,\n  videoSegmentTimingInfoFn,\n  audioSegmentTimingInfoFn,\n  id3Fn,\n  captionsFn,\n  isEndOfTimeline,\n  endedTimelineFn,\n  dataFn,\n  doneFn,\n  onTransmuxerLog,\n  triggerSegmentEventFn\n}) => {\n  const activeXhrs = [];\n  const finishProcessingFn = waitForCompletion({\n    activeXhrs,\n    decryptionWorker,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn,\n    doneFn,\n    onTransmuxerLog,\n    triggerSegmentEventFn\n  }); // optionally, request the decryption key\n\n  if (segment.key && !segment.key.bytes) {\n    const objects = [segment.key];\n    if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n      objects.push(segment.map.key);\n    }\n    const keyRequestOptions = merge(xhrOptions, {\n      uri: segment.key.resolvedUri,\n      responseType: 'arraybuffer',\n      requestType: 'segment-key'\n    });\n    const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn, triggerSegmentEventFn);\n    const keyInfo = {\n      uri: segment.key.resolvedUri\n    };\n    triggerSegmentEventFn({\n      type: 'segmentkeyloadstart',\n      segment,\n      keyInfo\n    });\n    const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n    activeXhrs.push(keyXhr);\n  } // optionally, request the associated media init segment\n\n  if (segment.map && !segment.map.bytes) {\n    const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n    if (differentMapKey) {\n      const mapKeyRequestOptions = merge(xhrOptions, {\n        uri: segment.map.key.resolvedUri,\n        responseType: 'arraybuffer',\n        requestType: 'segment-key'\n      });\n      const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn, triggerSegmentEventFn);\n      const keyInfo = {\n        uri: segment.map.key.resolvedUri\n      };\n      triggerSegmentEventFn({\n        type: 'segmentkeyloadstart',\n        segment,\n        keyInfo\n      });\n      const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n      activeXhrs.push(mapKeyXhr);\n    }\n    const initSegmentOptions = merge(xhrOptions, {\n      uri: segment.map.resolvedUri,\n      responseType: 'arraybuffer',\n      headers: segmentXhrHeaders(segment.map),\n      requestType: 'segment-media-initialization'\n    });\n    const initSegmentRequestCallback = handleInitSegmentResponse({\n      segment,\n      finishProcessingFn,\n      triggerSegmentEventFn\n    });\n    triggerSegmentEventFn({\n      type: 'segmentloadstart',\n      segment\n    });\n    const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n    activeXhrs.push(initSegmentXhr);\n  }\n  const segmentRequestOptions = merge(xhrOptions, {\n    uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n    responseType: 'arraybuffer',\n    headers: segmentXhrHeaders(segment),\n    requestType: 'segment'\n  });\n  const segmentRequestCallback = handleSegmentResponse({\n    segment,\n    finishProcessingFn,\n    responseType: segmentRequestOptions.responseType,\n    triggerSegmentEventFn\n  });\n  triggerSegmentEventFn({\n    type: 'segmentloadstart',\n    segment\n  });\n  const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n  segmentXhr.addEventListener('progress', handleProgress({\n    segment,\n    progressFn,\n    trackInfoFn,\n    timingInfoFn,\n    videoSegmentTimingInfoFn,\n    audioSegmentTimingInfoFn,\n    id3Fn,\n    captionsFn,\n    isEndOfTimeline,\n    endedTimelineFn,\n    dataFn\n  }));\n  activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n  // multiple times, provide a shared state object\n\n  const loadendState = {};\n  activeXhrs.forEach(activeXhr => {\n    activeXhr.addEventListener('loadend', handleLoadEnd({\n      loadendState,\n      abortFn\n    }));\n  });\n  return () => abortAll(activeXhrs);\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n  if (!representation || !representation.playlist) {\n    return;\n  }\n  const playlist = representation.playlist;\n  return JSON.stringify({\n    id: playlist.id,\n    bandwidth: representation.bandwidth,\n    width: representation.width,\n    height: representation.height,\n    codecs: playlist.attributes && playlist.attributes.CODECS || ''\n  });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\nconst safeGetComputedStyle = function (el, property) {\n  if (!el) {\n    return '';\n  }\n  const result = window$1.getComputedStyle(el);\n  if (!result) {\n    return '';\n  }\n  return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\nconst stableSort = function (array, sortFn) {\n  const newArray = array.slice();\n  array.sort(function (left, right) {\n    const cmp = sortFn(left, right);\n    if (cmp === 0) {\n      return newArray.indexOf(left) - newArray.indexOf(right);\n    }\n    return cmp;\n  });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistBandwidth = function (left, right) {\n  let leftBandwidth;\n  let rightBandwidth;\n  if (left.attributes.BANDWIDTH) {\n    leftBandwidth = left.attributes.BANDWIDTH;\n  }\n  leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n  if (right.attributes.BANDWIDTH) {\n    rightBandwidth = right.attributes.BANDWIDTH;\n  }\n  rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n  return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistResolution = function (left, right) {\n  let leftWidth;\n  let rightWidth;\n  if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n    leftWidth = left.attributes.RESOLUTION.width;\n  }\n  leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n  if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n    rightWidth = right.attributes.RESOLUTION.width;\n  }\n  rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n  // have the same media dimensions/ resolution\n\n  if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n    return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n  }\n  return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} settings\n *        Object of information required to use this selector\n * @param {Object} settings.main\n *        Object representation of the main manifest\n * @param {number} settings.bandwidth\n *        Current calculated bandwidth of the player\n * @param {number} settings.playerWidth\n *        Current width of the player element (should account for the device pixel ratio)\n * @param {number} settings.playerHeight\n *        Current height of the player element (should account for the device pixel ratio)\n * @param {number} settings.playerObjectFit\n *        Current value of the video element's object-fit CSS property. Allows taking into\n *        account that the video might be scaled up to cover the media element when selecting\n *        media playlists based on player size.\n * @param {boolean} settings.limitRenditionByPlayerDimensions\n *        True if the player width and height should be used during the selection, false otherwise\n * @param {Object} settings.playlistController\n *        the current playlistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nlet simpleSelector = function (settings) {\n  const {\n    main,\n    bandwidth: playerBandwidth,\n    playerWidth,\n    playerHeight,\n    playerObjectFit,\n    limitRenditionByPlayerDimensions,\n    playlistController\n  } = settings; // If we end up getting called before `main` is available, exit early\n\n  if (!main) {\n    return;\n  }\n  const options = {\n    bandwidth: playerBandwidth,\n    width: playerWidth,\n    height: playerHeight,\n    limitRenditionByPlayerDimensions\n  };\n  let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n  if (Playlist.isAudioOnly(main)) {\n    playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n    // at the buttom of this function for debugging.\n\n    options.audioOnly = true;\n  } // convert the playlists to an intermediary representation to make comparisons easier\n\n  let sortedPlaylistReps = playlists.map(playlist => {\n    let bandwidth;\n    const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n    const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n    bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n    bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n    return {\n      bandwidth,\n      width,\n      height,\n      playlist\n    };\n  });\n  stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\n  if (!enabledPlaylistReps.length) {\n    // if there are no enabled playlists, then they have all been excluded or disabled\n    // by the user through the representations api. In this case, ignore exclusion and\n    // fallback to what the user wants by using playlists the user has not disabled.\n    enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist));\n  } // filter out any variant that has greater effective bitrate\n  // than the current estimated bandwidth\n\n  const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n  let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n  // and then taking the very first element\n\n  const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n  if (limitRenditionByPlayerDimensions === false) {\n    const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n    if (chosenRep && chosenRep.playlist) {\n      let type = 'sortedPlaylistReps';\n      if (bandwidthBestRep) {\n        type = 'bandwidthBestRep';\n      }\n      if (enabledPlaylistReps[0]) {\n        type = 'enabledPlaylistReps';\n      }\n      logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n      return chosenRep.playlist;\n    }\n    logFn('could not choose a playlist with options', options);\n    return null;\n  } // filter out playlists without resolution information\n\n  const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n  stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n  const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n  const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  let resolutionPlusOneList;\n  let resolutionPlusOneSmallest;\n  let resolutionPlusOneRep; // find the smallest variant that is larger than the player\n  // if there is no match of exact resolution\n\n  if (!resolutionBestRep) {\n    resolutionPlusOneList = haveResolution.filter(rep => {\n      if (playerObjectFit === 'cover') {\n        // video will be scaled up to cover the player. We need to\n        // make sure rendition is at least as wide and as high as the\n        // player.\n        return rep.width > playerWidth && rep.height > playerHeight;\n      } // video will be scaled down to fit inside the player soon as\n      // its resolution exceeds player size in at least one dimension.\n\n      return rep.width > playerWidth || rep.height > playerHeight;\n    }); // find all the variants have the same smallest resolution\n\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that\n    // is just-larger-than the video player\n\n    highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n    resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n  }\n  let leastPixelDiffRep; // If this selector proves to be better than others,\n  // resolutionPlusOneRep and resolutionBestRep and all\n  // the code involving them should be removed.\n\n  if (playlistController.leastPixelDiffSelector) {\n    // find the variant that is closest to the player's pixel size\n    const leastPixelDiffList = haveResolution.map(rep => {\n      rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n      return rep;\n    }); // get the highest bandwidth, closest resolution playlist\n\n    stableSort(leastPixelDiffList, (left, right) => {\n      // sort by highest bandwidth if pixelDiff is the same\n      if (left.pixelDiff === right.pixelDiff) {\n        return right.bandwidth - left.bandwidth;\n      }\n      return left.pixelDiff - right.pixelDiff;\n    });\n    leastPixelDiffRep = leastPixelDiffList[0];\n  } // fallback chain of variants\n\n  const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n  if (chosenRep && chosenRep.playlist) {\n    let type = 'sortedPlaylistReps';\n    if (leastPixelDiffRep) {\n      type = 'leastPixelDiffRep';\n    } else if (resolutionPlusOneRep) {\n      type = 'resolutionPlusOneRep';\n    } else if (resolutionBestRep) {\n      type = 'resolutionBestRep';\n    } else if (bandwidthBestRep) {\n      type = 'bandwidthBestRep';\n    } else if (enabledPlaylistReps[0]) {\n      type = 'enabledPlaylistReps';\n    }\n    logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n    return chosenRep.playlist;\n  }\n  logFn('could not choose a playlist with options', options);\n  return null;\n};\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nconst lastBandwidthSelector = function () {\n  let pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n  if (!isNaN(this.customPixelRatio)) {\n    pixelRatio = this.customPixelRatio;\n  }\n  return simpleSelector({\n    main: this.playlists.main,\n    bandwidth: this.systemBandwidth,\n    playerWidth: parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio,\n    playerHeight: parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio,\n    playerObjectFit: this.usePlayerObjectFit ? safeGetComputedStyle(this.tech_.el(), 'objectFit') : '',\n    limitRenditionByPlayerDimensions: this.limitRenditionByPlayerDimensions,\n    playlistController: this.playlistController_\n  });\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\nconst movingAverageBandwidthSelector = function (decay) {\n  let average = -1;\n  let lastSystemBandwidth = -1;\n  if (decay < 0 || decay > 1) {\n    throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n  }\n  return function () {\n    let pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n    if (!isNaN(this.customPixelRatio)) {\n      pixelRatio = this.customPixelRatio;\n    }\n    if (average < 0) {\n      average = this.systemBandwidth;\n      lastSystemBandwidth = this.systemBandwidth;\n    } // stop the average value from decaying for every 250ms\n    // when the systemBandwidth is constant\n    // and\n    // stop average from setting to a very low value when the\n    // systemBandwidth becomes 0 in case of chunk cancellation\n\n    if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n      average = decay * this.systemBandwidth + (1 - decay) * average;\n      lastSystemBandwidth = this.systemBandwidth;\n    }\n    return simpleSelector({\n      main: this.playlists.main,\n      bandwidth: average,\n      playerWidth: parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio,\n      playerHeight: parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio,\n      playerObjectFit: this.usePlayerObjectFit ? safeGetComputedStyle(this.tech_.el(), 'objectFit') : '',\n      limitRenditionByPlayerDimensions: this.limitRenditionByPlayerDimensions,\n      playlistController: this.playlistController_\n    });\n  };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n *        Object of information required to use this selector\n * @param {Object} settings.main\n *        Object representation of the main manifest\n * @param {number} settings.currentTime\n *        The current time of the player\n * @param {number} settings.bandwidth\n *        Current measured bandwidth\n * @param {number} settings.duration\n *        Duration of the media\n * @param {number} settings.segmentDuration\n *        Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n *        Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n *        The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n *        SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n *         {Object} return.playlist\n *         The highest bandwidth playlist with the least amount of rebuffering\n *         {Number} return.rebufferingImpact\n *         The amount of time in seconds switching to this playlist will rebuffer. A\n *         negative value means that switching will cause zero rebuffering.\n */\n\nconst minRebufferMaxBandwidthSelector = function (settings) {\n  const {\n    main,\n    currentTime,\n    bandwidth,\n    duration,\n    segmentDuration,\n    timeUntilRebuffer,\n    currentTimeline,\n    syncController\n  } = settings; // filter out any playlists that have been excluded due to\n  // incompatible configurations\n\n  const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n  // api or excluded temporarily due to playback errors.\n\n  let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n  if (!enabledPlaylists.length) {\n    // if there are no enabled playlists, then they have all been excluded or disabled\n    // by the user through the representations api. In this case, ignore exclusion and\n    // fallback to what the user wants by using playlists the user has not disabled.\n    enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist));\n  }\n  const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n  const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n    const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n    // sync request first. This will double the request time\n\n    const numRequests = syncPoint ? 1 : 2;\n    const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n    const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n    return {\n      playlist,\n      rebufferingImpact\n    };\n  });\n  const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n  stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n  if (noRebufferingPlaylists.length) {\n    return noRebufferingPlaylists[0];\n  }\n  stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\n  return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video.  If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n *         {Object} return.playlist\n *         The lowest bitrate playlist that contains a video codec.  If no such rendition\n *         exists pick the lowest audio rendition.\n */\n\nconst lowestBitrateCompatibleVariantSelector = function () {\n  // filter out any playlists that have been excluded due to\n  // incompatible configurations or playback errors\n  const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n  stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video\n  // (this is not necessarily true, although it is generally true).\n  //\n  // If an entire manifest has no valid videos everything will get filtered\n  // out.\n\n  const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\n  return playlistsWithVideo[0] || null;\n};\n\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\nconst concatSegments = segmentObj => {\n  let offset = 0;\n  let tempBuffer;\n  if (segmentObj.bytes) {\n    tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n    segmentObj.segments.forEach(segment => {\n      tempBuffer.set(segment, offset);\n      offset += segment.byteLength;\n    });\n  }\n  return tempBuffer;\n};\n/**\n * Example:\n * https://host.com/path1/path2/path3/segment.ts?arg1=val1\n * -->\n * path3/segment.ts\n *\n * @param resolvedUri\n * @return {string}\n */\n\nfunction compactSegmentUrlDescription(resolvedUri) {\n  try {\n    return new URL(resolvedUri).pathname.split('/').slice(-2).join('/');\n  } catch (e) {\n    return '';\n  }\n}\n\n/**\n * @file text-tracks.js\n */\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n  if (!inbandTextTracks[captionStream]) {\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-608'\n    });\n    let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n    if (/^cc708_/.test(captionStream)) {\n      instreamId = 'SERVICE' + captionStream.split('_')[1];\n    }\n    const track = tech.textTracks().getTrackById(instreamId);\n    if (track) {\n      // Resuse an existing track with a CC# id because this was\n      // very likely created by videojs-contrib-hls from information\n      // in the m3u8 for us to use\n      inbandTextTracks[captionStream] = track;\n    } else {\n      // This section gets called when we have caption services that aren't specified in the manifest.\n      // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n      const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n      let label = captionStream;\n      let language = captionStream;\n      let def = false;\n      const captionService = captionServices[instreamId];\n      if (captionService) {\n        label = captionService.label;\n        language = captionService.language;\n        def = captionService.default;\n      } // Otherwise, create a track with the default `CC#` label and\n      // without a language\n\n      inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n        kind: 'captions',\n        id: instreamId,\n        // TODO: investigate why this doesn't seem to turn the caption on by default\n        default: def,\n        label,\n        language\n      }, false).track;\n    }\n  }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n *   @param {Object} inbandTextTracks the inband text tracks\n *   @param {number} timestampOffset the timestamp offset of the source buffer\n *   @param {Array} captionArray an array of caption data\n * @private\n */\n\nconst addCaptionData = function ({\n  inbandTextTracks,\n  captionArray,\n  timestampOffset\n}) {\n  if (!captionArray) {\n    return;\n  }\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  captionArray.forEach(caption => {\n    const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n    // with positioning data\n\n    if (caption.content) {\n      caption.content.forEach(value => {\n        const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n        cue.line = value.line;\n        cue.align = 'left';\n        cue.position = value.position;\n        cue.positionAlign = 'line-left';\n        inbandTextTracks[track].addCue(cue);\n      });\n    } else {\n      // otherwise, a text value with combined captions is sent\n      inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n    }\n  });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\nconst deprecateOldCue = function (cue) {\n  Object.defineProperties(cue.frame, {\n    id: {\n      get() {\n        videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n        return cue.value.key;\n      }\n    },\n    value: {\n      get() {\n        videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n        return cue.value.data;\n      }\n    },\n    privateData: {\n      get() {\n        videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n        return cue.value.data;\n      }\n    }\n  });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n *   @param {Object} inbandTextTracks the inband text tracks\n *   @param {Array} metadataArray an array of meta data\n *   @param {number} timestampOffset the timestamp offset of the source buffer\n *   @param {number} videoDuration the duration of the video\n * @private\n */\n\nconst addMetadata = ({\n  inbandTextTracks,\n  metadataArray,\n  timestampOffset,\n  videoDuration\n}) => {\n  if (!metadataArray) {\n    return;\n  }\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n  if (!metadataTrack) {\n    return;\n  }\n  metadataArray.forEach(metadata => {\n    const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n    // ignore this bit of metadata.\n    // This likely occurs when you have an non-timed ID3 tag like TIT2,\n    // which is the \"Title/Songname/Content description\" frame\n\n    if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n      return;\n    } // If we have no frames, we can't create a cue.\n\n    if (!metadata.frames || !metadata.frames.length) {\n      return;\n    }\n    metadata.frames.forEach(frame => {\n      const cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n      cue.frame = frame;\n      cue.value = frame;\n      deprecateOldCue(cue);\n      metadataTrack.addCue(cue);\n    });\n  });\n  if (!metadataTrack.cues || !metadataTrack.cues.length) {\n    return;\n  } // Updating the metadeta cues so that\n  // the endTime of each cue is the startTime of the next cue\n  // the endTime of last cue is the duration of the video\n\n  const cues = metadataTrack.cues;\n  const cuesArray = []; // Create a copy of the TextTrackCueList...\n  // ...disregarding cues with a falsey value\n\n  for (let i = 0; i < cues.length; i++) {\n    if (cues[i]) {\n      cuesArray.push(cues[i]);\n    }\n  } // Group cues by their startTime value\n\n  const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n    const timeSlot = obj[cue.startTime] || [];\n    timeSlot.push(cue);\n    obj[cue.startTime] = timeSlot;\n    return obj;\n  }, {}); // Sort startTimes by ascending order\n\n  const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n  sortedStartTimes.forEach((startTime, idx) => {\n    const cueGroup = cuesGroupedByStartTime[startTime];\n    const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime;\n    const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n    cueGroup.forEach(cue => {\n      cue.endTime = nextTime;\n    });\n  });\n}; // object for mapping daterange attributes\n\nconst dateRangeAttr = {\n  id: 'ID',\n  class: 'CLASS',\n  startDate: 'START-DATE',\n  duration: 'DURATION',\n  endDate: 'END-DATE',\n  endOnNext: 'END-ON-NEXT',\n  plannedDuration: 'PLANNED-DURATION',\n  scte35Out: 'SCTE35-OUT',\n  scte35In: 'SCTE35-IN'\n};\nconst dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n/**\n * Add DateRange metadata text track to a source handler given an array of metadata\n *\n * @param {Object}\n *   @param {Object} inbandTextTracks the inband text tracks\n *   @param {Array} dateRanges parsed media playlist\n * @private\n */\n\nconst addDateRangeMetadata = ({\n  inbandTextTracks,\n  dateRanges\n}) => {\n  const metadataTrack = inbandTextTracks.metadataTrack_;\n  if (!metadataTrack) {\n    return;\n  }\n  const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n  dateRanges.forEach(dateRange => {\n    // we generate multiple cues for each date range with different attributes\n    for (const key of Object.keys(dateRange)) {\n      if (dateRangeKeysToOmit.has(key)) {\n        continue;\n      }\n      const cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n      cue.id = dateRange.id;\n      cue.type = 'com.apple.quicktime.HLS';\n      cue.value = {\n        key: dateRangeAttr[key],\n        data: dateRange[key]\n      };\n      if (key === 'scte35Out' || key === 'scte35In') {\n        cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n      }\n      metadataTrack.addCue(cue);\n    }\n    dateRange.processDateRange();\n  });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\nconst createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n  if (inbandTextTracks.metadataTrack_) {\n    return;\n  }\n  inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n    kind: 'metadata',\n    label: 'Timed Metadata'\n  }, false).track;\n  if (!videojs.browser.IS_ANY_SAFARI) {\n    inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n  }\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\nconst removeCuesFromTrack = function (start, end, track) {\n  let i;\n  let cue;\n  if (!track) {\n    return;\n  }\n  if (!track.cues) {\n    return;\n  }\n  i = track.cues.length;\n  while (i--) {\n    cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n    if (cue.startTime >= start && cue.endTime <= end) {\n      track.removeCue(cue);\n    }\n  }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\nconst removeDuplicateCuesFromTrack = function (track) {\n  const cues = track.cues;\n  if (!cues) {\n    return;\n  }\n  const uniqueCues = {};\n  for (let i = cues.length - 1; i >= 0; i--) {\n    const cue = cues[i];\n    const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n    if (uniqueCues[cueKey]) {\n      track.removeCue(cue);\n    } else {\n      uniqueCues[cueKey] = cue;\n    }\n  }\n};\n\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n *        The current buffer of gop information\n * @param {number} currentTime\n *        The current time\n * @param {Double} mapping\n *        Offset to map display time to stream presentation time\n * @return {Array}\n *         List of gops considered safe to append over\n */\n\nconst gopsSafeToAlignWith = (buffer, currentTime, mapping) => {\n  if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n    return [];\n  } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n  const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n  let i;\n  for (i = 0; i < buffer.length; i++) {\n    if (buffer[i].pts > currentTimePts) {\n      break;\n    }\n  }\n  return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n *        The current buffer of gop information\n * @param {Array} gops\n *        List of new gop information\n * @param {boolean} replace\n *        If true, replace the buffer with the new gop information. If false, append the\n *        new gop information to the buffer in the right location of time.\n * @return {Array}\n *         Updated list of gop information\n */\n\nconst updateGopBuffer = (buffer, gops, replace) => {\n  if (!gops.length) {\n    return buffer;\n  }\n  if (replace) {\n    // If we are in safe append mode, then completely overwrite the gop buffer\n    // with the most recent appeneded data. This will make sure that when appending\n    // future segments, we only try to align with gops that are both ahead of current\n    // time and in the last segment appended.\n    return gops.slice();\n  }\n  const start = gops[0].pts;\n  let i = 0;\n  for (i; i < buffer.length; i++) {\n    if (buffer[i].pts >= start) {\n      break;\n    }\n  }\n  return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n *        The current buffer of gop information\n * @param {Double} start\n *        position to start the remove at\n * @param {Double} end\n *        position to end the remove at\n * @param {Double} mapping\n *        Offset to map display time to stream presentation time\n */\n\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n  const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n  const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n  const updatedBuffer = buffer.slice();\n  let i = buffer.length;\n  while (i--) {\n    if (buffer[i].pts <= endPts) {\n      break;\n    }\n  }\n  if (i === -1) {\n    // no removal because end of remove range is before start of buffer\n    return updatedBuffer;\n  }\n  let j = i + 1;\n  while (j--) {\n    if (buffer[j].pts <= startPts) {\n      break;\n    }\n  } // clamp remove range start to 0 index\n\n  j = Math.max(j, 0);\n  updatedBuffer.splice(j, i - j + 1);\n  return updatedBuffer;\n};\nconst shallowEqual = function (a, b) {\n  // if both are undefined\n  // or one or the other is undefined\n  // they are not equal\n  if (!a && !b || !a && b || a && !b) {\n    return false;\n  } // they are the same object and thus, equal\n\n  if (a === b) {\n    return true;\n  } // sort keys so we can make sure they have\n  // all the same keys later.\n\n  const akeys = Object.keys(a).sort();\n  const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n  if (akeys.length !== bkeys.length) {\n    return false;\n  }\n  for (let i = 0; i < akeys.length; i++) {\n    const key = akeys[i]; // different sorted keys, not equal\n\n    if (key !== bkeys[i]) {\n      return false;\n    } // different values, not equal\n\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n  return true;\n};\n\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n  segments = segments || [];\n  const timelineSegments = [];\n  let time = 0;\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n    if (currentTimeline === segment.timeline) {\n      timelineSegments.push(i);\n      time += segment.duration;\n      if (time > targetTime) {\n        return i;\n      }\n    }\n  }\n  if (timelineSegments.length === 0) {\n    return 0;\n  } // default to the last timeline segment\n\n  return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => {\n  // Although these checks should most likely cover non 'main' types, for now it narrows\n  // the scope of our checks.\n  if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n    return null;\n  }\n  if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n    return 'Neither audio nor video found in segment.';\n  }\n  if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n    return '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.';\n  }\n  if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n    return '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.';\n  }\n  return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n *        The current seekable range\n * @param {number} currentTime\n *        The current time of the player\n * @param {number} targetDuration\n *        The target duration of the current playlist\n * @return {number}\n *         Time that is safe to remove from the back buffer without interrupting playback\n */\n\nconst safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => {\n  // 30 seconds before the playhead provides a safe default for trimming.\n  //\n  // Choosing a reasonable default is particularly important for high bitrate content and\n  // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n  // throw an APPEND_BUFFER_ERR.\n  let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n  if (seekable.length) {\n    // Some live playlists may have a shorter window of content than the full allowed back\n    // buffer. For these playlists, don't save content that's no longer within the window.\n    trimTime = Math.max(trimTime, seekable.start(0));\n  } // Don't remove within target duration of the current time to avoid the possibility of\n  // removing the GOP currently being played, as removing it can cause playback stalls.\n\n  const maxTrimTime = currentTime - targetDuration;\n  return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n  const {\n    startOfSegment,\n    duration,\n    segment,\n    part,\n    playlist: {\n      mediaSequence: seq,\n      id,\n      segments = []\n    },\n    mediaIndex: index,\n    partIndex,\n    timeline\n  } = segmentInfo;\n  const segmentLen = segments.length - 1;\n  let selection = 'mediaIndex/partIndex increment';\n  if (segmentInfo.getMediaInfoForTime) {\n    selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n  } else if (segmentInfo.isSyncRequest) {\n    selection = 'getSyncSegmentCandidate (isSyncRequest)';\n  }\n  if (segmentInfo.independent) {\n    selection += ` with independent ${segmentInfo.independent}`;\n  }\n  const hasPartIndex = typeof partIndex === 'number';\n  const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n  const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n    preloadSegment: segment\n  }) - 1 : 0;\n  return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n *        The timeline of the segment\n * @param {number} currentTimeline\n *        The timeline currently being followed by the loader\n * @param {number} startOfSegment\n *        The estimated segment start\n * @param {TimeRange[]} buffered\n *        The loader's buffer\n * @param {boolean} overrideCheck\n *        If true, no checks are made to see if the timestamp offset value should be set,\n *        but sets it directly to a value.\n *\n * @return {number|null}\n *         Either a number representing a new timestamp offset, or null if the segment is\n *         part of the same timeline\n */\n\nconst timestampOffsetForSegment = ({\n  segmentTimeline,\n  currentTimeline,\n  startOfSegment,\n  buffered,\n  overrideCheck\n}) => {\n  // Check to see if we are crossing a discontinuity to see if we need to set the\n  // timestamp offset on the transmuxer and source buffer.\n  //\n  // Previously, we changed the timestampOffset if the start of this segment was less than\n  // the currently set timestampOffset, but this isn't desirable as it can produce bad\n  // behavior, especially around long running live streams.\n  if (!overrideCheck && segmentTimeline === currentTimeline) {\n    return null;\n  } // When changing renditions, it's possible to request a segment on an older timeline. For\n  // instance, given two renditions with the following:\n  //\n  // #EXTINF:10\n  // segment1\n  // #EXT-X-DISCONTINUITY\n  // #EXTINF:10\n  // segment2\n  // #EXTINF:10\n  // segment3\n  //\n  // And the current player state:\n  //\n  // current time: 8\n  // buffer: 0 => 20\n  //\n  // The next segment on the current rendition would be segment3, filling the buffer from\n  // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n  // then the next segment to be requested will be segment1 from the new rendition in\n  // order to fill time 8 and onwards. Using the buffered end would result in repeated\n  // content (since it would position segment1 of the new rendition starting at 20s). This\n  // case can be identified when the new segment's timeline is a prior value. Instead of\n  // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n  // more accurate to the actual start time of the segment.\n\n  if (segmentTimeline < currentTimeline) {\n    return startOfSegment;\n  } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n  // value uses the end of the last segment if it is available. While this value\n  // should often be correct, it's better to rely on the buffered end, as the new\n  // content post discontinuity should line up with the buffered end as if it were\n  // time 0 for the new content.\n\n  return buffered.length ? buffered.end(buffered.length - 1) : startOfSegment;\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline:       0                 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader:                     ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader              ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline:       0                 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader:             ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader                      ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline:       0                 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader:           ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader            ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n *        The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n *        The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n *        The loader type\n * @param {boolean} audioDisabled\n *        Whether the audio is disabled for the loader. This should only be true when the\n *        loader may have muxed audio in its segment, but should not append it, e.g., for\n *        the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n *         Whether the loader should wait for a timeline change from the timeline change\n *         controller before processing the segment\n */\n\nconst shouldWaitForTimelineChange = ({\n  timelineChangeController,\n  currentTimeline,\n  segmentTimeline,\n  loaderType,\n  audioDisabled\n}) => {\n  if (currentTimeline === segmentTimeline) {\n    return false;\n  }\n  if (loaderType === 'audio') {\n    const lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n      type: 'main'\n    }); // Audio loader should wait if:\n    //\n    // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n    // * main hasn't yet changed to the timeline audio is looking to load\n\n    return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n  } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n  // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n  // loader's segments (or the content is audio/video only and handled by the main\n  // loader).\n\n  if (loaderType === 'main' && audioDisabled) {\n    const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n      type: 'audio'\n    }); // Main loader should wait for the audio loader if audio is not pending a timeline\n    // change to the current timeline.\n    //\n    // Since the main loader is responsible for setting the timestamp offset for both\n    // audio and video, the main loader must wait for audio to be about to change to its\n    // timeline before setting the offset, otherwise, if audio is behind in loading,\n    // segments from the previous timeline would be adjusted by the new timestamp offset.\n    //\n    // This requirement means that video will not cross a timeline until the audio is\n    // about to cross to it, so that way audio and video will always cross the timeline\n    // together.\n    //\n    // In addition to normal timeline changes, these rules also apply to the start of a\n    // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n    // that these rules apply to the first timeline change because if they did not, it's\n    // possible that the main loader will cross two timelines before the audio loader has\n    // crossed one. Logic may be implemented to handle the startup as a special case, but\n    // it's easier to simply treat all timeline changes the same.\n\n    if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n      return false;\n    }\n    return true;\n  }\n  return false;\n};\nconst shouldFixBadTimelineChanges = timelineChangeController => {\n  if (!timelineChangeController) {\n    return false;\n  }\n  const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n    type: 'audio'\n  });\n  const pendingMainTimelineChange = timelineChangeController.pendingTimelineChange({\n    type: 'main'\n  });\n  const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;\n  const differentPendingChanges = hasPendingTimelineChanges && pendingAudioTimelineChange.to !== pendingMainTimelineChange.to;\n  const isNotInitialPendingTimelineChange = hasPendingTimelineChanges && pendingAudioTimelineChange.from !== -1 && pendingMainTimelineChange.from !== -1;\n  if (isNotInitialPendingTimelineChange && differentPendingChanges) {\n    return true;\n  }\n  return false;\n};\n/**\n * Check if the pending audio timeline change is behind the\n * pending main timeline change.\n *\n * @param {SegmentLoader} segmentLoader\n * @return {boolean}\n */\n\nconst isAudioTimelineBehind = segmentLoader => {\n  const pendingAudioTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({\n    type: 'audio'\n  });\n  const pendingMainTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({\n    type: 'main'\n  });\n  const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;\n  return hasPendingTimelineChanges && pendingAudioTimelineChange.to < pendingMainTimelineChange.to;\n};\n/**\n * A method to check if the player is waiting for a timeline change, and fixes\n * certain scenarios where the timelines need to be updated.\n *\n * @param {SegmentLoader} segmentLoader\n */\n\nconst checkAndFixTimelines = segmentLoader => {\n  const segmentInfo = segmentLoader.pendingSegment_;\n  if (!segmentInfo) {\n    return;\n  }\n  const waitingForTimelineChange = shouldWaitForTimelineChange({\n    timelineChangeController: segmentLoader.timelineChangeController_,\n    currentTimeline: segmentLoader.currentTimeline_,\n    segmentTimeline: segmentInfo.timeline,\n    loaderType: segmentLoader.loaderType_,\n    audioDisabled: segmentLoader.audioDisabled_\n  });\n  if (waitingForTimelineChange && shouldFixBadTimelineChanges(segmentLoader.timelineChangeController_)) {\n    if (isAudioTimelineBehind(segmentLoader)) {\n      segmentLoader.timelineChangeController_.trigger('audioTimelineBehind');\n      return;\n    }\n    segmentLoader.timelineChangeController_.trigger('fixBadTimelineChange');\n  }\n};\nconst mediaDuration = timingInfos => {\n  let maxDuration = 0;\n  ['video', 'audio'].forEach(function (type) {\n    const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n    if (!typeTimingInfo) {\n      return;\n    }\n    const {\n      start,\n      end\n    } = typeTimingInfo;\n    let duration;\n    if (typeof start === 'bigint' || typeof end === 'bigint') {\n      duration = window$1.BigInt(end) - window$1.BigInt(start);\n    } else if (typeof start === 'number' && typeof end === 'number') {\n      duration = end - start;\n    }\n    if (typeof duration !== 'undefined' && duration > maxDuration) {\n      maxDuration = duration;\n    }\n  }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n  // as we only need BigInt when we are above that.\n\n  if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n    maxDuration = Number(maxDuration);\n  }\n  return maxDuration;\n};\nconst segmentTooLong = ({\n  segmentDuration,\n  maxDuration\n}) => {\n  // 0 duration segments are most likely due to metadata only segments or a lack of\n  // information.\n  if (!segmentDuration) {\n    return false;\n  } // For HLS:\n  //\n  // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n  // The EXTINF duration of each Media Segment in the Playlist\n  // file, when rounded to the nearest integer, MUST be less than or equal\n  // to the target duration; longer segments can trigger playback stalls\n  // or other errors.\n  //\n  // For DASH, the mpd-parser uses the largest reported segment duration as the target\n  // duration. Although that reported duration is occasionally approximate (i.e., not\n  // exact), a strict check may report that a segment is too long more often in DASH.\n\n  return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nconst getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => {\n  // Right now we aren't following DASH's timing model exactly, so only perform\n  // this check for HLS content.\n  if (sourceType !== 'hls') {\n    return null;\n  }\n  const segmentDuration = mediaDuration({\n    audioTimingInfo: segmentInfo.audioTimingInfo,\n    videoTimingInfo: segmentInfo.videoTimingInfo\n  }); // Don't report if we lack information.\n  //\n  // If the segment has a duration of 0 it is either a lack of information or a\n  // metadata only segment and shouldn't be reported here.\n\n  if (!segmentDuration) {\n    return null;\n  }\n  const targetDuration = segmentInfo.playlist.targetDuration;\n  const isSegmentWayTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration * 2\n  });\n  const isSegmentSlightlyTooLong = segmentTooLong({\n    segmentDuration,\n    maxDuration: targetDuration\n  });\n  const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n  if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n    return {\n      severity: isSegmentWayTooLong ? 'warn' : 'info',\n      message: segmentTooLongMessage\n    };\n  }\n  return null;\n};\n/**\n *\n * @param {Object} options type of segment loader and segment either segmentInfo or simple segment\n * @return a segmentInfo payload for events or errors.\n */\n\nconst segmentInfoPayload = ({\n  type,\n  segment\n}) => {\n  if (!segment) {\n    return;\n  }\n  const isEncrypted = Boolean(segment.key || segment.map && segment.map.ke);\n  const isMediaInitialization = Boolean(segment.map && !segment.map.bytes);\n  const start = segment.startOfSegment === undefined ? segment.start : segment.startOfSegment;\n  return {\n    type: type || segment.type,\n    uri: segment.resolvedUri || segment.uri,\n    start,\n    duration: segment.duration,\n    isEncrypted,\n    isMediaInitialization\n  };\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass SegmentLoader extends videojs.EventTarget {\n  constructor(settings, options = {}) {\n    super(); // check pre-conditions\n\n    if (!settings) {\n      throw new TypeError('Initialization settings are required');\n    }\n    if (typeof settings.currentTime !== 'function') {\n      throw new TypeError('No currentTime getter specified');\n    }\n    if (!settings.mediaSource) {\n      throw new TypeError('No MediaSource specified');\n    } // public properties\n\n    this.bandwidth = settings.bandwidth;\n    this.throughput = {\n      rate: 0,\n      count: 0\n    };\n    this.roundTrip = NaN;\n    this.resetStats_();\n    this.mediaIndex = null;\n    this.partIndex = null; // private settings\n\n    this.hasPlayed_ = settings.hasPlayed;\n    this.currentTime_ = settings.currentTime;\n    this.seekable_ = settings.seekable;\n    this.seeking_ = settings.seeking;\n    this.duration_ = settings.duration;\n    this.mediaSource_ = settings.mediaSource;\n    this.vhs_ = settings.vhs;\n    this.loaderType_ = settings.loaderType;\n    this.currentMediaInfo_ = void 0;\n    this.startingMediaInfo_ = void 0;\n    this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n    this.goalBufferLength_ = settings.goalBufferLength;\n    this.sourceType_ = settings.sourceType;\n    this.sourceUpdater_ = settings.sourceUpdater;\n    this.inbandTextTracks_ = settings.inbandTextTracks;\n    this.state_ = 'INIT';\n    this.timelineChangeController_ = settings.timelineChangeController;\n    this.shouldSaveSegmentTimingInfo_ = true;\n    this.parse708captions_ = settings.parse708captions;\n    this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n    this.captionServices_ = settings.captionServices;\n    this.exactManifestTimings = settings.exactManifestTimings;\n    this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n    this.checkBufferTimeout_ = null;\n    this.error_ = void 0;\n    this.currentTimeline_ = -1;\n    this.shouldForceTimestampOffsetAfterResync_ = false;\n    this.pendingSegment_ = null;\n    this.xhrOptions_ = null;\n    this.pendingSegments_ = [];\n    this.audioDisabled_ = false;\n    this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n    this.gopBuffer_ = [];\n    this.timeMapping_ = 0;\n    this.safeAppend_ = false;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    this.playlistOfLastInitSegment_ = {\n      audio: null,\n      video: null\n    };\n    this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n    // information yet to start the loading process (e.g., if the audio loader wants to\n    // load a segment from the next timeline but the main loader hasn't yet crossed that\n    // timeline), then the load call will be added to the queue until it is ready to be\n    // processed.\n\n    this.loadQueue_ = [];\n    this.metadataQueue_ = {\n      id3: [],\n      caption: []\n    };\n    this.waitingOnRemove_ = false;\n    this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n    this.activeInitSegmentId_ = null;\n    this.initSegments_ = {}; // HLSe playback\n\n    this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n    this.keyCache_ = {};\n    this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n    // between a time in the display time and a segment index within\n    // a playlist\n\n    this.syncController_ = settings.syncController;\n    this.syncPoint_ = {\n      segmentIndex: 0,\n      time: 0\n    };\n    this.transmuxer_ = this.createTransmuxer_();\n    this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n    this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    this.mediaSource_.addEventListener('sourceopen', () => {\n      if (!this.isEndOfStream_()) {\n        this.ended_ = false;\n      }\n    }); // ...for determining the fetch location\n\n    this.fetchAtBuffer_ = false;\n    this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n    Object.defineProperty(this, 'state', {\n      get() {\n        return this.state_;\n      },\n      set(newState) {\n        if (newState !== this.state_) {\n          this.logger_(`${this.state_} -> ${newState}`);\n          this.state_ = newState;\n          this.trigger('statechange');\n        }\n      }\n    });\n    this.sourceUpdater_.on('ready', () => {\n      if (this.hasEnoughInfoToAppend_()) {\n        this.processCallQueue_();\n      } else {\n        checkAndFixTimelines(this);\n      }\n    });\n    this.sourceUpdater_.on('codecschange', metadata => {\n      this.trigger(_extends({\n        type: 'codecschange'\n      }, metadata));\n    }); // Only the main loader needs to listen for pending timeline changes, as the main\n    // loader should wait for audio to be ready to change its timeline so that both main\n    // and audio timelines change together. For more details, see the\n    // shouldWaitForTimelineChange function.\n\n    if (this.loaderType_ === 'main') {\n      this.timelineChangeController_.on('pendingtimelinechange', () => {\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        } else {\n          checkAndFixTimelines(this);\n        }\n      });\n    } // The main loader only listens on pending timeline changes, but the audio loader,\n    // since its loads follow main, needs to listen on timeline changes. For more details,\n    // see the shouldWaitForTimelineChange function.\n\n    if (this.loaderType_ === 'audio') {\n      this.timelineChangeController_.on('timelinechange', metadata => {\n        this.trigger(_extends({\n          type: 'timelinechange'\n        }, metadata));\n        if (this.hasEnoughInfoToLoad_()) {\n          this.processLoadQueue_();\n        } else {\n          checkAndFixTimelines(this);\n        }\n        if (this.hasEnoughInfoToAppend_()) {\n          this.processCallQueue_();\n        } else {\n          checkAndFixTimelines(this);\n        }\n      });\n    }\n  }\n  /**\n   * TODO: Current sync controller consists of many hls-specific strategies\n   * media sequence sync is also hls-specific, and we would like to be protocol-agnostic on this level\n   * this should be a part of the sync-controller and sync controller should expect different strategy list based on the protocol.\n   *\n   * @return {MediaSequenceSync|null}\n   * @private\n   */\n\n  get mediaSequenceSync_() {\n    return this.syncController_.getMediaSequenceSync(this.loaderType_);\n  }\n  createTransmuxer_() {\n    return segmentTransmuxer.createTransmuxer({\n      remux: false,\n      alignGopsAtEnd: this.safeAppend_,\n      keepOriginalTimestamps: true,\n      parse708captions: this.parse708captions_,\n      captionServices: this.captionServices_\n    });\n  }\n  /**\n   * reset all of our media stats\n   *\n   * @private\n   */\n\n  resetStats_() {\n    this.mediaBytesTransferred = 0;\n    this.mediaRequests = 0;\n    this.mediaRequestsAborted = 0;\n    this.mediaRequestsTimedout = 0;\n    this.mediaRequestsErrored = 0;\n    this.mediaTransferDuration = 0;\n    this.mediaSecondsLoaded = 0;\n    this.mediaAppends = 0;\n  }\n  /**\n   * dispose of the SegmentLoader and reset to the default state\n   */\n\n  dispose() {\n    this.trigger('dispose');\n    this.state = 'DISPOSED';\n    this.pause();\n    this.abort_();\n    if (this.transmuxer_) {\n      this.transmuxer_.terminate();\n    }\n    this.resetStats_();\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n    }\n    if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n      this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n    }\n    this.off();\n  }\n  setAudio(enable) {\n    this.audioDisabled_ = !enable;\n    if (enable) {\n      this.appendInitSegment_.audio = true;\n    } else {\n      // remove current track audio if it gets disabled\n      this.sourceUpdater_.removeAudio(0, this.duration_());\n    }\n  }\n  /**\n   * abort anything that is currently doing on with the SegmentLoader\n   * and reset to a default state\n   */\n\n  abort() {\n    if (this.state !== 'WAITING') {\n      if (this.pendingSegment_) {\n        this.pendingSegment_ = null;\n      }\n      this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n      return;\n    }\n    this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n    // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n    // when the request is aborted. This will prevent the loader from being stuck in the\n    // WAITING state indefinitely.\n\n    this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n    // next segment\n\n    if (!this.paused()) {\n      this.monitorBuffer_();\n    }\n  }\n  /**\n   * abort all pending xhr requests and null any pending segements\n   *\n   * @private\n   */\n\n  abort_() {\n    if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n      this.pendingSegment_.abortRequests();\n    } // clear out the segment being processed\n\n    this.pendingSegment_ = null;\n    this.callQueue_ = [];\n    this.loadQueue_ = [];\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n    this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n    this.waitingOnRemove_ = false;\n    window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n    this.quotaExceededErrorRetryTimeout_ = null;\n  }\n  checkForAbort_(requestId) {\n    // If the state is APPENDING, then aborts will not modify the state, meaning the first\n    // callback that happens should reset the state to READY so that loading can continue.\n    if (this.state === 'APPENDING' && !this.pendingSegment_) {\n      this.state = 'READY';\n      return true;\n    }\n    if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n      return true;\n    }\n    return false;\n  }\n  /**\n   * set an error on the segment loader and null out any pending segements\n   *\n   * @param {Error} error the error to set on the SegmentLoader\n   * @return {Error} the error that was set or that is currently set\n   */\n\n  error(error) {\n    if (typeof error !== 'undefined') {\n      this.logger_('error occurred:', error);\n      this.error_ = error;\n    }\n    this.pendingSegment_ = null;\n    return this.error_;\n  }\n  endOfStream() {\n    this.ended_ = true;\n    if (this.transmuxer_) {\n      // need to clear out any cached data to prepare for the new segment\n      segmentTransmuxer.reset(this.transmuxer_);\n    }\n    this.gopBuffer_.length = 0;\n    this.pause();\n    this.trigger('ended');\n  }\n  /**\n   * Indicates which time ranges are buffered\n   *\n   * @return {TimeRange}\n   *         TimeRange object representing the current buffered ranges\n   */\n\n  buffered_() {\n    const trackInfo = this.getMediaInfo_();\n    if (!this.sourceUpdater_ || !trackInfo) {\n      return createTimeRanges();\n    }\n    if (this.loaderType_ === 'main') {\n      const {\n        hasAudio,\n        hasVideo,\n        isMuxed\n      } = trackInfo;\n      if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n        return this.sourceUpdater_.buffered();\n      }\n      if (hasVideo) {\n        return this.sourceUpdater_.videoBuffered();\n      }\n    } // One case that can be ignored for now is audio only with alt audio,\n    // as we don't yet have proper support for that.\n\n    return this.sourceUpdater_.audioBuffered();\n  }\n  /**\n   * Gets and sets init segment for the provided map\n   *\n   * @param {Object} map\n   *        The map object representing the init segment to get or set\n   * @param {boolean=} set\n   *        If true, the init segment for the provided map should be saved\n   * @return {Object}\n   *         map object for desired init segment\n   */\n\n  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n    const id = initSegmentId(map);\n    let storedMap = this.initSegments_[id];\n    if (set && !storedMap && map.bytes) {\n      this.initSegments_[id] = storedMap = {\n        resolvedUri: map.resolvedUri,\n        byterange: map.byterange,\n        bytes: map.bytes,\n        tracks: map.tracks,\n        timescales: map.timescales\n      };\n    }\n    return storedMap || map;\n  }\n  /**\n   * Gets and sets key for the provided key\n   *\n   * @param {Object} key\n   *        The key object representing the key to get or set\n   * @param {boolean=} set\n   *        If true, the key for the provided key should be saved\n   * @return {Object}\n   *         Key object for desired key\n   */\n\n  segmentKey(key, set = false) {\n    if (!key) {\n      return null;\n    }\n    const id = segmentKeyId(key);\n    let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n    if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n      this.keyCache_[id] = storedKey = {\n        resolvedUri: key.resolvedUri,\n        bytes: key.bytes\n      };\n    }\n    const result = {\n      resolvedUri: (storedKey || key).resolvedUri\n    };\n    if (storedKey) {\n      result.bytes = storedKey.bytes;\n    }\n    return result;\n  }\n  /**\n   * Returns true if all configuration required for loading is present, otherwise false.\n   *\n   * @return {boolean} True if the all configuration is ready for loading\n   * @private\n   */\n\n  couldBeginLoading_() {\n    return this.playlist_ && !this.paused();\n  }\n  /**\n   * load a playlist and start to fill the buffer\n   */\n\n  load() {\n    // un-pause\n    this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n    // specified\n\n    if (!this.playlist_) {\n      return;\n    } // if all the configuration is ready, initialize and begin loading\n\n    if (this.state === 'INIT' && this.couldBeginLoading_()) {\n      return this.init_();\n    } // if we're in the middle of processing a segment already, don't\n    // kick off an additional segment request\n\n    if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n      return;\n    }\n    this.state = 'READY';\n  }\n  /**\n   * Once all the starting parameters have been specified, begin\n   * operation. This method should only be invoked from the INIT\n   * state.\n   *\n   * @private\n   */\n\n  init_() {\n    this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n    // audio data from the muxed content should be removed\n\n    this.resetEverything();\n    return this.monitorBuffer_();\n  }\n  /**\n   * set a playlist on the segment loader\n   *\n   * @param {PlaylistLoader} media the playlist to set on the segment loader\n   */\n\n  playlist(newPlaylist, options = {}) {\n    if (!newPlaylist) {\n      return;\n    }\n    if (this.playlist_ && this.playlist_.endList && newPlaylist.endList && this.playlist_.uri === newPlaylist.uri) {\n      // skip update if both prev and new are vod and have the same URI\n      return;\n    }\n    const oldPlaylist = this.playlist_;\n    const segmentInfo = this.pendingSegment_;\n    this.playlist_ = newPlaylist;\n    this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n    // is always our zero-time so force a sync update each time the playlist\n    // is refreshed from the server\n    //\n    // Use the INIT state to determine if playback has started, as the playlist sync info\n    // should be fixed once requests begin (as sync points are generated based on sync\n    // info), but not before then.\n\n    if (this.state === 'INIT') {\n      newPlaylist.syncInfo = {\n        mediaSequence: newPlaylist.mediaSequence,\n        time: 0\n      }; // Setting the date time mapping means mapping the program date time (if available)\n      // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n      // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n      // be updated as the playlist is refreshed before the loader starts loading, the\n      // program date time mapping needs to be updated as well.\n      //\n      // This mapping is only done for the main loader because a program date time should\n      // map equivalently between playlists.\n\n      if (this.loaderType_ === 'main') {\n        this.syncController_.setDateTimeMappingForStart(newPlaylist);\n      }\n    }\n    let oldId = null;\n    if (oldPlaylist) {\n      if (oldPlaylist.id) {\n        oldId = oldPlaylist.id;\n      } else if (oldPlaylist.uri) {\n        oldId = oldPlaylist.uri;\n      }\n    }\n    this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`);\n    if (this.mediaSequenceSync_) {\n      this.mediaSequenceSync_.update(newPlaylist, this.currentTime_());\n      this.logger_(`Playlist update:\ncurrentTime: ${this.currentTime_()}\nbufferedEnd: ${lastBufferedEnd(this.buffered_())}\n`, this.mediaSequenceSync_.diagnostics);\n    } // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n    // in LIVE, we always want to update with new playlists (including refreshes)\n\n    this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n    // buffering now\n\n    if (this.state === 'INIT' && this.couldBeginLoading_()) {\n      return this.init_();\n    }\n    if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n      if (this.mediaIndex !== null) {\n        // we must reset/resync the segment loader when we switch renditions and\n        // the segment loader is already synced to the previous rendition\n        // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n        // to false, resulting in fetching segments at currentTime and causing repeated\n        // same-segment requests on playlist change. This erroneously drives up the playback watcher\n        // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n        // will not change the buffer.\n        // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n        const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n        if (isLLHLS) {\n          this.resetLoader();\n        } else {\n          this.resyncLoader();\n        }\n      }\n      this.currentMediaInfo_ = void 0;\n      this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n      return;\n    } // we reloaded the same playlist so we are in a live scenario\n    // and we will likely need to adjust the mediaIndex\n\n    const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n    this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader\n    // this is important because we can abort a request and this value must be\n    // equal to the last appended mediaIndex\n\n    if (this.mediaIndex !== null) {\n      this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n      // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n      // new playlist was incremented by 1.\n\n      if (this.mediaIndex < 0) {\n        this.mediaIndex = null;\n        this.partIndex = null;\n      } else {\n        const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n        // unless parts fell off of the playlist for this segment.\n        // In that case we need to reset partIndex and resync\n\n        if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n          const mediaIndex = this.mediaIndex;\n          this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);\n          this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n          // as the part was dropped from our current playlists segment.\n          // The mediaIndex will still be valid so keep that around.\n\n          this.mediaIndex = mediaIndex;\n        }\n      }\n    } // update the mediaIndex on the SegmentInfo object\n    // this is important because we will update this.mediaIndex with this value\n    // in `handleAppendsDone_` after the segment has been successfully appended\n\n    if (segmentInfo) {\n      segmentInfo.mediaIndex -= mediaSequenceDiff;\n      if (segmentInfo.mediaIndex < 0) {\n        segmentInfo.mediaIndex = null;\n        segmentInfo.partIndex = null;\n      } else {\n        // we need to update the referenced segment so that timing information is\n        // saved for the new playlist's segment, however, if the segment fell off the\n        // playlist, we can leave the old reference and just lose the timing info\n        if (segmentInfo.mediaIndex >= 0) {\n          segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n        }\n        if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n          segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n        }\n      }\n    }\n    this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n  }\n  /**\n   * Prevent the loader from fetching additional segments. If there\n   * is a segment request outstanding, it will finish processing\n   * before the loader halts. A segment loader can be unpaused by\n   * calling load().\n   */\n\n  pause() {\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n      this.checkBufferTimeout_ = null;\n    }\n  }\n  /**\n   * Returns whether the segment loader is fetching additional\n   * segments when given the opportunity. This property can be\n   * modified through calls to pause() and load().\n   */\n\n  paused() {\n    return this.checkBufferTimeout_ === null;\n  }\n  /**\n   * Delete all the buffered data and reset the SegmentLoader\n   *\n   * @param {Function} [done] an optional callback to be executed when the remove\n   * operation is complete\n   */\n\n  resetEverything(done) {\n    this.ended_ = false;\n    this.activeInitSegmentId_ = null;\n    this.appendInitSegment_ = {\n      audio: true,\n      video: true\n    };\n    this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n    // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n    // we then clamp the value to duration if necessary.\n\n    this.remove(0, Infinity, done); // clears fmp4 captions\n\n    if (this.transmuxer_) {\n      this.transmuxer_.postMessage({\n        action: 'clearAllMp4Captions'\n      }); // reset the cache in the transmuxer\n\n      this.transmuxer_.postMessage({\n        action: 'reset'\n      });\n    }\n  }\n  /**\n   * Force the SegmentLoader to resync and start loading around the currentTime instead\n   * of starting at the end of the buffer\n   *\n   * Useful for fast quality changes\n   */\n\n  resetLoader() {\n    this.fetchAtBuffer_ = false;\n    if (this.mediaSequenceSync_) {\n      this.mediaSequenceSync_.resetAppendedStatus();\n    }\n    this.resyncLoader();\n  }\n  /**\n   * Force the SegmentLoader to restart synchronization and make a conservative guess\n   * before returning to the simple walk-forward method\n   */\n\n  resyncLoader() {\n    if (this.transmuxer_) {\n      // need to clear out any cached data to prepare for the new segment\n      segmentTransmuxer.reset(this.transmuxer_);\n    }\n    this.mediaIndex = null;\n    this.partIndex = null;\n    this.syncPoint_ = null;\n    this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,\n    // so we don't want it for DASH or fragmented mp4 segments.\n\n    const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;\n    const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;\n    if (isHlsTs) {\n      this.shouldForceTimestampOffsetAfterResync_ = true;\n    }\n    this.callQueue_ = [];\n    this.loadQueue_ = [];\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n    this.abort();\n    if (this.transmuxer_) {\n      this.transmuxer_.postMessage({\n        action: 'clearParsedMp4Captions'\n      });\n    }\n  }\n  /**\n   * Remove any data in the source buffer between start and end times\n   *\n   * @param {number} start - the start time of the region to remove from the buffer\n   * @param {number} end - the end time of the region to remove from the buffer\n   * @param {Function} [done] - an optional callback to be executed when the remove\n   * @param {boolean} force - force all remove operations to happen\n   * operation is complete\n   */\n\n  remove(start, end, done = () => {}, force = false) {\n    // clamp end to duration if we need to remove everything.\n    // This is due to a browser bug that causes issues if we remove to Infinity.\n    // videojs/videojs-contrib-hls#1225\n    if (end === Infinity) {\n      end = this.duration_();\n    } // skip removes that would throw an error\n    // commonly happens during a rendition switch at the start of a video\n    // from start 0 to end 0\n\n    if (end <= start) {\n      this.logger_('skipping remove because end ${end} is <= start ${start}');\n      return;\n    }\n    if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n      this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n      return;\n    } // set it to one to complete this function's removes\n\n    let removesRemaining = 1;\n    const removeFinished = () => {\n      removesRemaining--;\n      if (removesRemaining === 0) {\n        done();\n      }\n    };\n    if (force || !this.audioDisabled_) {\n      removesRemaining++;\n      this.sourceUpdater_.removeAudio(start, end, removeFinished);\n    } // While it would be better to only remove video if the main loader has video, this\n    // should be safe with audio only as removeVideo will call back even if there's no\n    // video buffer.\n    //\n    // In theory we can check to see if there's video before calling the remove, but in\n    // the event that we're switching between renditions and from video to audio only\n    // (when we add support for that), we may need to clear the video contents despite\n    // what the new media will contain.\n\n    if (force || this.loaderType_ === 'main') {\n      this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n      removesRemaining++;\n      this.sourceUpdater_.removeVideo(start, end, removeFinished);\n    } // remove any captions and ID3 tags\n\n    for (const track in this.inbandTextTracks_) {\n      removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n    }\n    removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n    removeFinished();\n  }\n  /**\n   * (re-)schedule monitorBufferTick_ to run as soon as possible\n   *\n   * @private\n   */\n\n  monitorBuffer_() {\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n    }\n    this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n  }\n  /**\n   * As long as the SegmentLoader is in the READY state, periodically\n   * invoke fillBuffer_().\n   *\n   * @private\n   */\n\n  monitorBufferTick_() {\n    if (this.state === 'READY') {\n      this.fillBuffer_();\n    }\n    if (this.checkBufferTimeout_) {\n      window$1.clearTimeout(this.checkBufferTimeout_);\n    }\n    this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n  }\n  /**\n   * fill the buffer with segements unless the sourceBuffers are\n   * currently updating\n   *\n   * Note: this function should only ever be called by monitorBuffer_\n   * and never directly\n   *\n   * @private\n   */\n\n  fillBuffer_() {\n    // TODO since the source buffer maintains a queue, and we shouldn't call this function\n    // except when we're ready for the next segment, this check can most likely be removed\n    if (this.sourceUpdater_.updating()) {\n      return;\n    } // see if we need to begin loading immediately\n\n    const segmentInfo = this.chooseNextRequest_();\n    if (!segmentInfo) {\n      return;\n    }\n    const metadata = {\n      segmentInfo: segmentInfoPayload({\n        type: this.loaderType_,\n        segment: segmentInfo\n      })\n    };\n    this.trigger({\n      type: 'segmentselected',\n      metadata\n    });\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      this.isPendingTimestampOffset_ = false;\n      this.timelineChangeController_.pendingTimelineChange({\n        type: this.loaderType_,\n        from: this.currentTimeline_,\n        to: segmentInfo.timeline\n      });\n    }\n    this.loadSegment_(segmentInfo);\n  }\n  /**\n   * Determines if we should call endOfStream on the media source based\n   * on the state of the buffer or if appened segment was the final\n   * segment in the playlist.\n   *\n   * @param {number} [mediaIndex] the media index of segment we last appended\n   * @param {Object} [playlist] a media playlist object\n   * @return {boolean} do we need to call endOfStream on the MediaSource\n   */\n\n  isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n    if (!playlist || !this.mediaSource_) {\n      return false;\n    }\n    const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n    const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n    const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n    // so that MediaSources can trigger the `ended` event when it runs out of\n    // buffered data instead of waiting for me\n\n    return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n  }\n  /**\n   * Determines what request should be made given current segment loader state.\n   *\n   * @return {Object} a request object that describes the segment/part to load\n   */\n\n  chooseNextRequest_() {\n    const buffered = this.buffered_();\n    const bufferedEnd = lastBufferedEnd(buffered) || 0;\n    const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n    const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n    const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n    const segments = this.playlist_.segments; // return no segment if:\n    // 1. we don't have segments\n    // 2. The video has not yet played and we already downloaded a segment\n    // 3. we already have enough buffered time\n\n    if (!segments.length || preloaded || haveEnoughBuffer) {\n      return null;\n    }\n    this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_(), this.loaderType_);\n    const next = {\n      partIndex: null,\n      mediaIndex: null,\n      startOfSegment: null,\n      playlist: this.playlist_,\n      isSyncRequest: Boolean(!this.syncPoint_)\n    };\n    if (next.isSyncRequest) {\n      next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n      this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${next.mediaIndex}`);\n    } else if (this.mediaIndex !== null) {\n      const segment = segments[this.mediaIndex];\n      const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n      next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n      if (segment.parts && segment.parts[partIndex + 1]) {\n        next.mediaIndex = this.mediaIndex;\n        next.partIndex = partIndex + 1;\n      } else {\n        next.mediaIndex = this.mediaIndex + 1;\n      }\n    } else {\n      let segmentIndex;\n      let partIndex;\n      let startTime;\n      const targetTime = this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_();\n      if (this.mediaSequenceSync_) {\n        this.logger_(`chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ${targetTime}.\nCurrentTime: ${this.currentTime_()}\nBufferedEnd: ${bufferedEnd}\nFetch At Buffer: ${this.fetchAtBuffer_}\n`, this.mediaSequenceSync_.diagnostics);\n      }\n      if (this.mediaSequenceSync_ && this.mediaSequenceSync_.isReliable) {\n        const syncInfo = this.getSyncInfoFromMediaSequenceSync_(targetTime);\n        if (!syncInfo) {\n          const message = 'No sync info found while using media sequence sync';\n          this.error({\n            message,\n            metadata: {\n              errorType: videojs.Error.StreamingFailedToSelectNextSegment,\n              error: new Error(message)\n            }\n          });\n          this.logger_('chooseNextRequest_ - no sync info found using media sequence sync'); // no match\n\n          return null;\n        }\n        this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${syncInfo.start} --> ${syncInfo.end})`);\n        segmentIndex = syncInfo.segmentIndex;\n        partIndex = syncInfo.partIndex;\n        startTime = syncInfo.start;\n      } else {\n        this.logger_('chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.'); // fallback\n\n        const mediaInfoForTime = Playlist.getMediaInfoForTime({\n          exactManifestTimings: this.exactManifestTimings,\n          playlist: this.playlist_,\n          currentTime: targetTime,\n          startingPartIndex: this.syncPoint_.partIndex,\n          startingSegmentIndex: this.syncPoint_.segmentIndex,\n          startTime: this.syncPoint_.time\n        });\n        segmentIndex = mediaInfoForTime.segmentIndex;\n        partIndex = mediaInfoForTime.partIndex;\n        startTime = mediaInfoForTime.startTime;\n      }\n      next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${targetTime}` : `currentTime ${targetTime}`;\n      next.mediaIndex = segmentIndex;\n      next.startOfSegment = startTime;\n      next.partIndex = partIndex;\n      this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${next.mediaIndex} `);\n    }\n    const nextSegment = segments[next.mediaIndex];\n    let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n    // the next partIndex is invalid do not choose a next segment.\n\n    if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n      return null;\n    } // if the next segment has parts, and we don't have a partIndex.\n    // Set partIndex to 0\n\n    if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n      next.partIndex = 0;\n      nextPart = nextSegment.parts[0];\n    } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n    // it applies to each segment in each media playlist.\n    // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n    const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n    // that the next part we append is \"independent\" if possible.\n    // So we check if the previous part is independent, and request\n    // it if it is.\n\n    if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n      if (next.partIndex === 0) {\n        const lastSegment = segments[next.mediaIndex - 1];\n        const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n        if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n          next.mediaIndex -= 1;\n          next.partIndex = lastSegment.parts.length - 1;\n          next.independent = 'previous segment';\n        }\n      } else if (nextSegment.parts[next.partIndex - 1].independent) {\n        next.partIndex -= 1;\n        next.independent = 'previous part';\n      }\n    }\n    const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n    // 1. this is the last segment in the playlist\n    // 2. end of stream has been called on the media source already\n    // 3. the player is not seeking\n\n    if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n      return null;\n    }\n    if (this.shouldForceTimestampOffsetAfterResync_) {\n      this.shouldForceTimestampOffsetAfterResync_ = false;\n      next.forceTimestampOffset = true;\n      this.logger_('choose next request. Force timestamp offset after loader resync');\n    }\n    return this.generateSegmentInfo_(next);\n  }\n  getSyncInfoFromMediaSequenceSync_(targetTime) {\n    if (!this.mediaSequenceSync_) {\n      return null;\n    } // we should pull the target time to the least available time if we drop out of sync for any reason\n\n    const finalTargetTime = Math.max(targetTime, this.mediaSequenceSync_.start);\n    if (targetTime !== finalTargetTime) {\n      this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${targetTime} to ${finalTargetTime}`);\n    }\n    const mediaSequenceSyncInfo = this.mediaSequenceSync_.getSyncInfoForTime(finalTargetTime);\n    if (!mediaSequenceSyncInfo) {\n      // no match at all\n      return null;\n    }\n    if (!mediaSequenceSyncInfo.isAppended) {\n      // has a perfect match\n      return mediaSequenceSyncInfo;\n    } // has match, but segment was already appended.\n    // attempt to auto-advance to the nearest next segment:\n\n    const nextMediaSequenceSyncInfo = this.mediaSequenceSync_.getSyncInfoForTime(mediaSequenceSyncInfo.end);\n    if (!nextMediaSequenceSyncInfo) {\n      // no match at all\n      return null;\n    }\n    if (nextMediaSequenceSyncInfo.isAppended) {\n      this.logger_('getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!');\n    } // got match with the nearest next segment\n\n    return nextMediaSequenceSyncInfo;\n  }\n  generateSegmentInfo_(options) {\n    const {\n      independent,\n      playlist,\n      mediaIndex,\n      startOfSegment,\n      isSyncRequest,\n      partIndex,\n      forceTimestampOffset,\n      getMediaInfoForTime\n    } = options;\n    const segment = playlist.segments[mediaIndex];\n    const part = typeof partIndex === 'number' && segment.parts[partIndex];\n    const segmentInfo = {\n      requestId: 'segment-loader-' + Math.random(),\n      // resolve the segment URL relative to the playlist\n      uri: part && part.resolvedUri || segment.resolvedUri,\n      // the segment's mediaIndex at the time it was requested\n      mediaIndex,\n      partIndex: part ? partIndex : null,\n      // whether or not to update the SegmentLoader's state with this\n      // segment's mediaIndex\n      isSyncRequest,\n      startOfSegment,\n      // the segment's playlist\n      playlist,\n      // unencrypted bytes of the segment\n      bytes: null,\n      // when a key is defined for this segment, the encrypted bytes\n      encryptedBytes: null,\n      // The target timestampOffset for this segment when we append it\n      // to the source buffer\n      timestampOffset: null,\n      // The timeline that the segment is in\n      timeline: segment.timeline,\n      // The expected duration of the segment in seconds\n      duration: part && part.duration || segment.duration,\n      // retain the segment in case the playlist updates while doing an async process\n      segment,\n      part,\n      byteLength: 0,\n      transmuxer: this.transmuxer_,\n      // type of getMediaInfoForTime that was used to get this segment\n      getMediaInfoForTime,\n      independent\n    };\n    const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n    segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n      segmentTimeline: segment.timeline,\n      currentTimeline: this.currentTimeline_,\n      startOfSegment,\n      buffered: this.buffered_(),\n      overrideCheck\n    });\n    const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n    if (typeof audioBufferedEnd === 'number') {\n      // since the transmuxer is using the actual timing values, but the buffer is\n      // adjusted by the timestamp offset, we must adjust the value here\n      segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n    }\n    if (this.sourceUpdater_.videoBuffered().length) {\n      segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n      // since the transmuxer is using the actual timing values, but the time is\n      // adjusted by the timestmap offset, we must adjust the value here\n      this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n    }\n    return segmentInfo;\n  } // get the timestampoffset for a segment,\n  // added so that vtt segment loader can override and prevent\n  // adding timestamp offsets.\n\n  timestampOffsetForSegment_(options) {\n    return timestampOffsetForSegment(options);\n  }\n  /**\n   * Determines if the network has enough bandwidth to complete the current segment\n   * request in a timely manner. If not, the request will be aborted early and bandwidth\n   * updated to trigger a playlist switch.\n   *\n   * @param {Object} stats\n   *        Object containing stats about the request timing and size\n   * @private\n   */\n\n  earlyAbortWhenNeeded_(stats) {\n    if (this.vhs_.tech_.paused() ||\n    // Don't abort if the current playlist is on the lowestEnabledRendition\n    // TODO: Replace using timeout with a boolean indicating whether this playlist is\n    //       the lowestEnabledRendition.\n    !this.xhrOptions_.timeout ||\n    // Don't abort if we have no bandwidth information to estimate segment sizes\n    !this.playlist_.attributes.BANDWIDTH) {\n      return;\n    } // Wait at least 1 second since the first byte of data has been received before\n    // using the calculated bandwidth from the progress event to allow the bitrate\n    // to stabilize\n\n    if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n      return;\n    }\n    const currentTime = this.currentTime_();\n    const measuredBandwidth = stats.bandwidth;\n    const segmentDuration = this.pendingSegment_.duration;\n    const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n    // if we are only left with less than 1 second when the request completes.\n    // A negative timeUntilRebuffering indicates we are already rebuffering\n\n    const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n    // is larger than the estimated time until the player runs out of forward buffer\n\n    if (requestTimeRemaining <= timeUntilRebuffer$1) {\n      return;\n    }\n    const switchCandidate = minRebufferMaxBandwidthSelector({\n      main: this.vhs_.playlists.main,\n      currentTime,\n      bandwidth: measuredBandwidth,\n      duration: this.duration_(),\n      segmentDuration,\n      timeUntilRebuffer: timeUntilRebuffer$1,\n      currentTimeline: this.currentTimeline_,\n      syncController: this.syncController_\n    });\n    if (!switchCandidate) {\n      return;\n    }\n    const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n    const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n    let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n    // potential round trip time of the new request so that we are not too aggressive\n    // with switching to a playlist that might save us a fraction of a second.\n\n    if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n      minimumTimeSaving = 1;\n    }\n    if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n      return;\n    } // set the bandwidth to that of the desired playlist being sure to scale by\n    // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n    // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n    this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n    this.trigger('earlyabort');\n  }\n  handleAbort_(segmentInfo) {\n    this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`);\n    this.mediaRequestsAborted += 1;\n  }\n  /**\n   * XHR `progress` event handler\n   *\n   * @param {Event}\n   *        The XHR `progress` event\n   * @param {Object} simpleSegment\n   *        A simplified segment object copy\n   * @private\n   */\n\n  handleProgress_(event, simpleSegment) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    this.trigger('progress');\n  }\n  handleTrackInfo_(simpleSegment, trackInfo) {\n    const {\n      hasAudio,\n      hasVideo\n    } = trackInfo;\n    const metadata = {\n      segmentInfo: segmentInfoPayload({\n        type: this.loaderType_,\n        segment: simpleSegment\n      }),\n      trackInfo: {\n        hasAudio,\n        hasVideo\n      }\n    };\n    this.trigger({\n      type: 'segmenttransmuxingtrackinfoavailable',\n      metadata\n    });\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    if (this.checkForIllegalMediaSwitch(trackInfo)) {\n      return;\n    }\n    trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n    // Guard against cases where we're not getting track info at all until we are\n    // certain that all streams will provide it.\n\n    if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n      this.appendInitSegment_ = {\n        audio: true,\n        video: true\n      };\n      this.startingMediaInfo_ = trackInfo;\n      this.currentMediaInfo_ = trackInfo;\n      this.logger_('trackinfo update', trackInfo);\n      this.trigger('trackinfo');\n    } // trackinfo may cause an abort if the trackinfo\n    // causes a codec change to an unsupported codec.\n\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // set trackinfo on the pending segment so that\n    // it can append.\n\n    this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    } else {\n      checkAndFixTimelines(this);\n    }\n  }\n  handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    const segmentInfo = this.pendingSegment_;\n    const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n    segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n    segmentInfo[timingInfoProperty][timeType] = time;\n    this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n    if (this.hasEnoughInfoToAppend_()) {\n      this.processCallQueue_();\n    } else {\n      checkAndFixTimelines(this);\n    }\n  }\n  handleCaptions_(simpleSegment, captionData) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // This could only happen with fmp4 segments, but\n    // should still not happen in general\n\n    if (captionData.length === 0) {\n      this.logger_('SegmentLoader received no captions from a caption event');\n      return;\n    }\n    const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n    // can be adjusted by the timestamp offset\n\n    if (!segmentInfo.hasAppendedData_) {\n      this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n      return;\n    }\n    const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n    const captionTracks = {}; // get total start/end and captions for each track/stream\n\n    captionData.forEach(caption => {\n      // caption.stream is actually a track name...\n      // set to the existing values in tracks or default values\n      captionTracks[caption.stream] = captionTracks[caption.stream] || {\n        // Infinity, as any other value will be less than this\n        startTime: Infinity,\n        captions: [],\n        // 0 as an other value will be more than this\n        endTime: 0\n      };\n      const captionTrack = captionTracks[caption.stream];\n      captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n      captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n      captionTrack.captions.push(caption);\n    });\n    Object.keys(captionTracks).forEach(trackName => {\n      const {\n        startTime,\n        endTime,\n        captions\n      } = captionTracks[trackName];\n      const inbandTextTracks = this.inbandTextTracks_;\n      this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n      createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n      // We do this because a rendition change that also changes the timescale for captions\n      // will result in captions being re-parsed for certain segments. If we add them again\n      // without clearing we will have two of the same captions visible.\n\n      removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n      addCaptionData({\n        captionArray: captions,\n        inbandTextTracks,\n        timestampOffset\n      });\n    }); // Reset stored captions since we added parsed\n    // captions to a text track at this point\n\n    if (this.transmuxer_) {\n      this.transmuxer_.postMessage({\n        action: 'clearParsedMp4Captions'\n      });\n    }\n  }\n  handleId3_(simpleSegment, id3Frames, dispatchType) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    }\n    const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n    if (!segmentInfo.hasAppendedData_) {\n      this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n      return;\n    }\n    this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n  }\n  processMetadataQueue_() {\n    this.metadataQueue_.id3.forEach(fn => fn());\n    this.metadataQueue_.caption.forEach(fn => fn());\n    this.metadataQueue_.id3 = [];\n    this.metadataQueue_.caption = [];\n  }\n  processCallQueue_() {\n    const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n    // functions may check the length of the load queue and default to pushing themselves\n    // back onto the queue.\n\n    this.callQueue_ = [];\n    callQueue.forEach(fun => fun());\n  }\n  processLoadQueue_() {\n    const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n    // functions may check the length of the load queue and default to pushing themselves\n    // back onto the queue.\n\n    this.loadQueue_ = [];\n    loadQueue.forEach(fun => fun());\n  }\n  /**\n   * Determines whether the loader has enough info to load the next segment.\n   *\n   * @return {boolean}\n   *         Whether or not the loader has enough info to load the next segment\n   */\n\n  hasEnoughInfoToLoad_() {\n    // Since primary timing goes by video, only the audio loader potentially needs to wait\n    // to load.\n    if (this.loaderType_ !== 'audio') {\n      return true;\n    }\n    const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n    // enough info to load.\n\n    if (!segmentInfo) {\n      return false;\n    } // The first segment can and should be loaded immediately so that source buffers are\n    // created together (before appending). Source buffer creation uses the presence of\n    // audio and video data to determine whether to create audio/video source buffers, and\n    // uses processed (transmuxed or parsed) media to determine the types required.\n\n    if (!this.getCurrentMediaInfo_()) {\n      return true;\n    }\n    if (\n    // Technically, instead of waiting to load a segment on timeline changes, a segment\n    // can be requested and downloaded and only wait before it is transmuxed or parsed.\n    // But in practice, there are a few reasons why it is better to wait until a loader\n    // is ready to append that segment before requesting and downloading:\n    //\n    // 1. Because audio and main loaders cross discontinuities together, if this loader\n    //    is waiting for the other to catch up, then instead of requesting another\n    //    segment and using up more bandwidth, by not yet loading, more bandwidth is\n    //    allotted to the loader currently behind.\n    // 2. media-segment-request doesn't have to have logic to consider whether a segment\n    // is ready to be processed or not, isolating the queueing behavior to the loader.\n    // 3. The audio loader bases some of its segment properties on timing information\n    //    provided by the main loader, meaning that, if the logic for waiting on\n    //    processing was in media-segment-request, then it would also need to know how\n    //    to re-generate the segment information after the main loader caught up.\n    shouldWaitForTimelineChange({\n      timelineChangeController: this.timelineChangeController_,\n      currentTimeline: this.currentTimeline_,\n      segmentTimeline: segmentInfo.timeline,\n      loaderType: this.loaderType_,\n      audioDisabled: this.audioDisabled_\n    })) {\n      return false;\n    }\n    return true;\n  }\n  getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n  }\n  getMediaInfo_(segmentInfo = this.pendingSegment_) {\n    return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n  }\n  getPendingSegmentPlaylist() {\n    return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n  }\n  hasEnoughInfoToAppend_() {\n    if (!this.sourceUpdater_.ready()) {\n      return false;\n    } // If content needs to be removed or the loader is waiting on an append reattempt,\n    // then no additional content should be appended until the prior append is resolved.\n\n    if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n      return false;\n    }\n    const segmentInfo = this.pendingSegment_;\n    const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n    // we do not have information on this specific\n    // segment yet\n\n    if (!segmentInfo || !trackInfo) {\n      return false;\n    }\n    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\n    if (hasVideo && !segmentInfo.videoTimingInfo) {\n      return false;\n    } // muxed content only relies on video timing information for now.\n\n    if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n      return false;\n    } // we need to allow an append here even if we're moving to different timelines.\n\n    if (shouldWaitForTimelineChange({\n      timelineChangeController: this.timelineChangeController_,\n      currentTimeline: this.currentTimeline_,\n      segmentTimeline: segmentInfo.timeline,\n      loaderType: this.loaderType_,\n      audioDisabled: this.audioDisabled_\n    })) {\n      return false;\n    }\n    return true;\n  }\n  handleData_(simpleSegment, result) {\n    this.earlyAbortWhenNeeded_(simpleSegment.stats);\n    if (this.checkForAbort_(simpleSegment.requestId)) {\n      return;\n    } // If there's anything in the call queue, then this data came later and should be\n    // executed after the calls currently queued.\n\n    if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n      checkAndFixTimelines(this);\n      this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n      return;\n    }\n    const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n    this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n    this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n    // logic may change behavior depending on the state, and changing state too early may\n    // inflate our estimates of bandwidth. In the future this should be re-examined to\n    // note more granular states.\n    // don't process and append data if the mediaSource is closed\n\n    if (this.mediaSource_.readyState === 'closed') {\n      return;\n    } // if this request included an initialization segment, save that data\n    // to the initSegment cache\n\n    if (simpleSegment.map) {\n      simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n      segmentInfo.segment.map = simpleSegment.map;\n    } // if this request included a segment key, save that data in the cache\n\n    if (simpleSegment.key) {\n      this.segmentKey(simpleSegment.key, true);\n    }\n    segmentInfo.isFmp4 = simpleSegment.isFmp4;\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n    if (segmentInfo.isFmp4) {\n      this.trigger('fmp4');\n      segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n    } else {\n      const trackInfo = this.getCurrentMediaInfo_();\n      const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n      let firstVideoFrameTimeForData;\n      if (useVideoTimingInfo) {\n        firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n      } // Segment loader knows more about segment timing than the transmuxer (in certain\n      // aspects), so make any changes required for a more accurate start time.\n      // Don't set the end time yet, as the segment may not be finished processing.\n\n      segmentInfo.timingInfo.start = this.trueSegmentStart_({\n        currentStart: segmentInfo.timingInfo.start,\n        playlist: segmentInfo.playlist,\n        mediaIndex: segmentInfo.mediaIndex,\n        currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n        useVideoTimingInfo,\n        firstVideoFrameTimeForData,\n        videoTimingInfo: segmentInfo.videoTimingInfo,\n        audioTimingInfo: segmentInfo.audioTimingInfo\n      });\n    } // Init segments for audio and video only need to be appended in certain cases. Now\n    // that data is about to be appended, we can check the final cases to determine\n    // whether we should append an init segment.\n\n    this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n    // as we use the start of the segment to offset the best guess (playlist provided)\n    // timestamp offset.\n\n    this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n    // be appended or not.\n\n    if (segmentInfo.isSyncRequest) {\n      // first save/update our timing info for this segment.\n      // this is what allows us to choose an accurate segment\n      // and the main reason we make a sync request.\n      this.updateTimingInfoEnd_(segmentInfo);\n      this.syncController_.saveSegmentTimingInfo({\n        segmentInfo,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n      const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n      // after taking into account its timing info, do not append it.\n\n      if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n        this.logger_('sync segment was incorrect, not appending');\n        return;\n      } // otherwise append it like any other segment as our guess was correct.\n\n      this.logger_('sync segment was correct, appending');\n    } // Save some state so that in the future anything waiting on first append (and/or\n    // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n    // we need some notion of whether the timestamp offset or other relevant information\n    // has had a chance to be set.\n\n    segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n    this.processMetadataQueue_();\n    this.appendData_(segmentInfo, result);\n  }\n  updateAppendInitSegmentStatus(segmentInfo, type) {\n    // alt audio doesn't manage timestamp offset\n    if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n    // in the case that we're handling partial data, we don't want to append an init\n    // segment for each chunk\n    !segmentInfo.changedTimestampOffset) {\n      // if the timestamp offset changed, the timeline may have changed, so we have to re-\n      // append init segments\n      this.appendInitSegment_ = {\n        audio: true,\n        video: true\n      };\n    }\n    if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n      // make sure we append init segment on playlist changes, in case the media config\n      // changed\n      this.appendInitSegment_[type] = true;\n    }\n  }\n  getInitSegmentAndUpdateState_({\n    type,\n    initSegment,\n    map,\n    playlist\n  }) {\n    // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n    // (Section 3) required to parse the applicable Media Segments.  It applies to every\n    // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n    // or until the end of the playlist.\"\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n    if (map) {\n      const id = initSegmentId(map);\n      if (this.activeInitSegmentId_ === id) {\n        // don't need to re-append the init segment if the ID matches\n        return null;\n      } // a map-specified init segment takes priority over any transmuxed (or otherwise\n      // obtained) init segment\n      //\n      // this also caches the init segment for later use\n\n      initSegment = this.initSegmentForMap(map, true).bytes;\n      this.activeInitSegmentId_ = id;\n    } // We used to always prepend init segments for video, however, that shouldn't be\n    // necessary. Instead, we should only append on changes, similar to what we've always\n    // done for audio. This is more important (though may not be that important) for\n    // frame-by-frame appending for LHLS, simply because of the increased quantity of\n    // appends.\n\n    if (initSegment && this.appendInitSegment_[type]) {\n      // Make sure we track the playlist that we last used for the init segment, so that\n      // we can re-append the init segment in the event that we get data from a new\n      // playlist. Discontinuities and track changes are handled in other sections.\n      this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n      this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n      // we are appending the muxer init segment\n\n      this.activeInitSegmentId_ = null;\n      return initSegment;\n    }\n    return null;\n  }\n  handleQuotaExceededError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\n    const audioBuffered = this.sourceUpdater_.audioBuffered();\n    const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n    // should be cleared out during the buffer removals. However, log in case it helps\n    // debug.\n\n    if (audioBuffered.length > 1) {\n      this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n    }\n    if (videoBuffered.length > 1) {\n      this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n    }\n    const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n    const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n    const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n    const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n    if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n      // Can't remove enough buffer to make room for new segment (or the browser doesn't\n      // allow for appends of segments this size). In the future, it may be possible to\n      // split up the segment and append in pieces, but for now, error out this playlist\n      // in an attempt to switch to a more manageable rendition.\n      this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `);\n      this.error({\n        message: 'Quota exceeded error with append of a single segment of content',\n        excludeUntil: Infinity\n      });\n      this.trigger('error');\n      return;\n    } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n    // that the segment-loader should block on future events until this one is handled, so\n    // that it doesn't keep moving onto further segments. Adding the call to the call\n    // queue will prevent further appends until waitingOnRemove_ and\n    // quotaExceededErrorRetryTimeout_ are cleared.\n    //\n    // Note that this will only block the current loader. In the case of demuxed content,\n    // the other load may keep filling as fast as possible. In practice, this should be\n    // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n    // source buffer, or video fills without enough room for audio to append (and without\n    // the availability of clearing out seconds of back buffer to make room for audio).\n    // But it might still be good to handle this case in the future as a TODO.\n\n    this.waitingOnRemove_ = true;\n    this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n      segmentInfo,\n      type,\n      bytes\n    }));\n    const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n    // before retrying.\n\n    const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n    this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n    this.remove(0, timeToRemoveUntil, () => {\n      this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n      this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n      // attempts (since we can't clear less than the minimum)\n\n      this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n        this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n        this.quotaExceededErrorRetryTimeout_ = null;\n        this.processCallQueue_();\n      }, MIN_BACK_BUFFER * 1000);\n    }, true);\n  }\n  handleAppendError_({\n    segmentInfo,\n    type,\n    bytes\n  }, error) {\n    // if there's no error, nothing to do\n    if (!error) {\n      return;\n    }\n    if (error.code === QUOTA_EXCEEDED_ERR) {\n      this.handleQuotaExceededError_({\n        segmentInfo,\n        type,\n        bytes\n      }); // A quota exceeded error should be recoverable with a future re-append, so no need\n      // to trigger an append error.\n\n      return;\n    }\n    this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error); // If an append errors, we often can't recover.\n    // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n    //\n    // Trigger a special error so that it can be handled separately from normal,\n    // recoverable errors.\n\n    this.error({\n      message: `${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`,\n      metadata: {\n        errorType: videojs.Error.StreamingFailedToAppendSegment\n      }\n    });\n    this.trigger('appenderror');\n  }\n  appendToSourceBuffer_({\n    segmentInfo,\n    type,\n    initSegment,\n    data,\n    bytes\n  }) {\n    // If this is a re-append, bytes were already created and don't need to be recreated\n    if (!bytes) {\n      const segments = [data];\n      let byteLength = data.byteLength;\n      if (initSegment) {\n        // if the media initialization segment is changing, append it before the content\n        // segment\n        segments.unshift(initSegment);\n        byteLength += initSegment.byteLength;\n      } // Technically we should be OK appending the init segment separately, however, we\n      // haven't yet tested that, and prepending is how we have always done things.\n\n      bytes = concatSegments({\n        bytes: byteLength,\n        segments\n      });\n    }\n    const metadata = {\n      segmentInfo: segmentInfoPayload({\n        type: this.loaderType_,\n        segment: segmentInfo\n      })\n    };\n    this.trigger({\n      type: 'segmentappendstart',\n      metadata\n    });\n    this.sourceUpdater_.appendBuffer({\n      segmentInfo,\n      type,\n      bytes\n    }, this.handleAppendError_.bind(this, {\n      segmentInfo,\n      type,\n      bytes\n    }));\n  }\n  handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n    if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n      return;\n    }\n    const segment = this.pendingSegment_.segment;\n    const timingInfoProperty = `${type}TimingInfo`;\n    if (!segment[timingInfoProperty]) {\n      segment[timingInfoProperty] = {};\n    }\n    segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n    segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n    segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n    segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n    segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n    segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n  }\n  appendData_(segmentInfo, result) {\n    const {\n      type,\n      data\n    } = result;\n    if (!data || !data.byteLength) {\n      return;\n    }\n    if (type === 'audio' && this.audioDisabled_) {\n      return;\n    }\n    const initSegment = this.getInitSegmentAndUpdateState_({\n      type,\n      initSegment: result.initSegment,\n      playlist: segmentInfo.playlist,\n      map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n    });\n    this.appendToSourceBuffer_({\n      segmentInfo,\n      type,\n      initSegment,\n      data\n    });\n  }\n  /**\n   * load a specific segment from a request into the buffer\n   *\n   * @private\n   */\n\n  loadSegment_(segmentInfo) {\n    this.state = 'WAITING';\n    this.pendingSegment_ = segmentInfo;\n    this.trimBackBuffer_(segmentInfo);\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      if (this.transmuxer_) {\n        this.transmuxer_.postMessage({\n          action: 'clearAllMp4Captions'\n        });\n      }\n    }\n    if (!this.hasEnoughInfoToLoad_()) {\n      checkAndFixTimelines(this);\n      this.loadQueue_.push(() => {\n        // regenerate the audioAppendStart, timestampOffset, etc as they\n        // may have changed since this function was added to the queue.\n        const options = _extends({}, segmentInfo, {\n          forceTimestampOffset: true\n        });\n        _extends(segmentInfo, this.generateSegmentInfo_(options));\n        this.isPendingTimestampOffset_ = false;\n        this.updateTransmuxerAndRequestSegment_(segmentInfo);\n      });\n      return;\n    }\n    this.updateTransmuxerAndRequestSegment_(segmentInfo);\n  }\n  updateTransmuxerAndRequestSegment_(segmentInfo) {\n    // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n    // the transmuxer still needs to be updated before then.\n    //\n    // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n    // offset must be passed to the transmuxer for stream correcting adjustments.\n    if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n      this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n      segmentInfo.gopsToAlignWith = [];\n      this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n      this.transmuxer_.postMessage({\n        action: 'reset'\n      });\n      this.transmuxer_.postMessage({\n        action: 'setTimestampOffset',\n        timestampOffset: segmentInfo.timestampOffset\n      });\n    }\n    const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n    const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n    const isWalkingForward = this.mediaIndex !== null;\n    const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n    // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n    // the first timeline\n    segmentInfo.timeline > 0;\n    const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n    this.logger_(`Requesting\n${compactSegmentUrlDescription(segmentInfo.uri)}\n${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n    // then this init segment has never been seen before and should be appended.\n    //\n    // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n    // both to true and leave the decision of whether to append the init segment to append time.\n\n    if (simpleSegment.map && !simpleSegment.map.bytes) {\n      this.logger_('going to request init segment.');\n      this.appendInitSegment_ = {\n        video: true,\n        audio: true\n      };\n    }\n    segmentInfo.abortRequests = mediaSegmentRequest({\n      xhr: this.vhs_.xhr,\n      xhrOptions: this.xhrOptions_,\n      decryptionWorker: this.decrypter_,\n      segment: simpleSegment,\n      abortFn: this.handleAbort_.bind(this, segmentInfo),\n      progressFn: this.handleProgress_.bind(this),\n      trackInfoFn: this.handleTrackInfo_.bind(this),\n      timingInfoFn: this.handleTimingInfo_.bind(this),\n      videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n      audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n      captionsFn: this.handleCaptions_.bind(this),\n      isEndOfTimeline,\n      endedTimelineFn: () => {\n        this.logger_('received endedtimeline callback');\n      },\n      id3Fn: this.handleId3_.bind(this),\n      dataFn: this.handleData_.bind(this),\n      doneFn: this.segmentRequestFinished_.bind(this),\n      onTransmuxerLog: ({\n        message,\n        level,\n        stream\n      }) => {\n        this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n      },\n      triggerSegmentEventFn: ({\n        type,\n        segment,\n        keyInfo,\n        trackInfo,\n        timingInfo\n      }) => {\n        const segInfo = segmentInfoPayload({\n          segment\n        });\n        const metadata = {\n          segmentInfo: segInfo\n        }; // add other properties if necessary.\n\n        if (keyInfo) {\n          metadata.keyInfo = keyInfo;\n        }\n        if (trackInfo) {\n          metadata.trackInfo = trackInfo;\n        }\n        if (timingInfo) {\n          metadata.timingInfo = timingInfo;\n        }\n        this.trigger({\n          type,\n          metadata\n        });\n      }\n    });\n  }\n  /**\n   * trim the back buffer so that we don't have too much data\n   * in the source buffer\n   *\n   * @private\n   *\n   * @param {Object} segmentInfo - the current segment\n   */\n\n  trimBackBuffer_(segmentInfo) {\n    const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n    // buffer and a very conservative \"garbage collector\"\n    // We manually clear out the old buffer to ensure\n    // we don't trigger the QuotaExceeded error\n    // on the source buffer during subsequent appends\n\n    if (removeToTime > 0) {\n      this.remove(0, removeToTime);\n    }\n  }\n  /**\n   * created a simplified copy of the segment object with just the\n   * information necessary to perform the XHR and decryption\n   *\n   * @private\n   *\n   * @param {Object} segmentInfo - the current segment\n   * @return {Object} a simplified segment object copy\n   */\n\n  createSimplifiedSegmentObj_(segmentInfo) {\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const isEncrypted = segmentInfo.segment.key || segmentInfo.segment.map && segmentInfo.segment.map.key;\n    const isMediaInitialization = segmentInfo.segment.map && !segmentInfo.segment.map.bytes;\n    const simpleSegment = {\n      resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n      byterange: part ? part.byterange : segment.byterange,\n      requestId: segmentInfo.requestId,\n      transmuxer: segmentInfo.transmuxer,\n      audioAppendStart: segmentInfo.audioAppendStart,\n      gopsToAlignWith: segmentInfo.gopsToAlignWith,\n      part: segmentInfo.part,\n      type: this.loaderType_,\n      start: segmentInfo.startOfSegment,\n      duration: segmentInfo.duration,\n      isEncrypted,\n      isMediaInitialization\n    };\n    const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n    if (previousSegment && previousSegment.timeline === segment.timeline) {\n      // The baseStartTime of a segment is used to handle rollover when probing the TS\n      // segment to retrieve timing information. Since the probe only looks at the media's\n      // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n      // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n      // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n      // seconds of media time, so should be used here. The previous segment is used since\n      // the end of the previous segment should represent the beginning of the current\n      // segment, so long as they are on the same timeline.\n      if (previousSegment.videoTimingInfo) {\n        simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n      } else if (previousSegment.audioTimingInfo) {\n        simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n      }\n    }\n    if (segment.key) {\n      // if the media sequence is greater than 2^32, the IV will be incorrect\n      // assuming 10s segments, that would be about 1300 years\n      const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n      simpleSegment.key = this.segmentKey(segment.key);\n      simpleSegment.key.iv = iv;\n    }\n    if (segment.map) {\n      simpleSegment.map = this.initSegmentForMap(segment.map);\n    }\n    return simpleSegment;\n  }\n  saveTransferStats_(stats) {\n    // every request counts as a media request even if it has been aborted\n    // or canceled due to a timeout\n    this.mediaRequests += 1;\n    if (stats) {\n      this.mediaBytesTransferred += stats.bytesReceived;\n      this.mediaTransferDuration += stats.roundTripTime;\n    }\n  }\n  saveBandwidthRelatedStats_(duration, stats) {\n    // byteLength will be used for throughput, and should be based on bytes receieved,\n    // which we only know at the end of the request and should reflect total bytes\n    // downloaded rather than just bytes processed from components of the segment\n    this.pendingSegment_.byteLength = stats.bytesReceived;\n    if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n    const metadata = {\n      bandwidthInfo: {\n        from: this.bandwidth,\n        to: stats.bandwidth\n      }\n    }; // player event with payload\n\n    this.trigger({\n      type: 'bandwidthupdated',\n      metadata\n    });\n    this.bandwidth = stats.bandwidth;\n    this.roundTrip = stats.roundTripTime;\n  }\n  handleTimeout_() {\n    // although the VTT segment loader bandwidth isn't really used, it's good to\n    // maintain functinality between segment loaders\n    this.mediaRequestsTimedout += 1;\n    this.bandwidth = 1;\n    this.roundTrip = NaN;\n    this.trigger('bandwidthupdate');\n    this.trigger('timeout');\n  }\n  /**\n   * Handle the callback from the segmentRequest function and set the\n   * associated SegmentLoader state and errors if necessary\n   *\n   * @private\n   */\n\n  segmentRequestFinished_(error, simpleSegment, result) {\n    // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n    // check the call queue directly since this function doesn't need to deal with any\n    // data, and can continue even if the source buffers are not set up and we didn't get\n    // any data from the segment\n    if (this.callQueue_.length) {\n      this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n      return;\n    }\n    this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n    if (!this.pendingSegment_) {\n      return;\n    } // the request was aborted and the SegmentLoader has already started\n    // another request. this can happen when the timeout for an aborted\n    // request triggers due to a limitation in the XHR library\n    // do not count this as any sort of request or we risk double-counting\n\n    if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n      return;\n    } // an error occurred from the active pendingSegment_ so reset everything\n\n    if (error) {\n      this.pendingSegment_ = null;\n      this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n      if (error.code === REQUEST_ERRORS.ABORTED) {\n        return;\n      }\n      this.pause(); // the error is really just that at least one of the requests timed-out\n      // set the bandwidth to a very low value and trigger an ABR switch to\n      // take emergency action\n\n      if (error.code === REQUEST_ERRORS.TIMEOUT) {\n        this.handleTimeout_();\n        return;\n      } // if control-flow has arrived here, then the error is real\n      // emit an error event to exclude the current playlist\n\n      this.mediaRequestsErrored += 1;\n      this.error(error);\n      this.trigger('error');\n      return;\n    }\n    const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n    // generated for ABR purposes\n\n    this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n    segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n    if (result.gopInfo) {\n      this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n    } // Although we may have already started appending on progress, we shouldn't switch the\n    // state away from loading until we are officially done loading the segment data.\n\n    this.state = 'APPENDING'; // used for testing\n\n    this.trigger('appending');\n    this.waitForAppendsToComplete_(segmentInfo);\n  }\n  setTimeMapping_(timeline) {\n    const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n    if (timelineMapping !== null) {\n      this.timeMapping_ = timelineMapping;\n    }\n  }\n  updateMediaSecondsLoaded_(segment) {\n    if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n      this.mediaSecondsLoaded += segment.end - segment.start;\n    } else {\n      this.mediaSecondsLoaded += segment.duration;\n    }\n  }\n  shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n    if (timestampOffset === null) {\n      return false;\n    } // note that we're potentially using the same timestamp offset for both video and\n    // audio\n\n    if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n      return true;\n    }\n    if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n      return true;\n    }\n    return false;\n  }\n  trueSegmentStart_({\n    currentStart,\n    playlist,\n    mediaIndex,\n    firstVideoFrameTimeForData,\n    currentVideoTimestampOffset,\n    useVideoTimingInfo,\n    videoTimingInfo,\n    audioTimingInfo\n  }) {\n    if (typeof currentStart !== 'undefined') {\n      // if start was set once, keep using it\n      return currentStart;\n    }\n    if (!useVideoTimingInfo) {\n      return audioTimingInfo.start;\n    }\n    const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n    // within that segment. Since the transmuxer maintains a cache of incomplete data\n    // from and/or the last frame seen, the start time may reflect a frame that starts\n    // in the previous segment. Check for that case and ensure the start time is\n    // accurate for the segment.\n\n    if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n      return firstVideoFrameTimeForData;\n    }\n    return videoTimingInfo.start;\n  }\n  waitForAppendsToComplete_(segmentInfo) {\n    const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n    if (!trackInfo) {\n      this.error({\n        message: 'No starting media returned, likely due to an unsupported media format.',\n        playlistExclusionDuration: Infinity\n      });\n      this.trigger('error');\n      return;\n    } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n    // on each queue this loader is responsible for to ensure that the appends are\n    // complete.\n\n    const {\n      hasAudio,\n      hasVideo,\n      isMuxed\n    } = trackInfo;\n    const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n    const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n    segmentInfo.waitingOnAppends = 0; // segments with no data\n\n    if (!segmentInfo.hasAppendedData_) {\n      if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n        // When there's no audio or video data in the segment, there's no audio or video\n        // timing information.\n        //\n        // If there's no audio or video timing information, then the timestamp offset\n        // can't be adjusted to the appropriate value for the transmuxer and source\n        // buffers.\n        //\n        // Therefore, the next segment should be used to set the timestamp offset.\n        this.isPendingTimestampOffset_ = true;\n      } // override settings for metadata only segments\n\n      segmentInfo.timingInfo = {\n        start: 0\n      };\n      segmentInfo.waitingOnAppends++;\n      if (!this.isPendingTimestampOffset_) {\n        // update the timestampoffset\n        this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n        // no video/audio data.\n\n        this.processMetadataQueue_();\n      } // append is \"done\" instantly with no data.\n\n      this.checkAppendsDone_(segmentInfo);\n      return;\n    } // Since source updater could call back synchronously, do the increments first.\n\n    if (waitForVideo) {\n      segmentInfo.waitingOnAppends++;\n    }\n    if (waitForAudio) {\n      segmentInfo.waitingOnAppends++;\n    }\n    if (waitForVideo) {\n      this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n    }\n    if (waitForAudio) {\n      this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n    }\n  }\n  checkAppendsDone_(segmentInfo) {\n    if (this.checkForAbort_(segmentInfo.requestId)) {\n      return;\n    }\n    segmentInfo.waitingOnAppends--;\n    if (segmentInfo.waitingOnAppends === 0) {\n      this.handleAppendsDone_();\n    }\n  }\n  checkForIllegalMediaSwitch(trackInfo) {\n    const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n    if (illegalMediaSwitchError) {\n      this.error({\n        message: illegalMediaSwitchError,\n        playlistExclusionDuration: Infinity\n      });\n      this.trigger('error');\n      return true;\n    }\n    return false;\n  }\n  updateSourceBufferTimestampOffset_(segmentInfo) {\n    if (segmentInfo.timestampOffset === null ||\n    // we don't yet have the start for whatever media type (video or audio) has\n    // priority, timing-wise, so we must wait\n    typeof segmentInfo.timingInfo.start !== 'number' ||\n    // already updated the timestamp offset for this segment\n    segmentInfo.changedTimestampOffset ||\n    // the alt audio loader should not be responsible for setting the timestamp offset\n    this.loaderType_ !== 'main') {\n      return;\n    }\n    let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n    // the timing info here comes from video. In the event that the audio is longer than\n    // the video, this will trim the start of the audio.\n    // This also trims any offset from 0 at the beginning of the media\n\n    segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n      videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n      audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n      timingInfo: segmentInfo.timingInfo\n    }); // In the event that there are part segment downloads, each will try to update the\n    // timestamp offset. Retaining this bit of state prevents us from updating in the\n    // future (within the same segment), however, there may be a better way to handle it.\n\n    segmentInfo.changedTimestampOffset = true;\n    if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n      this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n      didChange = true;\n    }\n    if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n      this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n      didChange = true;\n    }\n    if (didChange) {\n      this.trigger('timestampoffset');\n    }\n  }\n  getSegmentStartTimeForTimestampOffsetCalculation_({\n    videoTimingInfo,\n    audioTimingInfo,\n    timingInfo\n  }) {\n    if (!this.useDtsForTimestampOffset_) {\n      return timingInfo.start;\n    }\n    if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n      return videoTimingInfo.transmuxedDecodeStart;\n    } // handle audio only\n\n    if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n      return audioTimingInfo.transmuxedDecodeStart;\n    } // handle content not transmuxed (e.g., MP4)\n\n    return timingInfo.start;\n  }\n  updateTimingInfoEnd_(segmentInfo) {\n    segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n    const trackInfo = this.getMediaInfo_();\n    const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n    const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n    if (!prioritizedTimingInfo) {\n      return;\n    }\n    segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n    // End time may not exist in a case where we aren't parsing the full segment (one\n    // current example is the case of fmp4), so use the rough duration to calculate an\n    // end time.\n    prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n  }\n  /**\n   * callback to run when appendBuffer is finished. detects if we are\n   * in a good state to do things with the data we got, or if we need\n   * to wait for more\n   *\n   * @private\n   */\n\n  handleAppendsDone_() {\n    // appendsdone can cause an abort\n    if (this.pendingSegment_) {\n      const metadata = {\n        segmentInfo: segmentInfoPayload({\n          type: this.loaderType_,\n          segment: this.pendingSegment_\n        })\n      };\n      this.trigger({\n        type: 'appendsdone',\n        metadata\n      });\n    }\n    if (!this.pendingSegment_) {\n      this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n      // all appending cases?\n\n      if (!this.paused()) {\n        this.monitorBuffer_();\n      }\n      return;\n    }\n    const segmentInfo = this.pendingSegment_;\n    if (segmentInfo.part && segmentInfo.part.syncInfo) {\n      // low-latency flow\n      segmentInfo.part.syncInfo.markAppended();\n    } else if (segmentInfo.segment.syncInfo) {\n      // normal flow\n      segmentInfo.segment.syncInfo.markAppended();\n    } // Now that the end of the segment has been reached, we can set the end time. It's\n    // best to wait until all appends are done so we're sure that the primary media is\n    // finished (and we have its end time).\n\n    this.updateTimingInfoEnd_(segmentInfo);\n    if (this.shouldSaveSegmentTimingInfo_) {\n      // Timeline mappings should only be saved for the main loader. This is for multiple\n      // reasons:\n      //\n      // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n      //    and the main loader try to save the timeline mapping, whichever comes later\n      //    will overwrite the first. In theory this is OK, as the mappings should be the\n      //    same, however, it breaks for (2)\n      // 2) In the event of a live stream, the initial live point will make for a somewhat\n      //    arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n      //    the mapping will be off for one of the streams, dependent on which one was\n      //    first saved (see (1)).\n      // 3) Primary timing goes by video in VHS, so the mapping should be video.\n      //\n      // Since the audio loader will wait for the main loader to load the first segment,\n      // the main loader will save the first timeline mapping, and ensure that there won't\n      // be a case where audio loads two segments without saving a mapping (thus leading\n      // to missing segment timing info).\n      this.syncController_.saveSegmentTimingInfo({\n        segmentInfo,\n        shouldSaveTimelineMapping: this.loaderType_ === 'main'\n      });\n    }\n    const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n    if (segmentDurationMessage) {\n      if (segmentDurationMessage.severity === 'warn') {\n        videojs.log.warn(segmentDurationMessage.message);\n      } else {\n        this.logger_(segmentDurationMessage.message);\n      }\n    }\n    this.recordThroughput_(segmentInfo);\n    this.pendingSegment_ = null;\n    this.state = 'READY';\n    if (segmentInfo.isSyncRequest) {\n      this.trigger('syncinfoupdate'); // if the sync request was not appended\n      // then it was not the correct segment.\n      // throw it away and use the data it gave us\n      // to get the correct one.\n\n      if (!segmentInfo.hasAppendedData_) {\n        this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`);\n        return;\n      }\n    }\n    this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n    this.addSegmentMetadataCue_(segmentInfo);\n    this.fetchAtBuffer_ = true;\n    if (this.currentTimeline_ !== segmentInfo.timeline) {\n      this.timelineChangeController_.lastTimelineChange({\n        type: this.loaderType_,\n        from: this.currentTimeline_,\n        to: segmentInfo.timeline\n      }); // If audio is not disabled, the main segment loader is responsible for updating\n      // the audio timeline as well. If the content is video only, this won't have any\n      // impact.\n\n      if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n        this.timelineChangeController_.lastTimelineChange({\n          type: 'audio',\n          from: this.currentTimeline_,\n          to: segmentInfo.timeline\n        });\n      }\n    }\n    this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n    // the following conditional otherwise it may consider this a bad \"guess\"\n    // and attempt to resync when the post-update seekable window and live\n    // point would mean that this was the perfect segment to fetch\n\n    this.trigger('syncinfoupdate');\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n    const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n    // the currentTime_ that means that our conservative guess was too conservative.\n    // In that case, reset the loader state so that we try to use any information gained\n    // from the previous request to create a new, more accurate, sync-point.\n\n    if (badSegmentGuess || badPartGuess) {\n      this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n      this.resetEverything();\n      return;\n    }\n    const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n    // and conservatively guess\n\n    if (isWalkingForward) {\n      this.trigger('bandwidthupdate');\n    }\n    this.trigger('progress');\n    this.mediaIndex = segmentInfo.mediaIndex;\n    this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n    // buffer, end the stream. this ensures the \"ended\" event will\n    // fire if playback reaches that point.\n\n    if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n      this.endOfStream();\n    } // used for testing\n\n    this.trigger('appended');\n    if (segmentInfo.hasAppendedData_) {\n      this.mediaAppends++;\n    }\n    if (!this.paused()) {\n      this.monitorBuffer_();\n    }\n  }\n  /**\n   * Records the current throughput of the decrypt, transmux, and append\n   * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n   * moving average of the throughput. `throughput.count` is the number of\n   * data points in the average.\n   *\n   * @private\n   * @param {Object} segmentInfo the object returned by loadSegment\n   */\n\n  recordThroughput_(segmentInfo) {\n    if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n      this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n      return;\n    }\n    const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n    // by zero in the case where the throughput is ridiculously high\n\n    const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n    const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n    //   newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n    this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n  }\n  /**\n   * Adds a cue to the segment-metadata track with some metadata information about the\n   * segment\n   *\n   * @private\n   * @param {Object} segmentInfo\n   *        the object returned by loadSegment\n   * @method addSegmentMetadataCue_\n   */\n\n  addSegmentMetadataCue_(segmentInfo) {\n    if (!this.segmentMetadataTrack_) {\n      return;\n    }\n    const segment = segmentInfo.segment;\n    const start = segment.start;\n    const end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n    if (!finite(start) || !finite(end)) {\n      return;\n    }\n    removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n    const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n    const value = {\n      custom: segment.custom,\n      dateTimeObject: segment.dateTimeObject,\n      dateTimeString: segment.dateTimeString,\n      programDateTime: segment.programDateTime,\n      bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n      resolution: segmentInfo.playlist.attributes.RESOLUTION,\n      codecs: segmentInfo.playlist.attributes.CODECS,\n      byteLength: segmentInfo.byteLength,\n      uri: segmentInfo.uri,\n      timeline: segmentInfo.timeline,\n      playlist: segmentInfo.playlist.id,\n      start,\n      end\n    };\n    const data = JSON.stringify(value);\n    const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n    // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n    cue.value = value;\n    this.segmentMetadataTrack_.addCue(cue);\n  }\n}\nfunction noop() {}\nconst toTitleCase = function (string) {\n  if (typeof string !== 'string') {\n    return string;\n  }\n  return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n  const sourceBuffer = sourceUpdater[`${type}Buffer`];\n  return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n  for (let i = 0; i < queue.length; i++) {\n    const queueEntry = queue[i];\n    if (queueEntry.type === 'mediaSource') {\n      // If the next entry is a media source entry (uses multiple source buffers), block\n      // processing to allow it to go through first.\n      return null;\n    }\n    if (queueEntry.type === type) {\n      return i;\n    }\n  }\n  return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n  if (sourceUpdater.queue.length === 0) {\n    return;\n  }\n  let queueIndex = 0;\n  let queueEntry = sourceUpdater.queue[queueIndex];\n  if (queueEntry.type === 'mediaSource') {\n    if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n      sourceUpdater.queue.shift();\n      queueEntry.action(sourceUpdater);\n      if (queueEntry.doneFn) {\n        queueEntry.doneFn();\n      } // Only specific source buffer actions must wait for async updateend events. Media\n      // Source actions process synchronously. Therefore, both audio and video source\n      // buffers are now clear to process the next queue entries.\n\n      shiftQueue('audio', sourceUpdater);\n      shiftQueue('video', sourceUpdater);\n    } // Media Source actions require both source buffers, so if the media source action\n    // couldn't process yet (because one or both source buffers are busy), block other\n    // queue actions until both are available and the media source action can process.\n\n    return;\n  }\n  if (type === 'mediaSource') {\n    // If the queue was shifted by a media source action (this happens when pushing a\n    // media source action onto the queue), then it wasn't from an updateend event from an\n    // audio or video source buffer, so there's no change from previous state, and no\n    // processing should be done.\n    return;\n  } // Media source queue entries don't need to consider whether the source updater is\n  // started (i.e., source buffers are created) as they don't need the source buffers, but\n  // source buffer queue entries do.\n\n  if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n    return;\n  }\n  if (queueEntry.type !== type) {\n    queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n    if (queueIndex === null) {\n      // Either there's no queue entry that uses this source buffer type in the queue, or\n      // there's a media source queue entry before the next entry of this type, in which\n      // case wait for that action to process first.\n      return;\n    }\n    queueEntry = sourceUpdater.queue[queueIndex];\n  }\n  sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n  //\n  // The queue pending operation must be set before the action is performed in the event\n  // that the action results in a synchronous event that is acted upon. For instance, if\n  // an exception is thrown that can be handled, it's possible that new actions will be\n  // appended to an empty queue and immediately executed, but would not have the correct\n  // pending information if this property was set after the action was performed.\n\n  sourceUpdater.queuePending[type] = queueEntry;\n  queueEntry.action(type, sourceUpdater);\n  if (!queueEntry.doneFn) {\n    // synchronous operation, process next entry\n    sourceUpdater.queuePending[type] = null;\n    shiftQueue(type, sourceUpdater);\n    return;\n  }\n};\nconst cleanupBuffer = (type, sourceUpdater) => {\n  const buffer = sourceUpdater[`${type}Buffer`];\n  const titleType = toTitleCase(type);\n  if (!buffer) {\n    return;\n  }\n  buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n  buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n  sourceUpdater.codecs[type] = null;\n  sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n  appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n    // or the media source does not contain this source buffer.\n\n    if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n      return;\n    }\n    sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n    try {\n      sourceBuffer.appendBuffer(bytes);\n    } catch (e) {\n      sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n      sourceUpdater.queuePending[type] = null;\n      onError(e);\n    }\n  },\n  remove: (start, end) => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n    // or the media source does not contain this source buffer.\n\n    if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n      return;\n    }\n    sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n    try {\n      sourceBuffer.remove(start, end);\n    } catch (e) {\n      sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n    }\n  },\n  timestampOffset: offset => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n    // or the media source does not contain this source buffer.\n\n    if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n      return;\n    }\n    sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n    sourceBuffer.timestampOffset = offset;\n  },\n  callback: callback => (type, sourceUpdater) => {\n    callback();\n  },\n  endOfStream: error => sourceUpdater => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n    sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n    try {\n      sourceUpdater.mediaSource.endOfStream(error);\n    } catch (e) {\n      videojs.log.warn('Failed to call media source endOfStream', e);\n    }\n  },\n  duration: duration => sourceUpdater => {\n    sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n    try {\n      sourceUpdater.mediaSource.duration = duration;\n    } catch (e) {\n      videojs.log.warn('Failed to set media source duration', e);\n    }\n  },\n  abort: () => (type, sourceUpdater) => {\n    if (sourceUpdater.mediaSource.readyState !== 'open') {\n      return;\n    }\n    const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n    // or the media source does not contain this source buffer.\n\n    if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n      return;\n    }\n    sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n    try {\n      sourceBuffer.abort();\n    } catch (e) {\n      videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n    }\n  },\n  addSourceBuffer: (type, codec) => sourceUpdater => {\n    const titleType = toTitleCase(type);\n    const mime = getMimeForCodec(codec);\n    sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n    const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n    sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n    sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n    sourceUpdater.codecs[type] = codec;\n    sourceUpdater[`${type}Buffer`] = sourceBuffer;\n  },\n  removeSourceBuffer: type => sourceUpdater => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`];\n    cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n    // or the media source does not contain this source buffer.\n\n    if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n      return;\n    }\n    sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n    try {\n      sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n    } catch (e) {\n      videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n    }\n  },\n  changeType: codec => (type, sourceUpdater) => {\n    const sourceBuffer = sourceUpdater[`${type}Buffer`];\n    const mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n    // or the media source does not contain this source buffer.\n\n    if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n      return;\n    } // do not update codec if we don't need to.\n    // Only update if we change the codec base.\n    // For example, going from avc1.640028 to avc1.64001f does not require a changeType call.\n\n    const newCodecBase = codec.substring(0, codec.indexOf('.'));\n    const oldCodec = sourceUpdater.codecs[type];\n    const oldCodecBase = oldCodec.substring(0, oldCodec.indexOf('.'));\n    if (oldCodecBase === newCodecBase) {\n      return;\n    }\n    const metadata = {\n      codecsChangeInfo: {\n        from: oldCodec,\n        to: codec\n      }\n    };\n    sourceUpdater.trigger({\n      type: 'codecschange',\n      metadata\n    });\n    sourceUpdater.logger_(`changing ${type}Buffer codec from ${oldCodec} to ${codec}`); // check if change to the provided type is supported\n\n    try {\n      sourceBuffer.changeType(mime);\n      sourceUpdater.codecs[type] = codec;\n    } catch (e) {\n      metadata.errorType = videojs.Error.StreamingCodecsChangeError;\n      metadata.error = e;\n      e.metadata = metadata;\n      sourceUpdater.error_ = e;\n      sourceUpdater.trigger('error');\n      videojs.log.warn(`Failed to changeType on ${type}Buffer`, e);\n    }\n  }\n};\nconst pushQueue = ({\n  type,\n  sourceUpdater,\n  action,\n  doneFn,\n  name\n}) => {\n  sourceUpdater.queue.push({\n    type,\n    action,\n    doneFn,\n    name\n  });\n  shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n  // Although there should, in theory, be a pending action for any updateend receieved,\n  // there are some actions that may trigger updateend events without set definitions in\n  // the w3c spec. For instance, setting the duration on the media source may trigger\n  // updateend events on source buffers. This does not appear to be in the spec. As such,\n  // if we encounter an updateend without a corresponding pending action from our queue\n  // for that source buffer type, process the next action.\n  const bufferedRangesForType = sourceUpdater[`${type}Buffered`]();\n  const descriptiveString = bufferedRangesToString(bufferedRangesForType);\n  sourceUpdater.logger_(`received \"updateend\" event for ${type} Source Buffer: `, descriptiveString);\n  if (sourceUpdater.queuePending[type]) {\n    const doneFn = sourceUpdater.queuePending[type].doneFn;\n    sourceUpdater.queuePending[type] = null;\n    if (doneFn) {\n      // if there's an error, report it\n      doneFn(sourceUpdater[`${type}Error_`]);\n    }\n  }\n  shiftQueue(type, sourceUpdater);\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\n\nclass SourceUpdater extends videojs.EventTarget {\n  constructor(mediaSource) {\n    super();\n    this.mediaSource = mediaSource;\n    this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n    this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n    this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n    this.audioTimestampOffset_ = 0;\n    this.videoTimestampOffset_ = 0;\n    this.queue = [];\n    this.queuePending = {\n      audio: null,\n      video: null\n    };\n    this.delayedAudioAppendQueue_ = [];\n    this.videoAppendQueued_ = false;\n    this.codecs = {};\n    this.onVideoUpdateEnd_ = onUpdateend('video', this);\n    this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n    this.onVideoError_ = e => {\n      // used for debugging\n      this.videoError_ = e;\n    };\n    this.onAudioError_ = e => {\n      // used for debugging\n      this.audioError_ = e;\n    };\n    this.createdSourceBuffers_ = false;\n    this.initializedEme_ = false;\n    this.triggeredReady_ = false;\n  }\n  initializedEme() {\n    this.initializedEme_ = true;\n    this.triggerReady();\n  }\n  hasCreatedSourceBuffers() {\n    // if false, likely waiting on one of the segment loaders to get enough data to create\n    // source buffers\n    return this.createdSourceBuffers_;\n  }\n  hasInitializedAnyEme() {\n    return this.initializedEme_;\n  }\n  ready() {\n    return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n  }\n  createSourceBuffers(codecs) {\n    if (this.hasCreatedSourceBuffers()) {\n      // already created them before\n      return;\n    } // the intial addOrChangeSourceBuffers will always be\n    // two add buffers.\n\n    this.addOrChangeSourceBuffers(codecs);\n    this.createdSourceBuffers_ = true;\n    this.trigger('createdsourcebuffers');\n    this.triggerReady();\n  }\n  triggerReady() {\n    // only allow ready to be triggered once, this prevents the case\n    // where:\n    // 1. we trigger createdsourcebuffers\n    // 2. ie 11 synchronously initializates eme\n    // 3. the synchronous initialization causes us to trigger ready\n    // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n    if (this.ready() && !this.triggeredReady_) {\n      this.triggeredReady_ = true;\n      this.trigger('ready');\n    }\n  }\n  /**\n   * Add a type of source buffer to the media source.\n   *\n   * @param {string} type\n   *        The type of source buffer to add.\n   *\n   * @param {string} codec\n   *        The codec to add the source buffer with.\n   */\n\n  addSourceBuffer(type, codec) {\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.addSourceBuffer(type, codec),\n      name: 'addSourceBuffer'\n    });\n  }\n  /**\n   * call abort on a source buffer.\n   *\n   * @param {string} type\n   *        The type of source buffer to call abort on.\n   */\n\n  abort(type) {\n    pushQueue({\n      type,\n      sourceUpdater: this,\n      action: actions.abort(type),\n      name: 'abort'\n    });\n  }\n  /**\n   * Call removeSourceBuffer and remove a specific type\n   * of source buffer on the mediaSource.\n   *\n   * @param {string} type\n   *        The type of source buffer to remove.\n   */\n\n  removeSourceBuffer(type) {\n    if (!this.canRemoveSourceBuffer()) {\n      videojs.log.error('removeSourceBuffer is not supported!');\n      return;\n    }\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.removeSourceBuffer(type),\n      name: 'removeSourceBuffer'\n    });\n  }\n  /**\n   * Whether or not the removeSourceBuffer function is supported\n   * on the mediaSource.\n   *\n   * @return {boolean}\n   *          if removeSourceBuffer can be called.\n   */\n\n  canRemoveSourceBuffer() {\n    // As of Firefox 83 removeSourceBuffer\n    // throws errors, so we report that it does not support this.\n    return !videojs.browser.IS_FIREFOX && window$1.MediaSource && window$1.MediaSource.prototype && typeof window$1.MediaSource.prototype.removeSourceBuffer === 'function';\n  }\n  /**\n   * Whether or not the changeType function is supported\n   * on our SourceBuffers.\n   *\n   * @return {boolean}\n   *         if changeType can be called.\n   */\n\n  static canChangeType() {\n    return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === 'function';\n  }\n  /**\n   * Whether or not the changeType function is supported\n   * on our SourceBuffers.\n   *\n   * @return {boolean}\n   *         if changeType can be called.\n   */\n\n  canChangeType() {\n    return this.constructor.canChangeType();\n  }\n  /**\n   * Call the changeType function on a source buffer, given the code and type.\n   *\n   * @param {string} type\n   *        The type of source buffer to call changeType on.\n   *\n   * @param {string} codec\n   *        The codec string to change type with on the source buffer.\n   */\n\n  changeType(type, codec) {\n    if (!this.canChangeType()) {\n      videojs.log.error('changeType is not supported!');\n      return;\n    }\n    pushQueue({\n      type,\n      sourceUpdater: this,\n      action: actions.changeType(codec),\n      name: 'changeType'\n    });\n  }\n  /**\n   * Add source buffers with a codec or, if they are already created,\n   * call changeType on source buffers using changeType.\n   *\n   * @param {Object} codecs\n   *        Codecs to switch to\n   */\n\n  addOrChangeSourceBuffers(codecs) {\n    if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n      throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n    }\n    Object.keys(codecs).forEach(type => {\n      const codec = codecs[type];\n      if (!this.hasCreatedSourceBuffers()) {\n        return this.addSourceBuffer(type, codec);\n      }\n      if (this.canChangeType()) {\n        this.changeType(type, codec);\n      }\n    });\n  }\n  /**\n   * Queue an update to append an ArrayBuffer.\n   *\n   * @param {MediaObject} object containing audioBytes and/or videoBytes\n   * @param {Function} done the function to call when done\n   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n   */\n\n  appendBuffer(options, doneFn) {\n    const {\n      segmentInfo,\n      type,\n      bytes\n    } = options;\n    this.processedAppend_ = true;\n    if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n      this.delayedAudioAppendQueue_.push([options, doneFn]);\n      this.logger_(`delayed audio append of ${bytes.length} until video append`);\n      return;\n    } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n    // not be fired. This means that the queue will be blocked until the next action\n    // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n    // these errors by calling the doneFn with the specific error.\n\n    const onError = doneFn;\n    pushQueue({\n      type,\n      sourceUpdater: this,\n      action: actions.appendBuffer(bytes, segmentInfo || {\n        mediaIndex: -1\n      }, onError),\n      doneFn,\n      name: 'appendBuffer'\n    });\n    if (type === 'video') {\n      this.videoAppendQueued_ = true;\n      if (!this.delayedAudioAppendQueue_.length) {\n        return;\n      }\n      const queue = this.delayedAudioAppendQueue_.slice();\n      this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n      this.delayedAudioAppendQueue_.length = 0;\n      queue.forEach(que => {\n        this.appendBuffer.apply(this, que);\n      });\n    }\n  }\n  /**\n   * Get the audio buffer's buffered timerange.\n   *\n   * @return {TimeRange}\n   *         The audio buffer's buffered time range\n   */\n\n  audioBuffered() {\n    // no media source/source buffer or it isn't in the media sources\n    // source buffer list\n    if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n      return createTimeRanges();\n    }\n    return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n  }\n  /**\n   * Get the video buffer's buffered timerange.\n   *\n   * @return {TimeRange}\n   *         The video buffer's buffered time range\n   */\n\n  videoBuffered() {\n    // no media source/source buffer or it isn't in the media sources\n    // source buffer list\n    if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n      return createTimeRanges();\n    }\n    return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n  }\n  /**\n   * Get a combined video/audio buffer's buffered timerange.\n   *\n   * @return {TimeRange}\n   *         the combined time range\n   */\n\n  buffered() {\n    const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n    const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n    if (audio && !video) {\n      return this.audioBuffered();\n    }\n    if (video && !audio) {\n      return this.videoBuffered();\n    }\n    return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n  }\n  /**\n   * Add a callback to the queue that will set duration on the mediaSource.\n   *\n   * @param {number} duration\n   *        The duration to set\n   *\n   * @param {Function} [doneFn]\n   *        function to run after duration has been set.\n   */\n\n  setDuration(duration, doneFn = noop) {\n    // In order to set the duration on the media source, it's necessary to wait for all\n    // source buffers to no longer be updating. \"If the updating attribute equals true on\n    // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n    // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.duration(duration),\n      name: 'duration',\n      doneFn\n    });\n  }\n  /**\n   * Add a mediaSource endOfStream call to the queue\n   *\n   * @param {Error} [error]\n   *        Call endOfStream with an error\n   *\n   * @param {Function} [doneFn]\n   *        A function that should be called when the\n   *        endOfStream call has finished.\n   */\n\n  endOfStream(error = null, doneFn = noop) {\n    if (typeof error !== 'string') {\n      error = undefined;\n    } // In order to set the duration on the media source, it's necessary to wait for all\n    // source buffers to no longer be updating. \"If the updating attribute equals true on\n    // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n    // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n    pushQueue({\n      type: 'mediaSource',\n      sourceUpdater: this,\n      action: actions.endOfStream(error),\n      name: 'endOfStream',\n      doneFn\n    });\n  }\n  /**\n   * Queue an update to remove a time range from the buffer.\n   *\n   * @param {number} start where to start the removal\n   * @param {number} end where to end the removal\n   * @param {Function} [done=noop] optional callback to be executed when the remove\n   * operation is complete\n   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n   */\n\n  removeAudio(start, end, done = noop) {\n    if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n      done();\n      return;\n    }\n    pushQueue({\n      type: 'audio',\n      sourceUpdater: this,\n      action: actions.remove(start, end),\n      doneFn: done,\n      name: 'remove'\n    });\n  }\n  /**\n   * Queue an update to remove a time range from the buffer.\n   *\n   * @param {number} start where to start the removal\n   * @param {number} end where to end the removal\n   * @param {Function} [done=noop] optional callback to be executed when the remove\n   * operation is complete\n   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n   */\n\n  removeVideo(start, end, done = noop) {\n    if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n      done();\n      return;\n    }\n    pushQueue({\n      type: 'video',\n      sourceUpdater: this,\n      action: actions.remove(start, end),\n      doneFn: done,\n      name: 'remove'\n    });\n  }\n  /**\n   * Whether the underlying sourceBuffer is updating or not\n   *\n   * @return {boolean} the updating status of the SourceBuffer\n   */\n\n  updating() {\n    // the audio/video source buffer is updating\n    if (updating('audio', this) || updating('video', this)) {\n      return true;\n    }\n    return false;\n  }\n  /**\n   * Set/get the timestampoffset on the audio SourceBuffer\n   *\n   * @return {number} the timestamp offset\n   */\n\n  audioTimestampOffset(offset) {\n    if (typeof offset !== 'undefined' && this.audioBuffer &&\n    // no point in updating if it's the same\n    this.audioTimestampOffset_ !== offset) {\n      pushQueue({\n        type: 'audio',\n        sourceUpdater: this,\n        action: actions.timestampOffset(offset),\n        name: 'timestampOffset'\n      });\n      this.audioTimestampOffset_ = offset;\n    }\n    return this.audioTimestampOffset_;\n  }\n  /**\n   * Set/get the timestampoffset on the video SourceBuffer\n   *\n   * @return {number} the timestamp offset\n   */\n\n  videoTimestampOffset(offset) {\n    if (typeof offset !== 'undefined' && this.videoBuffer &&\n    // no point in updating if it's the same\n    this.videoTimestampOffset_ !== offset) {\n      pushQueue({\n        type: 'video',\n        sourceUpdater: this,\n        action: actions.timestampOffset(offset),\n        name: 'timestampOffset'\n      });\n      this.videoTimestampOffset_ = offset;\n    }\n    return this.videoTimestampOffset_;\n  }\n  /**\n   * Add a function to the queue that will be called\n   * when it is its turn to run in the audio queue.\n   *\n   * @param {Function} callback\n   *        The callback to queue.\n   */\n\n  audioQueueCallback(callback) {\n    if (!this.audioBuffer) {\n      return;\n    }\n    pushQueue({\n      type: 'audio',\n      sourceUpdater: this,\n      action: actions.callback(callback),\n      name: 'callback'\n    });\n  }\n  /**\n   * Add a function to the queue that will be called\n   * when it is its turn to run in the video queue.\n   *\n   * @param {Function} callback\n   *        The callback to queue.\n   */\n\n  videoQueueCallback(callback) {\n    if (!this.videoBuffer) {\n      return;\n    }\n    pushQueue({\n      type: 'video',\n      sourceUpdater: this,\n      action: actions.callback(callback),\n      name: 'callback'\n    });\n  }\n  /**\n   * dispose of the source updater and the underlying sourceBuffer\n   */\n\n  dispose() {\n    this.trigger('dispose');\n    bufferTypes.forEach(type => {\n      this.abort(type);\n      if (this.canRemoveSourceBuffer()) {\n        this.removeSourceBuffer(type);\n      } else {\n        this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n      }\n    });\n    this.videoAppendQueued_ = false;\n    this.delayedAudioAppendQueue_.length = 0;\n    if (this.sourceopenListener_) {\n      this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n    }\n    this.off();\n  }\n}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\nconst bufferToHexString = buffer => {\n  const uInt8Buffer = new Uint8Array(buffer);\n  return Array.from(uInt8Buffer).map(byte => byte.toString(16).padStart(2, '0')).join('');\n};\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n  constructor() {\n    super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n  }\n}\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass VTTSegmentLoader extends SegmentLoader {\n  constructor(settings, options = {}) {\n    super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n    // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n    this.mediaSource_ = null;\n    this.subtitlesTrack_ = null;\n    this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n    this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n    // the sync controller leads to improper behavior.\n\n    this.shouldSaveSegmentTimingInfo_ = false;\n  }\n  /**\n   * Indicates which time ranges are buffered\n   *\n   * @return {TimeRange}\n   *         TimeRange object representing the current buffered ranges\n   */\n\n  buffered_() {\n    if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n      return createTimeRanges();\n    }\n    const cues = this.subtitlesTrack_.cues;\n    const start = cues[0].startTime;\n    const end = cues[cues.length - 1].startTime;\n    return createTimeRanges([[start, end]]);\n  }\n  /**\n   * Gets and sets init segment for the provided map\n   *\n   * @param {Object} map\n   *        The map object representing the init segment to get or set\n   * @param {boolean=} set\n   *        If true, the init segment for the provided map should be saved\n   * @return {Object}\n   *         map object for desired init segment\n   */\n\n  initSegmentForMap(map, set = false) {\n    if (!map) {\n      return null;\n    }\n    const id = initSegmentId(map);\n    let storedMap = this.initSegments_[id];\n    if (set && !storedMap && map.bytes) {\n      // append WebVTT line terminators to the media initialization segment if it exists\n      // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n      // requires two or more WebVTT line terminators between the WebVTT header and the\n      // rest of the file\n      const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n      const combinedSegment = new Uint8Array(combinedByteLength);\n      combinedSegment.set(map.bytes);\n      combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n      this.initSegments_[id] = storedMap = {\n        resolvedUri: map.resolvedUri,\n        byterange: map.byterange,\n        bytes: combinedSegment\n      };\n    }\n    return storedMap || map;\n  }\n  /**\n   * Returns true if all configuration required for loading is present, otherwise false.\n   *\n   * @return {boolean} True if the all configuration is ready for loading\n   * @private\n   */\n\n  couldBeginLoading_() {\n    return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n  }\n  /**\n   * Once all the starting parameters have been specified, begin\n   * operation. This method should only be invoked from the INIT\n   * state.\n   *\n   * @private\n   */\n\n  init_() {\n    this.state = 'READY';\n    this.resetEverything();\n    return this.monitorBuffer_();\n  }\n  /**\n   * Set a subtitle track on the segment loader to add subtitles to\n   *\n   * @param {TextTrack=} track\n   *        The text track to add loaded subtitles to\n   * @return {TextTrack}\n   *        Returns the subtitles track\n   */\n\n  track(track) {\n    if (typeof track === 'undefined') {\n      return this.subtitlesTrack_;\n    }\n    this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start\n    // buffering now\n\n    if (this.state === 'INIT' && this.couldBeginLoading_()) {\n      this.init_();\n    }\n    return this.subtitlesTrack_;\n  }\n  /**\n   * Remove any data in the source buffer between start and end times\n   *\n   * @param {number} start - the start time of the region to remove from the buffer\n   * @param {number} end - the end time of the region to remove from the buffer\n   */\n\n  remove(start, end) {\n    removeCuesFromTrack(start, end, this.subtitlesTrack_);\n  }\n  /**\n   * fill the buffer with segements unless the sourceBuffers are\n   * currently updating\n   *\n   * Note: this function should only ever be called by monitorBuffer_\n   * and never directly\n   *\n   * @private\n   */\n\n  fillBuffer_() {\n    // see if we need to begin loading immediately\n    const segmentInfo = this.chooseNextRequest_();\n    if (!segmentInfo) {\n      return;\n    }\n    if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n      // We don't have the timestamp offset that we need to sync subtitles.\n      // Rerun on a timestamp offset or user interaction.\n      const checkTimestampOffset = () => {\n        this.state = 'READY';\n        if (!this.paused()) {\n          // if not paused, queue a buffer check as soon as possible\n          this.monitorBuffer_();\n        }\n      };\n      this.syncController_.one('timestampoffset', checkTimestampOffset);\n      this.state = 'WAITING_ON_TIMELINE';\n      return;\n    }\n    this.loadSegment_(segmentInfo);\n  } // never set a timestamp offset for vtt segments.\n\n  timestampOffsetForSegment_() {\n    return null;\n  }\n  chooseNextRequest_() {\n    return this.skipEmptySegments_(super.chooseNextRequest_());\n  }\n  /**\n   * Prevents the segment loader from requesting segments we know contain no subtitles\n   * by walking forward until we find the next segment that we don't know whether it is\n   * empty or not.\n   *\n   * @param {Object} segmentInfo\n   *        a segment info object that describes the current segment\n   * @return {Object}\n   *         a segment info object that describes the current segment\n   */\n\n  skipEmptySegments_(segmentInfo) {\n    while (segmentInfo && segmentInfo.segment.empty) {\n      // stop at the last possible segmentInfo\n      if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n        segmentInfo = null;\n        break;\n      }\n      segmentInfo = this.generateSegmentInfo_({\n        playlist: segmentInfo.playlist,\n        mediaIndex: segmentInfo.mediaIndex + 1,\n        startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n        isSyncRequest: segmentInfo.isSyncRequest\n      });\n    }\n    return segmentInfo;\n  }\n  stopForError(error) {\n    this.error(error);\n    this.state = 'READY';\n    this.pause();\n    this.trigger('error');\n  }\n  /**\n   * append a decrypted segement to the SourceBuffer through a SourceUpdater\n   *\n   * @private\n   */\n\n  segmentRequestFinished_(error, simpleSegment, result) {\n    if (!this.subtitlesTrack_) {\n      this.state = 'READY';\n      return;\n    }\n    this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n    if (!this.pendingSegment_) {\n      this.state = 'READY';\n      this.mediaRequestsAborted += 1;\n      return;\n    }\n    if (error) {\n      if (error.code === REQUEST_ERRORS.TIMEOUT) {\n        this.handleTimeout_();\n      }\n      if (error.code === REQUEST_ERRORS.ABORTED) {\n        this.mediaRequestsAborted += 1;\n      } else {\n        this.mediaRequestsErrored += 1;\n      }\n      this.stopForError(error);\n      return;\n    }\n    const segmentInfo = this.pendingSegment_;\n    const isMp4WebVttSegmentWithCues = result.mp4VttCues && result.mp4VttCues.length;\n    if (isMp4WebVttSegmentWithCues) {\n      segmentInfo.mp4VttCues = result.mp4VttCues;\n    } // although the VTT segment loader bandwidth isn't really used, it's good to\n    // maintain functionality between segment loaders\n\n    this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n    if (simpleSegment.key) {\n      this.segmentKey(simpleSegment.key, true);\n    }\n    this.state = 'APPENDING'; // used for tests\n\n    this.trigger('appending');\n    const segment = segmentInfo.segment;\n    if (segment.map) {\n      segment.map.bytes = simpleSegment.map.bytes;\n    }\n    segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n    if (typeof window$1.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n      this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n      // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n      this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n        message: 'Error loading vtt.js'\n      }));\n      return;\n    }\n    segment.requested = true;\n    try {\n      this.parseVTTCues_(segmentInfo);\n    } catch (e) {\n      this.stopForError({\n        message: e.message,\n        metadata: {\n          errorType: videojs.Error.StreamingVttParserError,\n          error: e\n        }\n      });\n      return;\n    }\n    if (!isMp4WebVttSegmentWithCues) {\n      this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n    }\n    if (segmentInfo.cues.length) {\n      segmentInfo.timingInfo = {\n        start: segmentInfo.cues[0].startTime,\n        end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n      };\n    } else {\n      segmentInfo.timingInfo = {\n        start: segmentInfo.startOfSegment,\n        end: segmentInfo.startOfSegment + segmentInfo.duration\n      };\n    }\n    if (segmentInfo.isSyncRequest) {\n      this.trigger('syncinfoupdate');\n      this.pendingSegment_ = null;\n      this.state = 'READY';\n      return;\n    }\n    segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n    this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n    // the subtitle track\n\n    segmentInfo.cues.forEach(cue => {\n      this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window$1.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n    }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n    // cues to have identical time-intervals, but if the text is also identical\n    // we can safely assume it is a duplicate that can be removed (ex. when a cue\n    // \"overlaps\" VTT segments)\n\n    removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n    this.handleAppendsDone_();\n  }\n  handleData_(simpleSegment, result) {\n    const isVttType = simpleSegment && simpleSegment.type === 'vtt';\n    const isTextResult = result && result.type === 'text';\n    const isFmp4VttSegment = isVttType && isTextResult; // handle segment data for fmp4 encapsulated webvtt\n\n    if (isFmp4VttSegment) {\n      super.handleData_(simpleSegment, result);\n    }\n  }\n  updateTimingInfoEnd_() {// noop\n  }\n  /**\n   * Utility function for converting mp4 webvtt cue objects into VTTCues.\n   *\n   * @param {Object} segmentInfo with mp4 webvtt cues for parsing into VTTCue objecs\n   */\n\n  parseMp4VttCues_(segmentInfo) {\n    const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n    segmentInfo.mp4VttCues.forEach(cue => {\n      const start = cue.start + timestampOffset;\n      const end = cue.end + timestampOffset;\n      const vttCue = new window$1.VTTCue(start, end, cue.cueText);\n      if (cue.settings) {\n        cue.settings.split(' ').forEach(cueSetting => {\n          const keyValString = cueSetting.split(':');\n          const key = keyValString[0];\n          const value = keyValString[1];\n          vttCue[key] = isNaN(value) ? value : Number(value);\n        });\n      }\n      segmentInfo.cues.push(vttCue);\n    });\n  }\n  /**\n   * Uses the WebVTT parser to parse the segment response\n   *\n   * @throws NoVttJsError\n   *\n   * @param {Object} segmentInfo\n   *        a segment info object that describes the current segment\n   * @private\n   */\n\n  parseVTTCues_(segmentInfo) {\n    let decoder;\n    let decodeBytesToString = false;\n    if (typeof window$1.WebVTT !== 'function') {\n      // caller is responsible for exception handling.\n      throw new NoVttJsError();\n    }\n    segmentInfo.cues = [];\n    segmentInfo.timestampmap = {\n      MPEGTS: 0,\n      LOCAL: 0\n    };\n    if (segmentInfo.mp4VttCues) {\n      this.parseMp4VttCues_(segmentInfo);\n      return;\n    }\n    if (typeof window$1.TextDecoder === 'function') {\n      decoder = new window$1.TextDecoder('utf8');\n    } else {\n      decoder = window$1.WebVTT.StringDecoder();\n      decodeBytesToString = true;\n    }\n    const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n    parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n    parser.ontimestampmap = map => {\n      segmentInfo.timestampmap = map;\n    };\n    parser.onparsingerror = error => {\n      videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n    };\n    if (segmentInfo.segment.map) {\n      let mapData = segmentInfo.segment.map.bytes;\n      if (decodeBytesToString) {\n        mapData = uint8ToUtf8(mapData);\n      }\n      parser.parse(mapData);\n    }\n    let segmentData = segmentInfo.bytes;\n    if (decodeBytesToString) {\n      segmentData = uint8ToUtf8(segmentData);\n    }\n    parser.parse(segmentData);\n    parser.flush();\n  }\n  /**\n   * Updates the start and end times of any cues parsed by the WebVTT parser using\n   * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n   * from the SyncController\n   *\n   * @param {Object} segmentInfo\n   *        a segment info object that describes the current segment\n   * @param {Object} mappingObj\n   *        object containing a mapping from TS to media time\n   * @param {Object} playlist\n   *        the playlist object containing the segment\n   * @private\n   */\n\n  updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n    const segment = segmentInfo.segment;\n    if (!mappingObj) {\n      // If the sync controller does not have a mapping of TS to Media Time for the\n      // timeline, then we don't have enough information to update the cue\n      // start/end times\n      return;\n    }\n    if (!segmentInfo.cues.length) {\n      // If there are no cues, we also do not have enough information to figure out\n      // segment timing. Mark that the segment contains no cues so we don't re-request\n      // an empty segment.\n      segment.empty = true;\n      return;\n    }\n    const {\n      MPEGTS,\n      LOCAL\n    } = segmentInfo.timestampmap;\n    /**\n     * From the spec:\n     * The MPEGTS media timestamp MUST use a 90KHz timescale,\n     * even when non-WebVTT Media Segments use a different timescale.\n     */\n\n    const mpegTsInSeconds = MPEGTS / ONE_SECOND_IN_TS;\n    const diff = mpegTsInSeconds - LOCAL + mappingObj.mapping;\n    segmentInfo.cues.forEach(cue => {\n      const duration = cue.endTime - cue.startTime;\n      const startTime = this.handleRollover_(cue.startTime + diff, mappingObj.time);\n      cue.startTime = Math.max(startTime, 0);\n      cue.endTime = Math.max(startTime + duration, 0);\n    });\n    if (!playlist.syncInfo) {\n      const firstStart = segmentInfo.cues[0].startTime;\n      const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n      playlist.syncInfo = {\n        mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n        time: Math.min(firstStart, lastStart - segment.duration)\n      };\n    }\n  }\n  /**\n   * MPEG-TS PES timestamps are limited to 2^33.\n   * Once they reach 2^33, they roll over to 0.\n   * mux.js handles PES timestamp rollover for the following scenarios:\n   * [forward rollover(right)] ->\n   *    PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0\n   * [backward rollover(left)] -->\n   *    we seek back to position before rollover.\n   *\n   * According to the HLS SPEC:\n   * When synchronizing WebVTT with PES timestamps, clients SHOULD account\n   * for cases where the 33-bit PES timestamps have wrapped and the WebVTT\n   * cue times have not.  When the PES timestamp wraps, the WebVTT Segment\n   * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT\n   * time to the new (low valued) PES timestamp.\n   *\n   * So we want to handle rollover here and align VTT Cue start/end time to the player's time.\n   */\n\n  handleRollover_(value, reference) {\n    if (reference === null) {\n      return value;\n    }\n    let valueIn90khz = value * ONE_SECOND_IN_TS;\n    const referenceIn90khz = reference * ONE_SECOND_IN_TS;\n    let offset;\n    if (referenceIn90khz < valueIn90khz) {\n      // - 2^33\n      offset = -8589934592;\n    } else {\n      // + 2^33\n      offset = 8589934592;\n    } // distance(value - reference) > 2^32\n\n    while (Math.abs(valueIn90khz - referenceIn90khz) > 4294967296) {\n      valueIn90khz += offset;\n    }\n    return valueIn90khz / ONE_SECOND_IN_TS;\n  }\n}\n\n/**\n * @file ad-cue-tags.js\n */\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n *        the track to find the cue for\n *\n * @param {number} mediaTime\n *        the time to find the cue at\n *\n * @return {Object|null}\n *         the found cue or null\n */\n\nconst findAdCue = function (track, mediaTime) {\n  const cues = track.cues;\n  for (let i = 0; i < cues.length; i++) {\n    const cue = cues[i];\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n      return cue;\n    }\n  }\n  return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n  if (!media.segments) {\n    return;\n  }\n  let mediaTime = offset;\n  let cue;\n  for (let i = 0; i < media.segments.length; i++) {\n    const segment = media.segments[i];\n    if (!cue) {\n      // Since the cues will span for at least the segment duration, adding a fudge\n      // factor of half segment duration will prevent duplicate cues from being\n      // created when timing info is not exact (e.g. cue start time initialized\n      // at 10.006677, but next call mediaTime is 10.003332 )\n      cue = findAdCue(track, mediaTime + segment.duration / 2);\n    }\n    if (cue) {\n      if ('cueIn' in segment) {\n        // Found a CUE-IN so end the cue\n        cue.endTime = mediaTime;\n        cue.adEndTime = mediaTime;\n        mediaTime += segment.duration;\n        cue = null;\n        continue;\n      }\n      if (mediaTime < cue.endTime) {\n        // Already processed this mediaTime for this cue\n        mediaTime += segment.duration;\n        continue;\n      } // otherwise extend cue until a CUE-IN is found\n\n      cue.endTime += segment.duration;\n    } else {\n      if ('cueOut' in segment) {\n        cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n        cue.adStartTime = mediaTime; // Assumes tag format to be\n        // #EXT-X-CUE-OUT:30\n\n        cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n        track.addCue(cue);\n      }\n      if ('cueOutCont' in segment) {\n        // Entered into the middle of an ad cue\n        // Assumes tag formate to be\n        // #EXT-X-CUE-OUT-CONT:10/30\n        const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n        cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n        cue.adStartTime = mediaTime - adOffset;\n        cue.adEndTime = cue.adStartTime + adTotal;\n        track.addCue(cue);\n      }\n    }\n    mediaTime += segment.duration;\n  }\n};\nclass SyncInfo {\n  /**\n   * @param {number} start - media sequence start\n   * @param {number} end - media sequence end\n   * @param {number} segmentIndex - index for associated segment\n   * @param {number|null} [partIndex] - index for associated part\n   * @param {boolean} [appended] - appended indicator\n   *\n   */\n  constructor({\n    start,\n    end,\n    segmentIndex,\n    partIndex = null,\n    appended = false\n  }) {\n    this.start_ = start;\n    this.end_ = end;\n    this.segmentIndex_ = segmentIndex;\n    this.partIndex_ = partIndex;\n    this.appended_ = appended;\n  }\n  isInRange(targetTime) {\n    return targetTime >= this.start && targetTime < this.end;\n  }\n  markAppended() {\n    this.appended_ = true;\n  }\n  resetAppendedStatus() {\n    this.appended_ = false;\n  }\n  get isAppended() {\n    return this.appended_;\n  }\n  get start() {\n    return this.start_;\n  }\n  get end() {\n    return this.end_;\n  }\n  get segmentIndex() {\n    return this.segmentIndex_;\n  }\n  get partIndex() {\n    return this.partIndex_;\n  }\n}\nclass SyncInfoData {\n  /**\n   *\n   * @param {SyncInfo} segmentSyncInfo - sync info for a given segment\n   * @param {Array<SyncInfo>} [partsSyncInfo] - sync infos for a list of parts for a given segment\n   */\n  constructor(segmentSyncInfo, partsSyncInfo = []) {\n    this.segmentSyncInfo_ = segmentSyncInfo;\n    this.partsSyncInfo_ = partsSyncInfo;\n  }\n  get segmentSyncInfo() {\n    return this.segmentSyncInfo_;\n  }\n  get partsSyncInfo() {\n    return this.partsSyncInfo_;\n  }\n  get hasPartsSyncInfo() {\n    return this.partsSyncInfo_.length > 0;\n  }\n  resetAppendStatus() {\n    this.segmentSyncInfo_.resetAppendedStatus();\n    this.partsSyncInfo_.forEach(partSyncInfo => partSyncInfo.resetAppendedStatus());\n  }\n}\nclass MediaSequenceSync {\n  constructor() {\n    /**\n     * @type {Map<number, SyncInfoData>}\n     * @protected\n     */\n    this.storage_ = new Map();\n    this.diagnostics_ = '';\n    this.isReliable_ = false;\n    this.start_ = -Infinity;\n    this.end_ = Infinity;\n  }\n  get start() {\n    return this.start_;\n  }\n  get end() {\n    return this.end_;\n  }\n  get diagnostics() {\n    return this.diagnostics_;\n  }\n  get isReliable() {\n    return this.isReliable_;\n  }\n  resetAppendedStatus() {\n    this.storage_.forEach(syncInfoData => syncInfoData.resetAppendStatus());\n  }\n  /**\n   * update sync storage\n   *\n   * @param {Object} playlist\n   * @param {number} currentTime\n   *\n   * @return {void}\n   */\n\n  update(playlist, currentTime) {\n    const {\n      mediaSequence,\n      segments\n    } = playlist;\n    this.isReliable_ = this.isReliablePlaylist_(mediaSequence, segments);\n    if (!this.isReliable_) {\n      return;\n    }\n    return this.updateStorage_(segments, mediaSequence, this.calculateBaseTime_(mediaSequence, segments, currentTime));\n  }\n  /**\n   * @param {number} targetTime\n   * @return {SyncInfo|null}\n   */\n\n  getSyncInfoForTime(targetTime) {\n    for (const {\n      segmentSyncInfo,\n      partsSyncInfo\n    } of this.storage_.values()) {\n      // Normal segment flow:\n      if (!partsSyncInfo.length) {\n        if (segmentSyncInfo.isInRange(targetTime)) {\n          return segmentSyncInfo;\n        }\n      } else {\n        // Low latency flow:\n        for (const partSyncInfo of partsSyncInfo) {\n          if (partSyncInfo.isInRange(targetTime)) {\n            return partSyncInfo;\n          }\n        }\n      }\n    }\n    return null;\n  }\n  getSyncInfoForMediaSequence(mediaSequence) {\n    return this.storage_.get(mediaSequence);\n  }\n  updateStorage_(segments, startingMediaSequence, startingTime) {\n    const newStorage = new Map();\n    let newDiagnostics = '\\n';\n    let currentStart = startingTime;\n    let currentMediaSequence = startingMediaSequence;\n    this.start_ = currentStart;\n    segments.forEach((segment, segmentIndex) => {\n      const prevSyncInfoData = this.storage_.get(currentMediaSequence);\n      const segmentStart = currentStart;\n      const segmentEnd = segmentStart + segment.duration;\n      const segmentIsAppended = Boolean(prevSyncInfoData && prevSyncInfoData.segmentSyncInfo && prevSyncInfoData.segmentSyncInfo.isAppended);\n      const segmentSyncInfo = new SyncInfo({\n        start: segmentStart,\n        end: segmentEnd,\n        appended: segmentIsAppended,\n        segmentIndex\n      });\n      segment.syncInfo = segmentSyncInfo;\n      let currentPartStart = currentStart;\n      const partsSyncInfo = (segment.parts || []).map((part, partIndex) => {\n        const partStart = currentPartStart;\n        const partEnd = currentPartStart + part.duration;\n        const partIsAppended = Boolean(prevSyncInfoData && prevSyncInfoData.partsSyncInfo && prevSyncInfoData.partsSyncInfo[partIndex] && prevSyncInfoData.partsSyncInfo[partIndex].isAppended);\n        const partSyncInfo = new SyncInfo({\n          start: partStart,\n          end: partEnd,\n          appended: partIsAppended,\n          segmentIndex,\n          partIndex\n        });\n        currentPartStart = partEnd;\n        newDiagnostics += `Media Sequence: ${currentMediaSequence}.${partIndex} | Range: ${partStart} --> ${partEnd} | Appended: ${partIsAppended}\\n`;\n        part.syncInfo = partSyncInfo;\n        return partSyncInfo;\n      });\n      newStorage.set(currentMediaSequence, new SyncInfoData(segmentSyncInfo, partsSyncInfo));\n      newDiagnostics += `${compactSegmentUrlDescription(segment.resolvedUri)} | Media Sequence: ${currentMediaSequence} | Range: ${segmentStart} --> ${segmentEnd} | Appended: ${segmentIsAppended}\\n`;\n      currentMediaSequence++;\n      currentStart = segmentEnd;\n    });\n    this.end_ = currentStart;\n    this.storage_ = newStorage;\n    this.diagnostics_ = newDiagnostics;\n  }\n  calculateBaseTime_(mediaSequence, segments, fallback) {\n    if (!this.storage_.size) {\n      // Initial setup flow.\n      return 0;\n    }\n    if (this.storage_.has(mediaSequence)) {\n      // Normal flow.\n      return this.storage_.get(mediaSequence).segmentSyncInfo.start;\n    }\n    const minMediaSequenceFromStorage = Math.min(...this.storage_.keys()); // This case captures a race condition that can occur if we switch to a new media playlist that is out of date\n    // and still has an older Media Sequence. If this occurs, we extrapolate backwards to get the base time.\n\n    if (mediaSequence < minMediaSequenceFromStorage) {\n      const mediaSequenceDiff = minMediaSequenceFromStorage - mediaSequence;\n      let baseTime = this.storage_.get(minMediaSequenceFromStorage).segmentSyncInfo.start;\n      for (let i = 0; i < mediaSequenceDiff; i++) {\n        const segment = segments[i];\n        baseTime -= segment.duration;\n      }\n      return baseTime;\n    } // Fallback flow.\n    // There is a gap between last recorded playlist and a new one received.\n\n    return fallback;\n  }\n  isReliablePlaylist_(mediaSequence, segments) {\n    return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;\n  }\n}\nclass DependantMediaSequenceSync extends MediaSequenceSync {\n  constructor(parent) {\n    super();\n    this.parent_ = parent;\n  }\n  calculateBaseTime_(mediaSequence, segments, fallback) {\n    if (!this.storage_.size) {\n      const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);\n      if (info) {\n        return info.segmentSyncInfo.start;\n      }\n      return 0;\n    }\n    return super.calculateBaseTime_(mediaSequence, segments, fallback);\n  }\n}\n\n/**\n * @file sync-controller.js\n */\n// synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst syncPointStrategies = [\n// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n//                the equivalence display-time 0 === segment-index 0\n{\n  name: 'VOD',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (duration !== Infinity) {\n      const syncPoint = {\n        time: 0,\n        segmentIndex: 0,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n    return null;\n  }\n}, {\n  name: 'MediaSequence',\n  /**\n   * run media sequence strategy\n   *\n   * @param {SyncController} syncController\n   * @param {Object} playlist\n   * @param {number} duration\n   * @param {number} currentTimeline\n   * @param {number} currentTime\n   * @param {string} type\n   */\n  run: (syncController, playlist, duration, currentTimeline, currentTime, type) => {\n    const mediaSequenceSync = syncController.getMediaSequenceSync(type);\n    if (!mediaSequenceSync) {\n      return null;\n    }\n    if (!mediaSequenceSync.isReliable) {\n      return null;\n    }\n    const syncInfo = mediaSequenceSync.getSyncInfoForTime(currentTime);\n    if (!syncInfo) {\n      return null;\n    }\n    return {\n      time: syncInfo.start,\n      partIndex: syncInfo.partIndex,\n      segmentIndex: syncInfo.segmentIndex\n    };\n  }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n  name: 'ProgramDateTime',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n      return null;\n    }\n    let syncPoint = null;\n    let lastDistance = null;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    currentTime = currentTime || 0;\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n      if (!datetimeMapping || !segment.dateTimeObject) {\n        continue;\n      }\n      const segmentTime = segment.dateTimeObject.getTime() / 1000;\n      let start = segmentTime + datetimeMapping; // take part duration into account.\n\n      if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n        for (let z = 0; z < partAndSegment.partIndex; z++) {\n          start += segment.parts[z].duration;\n        }\n      }\n      const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n      // currentTime and can stop looking for better candidates\n\n      if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n        break;\n      }\n      lastDistance = distance;\n      syncPoint = {\n        time: start,\n        segmentIndex: partAndSegment.segmentIndex,\n        partIndex: partAndSegment.partIndex\n      };\n    }\n    return syncPoint;\n  }\n},\n// Stategy \"Segment\": We have a known time mapping for a timeline and a\n//                    segment in the current timeline with timing data\n{\n  name: 'Segment',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    let lastDistance = null;\n    currentTime = currentTime || 0;\n    const partsAndSegments = getPartsAndSegments(playlist);\n    for (let i = 0; i < partsAndSegments.length; i++) {\n      // start from the end and loop backwards for live\n      // or start from the front and loop forwards for non-live\n      const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n      const partAndSegment = partsAndSegments[index];\n      const segment = partAndSegment.segment;\n      const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n      if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n        const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n        // currentTime and can stop looking for better candidates\n\n        if (lastDistance !== null && lastDistance < distance) {\n          break;\n        }\n        if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n          lastDistance = distance;\n          syncPoint = {\n            time: start,\n            segmentIndex: partAndSegment.segmentIndex,\n            partIndex: partAndSegment.partIndex\n          };\n        }\n      }\n    }\n    return syncPoint;\n  }\n},\n// Stategy \"Discontinuity\": We have a discontinuity with a known\n//                          display-time\n{\n  name: 'Discontinuity',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    let syncPoint = null;\n    currentTime = currentTime || 0;\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      let lastDistance = null;\n      for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const discontinuitySync = syncController.discontinuities[discontinuity];\n        if (discontinuitySync) {\n          const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n          // currentTime and can stop looking for better candidates\n\n          if (lastDistance !== null && lastDistance < distance) {\n            break;\n          }\n          if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n            lastDistance = distance;\n            syncPoint = {\n              time: discontinuitySync.time,\n              segmentIndex,\n              partIndex: null\n            };\n          }\n        }\n      }\n    }\n    return syncPoint;\n  }\n},\n// Stategy \"Playlist\": We have a playlist with a known mapping of\n//                     segment index to display time\n{\n  name: 'Playlist',\n  run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n    if (playlist.syncInfo) {\n      const syncPoint = {\n        time: playlist.syncInfo.time,\n        segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n        partIndex: null\n      };\n      return syncPoint;\n    }\n    return null;\n  }\n}];\nclass SyncController extends videojs.EventTarget {\n  constructor(options = {}) {\n    super(); // ...for synching across variants\n\n    this.timelines = [];\n    this.discontinuities = [];\n    this.timelineToDatetimeMappings = {}; // TODO: this map should be only available for HLS. Since only HLS has MediaSequence.\n    //  For some reason this map helps with syncing between quality switch for MPEG-DASH as well.\n    //  Moreover if we disable this map for MPEG-DASH - quality switch will be broken.\n    //  MPEG-DASH should have its own separate sync strategy\n\n    const main = new MediaSequenceSync();\n    const audio = new DependantMediaSequenceSync(main);\n    const vtt = new DependantMediaSequenceSync(main);\n    this.mediaSequenceStorage_ = {\n      main,\n      audio,\n      vtt\n    };\n    this.logger_ = logger('SyncController');\n  }\n  /**\n   *\n   * @param {string} loaderType\n   * @return {MediaSequenceSync|null}\n   */\n\n  getMediaSequenceSync(loaderType) {\n    return this.mediaSequenceStorage_[loaderType] || null;\n  }\n  /**\n   * Find a sync-point for the playlist specified\n   *\n   * A sync-point is defined as a known mapping from display-time to\n   * a segment-index in the current playlist.\n   *\n   * @param {Playlist} playlist\n   *        The playlist that needs a sync-point\n   * @param {number} duration\n   *        Duration of the MediaSource (Infinite if playing a live source)\n   * @param {number} currentTimeline\n   *        The last timeline from which a segment was loaded\n   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Object}\n   *          A sync-point object\n   */\n\n  getSyncPoint(playlist, duration, currentTimeline, currentTime, type) {\n    // Always use VOD sync point for VOD\n    if (duration !== Infinity) {\n      const vodSyncPointStrategy = syncPointStrategies.find(({\n        name\n      }) => name === 'VOD');\n      return vodSyncPointStrategy.run(this, playlist, duration);\n    }\n    const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime, type);\n    if (!syncPoints.length) {\n      // Signal that we need to attempt to get a sync-point manually\n      // by fetching a segment in the playlist and constructing\n      // a sync-point from that information\n      return null;\n    } // If we have exact match just return it instead of finding the nearest distance\n\n    for (const syncPointInfo of syncPoints) {\n      const {\n        syncPoint,\n        strategy\n      } = syncPointInfo;\n      const {\n        segmentIndex,\n        time\n      } = syncPoint;\n      if (segmentIndex < 0) {\n        continue;\n      }\n      const selectedSegment = playlist.segments[segmentIndex];\n      const start = time;\n      const end = start + selectedSegment.duration;\n      this.logger_(`Strategy: ${strategy}. Current time: ${currentTime}. selected segment: ${segmentIndex}. Time: [${start} -> ${end}]}`);\n      if (currentTime >= start && currentTime < end) {\n        this.logger_('Found sync point with exact match: ', syncPoint);\n        return syncPoint;\n      }\n    } // Now find the sync-point that is closest to the currentTime because\n    // that should result in the most accurate guess about which segment\n    // to fetch\n\n    return this.selectSyncPoint_(syncPoints, {\n      key: 'time',\n      value: currentTime\n    });\n  }\n  /**\n   * Calculate the amount of time that has expired off the playlist during playback\n   *\n   * @param {Playlist} playlist\n   *        Playlist object to calculate expired from\n   * @param {number} duration\n   *        Duration of the MediaSource (Infinity if playling a live source)\n   * @return {number|null}\n   *          The amount of time that has expired off the playlist during playback. Null\n   *          if no sync-points for the playlist can be found.\n   */\n\n  getExpiredTime(playlist, duration) {\n    if (!playlist || !playlist.segments) {\n      return null;\n    }\n    const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\n\n    if (!syncPoints.length) {\n      return null;\n    }\n    const syncPoint = this.selectSyncPoint_(syncPoints, {\n      key: 'segmentIndex',\n      value: 0\n    }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n    // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n    if (syncPoint.segmentIndex > 0) {\n      syncPoint.time *= -1;\n    }\n    return Math.abs(syncPoint.time + sumDurations({\n      defaultDuration: playlist.targetDuration,\n      durationList: playlist.segments,\n      startIndex: syncPoint.segmentIndex,\n      endIndex: 0\n    }));\n  }\n  /**\n   * Runs each sync-point strategy and returns a list of sync-points returned by the\n   * strategies\n   *\n   * @private\n   * @param {Playlist} playlist\n   *        The playlist that needs a sync-point\n   * @param {number} duration\n   *        Duration of the MediaSource (Infinity if playing a live source)\n   * @param {number} currentTimeline\n   *        The last timeline from which a segment was loaded\n   * @param {number} currentTime\n   *        Current player's time\n   * @param {string} type\n   *        Segment loader type\n   * @return {Array}\n   *          A list of sync-point objects\n   */\n\n  runStrategies_(playlist, duration, currentTimeline, currentTime, type) {\n    const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n    for (let i = 0; i < syncPointStrategies.length; i++) {\n      const strategy = syncPointStrategies[i];\n      const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime, type);\n      if (syncPoint) {\n        syncPoint.strategy = strategy.name;\n        syncPoints.push({\n          strategy: strategy.name,\n          syncPoint\n        });\n      }\n    }\n    return syncPoints;\n  }\n  /**\n   * Selects the sync-point nearest the specified target\n   *\n   * @private\n   * @param {Array} syncPoints\n   *        List of sync-points to select from\n   * @param {Object} target\n   *        Object specifying the property and value we are targeting\n   * @param {string} target.key\n   *        Specifies the property to target. Must be either 'time' or 'segmentIndex'\n   * @param {number} target.value\n   *        The value to target for the specified key.\n   * @return {Object}\n   *          The sync-point nearest the target\n   */\n\n  selectSyncPoint_(syncPoints, target) {\n    let bestSyncPoint = syncPoints[0].syncPoint;\n    let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n    let bestStrategy = syncPoints[0].strategy;\n    for (let i = 1; i < syncPoints.length; i++) {\n      const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n      if (newDistance < bestDistance) {\n        bestDistance = newDistance;\n        bestSyncPoint = syncPoints[i].syncPoint;\n        bestStrategy = syncPoints[i].strategy;\n      }\n    }\n    this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']');\n    return bestSyncPoint;\n  }\n  /**\n   * Save any meta-data present on the segments when segments leave\n   * the live window to the playlist to allow for synchronization at the\n   * playlist level later.\n   *\n   * @param {Playlist} oldPlaylist - The previous active playlist\n   * @param {Playlist} newPlaylist - The updated and most current playlist\n   */\n\n  saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n    const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n    if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n      videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`);\n      return;\n    } // When a segment expires from the playlist and it has a start time\n    // save that information as a possible sync-point reference in future\n\n    for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n      const lastRemovedSegment = oldPlaylist.segments[i];\n      if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n        newPlaylist.syncInfo = {\n          mediaSequence: oldPlaylist.mediaSequence + i,\n          time: lastRemovedSegment.start\n        };\n        this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`);\n        this.trigger('syncinfoupdate');\n        break;\n      }\n    }\n  }\n  /**\n   * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n   * before segments start to load.\n   *\n   * @param {Playlist} playlist - The currently active playlist\n   */\n\n  setDateTimeMappingForStart(playlist) {\n    // It's possible for the playlist to be updated before playback starts, meaning time\n    // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n    // crossed, then the old time zero mapping (for the prior timeline) would be retained\n    // unless the mappings are cleared.\n    this.timelineToDatetimeMappings = {};\n    if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n      const firstSegment = playlist.segments[0];\n      const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n      this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n    }\n  }\n  /**\n   * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n   * based on the latest timing information.\n   *\n   * @param {Object} options\n   *        Options object\n   * @param {SegmentInfo} options.segmentInfo\n   *        The current active request information\n   * @param {boolean} options.shouldSaveTimelineMapping\n   *        If there's a timeline change, determines if the timeline mapping should be\n   *        saved for timeline mapping and program date time mappings.\n   */\n\n  saveSegmentTimingInfo({\n    segmentInfo,\n    shouldSaveTimelineMapping\n  }) {\n    const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n    const segment = segmentInfo.segment;\n    if (didCalculateSegmentTimeMapping) {\n      this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n      // now with segment timing information\n\n      if (!segmentInfo.playlist.syncInfo) {\n        segmentInfo.playlist.syncInfo = {\n          mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n          time: segment.start\n        };\n      }\n    }\n    const dateTime = segment.dateTimeObject;\n    if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n      this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n    }\n  }\n  timestampOffsetForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n    return this.timelines[timeline].time;\n  }\n  mappingForTimeline(timeline) {\n    if (typeof this.timelines[timeline] === 'undefined') {\n      return null;\n    }\n    return this.timelines[timeline].mapping;\n  }\n  /**\n   * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n   * save that display time to the segment.\n   *\n   * @private\n   * @param {SegmentInfo} segmentInfo\n   *        The current active request information\n   * @param {Object} timingInfo\n   *        The start and end time of the current segment in \"media time\"\n   * @param {boolean} shouldSaveTimelineMapping\n   *        If there's a timeline change, determines if the timeline mapping should be\n   *        saved in timelines.\n   * @return {boolean}\n   *          Returns false if segment time mapping could not be calculated\n   */\n\n  calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n    // TODO: remove side effects\n    const segment = segmentInfo.segment;\n    const part = segmentInfo.part;\n    let mappingObj = this.timelines[segmentInfo.timeline];\n    let start;\n    let end;\n    if (typeof segmentInfo.timestampOffset === 'number') {\n      mappingObj = {\n        time: segmentInfo.startOfSegment,\n        mapping: segmentInfo.startOfSegment - timingInfo.start\n      };\n      if (shouldSaveTimelineMapping) {\n        this.timelines[segmentInfo.timeline] = mappingObj;\n        this.trigger('timestampoffset');\n        this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n      }\n      start = segmentInfo.startOfSegment;\n      end = timingInfo.end + mappingObj.mapping;\n    } else if (mappingObj) {\n      start = timingInfo.start + mappingObj.mapping;\n      end = timingInfo.end + mappingObj.mapping;\n    } else {\n      return false;\n    }\n    if (part) {\n      part.start = start;\n      part.end = end;\n    } // If we don't have a segment start yet or the start value we got\n    // is less than our current segment.start value, save a new start value.\n    // We have to do this because parts will have segment timing info saved\n    // multiple times and we want segment start to be the earliest part start\n    // value for that segment.\n\n    if (!segment.start || start < segment.start) {\n      segment.start = start;\n    }\n    segment.end = end;\n    return true;\n  }\n  /**\n   * Each time we have discontinuity in the playlist, attempt to calculate the location\n   * in display of the start of the discontinuity and save that. We also save an accuracy\n   * value so that we save values with the most accuracy (closest to 0.)\n   *\n   * @private\n   * @param {SegmentInfo} segmentInfo - The current active request information\n   */\n\n  saveDiscontinuitySyncInfo_(segmentInfo) {\n    const playlist = segmentInfo.playlist;\n    const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n    // the start of the range and it's accuracy is 0 (greater accuracy values\n    // mean more approximation)\n\n    if (segment.discontinuity) {\n      this.discontinuities[segment.timeline] = {\n        time: segment.start,\n        accuracy: 0\n      };\n    } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n      // Search for future discontinuities that we can provide better timing\n      // information for and save that information for sync purposes\n      for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n        const segmentIndex = playlist.discontinuityStarts[i];\n        const discontinuity = playlist.discontinuitySequence + i + 1;\n        const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n        const accuracy = Math.abs(mediaIndexDiff);\n        if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n          let time;\n          if (mediaIndexDiff < 0) {\n            time = segment.start - sumDurations({\n              defaultDuration: playlist.targetDuration,\n              durationList: playlist.segments,\n              startIndex: segmentInfo.mediaIndex,\n              endIndex: segmentIndex\n            });\n          } else {\n            time = segment.end + sumDurations({\n              defaultDuration: playlist.targetDuration,\n              durationList: playlist.segments,\n              startIndex: segmentInfo.mediaIndex + 1,\n              endIndex: segmentIndex\n            });\n          }\n          this.discontinuities[discontinuity] = {\n            time,\n            accuracy\n          };\n        }\n      }\n    }\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.off();\n  }\n}\n\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\n\nclass TimelineChangeController extends videojs.EventTarget {\n  constructor() {\n    super();\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n  }\n  clearPendingTimelineChange(type) {\n    this.pendingTimelineChanges_[type] = null;\n    this.trigger('pendingtimelinechange');\n  }\n  pendingTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.pendingTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      this.trigger('pendingtimelinechange');\n    }\n    return this.pendingTimelineChanges_[type];\n  }\n  lastTimelineChange({\n    type,\n    from,\n    to\n  }) {\n    if (typeof from === 'number' && typeof to === 'number') {\n      this.lastTimelineChanges_[type] = {\n        type,\n        from,\n        to\n      };\n      delete this.pendingTimelineChanges_[type];\n      const metadata = {\n        timelineChangeInfo: {\n          from,\n          to\n        }\n      };\n      this.trigger({\n        type: 'timelinechange',\n        metadata\n      });\n    }\n    return this.lastTimelineChanges_[type];\n  }\n  dispose() {\n    this.trigger('dispose');\n    this.pendingTimelineChanges_ = {};\n    this.lastTimelineChanges_ = {};\n    this.off();\n  }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst workerCode = transform(getWorkerString(function () {\n  /**\n   * @file stream.js\n   */\n\n  /**\n   * A lightweight readable stream implemention that handles event dispatching.\n   *\n   * @class Stream\n   */\n\n  var Stream = /*#__PURE__*/function () {\n    function Stream() {\n      this.listeners = {};\n    }\n    /**\n     * Add a listener for a specified event type.\n     *\n     * @param {string} type the event name\n     * @param {Function} listener the callback to be invoked when an event of\n     * the specified type occurs\n     */\n\n    var _proto = Stream.prototype;\n    _proto.on = function on(type, listener) {\n      if (!this.listeners[type]) {\n        this.listeners[type] = [];\n      }\n      this.listeners[type].push(listener);\n    }\n    /**\n     * Remove a listener for a specified event type.\n     *\n     * @param {string} type the event name\n     * @param {Function} listener  a function previously registered for this\n     * type of event through `on`\n     * @return {boolean} if we could turn it off or not\n     */;\n    _proto.off = function off(type, listener) {\n      if (!this.listeners[type]) {\n        return false;\n      }\n      var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n      // In Video.js we slice listener functions\n      // on trigger so that it does not mess up the order\n      // while we loop through.\n      //\n      // Here we slice on off so that the loop in trigger\n      // can continue using it's old reference to loop without\n      // messing up the order.\n\n      this.listeners[type] = this.listeners[type].slice(0);\n      this.listeners[type].splice(index, 1);\n      return index > -1;\n    }\n    /**\n     * Trigger an event of the specified type on this stream. Any additional\n     * arguments to this function are passed as parameters to event listeners.\n     *\n     * @param {string} type the event name\n     */;\n    _proto.trigger = function trigger(type) {\n      var callbacks = this.listeners[type];\n      if (!callbacks) {\n        return;\n      } // Slicing the arguments on every invocation of this method\n      // can add a significant amount of overhead. Avoid the\n      // intermediate object creation for the common case of a\n      // single callback argument\n\n      if (arguments.length === 2) {\n        var length = callbacks.length;\n        for (var i = 0; i < length; ++i) {\n          callbacks[i].call(this, arguments[1]);\n        }\n      } else {\n        var args = Array.prototype.slice.call(arguments, 1);\n        var _length = callbacks.length;\n        for (var _i = 0; _i < _length; ++_i) {\n          callbacks[_i].apply(this, args);\n        }\n      }\n    }\n    /**\n     * Destroys the stream and cleans up.\n     */;\n    _proto.dispose = function dispose() {\n      this.listeners = {};\n    }\n    /**\n     * Forwards all `data` events on this stream to the destination stream. The\n     * destination stream should provide a method `push` to receive the data\n     * events as they arrive.\n     *\n     * @param {Stream} destination the stream that will receive all `data` events\n     * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n     */;\n    _proto.pipe = function pipe(destination) {\n      this.on('data', function (data) {\n        destination.push(data);\n      });\n    };\n    return Stream;\n  }();\n  /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n  /**\n   * Returns the subarray of a Uint8Array without PKCS#7 padding.\n   *\n   * @param padded {Uint8Array} unencrypted bytes that have been padded\n   * @return {Uint8Array} the unpadded bytes\n   * @see http://tools.ietf.org/html/rfc5652\n   */\n\n  function unpad(padded) {\n    return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n  }\n  /*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */\n\n  /**\n   * @file aes.js\n   *\n   * This file contains an adaptation of the AES decryption algorithm\n   * from the Standford Javascript Cryptography Library. That work is\n   * covered by the following copyright and permissions notice:\n   *\n   * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n   * All rights reserved.\n   *\n   * Redistribution and use in source and binary forms, with or without\n   * modification, are permitted provided that the following conditions are\n   * met:\n   *\n   * 1. Redistributions of source code must retain the above copyright\n   *    notice, this list of conditions and the following disclaimer.\n   *\n   * 2. Redistributions in binary form must reproduce the above\n   *    copyright notice, this list of conditions and the following\n   *    disclaimer in the documentation and/or other materials provided\n   *    with the distribution.\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n   * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n   * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n   * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * The views and conclusions contained in the software and documentation\n   * are those of the authors and should not be interpreted as representing\n   * official policies, either expressed or implied, of the authors.\n   */\n\n  /**\n   * Expand the S-box tables.\n   *\n   * @private\n   */\n\n  const precompute = function () {\n    const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n    const encTable = tables[0];\n    const decTable = tables[1];\n    const sbox = encTable[4];\n    const sboxInv = decTable[4];\n    let i;\n    let x;\n    let xInv;\n    const d = [];\n    const th = [];\n    let x2;\n    let x4;\n    let x8;\n    let s;\n    let tEnc;\n    let tDec; // Compute double and third tables\n\n    for (i = 0; i < 256; i++) {\n      th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n    }\n    for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n      // Compute sbox\n      s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n      s = s >> 8 ^ s & 255 ^ 99;\n      sbox[x] = s;\n      sboxInv[s] = x; // Compute MixColumns\n\n      x8 = d[x4 = d[x2 = d[x]]];\n      tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n      tEnc = d[s] * 0x101 ^ s * 0x1010100;\n      for (i = 0; i < 4; i++) {\n        encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n        decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n      }\n    } // Compactify. Considerable speedup on Firefox.\n\n    for (i = 0; i < 5; i++) {\n      encTable[i] = encTable[i].slice(0);\n      decTable[i] = decTable[i].slice(0);\n    }\n    return tables;\n  };\n  let aesTables = null;\n  /**\n   * Schedule out an AES key for both encryption and decryption. This\n   * is a low-level class. Use a cipher mode to do bulk encryption.\n   *\n   * @class AES\n   * @param key {Array} The key as an array of 4, 6 or 8 words.\n   */\n\n  class AES {\n    constructor(key) {\n      /**\n      * The expanded S-box and inverse S-box tables. These will be computed\n      * on the client so that we don't have to send them down the wire.\n      *\n      * There are two tables, _tables[0] is for encryption and\n      * _tables[1] is for decryption.\n      *\n      * The first 4 sub-tables are the expanded S-box with MixColumns. The\n      * last (_tables[01][4]) is the S-box itself.\n      *\n      * @private\n      */\n      // if we have yet to precompute the S-box tables\n      // do so now\n      if (!aesTables) {\n        aesTables = precompute();\n      } // then make a copy of that object for use\n\n      this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n      let i;\n      let j;\n      let tmp;\n      const sbox = this._tables[0][4];\n      const decTable = this._tables[1];\n      const keyLen = key.length;\n      let rcon = 1;\n      if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n        throw new Error('Invalid aes key size');\n      }\n      const encKey = key.slice(0);\n      const decKey = [];\n      this._key = [encKey, decKey]; // schedule encryption keys\n\n      for (i = keyLen; i < 4 * keyLen + 28; i++) {\n        tmp = encKey[i - 1]; // apply sbox\n\n        if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n          tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n          if (i % keyLen === 0) {\n            tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n            rcon = rcon << 1 ^ (rcon >> 7) * 283;\n          }\n        }\n        encKey[i] = encKey[i - keyLen] ^ tmp;\n      } // schedule decryption keys\n\n      for (j = 0; i; j++, i--) {\n        tmp = encKey[j & 3 ? i : i - 4];\n        if (i <= 4 || j < 4) {\n          decKey[j] = tmp;\n        } else {\n          decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n        }\n      }\n    }\n    /**\n     * Decrypt 16 bytes, specified as four 32-bit words.\n     *\n     * @param {number} encrypted0 the first word to decrypt\n     * @param {number} encrypted1 the second word to decrypt\n     * @param {number} encrypted2 the third word to decrypt\n     * @param {number} encrypted3 the fourth word to decrypt\n     * @param {Int32Array} out the array to write the decrypted words\n     * into\n     * @param {number} offset the offset into the output array to start\n     * writing results\n     * @return {Array} The plaintext.\n     */\n\n    decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n      const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n      let a = encrypted0 ^ key[0];\n      let b = encrypted3 ^ key[1];\n      let c = encrypted2 ^ key[2];\n      let d = encrypted1 ^ key[3];\n      let a2;\n      let b2;\n      let c2; // key.length === 2 ?\n\n      const nInnerRounds = key.length / 4 - 2;\n      let i;\n      let kIndex = 4;\n      const table = this._tables[1]; // load up the tables\n\n      const table0 = table[0];\n      const table1 = table[1];\n      const table2 = table[2];\n      const table3 = table[3];\n      const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n      for (i = 0; i < nInnerRounds; i++) {\n        a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n        b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n        c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n        d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n        kIndex += 4;\n        a = a2;\n        b = b2;\n        c = c2;\n      } // Last round.\n\n      for (i = 0; i < 4; i++) {\n        out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n        a2 = a;\n        a = b;\n        b = c;\n        c = d;\n        d = a2;\n      }\n    }\n  }\n  /**\n   * @file async-stream.js\n   */\n\n  /**\n   * A wrapper around the Stream class to use setTimeout\n   * and run stream \"jobs\" Asynchronously\n   *\n   * @class AsyncStream\n   * @extends Stream\n   */\n\n  class AsyncStream extends Stream {\n    constructor() {\n      super(Stream);\n      this.jobs = [];\n      this.delay = 1;\n      this.timeout_ = null;\n    }\n    /**\n     * process an async job\n     *\n     * @private\n     */\n\n    processJob_() {\n      this.jobs.shift()();\n      if (this.jobs.length) {\n        this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n      } else {\n        this.timeout_ = null;\n      }\n    }\n    /**\n     * push a job into the stream\n     *\n     * @param {Function} job the job to push into the stream\n     */\n\n    push(job) {\n      this.jobs.push(job);\n      if (!this.timeout_) {\n        this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n      }\n    }\n  }\n  /**\n   * @file decrypter.js\n   *\n   * An asynchronous implementation of AES-128 CBC decryption with\n   * PKCS#7 padding.\n   */\n\n  /**\n   * Convert network-order (big-endian) bytes into their little-endian\n   * representation.\n   */\n\n  const ntoh = function (word) {\n    return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n  };\n  /**\n   * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n   *\n   * @param {Uint8Array} encrypted the encrypted bytes\n   * @param {Uint32Array} key the bytes of the decryption key\n   * @param {Uint32Array} initVector the initialization vector (IV) to\n   * use for the first round of CBC.\n   * @return {Uint8Array} the decrypted bytes\n   *\n   * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n   * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n   * @see https://tools.ietf.org/html/rfc2315\n   */\n\n  const decrypt = function (encrypted, key, initVector) {\n    // word-level access to the encrypted bytes\n    const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n    const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n    const decrypted = new Uint8Array(encrypted.byteLength);\n    const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n    // decrypted data\n\n    let init0;\n    let init1;\n    let init2;\n    let init3;\n    let encrypted0;\n    let encrypted1;\n    let encrypted2;\n    let encrypted3; // iteration variable\n\n    let wordIx; // pull out the words of the IV to ensure we don't modify the\n    // passed-in reference and easier access\n\n    init0 = initVector[0];\n    init1 = initVector[1];\n    init2 = initVector[2];\n    init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n    // to each decrypted block\n\n    for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n      // convert big-endian (network order) words into little-endian\n      // (javascript order)\n      encrypted0 = ntoh(encrypted32[wordIx]);\n      encrypted1 = ntoh(encrypted32[wordIx + 1]);\n      encrypted2 = ntoh(encrypted32[wordIx + 2]);\n      encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n      decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n      // plaintext\n\n      decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n      decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n      decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n      decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n      init0 = encrypted0;\n      init1 = encrypted1;\n      init2 = encrypted2;\n      init3 = encrypted3;\n    }\n    return decrypted;\n  };\n  /**\n   * The `Decrypter` class that manages decryption of AES\n   * data through `AsyncStream` objects and the `decrypt`\n   * function\n   *\n   * @param {Uint8Array} encrypted the encrypted bytes\n   * @param {Uint32Array} key the bytes of the decryption key\n   * @param {Uint32Array} initVector the initialization vector (IV) to\n   * @param {Function} done the function to run when done\n   * @class Decrypter\n   */\n\n  class Decrypter {\n    constructor(encrypted, key, initVector, done) {\n      const step = Decrypter.STEP;\n      const encrypted32 = new Int32Array(encrypted.buffer);\n      const decrypted = new Uint8Array(encrypted.byteLength);\n      let i = 0;\n      this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n      this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n      for (i = step; i < encrypted32.length; i += step) {\n        initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n        this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n      } // invoke the done() callback when everything is finished\n\n      this.asyncStream_.push(function () {\n        // remove pkcs#7 padding from the decrypted bytes\n        done(null, unpad(decrypted));\n      });\n    }\n    /**\n     * a getter for step the maximum number of bytes to process at one time\n     *\n     * @return {number} the value of step 32000\n     */\n\n    static get STEP() {\n      // 4 * 8000;\n      return 32000;\n    }\n    /**\n     * @private\n     */\n\n    decryptChunk_(encrypted, key, initVector, decrypted) {\n      return function () {\n        const bytes = decrypt(encrypted, key, initVector);\n        decrypted.set(bytes, encrypted.byteOffset);\n      };\n    }\n  }\n  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n  var win;\n  if (typeof window !== \"undefined\") {\n    win = window;\n  } else if (typeof commonjsGlobal !== \"undefined\") {\n    win = commonjsGlobal;\n  } else if (typeof self !== \"undefined\") {\n    win = self;\n  } else {\n    win = {};\n  }\n  var window_1 = win;\n  var isArrayBufferView = function isArrayBufferView(obj) {\n    if (ArrayBuffer.isView === 'function') {\n      return ArrayBuffer.isView(obj);\n    }\n    return obj && obj.buffer instanceof ArrayBuffer;\n  };\n  var BigInt = window_1.BigInt || Number;\n  [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n  (function () {\n    var a = new Uint16Array([0xFFCC]);\n    var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n    if (b[0] === 0xFF) {\n      return 'big';\n    }\n    if (b[0] === 0xCC) {\n      return 'little';\n    }\n    return 'unknown';\n  })();\n  /**\n   * Creates an object for sending to a web worker modifying properties that are TypedArrays\n   * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n   *\n   * @param {Object} message\n   *        Object of properties and values to send to the web worker\n   * @return {Object}\n   *         Modified message with TypedArray values expanded\n   * @function createTransferableMessage\n   */\n\n  const createTransferableMessage = function (message) {\n    const transferable = {};\n    Object.keys(message).forEach(key => {\n      const value = message[key];\n      if (isArrayBufferView(value)) {\n        transferable[key] = {\n          bytes: value.buffer,\n          byteOffset: value.byteOffset,\n          byteLength: value.byteLength\n        };\n      } else {\n        transferable[key] = value;\n      }\n    });\n    return transferable;\n  };\n  /* global self */\n\n  /**\n   * Our web worker interface so that things can talk to aes-decrypter\n   * that will be running in a web worker. the scope is passed to this by\n   * webworkify.\n   */\n\n  self.onmessage = function (event) {\n    const data = event.data;\n    const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n    const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n    const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n    /* eslint-disable no-new, handle-callback-err */\n\n    new Decrypter(encrypted, key, iv, function (err, bytes) {\n      self.postMessage(createTransferableMessage({\n        source: data.source,\n        decrypted: bytes\n      }), [bytes.buffer]);\n    });\n    /* eslint-enable */\n  };\n}));\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nconst audioTrackKind_ = properties => {\n  let kind = properties.default ? 'main' : 'alternative';\n  if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n    kind = 'main-desc';\n  }\n  return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n *        SegmentLoader to pause\n * @param {Object} mediaType\n *        Active media type\n * @function stopLoaders\n */\n\nconst stopLoaders = (segmentLoader, mediaType) => {\n  segmentLoader.abort();\n  segmentLoader.pause();\n  if (mediaType && mediaType.activePlaylistLoader) {\n    mediaType.activePlaylistLoader.pause();\n    mediaType.activePlaylistLoader = null;\n  }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n *        PlaylistLoader to start loading\n * @param {Object} mediaType\n *        Active media type\n * @function startLoaders\n */\n\nconst startLoaders = (playlistLoader, mediaType) => {\n  // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n  // playlist loader\n  mediaType.activePlaylistLoader = playlistLoader;\n  playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n *        MediaGroup type\n * @param {Object} settings\n *        Object containing required information for media groups\n * @return {Function}\n *         Handler for a non-destructive resync of SegmentLoader when the active media\n *         group changes.\n * @function onGroupChanged\n */\n\nconst onGroupChanged = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n  if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n    return;\n  }\n  mediaType.lastGroup_ = activeGroup;\n  mediaType.lastTrack_ = activeTrack;\n  stopLoaders(segmentLoader, mediaType);\n  if (!activeGroup || activeGroup.isMainPlaylist) {\n    // there is no group active or active group is a main playlist and won't change\n    return;\n  }\n  if (!activeGroup.playlistLoader) {\n    if (previousActiveLoader) {\n      // The previous group had a playlist loader but the new active group does not\n      // this means we are switching from demuxed to muxed audio. In this case we want to\n      // do a destructive reset of the main segment loader and not restart the audio\n      // loaders.\n      mainSegmentLoader.resetEverything();\n    }\n    return;\n  } // Non-destructive resync\n\n  segmentLoader.resyncLoader();\n  startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onGroupChanging = (type, settings) => () => {\n  const {\n    segmentLoaders: {\n      [type]: segmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  mediaType.lastGroup_ = null;\n  segmentLoader.abort();\n  segmentLoader.pause();\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n *        MediaGroup type\n * @param {Object} settings\n *        Object containing required information for media groups\n * @return {Function}\n *         Handler for a destructive reset of SegmentLoader when the active media\n *         track changes.\n * @function onTrackChanged\n */\n\nconst onTrackChanged = (type, settings) => () => {\n  const {\n    mainPlaylistLoader,\n    segmentLoaders: {\n      [type]: segmentLoader,\n      main: mainSegmentLoader\n    },\n    mediaTypes: {\n      [type]: mediaType\n    }\n  } = settings;\n  const activeTrack = mediaType.activeTrack();\n  const activeGroup = mediaType.getActiveGroup();\n  const previousActiveLoader = mediaType.activePlaylistLoader;\n  const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n  if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n    return;\n  }\n  mediaType.lastGroup_ = activeGroup;\n  mediaType.lastTrack_ = activeTrack;\n  stopLoaders(segmentLoader, mediaType);\n  if (!activeGroup) {\n    // there is no group active so we do not want to restart loaders\n    return;\n  }\n  if (activeGroup.isMainPlaylist) {\n    // track did not change, do nothing\n    if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n      return;\n    }\n    const pc = settings.vhs.playlistController_;\n    const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n    if (pc.media() === newPlaylist) {\n      return;\n    }\n    mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n    mainPlaylistLoader.pause();\n    mainSegmentLoader.resetEverything();\n    pc.fastQualityChange_(newPlaylist);\n    return;\n  }\n  if (type === 'AUDIO') {\n    if (!activeGroup.playlistLoader) {\n      // when switching from demuxed audio/video to muxed audio/video (noted by no\n      // playlist loader for the audio group), we want to do a destructive reset of the\n      // main segment loader and not restart the audio loaders\n      mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n      // it should be stopped\n\n      mainSegmentLoader.resetEverything();\n      return;\n    } // although the segment loader is an audio segment loader, call the setAudio\n    // function to ensure it is prepared to re-append the init segment (or handle other\n    // config changes)\n\n    segmentLoader.setAudio(true);\n    mainSegmentLoader.setAudio(false);\n  }\n  if (previousActiveLoader === activeGroup.playlistLoader) {\n    // Nothing has actually changed. This can happen because track change events can fire\n    // multiple times for a \"single\" change. One for enabling the new active track, and\n    // one for disabling the track that was active\n    startLoaders(activeGroup.playlistLoader, mediaType);\n    return;\n  }\n  if (segmentLoader.track) {\n    // For WebVTT, set the new text track in the segmentloader\n    segmentLoader.track(activeTrack);\n  } // destructive reset\n\n  segmentLoader.resetEverything();\n  startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onError = {\n  /**\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n   * an error.\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Error handler. Logs warning (or error if the playlist is excluded) to\n   *         console and switches back to default audio track.\n   * @function onError.AUDIO\n   */\n  AUDIO: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      },\n      excludePlaylist\n    } = settings; // switch back to default audio track\n\n    const activeTrack = mediaType.activeTrack();\n    const activeGroup = mediaType.activeGroup();\n    const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n    const defaultTrack = mediaType.tracks[id];\n    if (activeTrack === defaultTrack) {\n      // Default track encountered an error. All we can do now is exclude the current\n      // rendition and hope another will switch audio groups\n      excludePlaylist({\n        error: {\n          message: 'Problem encountered loading the default audio track.'\n        }\n      });\n      return;\n    }\n    videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n    for (const trackId in mediaType.tracks) {\n      mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n    }\n    mediaType.onTrackChanged();\n  },\n  /**\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n   * an error.\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Error handler. Logs warning to console and disables the active subtitle track\n   * @function onError.SUBTITLES\n   */\n  SUBTITLES: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n    const track = mediaType.activeTrack();\n    if (track) {\n      track.mode = 'disabled';\n    }\n    mediaType.onTrackChanged();\n  }\n};\nconst setupListeners = {\n  /**\n   * Setup event listeners for audio playlist loader\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {PlaylistLoader|null} playlistLoader\n   *        PlaylistLoader to register listeners on\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function setupListeners.AUDIO\n   */\n  AUDIO: (type, playlistLoader, settings) => {\n    if (!playlistLoader) {\n      // no playlist loader means audio will be muxed with the video\n      return;\n    }\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const media = playlistLoader.media();\n      segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n      // permits, start downloading segments\n\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('loadedplaylist', () => {\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n      if (!tech.paused()) {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('error', onError[type](type, settings));\n  },\n  /**\n   * Setup event listeners for subtitle playlist loader\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {PlaylistLoader|null} playlistLoader\n   *        PlaylistLoader to register listeners on\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function setupListeners.SUBTITLES\n   */\n  SUBTITLES: (type, playlistLoader, settings) => {\n    const {\n      tech,\n      requestOptions,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      mediaTypes: {\n        [type]: mediaType\n      }\n    } = settings;\n    playlistLoader.on('loadedmetadata', () => {\n      const media = playlistLoader.media();\n      segmentLoader.playlist(media, requestOptions);\n      segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n      // permits, start downloading segments\n\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('loadedplaylist', () => {\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n      if (!tech.paused()) {\n        segmentLoader.load();\n      }\n    });\n    playlistLoader.on('error', onError[type](type, settings));\n  }\n};\nconst initialize = {\n  /**\n   * Setup PlaylistLoaders and AudioTracks for the audio groups\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function initialize.AUDIO\n   */\n  'AUDIO': (type, settings) => {\n    const {\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks,\n          logger_\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n    if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n      mediaGroups[type] = {\n        main: {\n          default: {\n            default: true\n          }\n        }\n      };\n      if (audioOnlyMain) {\n        mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n      }\n    }\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n        if (audioOnlyMain) {\n          logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`);\n          properties.isMainPlaylist = true;\n          playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n          // use the resolved media playlist object\n        } else if (sourceType === 'vhs-json' && properties.playlists) {\n          playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n        } else if (properties.resolvedUri) {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n          // should we even have properties.playlists in this check.\n        } else if (properties.playlists && sourceType === 'dash') {\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n        } else {\n          // no resolvedUri means the audio is muxed with the video when using this\n          // audio track\n          playlistLoader = null;\n        }\n        properties = merge({\n          id: variantLabel,\n          playlistLoader\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const track = new videojs.AudioTrack({\n            id: variantLabel,\n            kind: audioTrackKind_(properties),\n            enabled: false,\n            language: properties.language,\n            default: properties.default,\n            label: variantLabel\n          });\n          tracks[variantLabel] = track;\n        }\n      }\n    } // setup single error event handler for the segment loader\n\n    segmentLoader.on('error', onError[type](type, settings));\n  },\n  /**\n   * Setup PlaylistLoaders and TextTracks for the subtitle groups\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function initialize.SUBTITLES\n   */\n  'SUBTITLES': (type, settings) => {\n    const {\n      tech,\n      vhs,\n      sourceType,\n      segmentLoaders: {\n        [type]: segmentLoader\n      },\n      requestOptions,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      },\n      mainPlaylistLoader\n    } = settings;\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n          // Subtitle playlists with the forced attribute are not selectable in Safari.\n          // According to Apple's HLS Authoring Specification:\n          //   If content has forced subtitles and regular subtitles in a given language,\n          //   the regular subtitles track in that language MUST contain both the forced\n          //   subtitles and the regular subtitles for that language.\n          // Because of this requirement and that Safari does not add forced subtitles,\n          // forced subtitles are skipped here to maintain consistent experience across\n          // all platforms\n          continue;\n        }\n        let properties = mediaGroups[type][groupId][variantLabel];\n        let playlistLoader;\n        if (sourceType === 'hls') {\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n        } else if (sourceType === 'dash') {\n          const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n          if (!playlists.length) {\n            return;\n          }\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n        } else if (sourceType === 'vhs-json') {\n          playlistLoader = new PlaylistLoader(\n          // if the vhs-json object included the media playlist, use the media playlist\n          // as provided, otherwise use the resolved URI to load the playlist\n          properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n        }\n        properties = merge({\n          id: variantLabel,\n          playlistLoader\n        }, properties);\n        setupListeners[type](type, properties.playlistLoader, settings);\n        groups[groupId].push(properties);\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const track = tech.addRemoteTextTrack({\n            id: variantLabel,\n            kind: 'subtitles',\n            default: properties.default && properties.autoselect,\n            language: properties.language,\n            label: variantLabel\n          }, false).track;\n          tracks[variantLabel] = track;\n        }\n      }\n    } // setup single error event handler for the segment loader\n\n    segmentLoader.on('error', onError[type](type, settings));\n  },\n  /**\n   * Setup TextTracks for the closed-caption groups\n   *\n   * @param {String} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @function initialize['CLOSED-CAPTIONS']\n   */\n  'CLOSED-CAPTIONS': (type, settings) => {\n    const {\n      tech,\n      main: {\n        mediaGroups\n      },\n      mediaTypes: {\n        [type]: {\n          groups,\n          tracks\n        }\n      }\n    } = settings;\n    for (const groupId in mediaGroups[type]) {\n      if (!groups[groupId]) {\n        groups[groupId] = [];\n      }\n      for (const variantLabel in mediaGroups[type][groupId]) {\n        const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n        if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n          continue;\n        }\n        const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n        let newProps = {\n          label: variantLabel,\n          language: properties.language,\n          instreamId: properties.instreamId,\n          default: properties.default && properties.autoselect\n        };\n        if (captionServices[newProps.instreamId]) {\n          newProps = merge(newProps, captionServices[newProps.instreamId]);\n        }\n        if (newProps.default === undefined) {\n          delete newProps.default;\n        } // No PlaylistLoader is required for Closed-Captions because the captions are\n        // embedded within the video stream\n\n        groups[groupId].push(merge({\n          id: variantLabel\n        }, properties));\n        if (typeof tracks[variantLabel] === 'undefined') {\n          const track = tech.addRemoteTextTrack({\n            id: newProps.instreamId,\n            kind: 'captions',\n            default: newProps.default,\n            language: newProps.language,\n            label: newProps.label\n          }, false).track;\n          tracks[variantLabel] = track;\n        }\n      }\n    }\n  }\n};\nconst groupMatch = (list, media) => {\n  for (let i = 0; i < list.length; i++) {\n    if (playlistMatch(media, list[i])) {\n      return true;\n    }\n    if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n      return true;\n    }\n  }\n  return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n *        MediaGroup type\n * @param {Object} settings\n *        Object containing required information for media groups\n * @return {Function}\n *         Function that returns the active media group for the provided type. Takes an\n *         optional parameter {TextTrack} track. If no track is provided, a list of all\n *         variants in the group, otherwise the variant corresponding to the provided\n *         track is returned.\n * @function activeGroup\n */\n\nconst activeGroup = (type, settings) => track => {\n  const {\n    mainPlaylistLoader,\n    mediaTypes: {\n      [type]: {\n        groups\n      }\n    }\n  } = settings;\n  const media = mainPlaylistLoader.media();\n  if (!media) {\n    return null;\n  }\n  let variants = null; // set to variants to main media active group\n\n  if (media.attributes[type]) {\n    variants = groups[media.attributes[type]];\n  }\n  const groupKeys = Object.keys(groups);\n  if (!variants) {\n    // find the mainPlaylistLoader media\n    // that is in a media group if we are dealing\n    // with audio only\n    if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n      for (let i = 0; i < groupKeys.length; i++) {\n        const groupPropertyList = groups[groupKeys[i]];\n        if (groupMatch(groupPropertyList, media)) {\n          variants = groupPropertyList;\n          break;\n        }\n      } // use the main group if it exists\n    } else if (groups.main) {\n      variants = groups.main; // only one group, use that one\n    } else if (groupKeys.length === 1) {\n      variants = groups[groupKeys[0]];\n    }\n  }\n  if (typeof track === 'undefined') {\n    return variants;\n  }\n  if (track === null || !variants) {\n    // An active track was specified so a corresponding group is expected. track === null\n    // means no track is currently active so there is no corresponding group\n    return null;\n  }\n  return variants.filter(props => props.id === track.id)[0] || null;\n};\nconst activeTrack = {\n  /**\n   * Returns a function used to get the active track of type provided\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Function that returns the active media track for the provided type. Returns\n   *         null if no track is active\n   * @function activeTrack.AUDIO\n   */\n  AUDIO: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n    for (const id in tracks) {\n      if (tracks[id].enabled) {\n        return tracks[id];\n      }\n    }\n    return null;\n  },\n  /**\n   * Returns a function used to get the active track of type provided\n   *\n   * @param {string} type\n   *        MediaGroup type\n   * @param {Object} settings\n   *        Object containing required information for media groups\n   * @return {Function}\n   *         Function that returns the active media track for the provided type. Returns\n   *         null if no track is active\n   * @function activeTrack.SUBTITLES\n   */\n  SUBTITLES: (type, settings) => () => {\n    const {\n      mediaTypes: {\n        [type]: {\n          tracks\n        }\n      }\n    } = settings;\n    for (const id in tracks) {\n      if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n        return tracks[id];\n      }\n    }\n    return null;\n  }\n};\nconst getActiveGroup = (type, {\n  mediaTypes\n}) => () => {\n  const activeTrack_ = mediaTypes[type].activeTrack();\n  if (!activeTrack_) {\n    return null;\n  }\n  return mediaTypes[type].activeGroup(activeTrack_);\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the main manifest.\n *\n * @param {Object} settings\n *        Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n *        The tech of the player\n * @param {Object} settings.requestOptions\n *        XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.mainPlaylistLoader\n *        PlaylistLoader for the main source\n * @param {VhsHandler} settings.vhs\n *        VHS SourceHandler\n * @param {Object} settings.main\n *        The parsed main manifest\n * @param {Object} settings.mediaTypes\n *        Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.excludePlaylist\n *        Excludes the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nconst setupMediaGroups = settings => {\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n    initialize[type](type, settings);\n  });\n  const {\n    mediaTypes,\n    mainPlaylistLoader,\n    tech,\n    vhs,\n    segmentLoaders: {\n      ['AUDIO']: audioSegmentLoader,\n      main: mainSegmentLoader\n    }\n  } = settings; // setup active group and track getters and change event handlers\n\n  ['AUDIO', 'SUBTITLES'].forEach(type => {\n    mediaTypes[type].activeGroup = activeGroup(type, settings);\n    mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n    mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n    mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n    mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n    mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n  }); // DO NOT enable the default subtitle or caption track.\n  // DO enable the default audio track\n\n  const audioGroup = mediaTypes.AUDIO.activeGroup();\n  if (audioGroup) {\n    const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n    mediaTypes.AUDIO.tracks[groupId].enabled = true;\n    mediaTypes.AUDIO.onGroupChanged();\n    mediaTypes.AUDIO.onTrackChanged();\n    const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n    // track is changed, but needs to be handled here since the track may not be considered\n    // changed on the first call to onTrackChanged\n\n    if (!activeAudioGroup.playlistLoader) {\n      // either audio is muxed with video or the stream is audio only\n      mainSegmentLoader.setAudio(true);\n    } else {\n      // audio is demuxed\n      mainSegmentLoader.setAudio(false);\n      audioSegmentLoader.setAudio(true);\n    }\n  }\n  mainPlaylistLoader.on('mediachange', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n  });\n  mainPlaylistLoader.on('mediachanging', () => {\n    ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n  }); // custom audio track change event handler for usage event\n\n  const onAudioTrackChanged = () => {\n    mediaTypes.AUDIO.onTrackChanged();\n    tech.trigger({\n      type: 'usage',\n      name: 'vhs-audio-change'\n    });\n  };\n  tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n  tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n  vhs.on('dispose', () => {\n    tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n    tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n  }); // clear existing audio tracks and add the ones we just created\n\n  tech.clearTracks('audio');\n  for (const id in mediaTypes.AUDIO.tracks) {\n    tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n  }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n *         Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\nconst createMediaTypes = () => {\n  const mediaTypes = {};\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n    mediaTypes[type] = {\n      groups: {},\n      tracks: {},\n      activePlaylistLoader: null,\n      activeGroup: noop,\n      activeTrack: noop,\n      getActiveGroup: noop,\n      onGroupChanged: noop,\n      onTrackChanged: noop,\n      lastTrack_: null,\n      logger_: logger(`MediaGroups[${type}]`)\n    };\n  });\n  return mediaTypes;\n};\n\n/**\n * A utility class for setting properties and maintaining the state of the content steering manifest.\n *\n * Content Steering manifest format:\n * VERSION: number (required) currently only version 1 is supported.\n * TTL: number in seconds (optional) until the next content steering manifest reload.\n * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n * PATHWAY-CLONES: array (optional) (HLS only) pathway clone objects to copy from other playlists.\n */\n\nclass SteeringManifest {\n  constructor() {\n    this.priority_ = [];\n    this.pathwayClones_ = new Map();\n  }\n  set version(number) {\n    // Only version 1 is currently supported for both DASH and HLS.\n    if (number === 1) {\n      this.version_ = number;\n    }\n  }\n  set ttl(seconds) {\n    // TTL = time-to-live, default = 300 seconds.\n    this.ttl_ = seconds || 300;\n  }\n  set reloadUri(uri) {\n    if (uri) {\n      // reload URI can be relative to the previous reloadUri.\n      this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n    }\n  }\n  set priority(array) {\n    // priority must be non-empty and unique values.\n    if (array && array.length) {\n      this.priority_ = array;\n    }\n  }\n  set pathwayClones(array) {\n    // pathwayClones must be non-empty.\n    if (array && array.length) {\n      this.pathwayClones_ = new Map(array.map(clone => [clone.ID, clone]));\n    }\n  }\n  get version() {\n    return this.version_;\n  }\n  get ttl() {\n    return this.ttl_;\n  }\n  get reloadUri() {\n    return this.reloadUri_;\n  }\n  get priority() {\n    return this.priority_;\n  }\n  get pathwayClones() {\n    return this.pathwayClones_;\n  }\n}\n/**\n * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {function} xhr for making a network request from the browser.\n * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n */\n\nclass ContentSteeringController extends videojs.EventTarget {\n  constructor(xhr, bandwidth) {\n    super();\n    this.currentPathway = null;\n    this.defaultPathway = null;\n    this.queryBeforeStart = false;\n    this.availablePathways_ = new Set();\n    this.steeringManifest = new SteeringManifest();\n    this.proxyServerUrl_ = null;\n    this.manifestType_ = null;\n    this.ttlTimeout_ = null;\n    this.request_ = null;\n    this.currentPathwayClones = new Map();\n    this.nextPathwayClones = new Map();\n    this.excludedSteeringManifestURLs = new Set();\n    this.logger_ = logger('Content Steering');\n    this.xhr_ = xhr;\n    this.getBandwidth_ = bandwidth;\n  }\n  /**\n   * Assigns the content steering tag properties to the steering controller\n   *\n   * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url\n   * @param {Object} steeringTag the content steering tag from the main manifest\n   */\n\n  assignTagProperties(baseUrl, steeringTag) {\n    this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n    const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n    if (!steeringUri) {\n      this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`);\n      this.trigger('error');\n      return;\n    } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n    if (steeringUri.startsWith('data:')) {\n      this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n      return;\n    } // reloadUri is the resolution of the main manifest URL and steering URL.\n\n    this.steeringManifest.reloadUri = resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n    this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on <ContentSteering> tags.\n\n    this.queryBeforeStart = steeringTag.queryBeforeStart;\n    this.proxyServerUrl_ = steeringTag.proxyServerURL; // trigger a steering event if we have a pathway from the content steering tag.\n    // this tells VHS which segment pathway to start with.\n    // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n    if (this.defaultPathway && !this.queryBeforeStart) {\n      this.trigger('content-steering');\n    }\n  }\n  /**\n   * Requests the content steering manifest and parse the response. This should only be called after\n   * assignTagProperties was called with a content steering tag.\n   *\n   * @param {string} initialUri The optional uri to make the request with.\n   *    If set, the request should be made with exactly what is passed in this variable.\n   *    This scenario should only happen once on initalization.\n   */\n\n  requestSteeringManifest(initial) {\n    const reloadUri = this.steeringManifest.reloadUri;\n    if (!reloadUri) {\n      return;\n    } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n    // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n    // This request URI accounts for manifest URIs that have been excluded.\n\n    const uri = initial ? reloadUri : this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n    if (!uri) {\n      this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n      this.trigger('error');\n      this.dispose();\n      return;\n    }\n    const metadata = {\n      contentSteeringInfo: {\n        uri\n      }\n    };\n    this.trigger({\n      type: 'contentsteeringloadstart',\n      metadata\n    });\n    this.request_ = this.xhr_({\n      uri,\n      requestType: 'content-steering-manifest'\n    }, (error, errorInfo) => {\n      if (error) {\n        // If the client receives HTTP 410 Gone in response to a manifest request,\n        // it MUST NOT issue another request for that URI for the remainder of the\n        // playback session. It MAY continue to use the most-recently obtained set\n        // of Pathways.\n        if (errorInfo.status === 410) {\n          this.logger_(`manifest request 410 ${error}.`);\n          this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n          this.excludedSteeringManifestURLs.add(uri);\n          return;\n        } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n        // header in response to a manifest request, it SHOULD wait until the time\n        // specified by the Retry-After header to reissue the request.\n\n        if (errorInfo.status === 429) {\n          const retrySeconds = errorInfo.responseHeaders['retry-after'];\n          this.logger_(`manifest request 429 ${error}.`);\n          this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n          this.startTTLTimeout_(parseInt(retrySeconds, 10));\n          return;\n        } // If the Steering Manifest cannot be loaded and parsed correctly, the\n        // client SHOULD continue to use the previous values and attempt to reload\n        // it after waiting for the previously-specified TTL (or 5 minutes if\n        // none).\n\n        this.logger_(`manifest failed to load ${error}.`);\n        this.startTTLTimeout_();\n        return;\n      }\n      this.trigger({\n        type: 'contentsteeringloadcomplete',\n        metadata\n      });\n      let steeringManifestJson;\n      try {\n        steeringManifestJson = JSON.parse(this.request_.responseText);\n      } catch (parseError) {\n        const errorMetadata = {\n          errorType: videojs.Error.StreamingContentSteeringParserError,\n          error: parseError\n        };\n        this.trigger({\n          type: 'error',\n          metadata: errorMetadata\n        });\n      }\n      this.assignSteeringProperties_(steeringManifestJson);\n      const parsedMetadata = {\n        contentSteeringInfo: metadata.contentSteeringInfo,\n        contentSteeringManifest: {\n          version: this.steeringManifest.version,\n          reloadUri: this.steeringManifest.reloadUri,\n          priority: this.steeringManifest.priority\n        }\n      };\n      this.trigger({\n        type: 'contentsteeringparsed',\n        metadata: parsedMetadata\n      });\n      this.startTTLTimeout_();\n    });\n  }\n  /**\n   * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n   *\n   * @param {string} steeringUrl the steering manifest url\n   * @return the steering manifest url to a proxy server with all parameters set\n   */\n\n  setProxyServerUrl_(steeringUrl) {\n    const steeringUrlObject = new window$1.URL(steeringUrl);\n    const proxyServerUrlObject = new window$1.URL(this.proxyServerUrl_);\n    proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n    return this.setSteeringParams_(proxyServerUrlObject.toString());\n  }\n  /**\n   * Decodes and parses the data uri encoded steering manifest\n   *\n   * @param {string} dataUri the data uri to be decoded and parsed.\n   */\n\n  decodeDataUriManifest_(dataUri) {\n    const steeringManifestJson = JSON.parse(window$1.atob(dataUri));\n    this.assignSteeringProperties_(steeringManifestJson);\n  }\n  /**\n   * Set the HLS or DASH content steering manifest request query parameters. For example:\n   * _HLS_pathway=\"<CURRENT-PATHWAY-ID>\" and _HLS_throughput=<THROUGHPUT>\n   * _DASH_pathway and _DASH_throughput\n   *\n   * @param {string} uri to add content steering server parameters to.\n   * @return a new uri as a string with the added steering query parameters.\n   */\n\n  setSteeringParams_(url) {\n    const urlObject = new window$1.URL(url);\n    const path = this.getPathway();\n    const networkThroughput = this.getBandwidth_();\n    if (path) {\n      const pathwayKey = `_${this.manifestType_}_pathway`;\n      urlObject.searchParams.set(pathwayKey, path);\n    }\n    if (networkThroughput) {\n      const throughputKey = `_${this.manifestType_}_throughput`;\n      urlObject.searchParams.set(throughputKey, networkThroughput);\n    }\n    return urlObject.toString();\n  }\n  /**\n   * Assigns the current steering manifest properties and to the SteeringManifest object\n   *\n   * @param {Object} steeringJson the raw JSON steering manifest\n   */\n\n  assignSteeringProperties_(steeringJson) {\n    this.steeringManifest.version = steeringJson.VERSION;\n    if (!this.steeringManifest.version) {\n      this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n      this.trigger('error');\n      return;\n    }\n    this.steeringManifest.ttl = steeringJson.TTL;\n    this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n    this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // Pathway clones to be created/updated in HLS.\n    // See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n\n    this.steeringManifest.pathwayClones = steeringJson['PATHWAY-CLONES'];\n    this.nextPathwayClones = this.steeringManifest.pathwayClones; // 1. apply first pathway from the array.\n    // 2. if first pathway doesn't exist in manifest, try next pathway.\n    //    a. if all pathways are exhausted, ignore the steering manifest priority.\n    // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n    //    a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n    //       the excluded pathway will be ignored.\n    //       See excludePathway usage in excludePlaylist().\n    // If there are no available pathways, we need to stop content steering.\n\n    if (!this.availablePathways_.size) {\n      this.logger_('There are no available pathways for content steering. Ending content steering.');\n      this.trigger('error');\n      this.dispose();\n    }\n    const chooseNextPathway = pathwaysByPriority => {\n      for (const path of pathwaysByPriority) {\n        if (this.availablePathways_.has(path)) {\n          return path;\n        }\n      } // If no pathway matches, ignore the manifest and choose the first available.\n\n      return [...this.availablePathways_][0];\n    };\n    const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n    if (this.currentPathway !== nextPathway) {\n      this.currentPathway = nextPathway;\n      this.trigger('content-steering');\n    }\n  }\n  /**\n   * Returns the pathway to use for steering decisions\n   *\n   * @return {string} returns the current pathway or the default\n   */\n\n  getPathway() {\n    return this.currentPathway || this.defaultPathway;\n  }\n  /**\n   * Chooses the manifest request URI based on proxy URIs and server URLs.\n   * Also accounts for exclusion on certain manifest URIs.\n   *\n   * @param {string} reloadUri the base uri before parameters\n   *\n   * @return {string} the final URI for the request to the manifest server.\n   */\n\n  getRequestURI(reloadUri) {\n    if (!reloadUri) {\n      return null;\n    }\n    const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n    if (this.proxyServerUrl_) {\n      const proxyURI = this.setProxyServerUrl_(reloadUri);\n      if (!isExcluded(proxyURI)) {\n        return proxyURI;\n      }\n    }\n    const steeringURI = this.setSteeringParams_(reloadUri);\n    if (!isExcluded(steeringURI)) {\n      return steeringURI;\n    } // Return nothing if all valid manifest URIs are excluded.\n\n    return null;\n  }\n  /**\n   * Start the timeout for re-requesting the steering manifest at the TTL interval.\n   *\n   * @param {number} ttl time in seconds of the timeout. Defaults to the\n   *        ttl interval in the steering manifest\n   */\n\n  startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n    // 300 (5 minutes) is the default value.\n    const ttlMS = ttl * 1000;\n    this.ttlTimeout_ = window$1.setTimeout(() => {\n      this.requestSteeringManifest();\n    }, ttlMS);\n  }\n  /**\n   * Clear the TTL timeout if necessary.\n   */\n\n  clearTTLTimeout_() {\n    window$1.clearTimeout(this.ttlTimeout_);\n    this.ttlTimeout_ = null;\n  }\n  /**\n   * aborts any current steering xhr and sets the current request object to null\n   */\n\n  abort() {\n    if (this.request_) {\n      this.request_.abort();\n    }\n    this.request_ = null;\n  }\n  /**\n   * aborts steering requests clears the ttl timeout and resets all properties.\n   */\n\n  dispose() {\n    this.off('content-steering');\n    this.off('error');\n    this.abort();\n    this.clearTTLTimeout_();\n    this.currentPathway = null;\n    this.defaultPathway = null;\n    this.queryBeforeStart = null;\n    this.proxyServerUrl_ = null;\n    this.manifestType_ = null;\n    this.ttlTimeout_ = null;\n    this.request_ = null;\n    this.excludedSteeringManifestURLs = new Set();\n    this.availablePathways_ = new Set();\n    this.steeringManifest = new SteeringManifest();\n  }\n  /**\n   * adds a pathway to the available pathways set\n   *\n   * @param {string} pathway the pathway string to add\n   */\n\n  addAvailablePathway(pathway) {\n    if (pathway) {\n      this.availablePathways_.add(pathway);\n    }\n  }\n  /**\n   * Clears all pathways from the available pathways set\n   */\n\n  clearAvailablePathways() {\n    this.availablePathways_.clear();\n  }\n  /**\n   * Removes a pathway from the available pathways set.\n   */\n\n  excludePathway(pathway) {\n    return this.availablePathways_.delete(pathway);\n  }\n  /**\n   * Checks the refreshed DASH manifest content steering tag for changes.\n   *\n   * @param {string} baseURL new steering tag on DASH manifest refresh\n   * @param {Object} newTag the new tag to check for changes\n   * @return a true or false whether the new tag has different values\n   */\n\n  didDASHTagChange(baseURL, newTag) {\n    return !newTag && this.steeringManifest.reloadUri || newTag && (resolveUrl(baseURL, newTag.serverURL) !== this.steeringManifest.reloadUri || newTag.defaultServiceLocation !== this.defaultPathway || newTag.queryBeforeStart !== this.queryBeforeStart || newTag.proxyServerURL !== this.proxyServerUrl_);\n  }\n  getAvailablePathways() {\n    return this.availablePathways_;\n  }\n}\nconst debounce = (callback, wait) => {\n  let timeoutId = null;\n  return (...args) => {\n    clearTimeout(timeoutId);\n    timeoutId = setTimeout(() => {\n      callback.apply(null, args);\n    }, wait);\n  };\n};\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n  currentPlaylist,\n  buffered,\n  currentTime,\n  nextPlaylist,\n  bufferLowWaterLine,\n  bufferHighWaterLine,\n  duration,\n  bufferBasedABR,\n  log\n}) {\n  // we have no other playlist to switch to\n  if (!nextPlaylist) {\n    videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n    return false;\n  }\n  const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n  if (!currentPlaylist) {\n    log(`${sharedLogLine} as current playlist is not set`);\n    return true;\n  } // no need to switch if playlist is the same\n\n  if (nextPlaylist.id === currentPlaylist.id) {\n    return false;\n  } // determine if current time is in a buffered range.\n\n  const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n  // This is because in LIVE, the player plays 3 segments from the end of the\n  // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n  // in those segments, a viewer will never experience a rendition upswitch.\n\n  if (!currentPlaylist.endList) {\n    // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n    // doubles the time to first playback.\n    if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n      log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n      return false;\n    }\n    log(`${sharedLogLine} as current playlist is live`);\n    return true;\n  }\n  const forwardBuffer = timeAheadOf(buffered, currentTime);\n  const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n  // duration is below the max potential low water line\n\n  if (duration < maxBufferLowWaterLine) {\n    log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n    return true;\n  }\n  const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n  const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n  // we can switch down\n\n  if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n    let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n    if (bufferBasedABR) {\n      logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n    }\n    log(logLine);\n    return true;\n  } // and if our buffer is higher than the low water line,\n  // we can switch up\n\n  if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n    let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n    if (bufferBasedABR) {\n      logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n    }\n    log(logLine);\n    return true;\n  }\n  log(`not ${sharedLogLine} as no switching criteria met`);\n  return false;\n};\n/**\n * the main playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a main playlist and a series of audio playlists\n * if they are available\n *\n * @class PlaylistController\n * @extends videojs.EventTarget\n */\n\nclass PlaylistController extends videojs.EventTarget {\n  constructor(options) {\n    super(); // Adding a slight debounce to avoid duplicate calls during rapid quality changes, for example:\n    // When selecting quality from the quality list,\n    // where we may have multiple bandwidth profiles for the same vertical resolution.\n\n    this.fastQualityChange_ = debounce(this.fastQualityChange_.bind(this), 100);\n    const {\n      src,\n      withCredentials,\n      tech,\n      bandwidth,\n      externVhs,\n      useCueTags,\n      playlistExclusionDuration,\n      enableLowInitialPlaylist,\n      sourceType,\n      cacheEncryptionKeys,\n      bufferBasedABR,\n      leastPixelDiffSelector,\n      captionServices,\n      experimentalUseMMS\n    } = options;\n    if (!src) {\n      throw new Error('A non-empty playlist URL or JSON manifest string is required');\n    }\n    let {\n      maxPlaylistRetries\n    } = options;\n    if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n      maxPlaylistRetries = Infinity;\n    }\n    Vhs$1 = externVhs;\n    this.bufferBasedABR = Boolean(bufferBasedABR);\n    this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n    this.withCredentials = withCredentials;\n    this.tech_ = tech;\n    this.vhs_ = tech.vhs;\n    this.player_ = options.player_;\n    this.sourceType_ = sourceType;\n    this.useCueTags_ = useCueTags;\n    this.playlistExclusionDuration = playlistExclusionDuration;\n    this.maxPlaylistRetries = maxPlaylistRetries;\n    this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n    this.usingManagedMediaSource_ = false;\n    if (this.useCueTags_) {\n      this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n      this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n    }\n    this.requestOptions_ = {\n      withCredentials,\n      maxPlaylistRetries,\n      timeout: null\n    };\n    this.on('error', this.pauseLoading);\n    this.mediaTypes_ = createMediaTypes();\n    if (experimentalUseMMS && window$1.ManagedMediaSource) {\n      // Airplay source not yet implemented. Remote playback must be disabled.\n      this.tech_.el_.disableRemotePlayback = true;\n      this.mediaSource = new window$1.ManagedMediaSource();\n      this.usingManagedMediaSource_ = true;\n      videojs.log('Using ManagedMediaSource');\n    } else if (window$1.MediaSource) {\n      this.mediaSource = new window$1.MediaSource();\n    }\n    this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n    this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n    this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n    this.load = this.load.bind(this);\n    this.pause = this.pause.bind(this);\n    this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n    this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n    this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_);\n    this.mediaSource.addEventListener('startstreaming', this.load);\n    this.mediaSource.addEventListener('endstreaming', this.pause); // we don't have to handle sourceclose since dispose will handle termination of\n    // everything, and the MediaSource should not be detached without a proper disposal\n\n    this.seekable_ = createTimeRanges();\n    this.hasPlayed_ = false;\n    this.syncController_ = new SyncController(options);\n    this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n      kind: 'metadata',\n      label: 'segment-metadata'\n    }, false).track;\n    this.segmentMetadataTrack_.mode = 'hidden';\n    this.decrypter_ = new Decrypter();\n    this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n    this.inbandTextTracks_ = {};\n    this.timelineChangeController_ = new TimelineChangeController();\n    this.keyStatusMap_ = new Map();\n    const segmentLoaderSettings = {\n      vhs: this.vhs_,\n      parse708captions: options.parse708captions,\n      useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n      captionServices,\n      mediaSource: this.mediaSource,\n      currentTime: this.tech_.currentTime.bind(this.tech_),\n      seekable: () => this.seekable(),\n      seeking: () => this.tech_.seeking(),\n      duration: () => this.duration(),\n      hasPlayed: () => this.hasPlayed_,\n      goalBufferLength: () => this.goalBufferLength(),\n      bandwidth,\n      syncController: this.syncController_,\n      decrypter: this.decrypter_,\n      sourceType: this.sourceType_,\n      inbandTextTracks: this.inbandTextTracks_,\n      cacheEncryptionKeys,\n      sourceUpdater: this.sourceUpdater_,\n      timelineChangeController: this.timelineChangeController_,\n      exactManifestTimings: options.exactManifestTimings,\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n    }; // The source type check not only determines whether a special DASH playlist loader\n    // should be used, but also covers the case where the provided src is a vhs-json\n    // manifest object (instead of a URL). In the case of vhs-json, the default\n    // PlaylistLoader should be used.\n\n    this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n    })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n      addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n    }));\n    this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n    // combined audio/video or just video when alternate audio track is selected\n\n    this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      segmentMetadataTrack: this.segmentMetadataTrack_,\n      loaderType: 'main'\n    }), options); // alternate audio track\n\n    this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'audio'\n    }), options);\n    this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n      loaderType: 'vtt',\n      featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n      loadVttJs: () => new Promise((resolve, reject) => {\n        function onLoad() {\n          tech.off('vttjserror', onError);\n          resolve();\n        }\n        function onError() {\n          tech.off('vttjsloaded', onLoad);\n          reject();\n        }\n        tech.one('vttjsloaded', onLoad);\n        tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n        tech.addWebVttScript_();\n      })\n    }), options);\n    const getBandwidth = () => {\n      return this.mainSegmentLoader_.bandwidth;\n    };\n    this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n    this.setupSegmentLoaderListeners_();\n    if (this.bufferBasedABR) {\n      this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n      this.tech_.on('pause', () => this.stopABRTimer_());\n      this.tech_.on('play', () => this.startABRTimer_());\n    } // Create SegmentLoader stat-getters\n    // mediaRequests_\n    // mediaRequestsAborted_\n    // mediaRequestsTimedout_\n    // mediaRequestsErrored_\n    // mediaTransferDuration_\n    // mediaBytesTransferred_\n    // mediaAppends_\n\n    loaderStats.forEach(stat => {\n      this[stat + '_'] = sumLoaderStat.bind(this, stat);\n    });\n    this.logger_ = logger('pc');\n    this.triggeredFmp4Usage = false;\n    if (this.tech_.preload() === 'none') {\n      this.loadOnPlay_ = () => {\n        this.loadOnPlay_ = null;\n        this.mainPlaylistLoader_.load();\n      };\n      this.tech_.one('play', this.loadOnPlay_);\n    } else {\n      this.mainPlaylistLoader_.load();\n    }\n    this.timeToLoadedData__ = -1;\n    this.mainAppendsToLoadedData__ = -1;\n    this.audioAppendsToLoadedData__ = -1;\n    const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n    this.tech_.one(event, () => {\n      const timeToLoadedDataStart = Date.now();\n      this.tech_.one('loadeddata', () => {\n        this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n        this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n        this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n      });\n    });\n  }\n  mainAppendsToLoadedData_() {\n    return this.mainAppendsToLoadedData__;\n  }\n  audioAppendsToLoadedData_() {\n    return this.audioAppendsToLoadedData__;\n  }\n  appendsToLoadedData_() {\n    const main = this.mainAppendsToLoadedData_();\n    const audio = this.audioAppendsToLoadedData_();\n    if (main === -1 || audio === -1) {\n      return -1;\n    }\n    return main + audio;\n  }\n  timeToLoadedData_() {\n    return this.timeToLoadedData__;\n  }\n  /**\n   * Run selectPlaylist and switch to the new playlist if we should\n   *\n   * @param {string} [reason=abr] a reason for why the ABR check is made\n   * @private\n   */\n\n  checkABR_(reason = 'abr') {\n    const nextPlaylist = this.selectPlaylist();\n    if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n      this.switchMedia_(nextPlaylist, reason);\n    }\n  }\n  switchMedia_(playlist, cause, delay) {\n    const oldMedia = this.media();\n    const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n    const newId = playlist && (playlist.id || playlist.uri);\n    if (oldId && oldId !== newId) {\n      this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n      const metadata = {\n        renditionInfo: {\n          id: newId,\n          bandwidth: playlist.attributes.BANDWIDTH,\n          resolution: playlist.attributes.RESOLUTION,\n          codecs: playlist.attributes.CODECS\n        },\n        cause\n      };\n      this.trigger({\n        type: 'renditionselected',\n        metadata\n      });\n      this.tech_.trigger({\n        type: 'usage',\n        name: `vhs-rendition-change-${cause}`\n      });\n    }\n    this.mainPlaylistLoader_.media(playlist, delay);\n  }\n  /**\n   * A function that ensures we switch our playlists inside of `mediaTypes`\n   * to match the current `serviceLocation` provided by the contentSteering controller.\n   * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n   *\n   * This should only be called on a DASH playback scenario while using content steering.\n   * This is necessary due to differences in how media in HLS manifests are generally tied to\n   * a video playlist, where in DASH that is not always the case.\n   */\n\n  switchMediaForDASHContentSteering_() {\n    ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n      const mediaType = this.mediaTypes_[type];\n      const activeGroup = mediaType ? mediaType.activeGroup() : null;\n      const pathway = this.contentSteeringController_.getPathway();\n      if (activeGroup && pathway) {\n        // activeGroup can be an array or a single group\n        const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n        const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n        if (dashMediaPlaylists.length) {\n          this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n        }\n      }\n    });\n  }\n  /**\n   * Start a timer that periodically calls checkABR_\n   *\n   * @private\n   */\n\n  startABRTimer_() {\n    this.stopABRTimer_();\n    this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n  }\n  /**\n   * Stop the timer that periodically calls checkABR_\n   *\n   * @private\n   */\n\n  stopABRTimer_() {\n    // if we're scrubbing, we don't need to pause.\n    // This getter will be added to Video.js in version 7.11.\n    if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n      return;\n    }\n    window$1.clearInterval(this.abrTimer_);\n    this.abrTimer_ = null;\n  }\n  /**\n   * Get a list of playlists for the currently selected audio playlist\n   *\n   * @return {Array} the array of audio playlists\n   */\n\n  getAudioTrackPlaylists_() {\n    const main = this.main();\n    const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n    // assume that the audio tracks are contained in main\n    // playlist array, use that or an empty array.\n\n    if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n      return defaultPlaylists;\n    }\n    const AUDIO = main.mediaGroups.AUDIO;\n    const groupKeys = Object.keys(AUDIO);\n    let track; // get the current active track\n\n    if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n      track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n    } else {\n      // default group is `main` or just the first group.\n      const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n      for (const label in defaultGroup) {\n        if (defaultGroup[label].default) {\n          track = {\n            label\n          };\n          break;\n        }\n      }\n    } // no active track no playlists.\n\n    if (!track) {\n      return defaultPlaylists;\n    }\n    const playlists = []; // get all of the playlists that are possible for the\n    // active track.\n\n    for (const group in AUDIO) {\n      if (AUDIO[group][track.label]) {\n        const properties = AUDIO[group][track.label];\n        if (properties.playlists && properties.playlists.length) {\n          playlists.push.apply(playlists, properties.playlists);\n        } else if (properties.uri) {\n          playlists.push(properties);\n        } else if (main.playlists.length) {\n          // if an audio group does not have a uri\n          // see if we have main playlists that use it as a group.\n          // if we do then add those to the playlists list.\n          for (let i = 0; i < main.playlists.length; i++) {\n            const playlist = main.playlists[i];\n            if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n              playlists.push(playlist);\n            }\n          }\n        }\n      }\n    }\n    if (!playlists.length) {\n      return defaultPlaylists;\n    }\n    return playlists;\n  }\n  /**\n   * Register event handlers on the main playlist loader. A helper\n   * function for construction time.\n   *\n   * @private\n   */\n\n  setupMainPlaylistLoaderListeners_() {\n    this.mainPlaylistLoader_.on('loadedmetadata', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n      // timeout the request.\n\n      if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      } // if this isn't a live video and preload permits, start\n      // downloading segments\n\n      if (media.endList && this.tech_.preload() !== 'none') {\n        this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n        this.mainSegmentLoader_.load();\n      }\n      setupMediaGroups({\n        sourceType: this.sourceType_,\n        segmentLoaders: {\n          AUDIO: this.audioSegmentLoader_,\n          SUBTITLES: this.subtitleSegmentLoader_,\n          main: this.mainSegmentLoader_\n        },\n        tech: this.tech_,\n        requestOptions: this.requestOptions_,\n        mainPlaylistLoader: this.mainPlaylistLoader_,\n        vhs: this.vhs_,\n        main: this.main(),\n        mediaTypes: this.mediaTypes_,\n        excludePlaylist: this.excludePlaylist.bind(this)\n      });\n      this.triggerPresenceUsage_(this.main(), media);\n      this.setupFirstPlay();\n      if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n        this.trigger('selectedinitialmedia');\n      } else {\n        // We must wait for the active audio playlist loader to\n        // finish setting up before triggering this event so the\n        // representations API and EME setup is correct\n        this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n          this.trigger('selectedinitialmedia');\n        });\n      }\n    });\n    this.mainPlaylistLoader_.on('loadedplaylist', () => {\n      if (this.loadOnPlay_) {\n        this.tech_.off('play', this.loadOnPlay_);\n      }\n      let updatedPlaylist = this.mainPlaylistLoader_.media();\n      if (!updatedPlaylist) {\n        // Add content steering listeners on first load and init.\n        this.attachContentSteeringListeners_();\n        this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n        // an initial media as the playlist selectors do not consider browser support\n\n        this.excludeUnsupportedVariants_();\n        let selectedMedia;\n        if (this.enableLowInitialPlaylist) {\n          selectedMedia = this.selectInitialPlaylist();\n        }\n        if (!selectedMedia) {\n          selectedMedia = this.selectPlaylist();\n        }\n        if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n          return;\n        }\n        this.initialMedia_ = selectedMedia;\n        this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n        // fire again since the playlist will be requested. In the case of vhs-json\n        // (where the manifest object is provided as the source), when the media\n        // playlist's `segments` list is already available, a media playlist won't be\n        // requested, and loadedplaylist won't fire again, so the playlist handler must be\n        // called on its own here.\n\n        const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n        if (!haveJsonSource) {\n          return;\n        }\n        updatedPlaylist = this.initialMedia_;\n      }\n      this.handleUpdatedMediaPlaylist(updatedPlaylist);\n    });\n    this.mainPlaylistLoader_.on('error', () => {\n      const error = this.mainPlaylistLoader_.error;\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainPlaylistLoader_.on('mediachanging', () => {\n      this.mainSegmentLoader_.abort();\n      this.mainSegmentLoader_.pause();\n    });\n    this.mainPlaylistLoader_.on('mediachange', () => {\n      const media = this.mainPlaylistLoader_.media();\n      const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n      // timeout the request.\n\n      if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n        this.requestOptions_.timeout = 0;\n      } else {\n        this.requestOptions_.timeout = requestTimeout;\n      }\n      if (this.sourceType_ === 'dash') {\n        // we don't want to re-request the same hls playlist right after it was changed\n        // Initially it was implemented as workaround to restart playlist loader for live\n        // when playlist loader is paused because of playlist exclusions:\n        // see: https://github.com/videojs/http-streaming/pull/1339\n        // but this introduces duplicate \"loadedplaylist\" event.\n        // Ideally we want to re-think playlist loader life-cycle events,\n        // but simply checking \"paused\" state should help a lot\n        if (this.mainPlaylistLoader_.isPaused) {\n          this.mainPlaylistLoader_.load();\n        }\n      } // TODO: Create a new event on the PlaylistLoader that signals\n      // that the segments have changed in some way and use that to\n      // update the SegmentLoader instead of doing it twice here and\n      // on `loadedplaylist`\n\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n      if (this.waitingForFastQualityPlaylistReceived_) {\n        this.runFastQualitySwitch_();\n      } else {\n        this.mainSegmentLoader_.load();\n      }\n      this.tech_.trigger({\n        type: 'mediachange',\n        bubbles: true\n      });\n    });\n    this.mainPlaylistLoader_.on('playlistunchanged', () => {\n      const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n      // excluded for not-changing. We likely just have a really slowly updating\n      // playlist.\n\n      if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n        return;\n      }\n      const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n      if (playlistOutdated) {\n        // Playlist has stopped updating and we're stuck at its end. Try to\n        // exclude it and switch to another playlist in the hope that that\n        // one is updating (and give the player a chance to re-adjust to the\n        // safe live point).\n        this.excludePlaylist({\n          error: {\n            message: 'Playlist no longer updating.',\n            reason: 'playlist-unchanged'\n          }\n        }); // useful for monitoring QoS\n\n        this.tech_.trigger('playliststuck');\n      }\n    });\n    this.mainPlaylistLoader_.on('renditiondisabled', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-disabled'\n      });\n    });\n    this.mainPlaylistLoader_.on('renditionenabled', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-rendition-enabled'\n      });\n    });\n    const playlistLoaderEvents = ['manifestrequeststart', 'manifestrequestcomplete', 'manifestparsestart', 'manifestparsecomplete', 'playlistrequeststart', 'playlistrequestcomplete', 'playlistparsestart', 'playlistparsecomplete', 'renditiondisabled', 'renditionenabled'];\n    playlistLoaderEvents.forEach(eventName => {\n      this.mainPlaylistLoader_.on(eventName, metadata => {\n        // trigger directly on the player to ensure early events are fired.\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n  }\n  /**\n   * Given an updated media playlist (whether it was loaded for the first time, or\n   * refreshed for live playlists), update any relevant properties and state to reflect\n   * changes in the media that should be accounted for (e.g., cues and duration).\n   *\n   * @param {Object} updatedPlaylist the updated media playlist object\n   *\n   * @private\n   */\n\n  handleUpdatedMediaPlaylist(updatedPlaylist) {\n    if (this.useCueTags_) {\n      this.updateAdCues_(updatedPlaylist);\n    } // TODO: Create a new event on the PlaylistLoader that signals\n    // that the segments have changed in some way and use that to\n    // update the SegmentLoader instead of doing it twice here and\n    // on `mediachange`\n\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n    if (this.waitingForFastQualityPlaylistReceived_) {\n      this.runFastQualitySwitch_();\n    }\n    this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n    // as it is possible that it was temporarily stopped while waiting for\n    // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n    if (!this.tech_.paused()) {\n      this.mainSegmentLoader_.load();\n      if (this.audioSegmentLoader_) {\n        this.audioSegmentLoader_.load();\n      }\n    }\n  }\n  /**\n   * A helper function for triggerring presence usage events once per source\n   *\n   * @private\n   */\n\n  triggerPresenceUsage_(main, media) {\n    const mediaGroups = main.mediaGroups || {};\n    let defaultDemuxed = true;\n    const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n    for (const mediaGroup in mediaGroups.AUDIO) {\n      for (const label in mediaGroups.AUDIO[mediaGroup]) {\n        const properties = mediaGroups.AUDIO[mediaGroup][label];\n        if (!properties.uri) {\n          defaultDemuxed = false;\n        }\n      }\n    }\n    if (defaultDemuxed) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-demuxed'\n      });\n    }\n    if (Object.keys(mediaGroups.SUBTITLES).length) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-webvtt'\n      });\n    }\n    if (Vhs$1.Playlist.isAes(media)) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-aes'\n      });\n    }\n    if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-alternate-audio'\n      });\n    }\n    if (this.useCueTags_) {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-playlist-cue-tags'\n      });\n    }\n  }\n  shouldSwitchToMedia_(nextPlaylist) {\n    const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n    const currentTime = this.tech_.currentTime();\n    const bufferLowWaterLine = this.bufferLowWaterLine();\n    const bufferHighWaterLine = this.bufferHighWaterLine();\n    const buffered = this.tech_.buffered();\n    return shouldSwitchToMedia({\n      buffered,\n      currentTime,\n      currentPlaylist,\n      nextPlaylist,\n      bufferLowWaterLine,\n      bufferHighWaterLine,\n      duration: this.duration(),\n      bufferBasedABR: this.bufferBasedABR,\n      log: this.logger_\n    });\n  }\n  /**\n   * Register event handlers on the segment loaders. A helper function\n   * for construction time.\n   *\n   * @private\n   */\n\n  setupSegmentLoaderListeners_() {\n    this.mainSegmentLoader_.on('bandwidthupdate', () => {\n      // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n      // useful to check to see if a rendition switch should be made.\n      this.checkABR_('bandwidthupdate');\n      this.tech_.trigger('bandwidthupdate');\n    });\n    this.mainSegmentLoader_.on('timeout', () => {\n      if (this.bufferBasedABR) {\n        // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n        // Here the only consideration is that for buffer based ABR there's no guarantee\n        // of an immediate switch (since the bandwidth is averaged with a timeout\n        // bandwidth value of 1), so force a load on the segment loader to keep it going.\n        this.mainSegmentLoader_.load();\n      }\n    }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n    // based ABR.\n\n    if (!this.bufferBasedABR) {\n      this.mainSegmentLoader_.on('progress', () => {\n        this.trigger('progress');\n      });\n    }\n    this.mainSegmentLoader_.on('error', () => {\n      const error = this.mainSegmentLoader_.error();\n      this.excludePlaylist({\n        playlistToExclude: error.playlist,\n        error\n      });\n    });\n    this.mainSegmentLoader_.on('appenderror', () => {\n      this.error = this.mainSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.mainSegmentLoader_.on('timestampoffset', () => {\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-timestamp-offset'\n      });\n    });\n    this.audioSegmentLoader_.on('syncinfoupdate', () => {\n      this.onSyncInfoUpdate_();\n    });\n    this.audioSegmentLoader_.on('appenderror', () => {\n      this.error = this.audioSegmentLoader_.error_;\n      this.trigger('error');\n    });\n    this.mainSegmentLoader_.on('ended', () => {\n      this.logger_('main segment loader ended');\n      this.onEndOfStream();\n    }); // There is the possibility of the video segment and the audio segment\n    // at a current time to be on different timelines. When this occurs, the player\n    // forwards playback to a point where these two segment types are back on the same\n    // timeline. This time will be just after the end of the audio segment that is on\n    // a previous timeline.\n\n    this.timelineChangeController_.on('audioTimelineBehind', () => {\n      const segmentInfo = this.audioSegmentLoader_.pendingSegment_;\n      if (!segmentInfo || !segmentInfo.segment || !segmentInfo.segment.syncInfo) {\n        return;\n      } // Update the current time to just after the faulty audio segment.\n      // This moves playback to a spot where both audio and video segments\n      // are on the same timeline.\n\n      const newTime = segmentInfo.segment.syncInfo.end + 0.01;\n      this.tech_.setCurrentTime(newTime);\n    });\n    this.timelineChangeController_.on('fixBadTimelineChange', () => {\n      // pause, reset-everything and load for all segment-loaders\n      this.logger_('Fix bad timeline change. Restarting al segment loaders...');\n      this.mainSegmentLoader_.pause();\n      this.mainSegmentLoader_.resetEverything();\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n        this.audioSegmentLoader_.pause();\n        this.audioSegmentLoader_.resetEverything();\n      }\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n        this.subtitleSegmentLoader_.pause();\n        this.subtitleSegmentLoader_.resetEverything();\n      } // start segment loader loading in case they are paused\n\n      this.load();\n    });\n    this.mainSegmentLoader_.on('earlyabort', event => {\n      // never try to early abort with the new ABR algorithm\n      if (this.bufferBasedABR) {\n        return;\n      }\n      this.delegateLoaders_('all', ['abort']);\n      this.excludePlaylist({\n        error: {\n          message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n        },\n        playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n      });\n    });\n    const updateCodecs = () => {\n      if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n        return this.tryToCreateSourceBuffers_();\n      }\n      const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n      if (!codecs) {\n        return;\n      }\n      this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n    };\n    this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n    this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n    this.mainSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('fmp4', () => {\n      if (!this.triggeredFmp4Usage) {\n        this.tech_.trigger({\n          type: 'usage',\n          name: 'vhs-fmp4'\n        });\n        this.triggeredFmp4Usage = true;\n      }\n    });\n    this.audioSegmentLoader_.on('ended', () => {\n      this.logger_('audioSegmentLoader ended');\n      this.onEndOfStream();\n    });\n    const segmentLoaderEvents = ['segmentselected', 'segmentloadstart', 'segmentloaded', 'segmentkeyloadstart', 'segmentkeyloadcomplete', 'segmentdecryptionstart', 'segmentdecryptioncomplete', 'segmenttransmuxingstart', 'segmenttransmuxingcomplete', 'segmenttransmuxingtrackinfoavailable', 'segmenttransmuxingtiminginfoavailable', 'segmentappendstart', 'appendsdone', 'bandwidthupdated', 'timelinechange', 'codecschange'];\n    segmentLoaderEvents.forEach(eventName => {\n      this.mainSegmentLoader_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n      this.audioSegmentLoader_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n      this.subtitleSegmentLoader_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n  }\n  mediaSecondsLoaded_() {\n    return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n  }\n  /**\n   * Call load on our SegmentLoaders\n   */\n\n  load() {\n    this.mainSegmentLoader_.load();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.load();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.load();\n    }\n  }\n  /**\n   * Call pause on our SegmentLoaders\n   */\n\n  pause() {\n    this.mainSegmentLoader_.pause();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\n    }\n  }\n  /**\n   * Re-tune playback quality level for the current player\n   * conditions. This method will perform destructive actions like removing\n   * already buffered content in order to readjust the currently active\n   * playlist quickly. This is good for manual quality changes\n   *\n   * @private\n   */\n\n  fastQualityChange_(media = this.selectPlaylist()) {\n    if (media && media === this.mainPlaylistLoader_.media()) {\n      this.logger_('skipping fastQualityChange because new media is same as old');\n      return;\n    }\n    this.switchMedia_(media, 'fast-quality'); // we would like to avoid race condition when we call fastQuality,\n    // reset everything and start loading segments from prev segments instead of new because new playlist is not received yet\n\n    this.waitingForFastQualityPlaylistReceived_ = true;\n  }\n  runFastQualitySwitch_() {\n    this.waitingForFastQualityPlaylistReceived_ = false;\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.resetEverything();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n      this.audioSegmentLoader_.resetEverything();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\n      this.subtitleSegmentLoader_.resetEverything();\n    } // start segment loader loading in case they are paused\n\n    this.load();\n  }\n  /**\n   * Begin playback.\n   */\n\n  play() {\n    if (this.setupFirstPlay()) {\n      return;\n    }\n    if (this.tech_.ended()) {\n      this.tech_.setCurrentTime(0);\n    }\n    if (this.hasPlayed_) {\n      this.load();\n    }\n    const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n    // seek forward to the live point\n\n    if (this.tech_.duration() === Infinity) {\n      if (this.tech_.currentTime() < seekable.start(0)) {\n        return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n      }\n    }\n  }\n  /**\n   * Seek to the latest media position if this is a live video and the\n   * player and video are loaded and initialized.\n   */\n\n  setupFirstPlay() {\n    const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n    //  If 1) there is no active media\n    //     2) the player is paused\n    //     3) the first play has already been setup\n    // then exit early\n\n    if (!media || this.tech_.paused() || this.hasPlayed_) {\n      return false;\n    } // when the video is a live stream and/or has a start time\n\n    if (!media.endList || media.start) {\n      const seekable = this.seekable();\n      if (!seekable.length) {\n        // without a seekable range, the player cannot seek to begin buffering at the\n        // live or start point\n        return false;\n      }\n      const seekableEnd = seekable.end(0);\n      let startPoint = seekableEnd;\n      if (media.start) {\n        const offset = media.start.timeOffset;\n        if (offset < 0) {\n          startPoint = Math.max(seekableEnd + offset, seekable.start(0));\n        } else {\n          startPoint = Math.min(seekableEnd, offset);\n        }\n      } // trigger firstplay to inform the source handler to ignore the next seek event\n\n      this.trigger('firstplay'); // seek to the live point\n\n      this.tech_.setCurrentTime(startPoint);\n    }\n    this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n    this.load();\n    return true;\n  }\n  /**\n   * handle the sourceopen event on the MediaSource\n   *\n   * @private\n   */\n\n  handleSourceOpen_() {\n    // Only attempt to create the source buffer if none already exist.\n    // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n    // after `endOfStream` has been called (in response to a seek for instance)\n    this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n    // code in video.js but is required because play() must be invoked\n    // *after* the media source has opened.\n\n    if (this.tech_.autoplay()) {\n      const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n      // on browsers which return a promise\n\n      if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n        playPromise.then(null, e => {});\n      }\n    }\n    this.trigger('sourceopen');\n  }\n  /**\n   * handle the sourceended event on the MediaSource\n   *\n   * @private\n   */\n\n  handleSourceEnded_() {\n    if (!this.inbandTextTracks_.metadataTrack_) {\n      return;\n    }\n    const cues = this.inbandTextTracks_.metadataTrack_.cues;\n    if (!cues || !cues.length) {\n      return;\n    }\n    const duration = this.duration();\n    cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n  }\n  /**\n   * handle the durationchange event on the MediaSource\n   *\n   * @private\n   */\n\n  handleDurationChange_() {\n    this.tech_.trigger('durationchange');\n  }\n  /**\n   * Calls endOfStream on the media source when all active stream types have called\n   * endOfStream\n   *\n   * @param {string} streamType\n   *        Stream type of the segment loader that called endOfStream\n   * @private\n   */\n\n  onEndOfStream() {\n    let isEndOfStream = this.mainSegmentLoader_.ended_;\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n      if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n        // if we do not know if the main segment loader contains video yet or if we\n        // definitively know the main segment loader contains video, then we need to wait\n        // for both main and audio segment loaders to call endOfStream\n        isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n      } else {\n        // otherwise just rely on the audio loader\n        isEndOfStream = this.audioSegmentLoader_.ended_;\n      }\n    }\n    if (!isEndOfStream) {\n      return;\n    }\n    this.stopABRTimer_();\n    this.sourceUpdater_.endOfStream();\n  }\n  /**\n   * Check if a playlist has stopped being updated\n   *\n   * @param {Object} playlist the media playlist object\n   * @return {boolean} whether the playlist has stopped being updated or not\n   */\n\n  stuckAtPlaylistEnd_(playlist) {\n    const seekable = this.seekable();\n    if (!seekable.length) {\n      // playlist doesn't have enough information to determine whether we are stuck\n      return false;\n    }\n    const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n    if (expired === null) {\n      return false;\n    } // does not use the safe live end to calculate playlist end, since we\n    // don't want to say we are stuck while there is still content\n\n    const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n    if (!buffered.length) {\n      // return true if the playhead reached the absolute end of the playlist\n      return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n    }\n    const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n    // end of playlist\n\n    return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n  }\n  /**\n   * Exclude a playlist for a set amount of time, making it unavailable for selection by\n   * the rendition selection algorithm, then force a new playlist (rendition) selection.\n   *\n   * @param {Object=} playlistToExclude\n   *                  the playlist to exclude, defaults to the currently selected playlist\n   * @param {Object=} error\n   *                  an optional error\n   * @param {number=} playlistExclusionDuration\n   *                  an optional number of seconds to exclude the playlist\n   */\n\n  excludePlaylist({\n    playlistToExclude = this.mainPlaylistLoader_.media(),\n    error = {},\n    playlistExclusionDuration\n  }) {\n    // If the `error` was generated by the playlist loader, it will contain\n    // the playlist we were trying to load (but failed) and that should be\n    // excluded instead of the currently selected playlist which is likely\n    // out-of-date in this scenario\n    playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n    playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n    // trying to load the main OR while we were disposing of the tech\n\n    if (!playlistToExclude) {\n      this.error = error;\n      if (this.mediaSource.readyState !== 'open') {\n        this.trigger('error');\n      } else {\n        this.sourceUpdater_.endOfStream('network');\n      }\n      return;\n    }\n    playlistToExclude.playlistErrors_++;\n    const playlists = this.mainPlaylistLoader_.main.playlists;\n    const enabledPlaylists = playlists.filter(isEnabled);\n    const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n    // forever\n\n    if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n      videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.');\n      this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n      return this.mainPlaylistLoader_.load(isFinalRendition);\n    }\n    if (isFinalRendition) {\n      // If we're content steering, try other pathways.\n      if (this.main().contentSteering) {\n        const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n        const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n        this.contentSteeringController_.excludePathway(pathway);\n        this.excludeThenChangePathway_();\n        setTimeout(() => {\n          this.contentSteeringController_.addAvailablePathway(pathway);\n        }, reIncludeDelay);\n        return;\n      } // Since we're on the final non-excluded playlist, and we're about to exclude\n      // it, instead of erring the player or retrying this playlist, clear out the current\n      // exclusion list. This allows other playlists to be attempted in case any have been\n      // fixed.\n\n      let reincluded = false;\n      playlists.forEach(playlist => {\n        // skip current playlist which is about to be excluded\n        if (playlist === playlistToExclude) {\n          return;\n        }\n        const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n        if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n          reincluded = true;\n          delete playlist.excludeUntil;\n        }\n      });\n      if (reincluded) {\n        videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n        // playlist. This is needed for users relying on the retryplaylist event to catch a\n        // case where the player might be stuck and looping through \"dead\" playlists.\n\n        this.tech_.trigger('retryplaylist');\n      }\n    } // Exclude this playlist\n\n    let excludeUntil;\n    if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n      excludeUntil = Infinity;\n    } else {\n      excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n    }\n    playlistToExclude.excludeUntil = excludeUntil;\n    if (error.reason) {\n      playlistToExclude.lastExcludeReason_ = error.reason;\n    }\n    this.tech_.trigger('excludeplaylist');\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'vhs-rendition-excluded'\n    }); // TODO: only load a new playlist if we're excluding the current playlist\n    // If this function was called with a playlist that's not the current active playlist\n    // (e.g., media().id !== playlistToExclude.id),\n    // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n    const nextPlaylist = this.selectPlaylist();\n    if (!nextPlaylist) {\n      this.error = 'Playback cannot continue. No available working or supported playlists.';\n      this.trigger('error');\n      return;\n    }\n    const logFn = error.internal ? this.logger_ : videojs.log.warn;\n    const errorMessage = error.message ? ' ' + error.message : '';\n    logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders\n\n    if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n      this.delegateLoaders_('audio', ['abort', 'pause']);\n    } // if subtitle group changed reset subtitle loaders\n\n    if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n      this.delegateLoaders_('subtitle', ['abort', 'pause']);\n    }\n    this.delegateLoaders_('main', ['abort', 'pause']);\n    const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n    const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n    return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n  }\n  /**\n   * Pause all segment/playlist loaders\n   */\n\n  pauseLoading() {\n    this.delegateLoaders_('all', ['abort', 'pause']);\n    this.stopABRTimer_();\n  }\n  /**\n   * Call a set of functions in order on playlist loaders, segment loaders,\n   * or both types of loaders.\n   *\n   * @param {string} filter\n   *        Filter loaders that should call fnNames using a string. Can be:\n   *        * all - run on all loaders\n   *        * audio - run on all audio loaders\n   *        * subtitle - run on all subtitle loaders\n   *        * main - run on the main loaders\n   *\n   * @param {Array|string} fnNames\n   *        A string or array of function names to call.\n   */\n\n  delegateLoaders_(filter, fnNames) {\n    const loaders = [];\n    const dontFilterPlaylist = filter === 'all';\n    if (dontFilterPlaylist || filter === 'main') {\n      loaders.push(this.mainPlaylistLoader_);\n    }\n    const mediaTypes = [];\n    if (dontFilterPlaylist || filter === 'audio') {\n      mediaTypes.push('AUDIO');\n    }\n    if (dontFilterPlaylist || filter === 'subtitle') {\n      mediaTypes.push('CLOSED-CAPTIONS');\n      mediaTypes.push('SUBTITLES');\n    }\n    mediaTypes.forEach(mediaType => {\n      const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n      if (loader) {\n        loaders.push(loader);\n      }\n    });\n    ['main', 'audio', 'subtitle'].forEach(name => {\n      const loader = this[`${name}SegmentLoader_`];\n      if (loader && (filter === name || filter === 'all')) {\n        loaders.push(loader);\n      }\n    });\n    loaders.forEach(loader => fnNames.forEach(fnName => {\n      if (typeof loader[fnName] === 'function') {\n        loader[fnName]();\n      }\n    }));\n  }\n  /**\n   * set the current time on all segment loaders\n   *\n   * @param {TimeRange} currentTime the current time to set\n   * @return {TimeRange} the current time\n   */\n\n  setCurrentTime(currentTime) {\n    const buffered = findRange(this.tech_.buffered(), currentTime);\n    if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n      // return immediately if the metadata is not ready yet\n      return 0;\n    } // it's clearly an edge-case but don't thrown an error if asked to\n    // seek within an empty playlist\n\n    if (!this.mainPlaylistLoader_.media().segments) {\n      return 0;\n    } // if the seek location is already buffered, continue buffering as usual\n\n    if (buffered && buffered.length) {\n      return currentTime;\n    } // cancel outstanding requests so we begin buffering at the new\n    // location\n\n    this.mainSegmentLoader_.pause();\n    this.mainSegmentLoader_.resetEverything();\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      this.audioSegmentLoader_.pause();\n      this.audioSegmentLoader_.resetEverything();\n    }\n    if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n      this.subtitleSegmentLoader_.pause();\n      this.subtitleSegmentLoader_.resetEverything();\n    } // start segment loader loading in case they are paused\n\n    this.load();\n  }\n  /**\n   * get the current duration\n   *\n   * @return {TimeRange} the duration\n   */\n\n  duration() {\n    if (!this.mainPlaylistLoader_) {\n      return 0;\n    }\n    const media = this.mainPlaylistLoader_.media();\n    if (!media) {\n      // no playlists loaded yet, so can't determine a duration\n      return 0;\n    } // Don't rely on the media source for duration in the case of a live playlist since\n    // setting the native MediaSource's duration to infinity ends up with consequences to\n    // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n    //\n    // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n    // however, few browsers have support for setLiveSeekableRange()\n    // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n    //\n    // Until a time when the duration of the media source can be set to infinity, and a\n    // seekable range specified across browsers, just return Infinity.\n\n    if (!media.endList) {\n      return Infinity;\n    } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n    // available). If it's not available, fall back to a playlist-calculated estimate.\n\n    if (this.mediaSource) {\n      return this.mediaSource.duration;\n    }\n    return Vhs$1.Playlist.duration(media);\n  }\n  /**\n   * check the seekable range\n   *\n   * @return {TimeRange} the seekable range\n   */\n\n  seekable() {\n    return this.seekable_;\n  }\n  getSeekableRange_(playlistLoader, mediaType) {\n    const media = playlistLoader.media();\n    if (!media) {\n      return null;\n    }\n    const mediaSequenceSync = this.syncController_.getMediaSequenceSync(mediaType);\n    if (mediaSequenceSync && mediaSequenceSync.isReliable) {\n      const start = mediaSequenceSync.start;\n      const end = mediaSequenceSync.end;\n      if (!isFinite(start) || !isFinite(end)) {\n        return null;\n      }\n      const liveEdgeDelay = Vhs$1.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main, media); // Make sure our seekable end is not less than the seekable start\n\n      const calculatedEnd = Math.max(start, end - liveEdgeDelay);\n      return createTimeRanges([[start, calculatedEnd]]);\n    }\n    const expired = this.syncController_.getExpiredTime(media, this.duration());\n    if (expired === null) {\n      return null;\n    }\n    const seekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main, media));\n    return seekable.length ? seekable : null;\n  }\n  computeFinalSeekable_(mainSeekable, audioSeekable) {\n    if (!audioSeekable) {\n      return mainSeekable;\n    }\n    const mainStart = mainSeekable.start(0);\n    const mainEnd = mainSeekable.end(0);\n    const audioStart = audioSeekable.start(0);\n    const audioEnd = audioSeekable.end(0);\n    if (audioStart > mainEnd || mainStart > audioEnd) {\n      // Seekables are far apart, rely on main\n      return mainSeekable;\n    } // Return the overlapping seekable range\n\n    return createTimeRanges([[Math.max(mainStart, audioStart), Math.min(mainEnd, audioEnd)]]);\n  }\n  onSyncInfoUpdate_() {\n    // TODO check for creation of both source buffers before updating seekable\n    //\n    // A fix was made to this function where a check for\n    // this.sourceUpdater_.hasCreatedSourceBuffers\n    // was added to ensure that both source buffers were created before seekable was\n    // updated. However, it originally had a bug where it was checking for a true and\n    // returning early instead of checking for false. Setting it to check for false to\n    // return early though created other issues. A call to play() would check for seekable\n    // end without verifying that a seekable range was present. In addition, even checking\n    // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n    // due to a media update calling load on the segment loaders, skipping a seek to live,\n    // thereby starting live streams at the beginning of the stream rather than at the end.\n    //\n    // This conditional should be fixed to wait for the creation of two source buffers at\n    // the same time as the other sections of code are fixed to properly seek to live and\n    // not throw an error due to checking for a seekable end when no seekable range exists.\n    //\n    // For now, fall back to the older behavior, with the understanding that the seekable\n    // range may not be completely correct, leading to a suboptimal initial live point.\n    if (!this.mainPlaylistLoader_) {\n      return;\n    }\n    const mainSeekable = this.getSeekableRange_(this.mainPlaylistLoader_, 'main');\n    if (!mainSeekable) {\n      return;\n    }\n    let audioSeekable;\n    if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n      audioSeekable = this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader, 'audio');\n      if (!audioSeekable) {\n        return;\n      }\n    }\n    const oldSeekable = this.seekable_;\n    this.seekable_ = this.computeFinalSeekable_(mainSeekable, audioSeekable);\n    if (!this.seekable_) {\n      return;\n    }\n    if (oldSeekable && oldSeekable.length && this.seekable_.length) {\n      if (oldSeekable.start(0) === this.seekable_.start(0) && oldSeekable.end(0) === this.seekable_.end(0)) {\n        // Seekable range hasn't changed\n        return;\n      }\n    }\n    this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n    const metadata = {\n      seekableRanges: this.seekable_\n    };\n    this.trigger({\n      type: 'seekablerangeschanged',\n      metadata\n    });\n    this.tech_.trigger('seekablechanged');\n  }\n  /**\n   * Update the player duration\n   */\n\n  updateDuration(isLive) {\n    if (this.updateDuration_) {\n      this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n      this.updateDuration_ = null;\n    }\n    if (this.mediaSource.readyState !== 'open') {\n      this.updateDuration_ = this.updateDuration.bind(this, isLive);\n      this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n      return;\n    }\n    if (isLive) {\n      const seekable = this.seekable();\n      if (!seekable.length) {\n        return;\n      } // Even in the case of a live playlist, the native MediaSource's duration should not\n      // be set to Infinity (even though this would be expected for a live playlist), since\n      // setting the native MediaSource's duration to infinity ends up with consequences to\n      // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n      //\n      // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n      // however, few browsers have support for setLiveSeekableRange()\n      // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n      //\n      // Until a time when the duration of the media source can be set to infinity, and a\n      // seekable range specified across browsers, the duration should be greater than or\n      // equal to the last possible seekable value.\n      // MediaSource duration starts as NaN\n      // It is possible (and probable) that this case will never be reached for many\n      // sources, since the MediaSource reports duration as the highest value without\n      // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n      // we buffered times 0 to 100 with real times of 100 to 200, even though current\n      // time will be between 0 and 100, the native media source may report the duration\n      // as 200. However, since we report duration separate from the media source (as\n      // Infinity), and as long as the native media source duration value is greater than\n      // our reported seekable range, seeks will work as expected. The large number as\n      // duration for live is actually a strategy used by some players to work around the\n      // issue of live seekable ranges cited above.\n\n      if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n        this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n      }\n      return;\n    }\n    const buffered = this.tech_.buffered();\n    let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n    if (buffered.length > 0) {\n      duration = Math.max(duration, buffered.end(buffered.length - 1));\n    }\n    if (this.mediaSource.duration !== duration) {\n      this.sourceUpdater_.setDuration(duration);\n    }\n  }\n  /**\n   * dispose of the PlaylistController and everything\n   * that it controls\n   */\n\n  dispose() {\n    this.trigger('dispose');\n    this.decrypter_.terminate();\n    this.mainPlaylistLoader_.dispose();\n    this.mainSegmentLoader_.dispose();\n    this.contentSteeringController_.dispose();\n    this.keyStatusMap_.clear();\n    if (this.loadOnPlay_) {\n      this.tech_.off('play', this.loadOnPlay_);\n    }\n    ['AUDIO', 'SUBTITLES'].forEach(type => {\n      const groups = this.mediaTypes_[type].groups;\n      for (const id in groups) {\n        groups[id].forEach(group => {\n          if (group.playlistLoader) {\n            group.playlistLoader.dispose();\n          }\n        });\n      }\n    });\n    this.audioSegmentLoader_.dispose();\n    this.subtitleSegmentLoader_.dispose();\n    this.sourceUpdater_.dispose();\n    this.timelineChangeController_.dispose();\n    this.stopABRTimer_();\n    if (this.updateDuration_) {\n      this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n    }\n    this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n    this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n    this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n    this.off();\n  }\n  /**\n   * return the main playlist object if we have one\n   *\n   * @return {Object} the main playlist object that we parsed\n   */\n\n  main() {\n    return this.mainPlaylistLoader_.main;\n  }\n  /**\n   * return the currently selected playlist\n   *\n   * @return {Object} the currently selected playlist object that we parsed\n   */\n\n  media() {\n    // playlist loader will not return media if it has not been fully loaded\n    return this.mainPlaylistLoader_.media() || this.initialMedia_;\n  }\n  areMediaTypesKnown_() {\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n    // otherwise check on the segment loader.\n\n    const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n    if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n      return false;\n    }\n    return true;\n  } // find from and to for codec switch event\n\n  getCodecsOrExclude_() {\n    const media = {\n      main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n      audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n    };\n    const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n    media.video = media.main;\n    const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n    const codecs = {};\n    const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n    if (media.main.hasVideo) {\n      codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n    }\n    if (media.main.isMuxed) {\n      codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n    }\n    if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n      codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n      media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n    } // no codecs, no playback.\n\n    if (!codecs.audio && !codecs.video) {\n      this.excludePlaylist({\n        playlistToExclude: playlist,\n        error: {\n          message: 'Could not determine codecs for playlist.'\n        },\n        playlistExclusionDuration: Infinity\n      });\n      return;\n    } // fmp4 relies on browser support, while ts relies on muxer support\n\n    const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec, this.usingManagedMediaSource_) : muxerSupportsCodec(codec);\n    const unsupportedCodecs = {};\n    let unsupportedAudio;\n    ['video', 'audio'].forEach(function (type) {\n      if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n        const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n        unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n        unsupportedCodecs[supporter].push(codecs[type]);\n        if (type === 'audio') {\n          unsupportedAudio = supporter;\n        }\n      }\n    });\n    if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n      const audioGroup = playlist.attributes.AUDIO;\n      this.main().playlists.forEach(variant => {\n        const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n        if (variantAudioGroup === audioGroup && variant !== playlist) {\n          variant.excludeUntil = Infinity;\n        }\n      });\n      this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n    } // if we have any unsupported codecs exclude this playlist.\n\n    if (Object.keys(unsupportedCodecs).length) {\n      const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n        if (acc) {\n          acc += ', ';\n        }\n        acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n        return acc;\n      }, '') + '.';\n      this.excludePlaylist({\n        playlistToExclude: playlist,\n        error: {\n          internal: true,\n          message\n        },\n        playlistExclusionDuration: Infinity\n      });\n      return;\n    } // check if codec switching is happening\n\n    if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n      const switchMessages = [];\n      ['video', 'audio'].forEach(type => {\n        const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n        const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n        if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n          switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n        }\n      });\n      if (switchMessages.length) {\n        this.excludePlaylist({\n          playlistToExclude: playlist,\n          error: {\n            message: `Codec switching not supported: ${switchMessages.join(', ')}.`,\n            internal: true\n          },\n          playlistExclusionDuration: Infinity\n        });\n        return;\n      }\n    } // TODO: when using the muxer shouldn't we just return\n    // the codecs that the muxer outputs?\n\n    return codecs;\n  }\n  /**\n   * Create source buffers and exlude any incompatible renditions.\n   *\n   * @private\n   */\n\n  tryToCreateSourceBuffers_() {\n    // media source is not ready yet or sourceBuffers are already\n    // created.\n    if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n      return;\n    }\n    if (!this.areMediaTypesKnown_()) {\n      return;\n    }\n    const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n    if (!codecs) {\n      return;\n    }\n    this.sourceUpdater_.createSourceBuffers(codecs);\n    const codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n    this.excludeIncompatibleVariants_(codecString);\n  }\n  /**\n   * Excludes playlists with codecs that are unsupported by the muxer and browser.\n   */\n\n  excludeUnsupportedVariants_() {\n    const playlists = this.main().playlists;\n    const ids = []; // TODO: why don't we have a property to loop through all\n    // playlist? Why did we ever mix indexes and keys?\n\n    Object.keys(playlists).forEach(key => {\n      const variant = playlists[key]; // check if we already processed this playlist.\n\n      if (ids.indexOf(variant.id) !== -1) {\n        return;\n      }\n      ids.push(variant.id);\n      const codecs = codecsForPlaylist(this.main, variant);\n      const unsupported = [];\n      if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio, this.usingManagedMediaSource_)) {\n        unsupported.push(`audio codec ${codecs.audio}`);\n      }\n      if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video, this.usingManagedMediaSource_)) {\n        unsupported.push(`video codec ${codecs.video}`);\n      }\n      if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n        unsupported.push(`text codec ${codecs.text}`);\n      }\n      if (unsupported.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`);\n      }\n    });\n  }\n  /**\n   * Exclude playlists that are known to be codec or\n   * stream-incompatible with the SourceBuffer configuration. For\n   * instance, Media Source Extensions would cause the video element to\n   * stall waiting for video data if you switched from a variant with\n   * video and audio to an audio-only one.\n   *\n   * @param {Object} media a media playlist compatible with the current\n   * set of SourceBuffers. Variants in the current main playlist that\n   * do not appear to have compatible codec or stream configurations\n   * will be excluded from the default playlist selection algorithm\n   * indefinitely.\n   * @private\n   */\n\n  excludeIncompatibleVariants_(codecString) {\n    const ids = [];\n    const playlists = this.main().playlists;\n    const codecs = unwrapCodecList(parseCodecs(codecString));\n    const codecCount_ = codecCount(codecs);\n    const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n    const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n    Object.keys(playlists).forEach(key => {\n      const variant = playlists[key]; // check if we already processed this playlist.\n      // or it if it is already excluded forever.\n\n      if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n        return;\n      }\n      ids.push(variant.id);\n      const exclusionReasons = []; // get codecs from the playlist for this variant\n\n      const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n      const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n      // variant is incompatible. Wait for mux.js to probe\n\n      if (!variantCodecs.audio && !variantCodecs.video) {\n        return;\n      } // TODO: we can support this by removing the\n      // old media source and creating a new one, but it will take some work.\n      // The number of streams cannot change\n\n      if (variantCodecCount !== codecCount_) {\n        exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n      } // only exclude playlists by codec change, if codecs cannot switch\n      // during playback.\n\n      if (!this.sourceUpdater_.canChangeType()) {\n        const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n        const variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n        if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n          exclusionReasons.push(`video codec \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n        } // the audio codec cannot change\n\n        if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n          exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n        }\n      }\n      if (exclusionReasons.length) {\n        variant.excludeUntil = Infinity;\n        this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n      }\n    });\n  }\n  updateAdCues_(media) {\n    let offset = 0;\n    const seekable = this.seekable();\n    if (seekable.length) {\n      offset = seekable.start(0);\n    }\n    updateAdCues(media, this.cueTagsTrack_, offset);\n  }\n  /**\n   * Calculates the desired forward buffer length based on current time\n   *\n   * @return {number} Desired forward buffer length in seconds\n   */\n\n  goalBufferLength() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.GOAL_BUFFER_LENGTH;\n    const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n    const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n    return Math.min(initial + currentTime * rate, max);\n  }\n  /**\n   * Calculates the desired buffer low water line based on current time\n   *\n   * @return {number} Desired buffer low water line in seconds\n   */\n\n  bufferLowWaterLine() {\n    const currentTime = this.tech_.currentTime();\n    const initial = Config.BUFFER_LOW_WATER_LINE;\n    const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n    const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n    const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n    return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n  }\n  bufferHighWaterLine() {\n    return Config.BUFFER_HIGH_WATER_LINE;\n  }\n  addDateRangesToTextTrack_(dateRanges) {\n    createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n    addDateRangeMetadata({\n      inbandTextTracks: this.inbandTextTracks_,\n      dateRanges\n    });\n  }\n  addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n    const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n    // audio/video source with a metadata track, and an alt audio with a metadata track.\n    // However, this probably won't happen, and if it does it can be handled then.\n\n    createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n    addMetadata({\n      inbandTextTracks: this.inbandTextTracks_,\n      metadataArray,\n      timestampOffset,\n      videoDuration\n    });\n  }\n  /**\n   * Utility for getting the pathway or service location from an HLS or DASH playlist.\n   *\n   * @param {Object} playlist for getting pathway from.\n   * @return the pathway attribute of a playlist\n   */\n\n  pathwayAttribute_(playlist) {\n    return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n  }\n  /**\n   * Initialize available pathways and apply the tag properties.\n   */\n\n  initContentSteeringController_() {\n    const main = this.main();\n    if (!main.contentSteering) {\n      return;\n    }\n    for (const playlist of main.playlists) {\n      this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n    }\n    this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); // request the steering manifest immediately if queryBeforeStart is set.\n\n    if (this.contentSteeringController_.queryBeforeStart) {\n      // When queryBeforeStart is true, initial request should omit steering parameters.\n      this.contentSteeringController_.requestSteeringManifest(true);\n      return;\n    } // otherwise start content steering after playback starts\n\n    this.tech_.one('canplay', () => {\n      this.contentSteeringController_.requestSteeringManifest();\n    });\n  }\n  /**\n   * Reset the content steering controller and re-init.\n   */\n\n  resetContentSteeringController_() {\n    this.contentSteeringController_.clearAvailablePathways();\n    this.contentSteeringController_.dispose();\n    this.initContentSteeringController_();\n  }\n  /**\n   * Attaches the listeners for content steering.\n   */\n\n  attachContentSteeringListeners_() {\n    this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));\n    const contentSteeringEvents = ['contentsteeringloadstart', 'contentsteeringloadcomplete', 'contentsteeringparsed'];\n    contentSteeringEvents.forEach(eventName => {\n      this.contentSteeringController_.on(eventName, metadata => {\n        this.trigger(_extends({}, metadata));\n      });\n    });\n    if (this.sourceType_ === 'dash') {\n      this.mainPlaylistLoader_.on('loadedplaylist', () => {\n        const main = this.main(); // check if steering tag or pathways changed.\n\n        const didDashTagChange = this.contentSteeringController_.didDASHTagChange(main.uri, main.contentSteering);\n        const didPathwaysChange = () => {\n          const availablePathways = this.contentSteeringController_.getAvailablePathways();\n          const newPathways = [];\n          for (const playlist of main.playlists) {\n            const serviceLocation = playlist.attributes.serviceLocation;\n            if (serviceLocation) {\n              newPathways.push(serviceLocation);\n              if (!availablePathways.has(serviceLocation)) {\n                return true;\n              }\n            }\n          } // If we have no new serviceLocations and previously had availablePathways\n\n          if (!newPathways.length && availablePathways.size) {\n            return true;\n          }\n          return false;\n        };\n        if (didDashTagChange || didPathwaysChange()) {\n          this.resetContentSteeringController_();\n        }\n      });\n    }\n  }\n  /**\n   * Simple exclude and change playlist logic for content steering.\n   */\n\n  excludeThenChangePathway_() {\n    const currentPathway = this.contentSteeringController_.getPathway();\n    if (!currentPathway) {\n      return;\n    }\n    this.handlePathwayClones_();\n    const main = this.main();\n    const playlists = main.playlists;\n    const ids = new Set();\n    let didEnablePlaylists = false;\n    Object.keys(playlists).forEach(key => {\n      const variant = playlists[key];\n      const pathwayId = this.pathwayAttribute_(variant);\n      const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n      const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n      if (steeringExclusion && !differentPathwayId) {\n        delete variant.excludeUntil;\n        delete variant.lastExcludeReason_;\n        didEnablePlaylists = true;\n      }\n      const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n      const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n      if (!shouldExclude) {\n        return;\n      }\n      ids.add(variant.id);\n      variant.excludeUntil = Infinity;\n      variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n      this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n    });\n    if (this.contentSteeringController_.manifestType_ === 'DASH') {\n      Object.keys(this.mediaTypes_).forEach(key => {\n        const type = this.mediaTypes_[key];\n        if (type.activePlaylistLoader) {\n          const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n          if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n            didEnablePlaylists = true;\n          }\n        }\n      });\n    }\n    if (didEnablePlaylists) {\n      this.changeSegmentPathway_();\n    }\n  }\n  /**\n   * Add, update, or delete playlists and media groups for\n   * the pathway clones for HLS Content Steering.\n   *\n   * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n   *\n   * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and\n   * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or\n   * `STABLE-RENDITION-ID` values.\n   */\n\n  handlePathwayClones_() {\n    const main = this.main();\n    const playlists = main.playlists;\n    const currentPathwayClones = this.contentSteeringController_.currentPathwayClones;\n    const nextPathwayClones = this.contentSteeringController_.nextPathwayClones;\n    const hasClones = currentPathwayClones && currentPathwayClones.size || nextPathwayClones && nextPathwayClones.size;\n    if (!hasClones) {\n      return;\n    }\n    for (const [id, clone] of currentPathwayClones.entries()) {\n      const newClone = nextPathwayClones.get(id); // Delete the old pathway clone.\n\n      if (!newClone) {\n        this.mainPlaylistLoader_.updateOrDeleteClone(clone);\n        this.contentSteeringController_.excludePathway(id);\n      }\n    }\n    for (const [id, clone] of nextPathwayClones.entries()) {\n      const oldClone = currentPathwayClones.get(id); // Create a new pathway if it is a new pathway clone object.\n\n      if (!oldClone) {\n        const playlistsToClone = playlists.filter(p => {\n          return p.attributes['PATHWAY-ID'] === clone['BASE-ID'];\n        });\n        playlistsToClone.forEach(p => {\n          this.mainPlaylistLoader_.addClonePathway(clone, p);\n        });\n        this.contentSteeringController_.addAvailablePathway(id);\n        continue;\n      } // There have not been changes to the pathway clone object, so skip.\n\n      if (this.equalPathwayClones_(oldClone, clone)) {\n        continue;\n      } // Update a preexisting cloned pathway.\n      // True is set for the update flag.\n\n      this.mainPlaylistLoader_.updateOrDeleteClone(clone, true);\n      this.contentSteeringController_.addAvailablePathway(id);\n    } // Deep copy contents of next to current pathways.\n\n    this.contentSteeringController_.currentPathwayClones = new Map(JSON.parse(JSON.stringify([...nextPathwayClones])));\n  }\n  /**\n   * Determines whether two pathway clone objects are equivalent.\n   *\n   * @param {Object} a The first pathway clone object.\n   * @param {Object} b The second pathway clone object.\n   * @return {boolean} True if the pathway clone objects are equal, false otherwise.\n   */\n\n  equalPathwayClones_(a, b) {\n    if (a['BASE-ID'] !== b['BASE-ID'] || a.ID !== b.ID || a['URI-REPLACEMENT'].HOST !== b['URI-REPLACEMENT'].HOST) {\n      return false;\n    }\n    const aParams = a['URI-REPLACEMENT'].PARAMS;\n    const bParams = b['URI-REPLACEMENT'].PARAMS; // We need to iterate through both lists of params because one could be\n    // missing a parameter that the other has.\n\n    for (const p in aParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n    for (const p in bParams) {\n      if (aParams[p] !== bParams[p]) {\n        return false;\n      }\n    }\n    return true;\n  }\n  /**\n   * Changes the current playlists for audio, video and subtitles after a new pathway\n   * is chosen from content steering.\n   */\n\n  changeSegmentPathway_() {\n    const nextPlaylist = this.selectPlaylist();\n    this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n    if (this.contentSteeringController_.manifestType_ === 'DASH') {\n      this.switchMediaForDASHContentSteering_();\n    }\n    this.switchMedia_(nextPlaylist, 'content-steering');\n  }\n  /**\n   * Iterates through playlists and check their keyId set and compare with the\n   * keyStatusMap, only enable playlists that have a usable key. If the playlist\n   * has no keyId leave it enabled by default.\n   */\n\n  excludeNonUsablePlaylistsByKeyId_() {\n    if (!this.mainPlaylistLoader_ || !this.mainPlaylistLoader_.main) {\n      return;\n    }\n    let nonUsableKeyStatusCount = 0;\n    const NON_USABLE = 'non-usable';\n    this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n      const keyIdSet = this.mainPlaylistLoader_.getKeyIdSet(playlist); // If the playlist doesn't have keyIDs lets not exclude it.\n\n      if (!keyIdSet || !keyIdSet.size) {\n        return;\n      }\n      keyIdSet.forEach(key => {\n        const USABLE = 'usable';\n        const hasUsableKeyStatus = this.keyStatusMap_.has(key) && this.keyStatusMap_.get(key) === USABLE;\n        const nonUsableExclusion = playlist.lastExcludeReason_ === NON_USABLE && playlist.excludeUntil === Infinity;\n        if (!hasUsableKeyStatus) {\n          // Only exclude playlists that haven't already been excluded as non-usable.\n          if (playlist.excludeUntil !== Infinity && playlist.lastExcludeReason_ !== NON_USABLE) {\n            playlist.excludeUntil = Infinity;\n            playlist.lastExcludeReason_ = NON_USABLE;\n            this.logger_(`excluding playlist ${playlist.id} because the key ID ${key} doesn't exist in the keyStatusMap or is not ${USABLE}`);\n          } // count all nonUsableKeyStatus\n\n          nonUsableKeyStatusCount++;\n        } else if (hasUsableKeyStatus && nonUsableExclusion) {\n          delete playlist.excludeUntil;\n          delete playlist.lastExcludeReason_;\n          this.logger_(`enabling playlist ${playlist.id} because key ID ${key} is ${USABLE}`);\n        }\n      });\n    }); // If for whatever reason every playlist has a non usable key status. Lets try re-including the SD renditions as a failsafe.\n\n    if (nonUsableKeyStatusCount >= this.mainPlaylistLoader_.main.playlists.length) {\n      this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n        const isNonHD = playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height < 720;\n        const excludedForNonUsableKey = playlist.excludeUntil === Infinity && playlist.lastExcludeReason_ === NON_USABLE;\n        if (isNonHD && excludedForNonUsableKey) {\n          // Only delete the excludeUntil so we don't try and re-exclude these playlists.\n          delete playlist.excludeUntil;\n          videojs.log.warn(`enabling non-HD playlist ${playlist.id} because all playlists were excluded due to ${NON_USABLE} key IDs`);\n        }\n      });\n    }\n  }\n  /**\n   * Adds a keystatus to the keystatus map, tries to convert to string if necessary.\n   *\n   * @param {any} keyId the keyId to add a status for\n   * @param {string} status the status of the keyId\n   */\n\n  addKeyStatus_(keyId, status) {\n    const isString = typeof keyId === 'string';\n    const keyIdHexString = isString ? keyId : bufferToHexString(keyId);\n    const formattedKeyIdString = keyIdHexString.slice(0, 32).toLowerCase();\n    this.logger_(`KeyStatus '${status}' with key ID ${formattedKeyIdString} added to the keyStatusMap`);\n    this.keyStatusMap_.set(formattedKeyIdString, status);\n  }\n  /**\n   * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.\n   *\n   * @param {any} keyId the keyId from the keystatuschange event\n   * @param {string} status the key status string\n   */\n\n  updatePlaylistByKeyStatus(keyId, status) {\n    this.addKeyStatus_(keyId, status);\n    if (!this.waitingForFastQualityPlaylistReceived_) {\n      this.excludeNonUsableThenChangePlaylist_();\n    } // Listen to loadedplaylist with a single listener and check for new contentProtection elements when a playlist is updated.\n\n    this.mainPlaylistLoader_.off('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n    this.mainPlaylistLoader_.on('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n  }\n  excludeNonUsableThenChangePlaylist_() {\n    this.excludeNonUsablePlaylistsByKeyId_();\n    this.fastQualityChange_();\n  }\n}\n\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The main playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n  const playlist = loader.main.playlists[playlistID];\n  const incompatible = isIncompatible(playlist);\n  const currentlyEnabled = isEnabled(playlist);\n  if (typeof enable === 'undefined') {\n    return currentlyEnabled;\n  }\n  if (enable) {\n    delete playlist.disabled;\n  } else {\n    playlist.disabled = true;\n  }\n  const metadata = {\n    renditionInfo: {\n      id: playlistID,\n      bandwidth: playlist.attributes.BANDWIDTH,\n      resolution: playlist.attributes.RESOLUTION,\n      codecs: playlist.attributes.CODECS\n    },\n    cause: 'fast-quality'\n  };\n  if (enable !== currentlyEnabled && !incompatible) {\n    // Ensure the outside world knows about our changes\n    if (enable) {\n      // call fast quality change only when the playlist is enabled\n      changePlaylistFn(playlist);\n      loader.trigger({\n        type: 'renditionenabled',\n        metadata\n      });\n    } else {\n      loader.trigger({\n        type: 'renditiondisabled',\n        metadata\n      });\n    }\n  }\n  return enable;\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\nclass Representation {\n  constructor(vhsHandler, playlist, id) {\n    const {\n      playlistController_: pc\n    } = vhsHandler;\n    const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n    if (playlist.attributes) {\n      const resolution = playlist.attributes.RESOLUTION;\n      this.width = resolution && resolution.width;\n      this.height = resolution && resolution.height;\n      this.bandwidth = playlist.attributes.BANDWIDTH;\n      this.frameRate = playlist.attributes['FRAME-RATE'];\n    }\n    this.codecs = codecsForPlaylist(pc.main(), playlist);\n    this.playlist = playlist; // The id is simply the ordinality of the media playlist\n    // within the main playlist\n\n    this.id = id; // Partially-apply the enableFunction to create a playlist-\n    // specific variant\n\n    this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n  }\n}\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n  // Add a single API-specific function to the VhsHandler instance\n  vhsHandler.representations = () => {\n    const main = vhsHandler.playlistController_.main();\n    const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n    if (!playlists) {\n      return [];\n    }\n    return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\n  };\n};\n\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher extends videojs.EventTarget {\n  /**\n   * Represents an PlaybackWatcher object.\n   *\n   * @class\n   * @param {Object} options an object that includes the tech and settings\n   */\n  constructor(options) {\n    super();\n    this.playlistController_ = options.playlistController;\n    this.tech_ = options.tech;\n    this.seekable = options.seekable;\n    this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n    this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n    this.media = options.media;\n    this.playedRanges_ = [];\n    this.consecutiveUpdates = 0;\n    this.lastRecordedTime = null;\n    this.checkCurrentTimeTimeout_ = null;\n    this.logger_ = logger('PlaybackWatcher');\n    this.logger_('initialize');\n    const playHandler = () => this.monitorCurrentTime_();\n    const canPlayHandler = () => this.monitorCurrentTime_();\n    const waitingHandler = () => this.techWaiting_();\n    const cancelTimerHandler = () => this.resetTimeUpdate_();\n    const pc = this.playlistController_;\n    const loaderTypes = ['main', 'subtitle', 'audio'];\n    const loaderChecks = {};\n    loaderTypes.forEach(type => {\n      loaderChecks[type] = {\n        reset: () => this.resetSegmentDownloads_(type),\n        updateend: () => this.checkSegmentDownloads_(type)\n      };\n      pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n      // isn't changing we want to reset. We cannot assume that the new rendition\n      // will also be stalled, until after new appends.\n\n      pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n      // This prevents one segment playlists (single vtt or single segment content)\n      // from being detected as stalling. As the buffer will not change in those cases, since\n      // the buffer is the entire video duration.\n\n      this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n    });\n    /**\n     * We check if a seek was into a gap through the following steps:\n     * 1. We get a seeking event and we do not get a seeked event. This means that\n     *    a seek was attempted but not completed.\n     * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n     *    removed everything from our buffer and appended a segment, and should be ready\n     *    to check for gaps.\n     */\n\n    const setSeekingHandlers = fn => {\n      ['main', 'audio'].forEach(type => {\n        pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n      });\n    };\n    this.seekingAppendCheck_ = () => {\n      if (this.fixesBadSeeks_()) {\n        this.consecutiveUpdates = 0;\n        this.lastRecordedTime = this.tech_.currentTime();\n        setSeekingHandlers('off');\n      }\n    };\n    this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n    this.watchForBadSeeking_ = () => {\n      this.clearSeekingAppendCheck_();\n      setSeekingHandlers('on');\n    };\n    this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n    this.tech_.on('seeking', this.watchForBadSeeking_);\n    this.tech_.on('waiting', waitingHandler);\n    this.tech_.on(timerCancelEvents, cancelTimerHandler);\n    this.tech_.on('canplay', canPlayHandler);\n    /*\n      An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n      is surfaced in one of two ways:\n       1)  The `waiting` event is fired before the player has buffered content, making it impossible\n          to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n          we can check if playback is stalled due to a gap, and skip the gap if necessary.\n      2)  A source with a gap at the beginning of the stream is loaded programatically while the player\n          is in a playing state. To catch this case, it's important that our one-time play listener is setup\n          even if the player is in a playing state\n    */\n\n    this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n    this.dispose = () => {\n      this.clearSeekingAppendCheck_();\n      this.logger_('dispose');\n      this.tech_.off('waiting', waitingHandler);\n      this.tech_.off(timerCancelEvents, cancelTimerHandler);\n      this.tech_.off('canplay', canPlayHandler);\n      this.tech_.off('play', playHandler);\n      this.tech_.off('seeking', this.watchForBadSeeking_);\n      this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n      loaderTypes.forEach(type => {\n        pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n        pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n        this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n      });\n      if (this.checkCurrentTimeTimeout_) {\n        window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n      }\n      this.resetTimeUpdate_();\n    };\n  }\n  /**\n   * Periodically check current time to see if playback stopped\n   *\n   * @private\n   */\n\n  monitorCurrentTime_() {\n    this.checkCurrentTime_();\n    if (this.checkCurrentTimeTimeout_) {\n      window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n    } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n    this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n  }\n  /**\n   * Reset stalled download stats for a specific type of loader\n   *\n   * @param {string} type\n   *        The segment loader type to check.\n   *\n   * @listens SegmentLoader#playlistupdate\n   * @listens Tech#seeking\n   * @listens Tech#seeked\n   */\n\n  resetSegmentDownloads_(type) {\n    const loader = this.playlistController_[`${type}SegmentLoader_`];\n    if (this[`${type}StalledDownloads_`] > 0) {\n      this.logger_(`resetting possible stalled download count for ${type} loader`);\n    }\n    this[`${type}StalledDownloads_`] = 0;\n    this[`${type}Buffered_`] = loader.buffered_();\n  }\n  /**\n   * Checks on every segment `appendsdone` to see\n   * if segment appends are making progress. If they are not\n   * and we are still downloading bytes. We exclude the playlist.\n   *\n   * @param {string} type\n   *        The segment loader type to check.\n   *\n   * @listens SegmentLoader#appendsdone\n   */\n\n  checkSegmentDownloads_(type) {\n    const pc = this.playlistController_;\n    const loader = pc[`${type}SegmentLoader_`];\n    const buffered = loader.buffered_();\n    const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n    this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or\n    // the buffered value for this loader changed\n    // appends are working\n\n    if (isBufferedDifferent) {\n      const metadata = {\n        bufferedRanges: buffered\n      };\n      pc.trigger({\n        type: 'bufferedrangeschanged',\n        metadata\n      });\n      this.resetSegmentDownloads_(type);\n      return;\n    }\n    this[`${type}StalledDownloads_`]++;\n    this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, {\n      playlistId: loader.playlist_ && loader.playlist_.id,\n      buffered: timeRangesToArray(buffered)\n    }); // after 10 possibly stalled appends with no reset, exclude\n\n    if (this[`${type}StalledDownloads_`] < 10) {\n      return;\n    }\n    this.logger_(`${type} loader stalled download exclusion`);\n    this.resetSegmentDownloads_(type);\n    this.tech_.trigger({\n      type: 'usage',\n      name: `vhs-${type}-download-exclusion`\n    });\n    if (type === 'subtitle') {\n      return;\n    } // TODO: should we exclude audio tracks rather than main tracks\n    // when type is audio?\n\n    pc.excludePlaylist({\n      error: {\n        message: `Excessive ${type} segment downloading detected.`\n      },\n      playlistExclusionDuration: Infinity\n    });\n  }\n  /**\n   * The purpose of this function is to emulate the \"waiting\" event on\n   * browsers that do not emit it when they are waiting for more\n   * data to continue playback\n   *\n   * @private\n   */\n\n  checkCurrentTime_() {\n    if (this.tech_.paused() || this.tech_.seeking()) {\n      return;\n    }\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n    if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n      // If current time is at the end of the final buffered region, then any playback\n      // stall is most likely caused by buffering in a low bandwidth environment. The tech\n      // should fire a `waiting` event in this scenario, but due to browser and tech\n      // inconsistencies. Calling `techWaiting_` here allows us to simulate\n      // responding to a native `waiting` event when the tech fails to emit one.\n      return this.techWaiting_();\n    }\n    if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n      this.consecutiveUpdates++;\n      this.waiting_();\n    } else if (currentTime === this.lastRecordedTime) {\n      this.consecutiveUpdates++;\n    } else {\n      this.playedRanges_.push(createTimeRanges([this.lastRecordedTime, currentTime]));\n      const metadata = {\n        playedRanges: this.playedRanges_\n      };\n      this.playlistController_.trigger({\n        type: 'playedrangeschanged',\n        metadata\n      });\n      this.consecutiveUpdates = 0;\n      this.lastRecordedTime = currentTime;\n    }\n  }\n  /**\n   * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n   *\n   * @private\n   */\n\n  resetTimeUpdate_() {\n    this.consecutiveUpdates = 0;\n  }\n  /**\n   * Fixes situations where there's a bad seek\n   *\n   * @return {boolean} whether an action was taken to fix the seek\n   * @private\n   */\n\n  fixesBadSeeks_() {\n    const seeking = this.tech_.seeking();\n    if (!seeking) {\n      return false;\n    } // TODO: It's possible that these seekable checks should be moved out of this function\n    // and into a function that runs on seekablechange. It's also possible that we only need\n    // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n    // seekable range.\n\n    const seekable = this.seekable();\n    const currentTime = this.tech_.currentTime();\n    const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n    let seekTo;\n    if (isAfterSeekableRange) {\n      const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n      seekTo = seekableEnd;\n    }\n    if (this.beforeSeekableWindow_(seekable, currentTime)) {\n      const seekableStart = seekable.start(0); // sync to the beginning of the live window\n      // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n      seekTo = seekableStart + (\n      // if the playlist is too short and the seekable range is an exact time (can\n      // happen in live with a 3 segment playlist), then don't use a time delta\n      seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n    }\n    if (typeof seekTo !== 'undefined') {\n      this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n      this.tech_.setCurrentTime(seekTo);\n      return true;\n    }\n    const sourceUpdater = this.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n    const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n    const media = this.media(); // verify that at least two segment durations or one part duration have been\n    // appended before checking for a gap.\n\n    const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n    // appended before checking for a gap.\n\n    const bufferedToCheck = [audioBuffered, videoBuffered];\n    for (let i = 0; i < bufferedToCheck.length; i++) {\n      // skip null buffered\n      if (!bufferedToCheck[i]) {\n        continue;\n      }\n      const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n      // duration behind we haven't appended enough to call this a bad seek.\n\n      if (timeAhead < minAppendedDuration) {\n        return false;\n      }\n    }\n    const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n    // to seek over the gap\n\n    if (nextRange.length === 0) {\n      return false;\n    }\n    seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n    this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`);\n    this.tech_.setCurrentTime(seekTo);\n    return true;\n  }\n  /**\n   * Handler for situations when we determine the player is waiting.\n   *\n   * @private\n   */\n\n  waiting_() {\n    if (this.techWaiting_()) {\n      return;\n    } // All tech waiting checks failed. Use last resort correction\n\n    const currentTime = this.tech_.currentTime();\n    const buffered = this.tech_.buffered();\n    const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n    // region with no indication that anything is amiss (seen in Firefox). Seeking to\n    // currentTime is usually enough to kickstart the player. This checks that the player\n    // is currently within a buffered region before attempting a corrective seek.\n    // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n    // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n    // make sure there is ~3 seconds of forward buffer before taking any corrective action\n    // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n    if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n      this.resetTimeUpdate_();\n      this.tech_.setCurrentTime(currentTime);\n      this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-unknown-waiting'\n      });\n      return;\n    }\n  }\n  /**\n   * Handler for situations when the tech fires a `waiting` event\n   *\n   * @return {boolean}\n   *         True if an action (or none) was needed to correct the waiting. False if no\n   *         checks passed\n   * @private\n   */\n\n  techWaiting_() {\n    const seekable = this.seekable();\n    const currentTime = this.tech_.currentTime();\n    if (this.tech_.seeking()) {\n      // Tech is seeking or already waiting on another action, no action needed\n      return true;\n    }\n    if (this.beforeSeekableWindow_(seekable, currentTime)) {\n      const livePoint = seekable.end(seekable.length - 1);\n      this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`);\n      this.resetTimeUpdate_();\n      this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-live-resync'\n      });\n      return true;\n    }\n    const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n    const buffered = this.tech_.buffered();\n    const videoUnderflow = this.videoUnderflow_({\n      audioBuffered: sourceUpdater.audioBuffered(),\n      videoBuffered: sourceUpdater.videoBuffered(),\n      currentTime\n    });\n    if (videoUnderflow) {\n      // Even though the video underflowed and was stuck in a gap, the audio overplayed\n      // the gap, leading currentTime into a buffered range. Seeking to currentTime\n      // allows the video to catch up to the audio position without losing any audio\n      // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n      this.resetTimeUpdate_();\n      this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n      this.tech_.trigger({\n        type: 'usage',\n        name: 'vhs-video-underflow'\n      });\n      return true;\n    }\n    const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n    if (nextRange.length > 0) {\n      this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`);\n      this.resetTimeUpdate_();\n      this.skipTheGap_(currentTime);\n      return true;\n    } // All checks failed. Returning false to indicate failure to correct waiting\n\n    return false;\n  }\n  afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) {\n    if (!seekable.length) {\n      // we can't make a solid case if there's no seekable, default to false\n      return false;\n    }\n    let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n    const isLive = !playlist.endList;\n    const isLLHLS = typeof playlist.partTargetDuration === 'number';\n    if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n      allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n    }\n    if (currentTime > allowedEnd) {\n      return true;\n    }\n    return false;\n  }\n  beforeSeekableWindow_(seekable, currentTime) {\n    if (seekable.length &&\n    // can't fall before 0 and 0 seekable start identifies VOD stream\n    seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n      return true;\n    }\n    return false;\n  }\n  videoUnderflow_({\n    videoBuffered,\n    audioBuffered,\n    currentTime\n  }) {\n    // audio only content will not have video underflow :)\n    if (!videoBuffered) {\n      return;\n    }\n    let gap; // find a gap in demuxed content.\n\n    if (videoBuffered.length && audioBuffered.length) {\n      // in Chrome audio will continue to play for ~3s when we run out of video\n      // so we have to check that the video buffer did have some buffer in the\n      // past.\n      const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n      const videoRange = findRange(videoBuffered, currentTime);\n      const audioRange = findRange(audioBuffered, currentTime);\n      if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n        gap = {\n          start: lastVideoRange.end(0),\n          end: audioRange.end(0)\n        };\n      } // find a gap in muxed content.\n    } else {\n      const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n      // stuck in a gap due to video underflow.\n\n      if (!nextRange.length) {\n        gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n      }\n    }\n    if (gap) {\n      this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n      return true;\n    }\n    return false;\n  }\n  /**\n   * Timer callback. If playback still has not proceeded, then we seek\n   * to the start of the next buffered region.\n   *\n   * @private\n   */\n\n  skipTheGap_(scheduledCurrentTime) {\n    const buffered = this.tech_.buffered();\n    const currentTime = this.tech_.currentTime();\n    const nextRange = findNextRange(buffered, currentTime);\n    this.resetTimeUpdate_();\n    if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n      return;\n    }\n    this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n    this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n    const metadata = {\n      gapInfo: {\n        from: currentTime,\n        to: nextRange.start(0)\n      }\n    };\n    this.playlistController_.trigger({\n      type: 'gapjumped',\n      metadata\n    });\n    this.tech_.trigger({\n      type: 'usage',\n      name: 'vhs-gap-skip'\n    });\n  }\n  gapFromVideoUnderflow_(buffered, currentTime) {\n    // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n    // playing for ~3 seconds after the video gap starts. This is done to account for\n    // video buffer underflow/underrun (note that this is not done when there is audio\n    // buffer underflow/underrun -- in that case the video will stop as soon as it\n    // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n    // video stalls). The player's time will reflect the playthrough of audio, so the\n    // time will appear as if we are in a buffered region, even if we are stuck in a\n    // \"gap.\"\n    //\n    // Example:\n    // video buffer:   0 => 10.1, 10.2 => 20\n    // audio buffer:   0 => 20\n    // overall buffer: 0 => 10.1, 10.2 => 20\n    // current time: 13\n    //\n    // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n    // however, the audio continued playing until it reached ~3 seconds past the gap\n    // (13 seconds), at which point it stops as well. Since current time is past the\n    // gap, findNextRange will return no ranges.\n    //\n    // To check for this issue, we see if there is a gap that starts somewhere within\n    // a 3 second range (3 seconds +/- 1 second) back from our current time.\n    const gaps = findGaps(buffered);\n    for (let i = 0; i < gaps.length; i++) {\n      const start = gaps.start(i);\n      const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n      if (currentTime - start < 4 && currentTime - start > 2) {\n        return {\n          start,\n          end\n        };\n      }\n    }\n    return null;\n  }\n}\nconst defaultOptions = {\n  errorInterval: 30,\n  getSource(next) {\n    const tech = this.tech({\n      IWillNotUseThisInPlugins: true\n    });\n    const sourceObj = tech.currentSource_ || this.currentSource();\n    return next(sourceObj);\n  }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nconst initPlugin = function (player, options) {\n  let lastCalled = 0;\n  let seekTo = 0;\n  const localOptions = merge(defaultOptions, options);\n  player.ready(() => {\n    player.trigger({\n      type: 'usage',\n      name: 'vhs-error-reload-initialized'\n    });\n  });\n  /**\n   * Player modifications to perform that must wait until `loadedmetadata`\n   * has been triggered\n   *\n   * @private\n   */\n\n  const loadedMetadataHandler = function () {\n    if (seekTo) {\n      player.currentTime(seekTo);\n    }\n  };\n  /**\n   * Set the source on the player element, play, and seek if necessary\n   *\n   * @param {Object} sourceObj An object specifying the source url and mime-type to play\n   * @private\n   */\n\n  const setSource = function (sourceObj) {\n    if (sourceObj === null || sourceObj === undefined) {\n      return;\n    }\n    seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n    player.one('loadedmetadata', loadedMetadataHandler);\n    player.src(sourceObj);\n    player.trigger({\n      type: 'usage',\n      name: 'vhs-error-reload'\n    });\n    player.play();\n  };\n  /**\n   * Attempt to get a source from either the built-in getSource function\n   * or a custom function provided via the options\n   *\n   * @private\n   */\n\n  const errorHandler = function () {\n    // Do not attempt to reload the source if a source-reload occurred before\n    // 'errorInterval' time has elapsed since the last source-reload\n    if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n      player.trigger({\n        type: 'usage',\n        name: 'vhs-error-reload-canceled'\n      });\n      return;\n    }\n    if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n      videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n      return;\n    }\n    lastCalled = Date.now();\n    return localOptions.getSource.call(player, setSource);\n  };\n  /**\n   * Unbind any event handlers that were bound by the plugin\n   *\n   * @private\n   */\n\n  const cleanupEvents = function () {\n    player.off('loadedmetadata', loadedMetadataHandler);\n    player.off('error', errorHandler);\n    player.off('dispose', cleanupEvents);\n  };\n  /**\n   * Cleanup before re-initializing the plugin\n   *\n   * @param {Object} [newOptions] an object with plugin options\n   * @private\n   */\n\n  const reinitPlugin = function (newOptions) {\n    cleanupEvents();\n    initPlugin(player, newOptions);\n  };\n  player.on('error', errorHandler);\n  player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n  // initializing the plugin\n\n  player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\nconst reloadSourceOnError = function (options) {\n  initPlugin(this, options);\n};\nvar version$4 = \"3.17.0\";\nvar version$3 = \"7.1.0\";\nvar version$2 = \"1.3.1\";\nvar version$1 = \"7.2.0\";\nvar version = \"4.0.2\";\nconst Vhs = {\n  PlaylistLoader,\n  Playlist,\n  utils,\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n  lastBandwidthSelector,\n  movingAverageBandwidthSelector,\n  comparePlaylistBandwidth,\n  comparePlaylistResolution,\n  xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n  Object.defineProperty(Vhs, prop, {\n    get() {\n      videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n      return Config[prop];\n    },\n    set(value) {\n      videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n      if (typeof value !== 'number' || value < 0) {\n        videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n        return;\n      }\n      Config[prop] = value;\n    }\n  });\n});\nconst LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n  const newPlaylist = playlistLoader.media();\n  let selectedIndex = -1;\n  for (let i = 0; i < qualityLevels.length; i++) {\n    if (qualityLevels[i].id === newPlaylist.id) {\n      selectedIndex = i;\n      break;\n    }\n  }\n  qualityLevels.selectedIndex_ = selectedIndex;\n  qualityLevels.trigger({\n    selectedIndex,\n    type: 'change'\n  });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n  vhs.representations().forEach(rep => {\n    qualityLevels.addQualityLevel(rep);\n  });\n  handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // VHS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\nVhs.canPlaySource = function () {\n  return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n  if (!keySystemOptions) {\n    return keySystemOptions;\n  }\n  let codecs = {};\n  if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n    codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n  }\n  if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n    codecs.audio = audioPlaylist.attributes.CODECS;\n  }\n  const videoContentType = getMimeForCodec(codecs.video);\n  const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n  const keySystemContentTypes = {};\n  for (const keySystem in keySystemOptions) {\n    keySystemContentTypes[keySystem] = {};\n    if (audioContentType) {\n      keySystemContentTypes[keySystem].audioContentType = audioContentType;\n    }\n    if (videoContentType) {\n      keySystemContentTypes[keySystem].videoContentType = videoContentType;\n    } // Default to using the video playlist's PSSH even though they may be different, as\n    // videojs-contrib-eme will only accept one in the options.\n    //\n    // This shouldn't be an issue for most cases as early intialization will handle all\n    // unique PSSH values, and if they aren't, then encrypted events should have the\n    // specific information needed for the unique license.\n\n    if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n      keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n    } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n    // so we need to prevent overwriting the URL entirely\n\n    if (typeof keySystemOptions[keySystem] === 'string') {\n      keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n    }\n  }\n  return merge(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n *           Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n *        The playlists to look through\n * @param {string[]} keySystems\n *        The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n *         An array of KeySystems objects containing available key systems and their\n *         pssh values\n */\n\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n  return playlists.reduce((keySystemsArr, playlist) => {\n    if (!playlist.contentProtection) {\n      return keySystemsArr;\n    }\n    const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n      const keySystemOptions = playlist.contentProtection[keySystem];\n      if (keySystemOptions && keySystemOptions.pssh) {\n        keySystemsObj[keySystem] = {\n          pssh: keySystemOptions.pssh\n        };\n      }\n      return keySystemsObj;\n    }, {});\n    if (Object.keys(keySystemsOptions).length) {\n      keySystemsArr.push(keySystemsOptions);\n    }\n    return keySystemsArr;\n  }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n *        The player instance\n * @param {Object[]} sourceKeySystems\n *        The key systems options from the player source\n * @param {Object} [audioMedia]\n *        The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n *        The playlists found on the main playlist object\n *\n * @return {Object}\n *         Promise that resolves when the key session has been created\n */\n\nconst waitForKeySessionCreation = ({\n  player,\n  sourceKeySystems,\n  audioMedia,\n  mainPlaylists\n}) => {\n  if (!player.eme.initializeMediaKeys) {\n    return Promise.resolve();\n  } // TODO should all audio PSSH values be initialized for DRM?\n  //\n  // All unique video rendition pssh values are initialized for DRM, but here only\n  // the initial audio playlist license is initialized. In theory, an encrypted\n  // event should be fired if the user switches to an alternative audio playlist\n  // where a license is required, but this case hasn't yet been tested. In addition, there\n  // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n  // languages).\n\n  const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n  const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n  const initializationFinishedPromises = [];\n  const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n  // only place where it should not be deduped is for ms-prefixed APIs, but\n  // the existence of modern EME APIs in addition to\n  // ms-prefixed APIs on Edge should prevent this from being a concern.\n  // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n  keySystemsOptionsArr.forEach(keySystemsOptions => {\n    keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n      player.tech_.one('keysessioncreated', resolve);\n    }));\n    initializationFinishedPromises.push(new Promise((resolve, reject) => {\n      player.eme.initializeMediaKeys({\n        keySystems: keySystemsOptions\n      }, err => {\n        if (err) {\n          reject(err);\n          return;\n        }\n        resolve();\n      });\n    }));\n  }); // The reasons Promise.race is chosen over Promise.any:\n  //\n  // * Promise.any is only available in Safari 14+.\n  // * None of these promises are expected to reject. If they do reject, it might be\n  //   better here for the race to surface the rejection, rather than mask it by using\n  //   Promise.any.\n\n  return Promise.race([\n  // If a session was previously created, these will all finish resolving without\n  // creating a new session, otherwise it will take until the end of all license\n  // requests, which is why the key session check is used (to make setup much faster).\n  Promise.all(initializationFinishedPromises),\n  // Once a single session is created, the browser knows DRM will be used.\n  Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n *        The player instance\n * @param {Object[]} sourceKeySystems\n *        The key systems options from the player source\n * @param {Object} media\n *        The active media playlist\n * @param {Object} [audioMedia]\n *        The active audio media playlist (optional)\n *\n * @return {boolean}\n *         Whether or not options were configured and EME is available\n */\n\nconst setupEmeOptions = ({\n  player,\n  sourceKeySystems,\n  media,\n  audioMedia\n}) => {\n  const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n  if (!sourceOptions) {\n    return false;\n  }\n  player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n  // do nothing.\n\n  if (sourceOptions && !player.eme) {\n    videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n    return false;\n  }\n  return true;\n};\nconst getVhsLocalStorage = () => {\n  if (!window$1.localStorage) {\n    return null;\n  }\n  const storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n  if (!storedObject) {\n    return null;\n  }\n  try {\n    return JSON.parse(storedObject);\n  } catch (e) {\n    // someone may have tampered with the value\n    return null;\n  }\n};\nconst updateVhsLocalStorage = options => {\n  if (!window$1.localStorage) {\n    return false;\n  }\n  let objectToStore = getVhsLocalStorage();\n  objectToStore = objectToStore ? merge(objectToStore, options) : options;\n  try {\n    window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n  } catch (e) {\n    // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n    // storage is set to 0).\n    // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n    // No need to perform any operation.\n    return false;\n  }\n  return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n *        The data URI\n *\n * @return {string|Object}\n *         The parsed object/string, or the original string if no supported media type\n *         was found\n */\n\nconst expandDataUri = dataUri => {\n  if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n    return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n  } // no known case for this data URI, return the string as-is\n\n  return dataUri;\n};\n/**\n * Adds a request hook to an xhr object\n *\n * @param {Object} xhr object to add the onRequest hook to\n * @param {function} callback hook function for an xhr request\n */\n\nconst addOnRequestHook = (xhr, callback) => {\n  if (!xhr._requestCallbackSet) {\n    xhr._requestCallbackSet = new Set();\n  }\n  xhr._requestCallbackSet.add(callback);\n};\n/**\n * Adds a response hook to an xhr object\n *\n * @param {Object} xhr object to add the onResponse hook to\n * @param {function} callback hook function for an xhr response\n */\n\nconst addOnResponseHook = (xhr, callback) => {\n  if (!xhr._responseCallbackSet) {\n    xhr._responseCallbackSet = new Set();\n  }\n  xhr._responseCallbackSet.add(callback);\n};\n/**\n * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n *\n * @param {Object} xhr object to remove the onRequest hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnRequestHook = (xhr, callback) => {\n  if (!xhr._requestCallbackSet) {\n    return;\n  }\n  xhr._requestCallbackSet.delete(callback);\n  if (!xhr._requestCallbackSet.size) {\n    delete xhr._requestCallbackSet;\n  }\n};\n/**\n * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n *\n * @param {Object} xhr object to remove the onResponse hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnResponseHook = (xhr, callback) => {\n  if (!xhr._responseCallbackSet) {\n    return;\n  }\n  xhr._responseCallbackSet.delete(callback);\n  if (!xhr._responseCallbackSet.size) {\n    delete xhr._responseCallbackSet;\n  }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\nVhs.supportsNativeHls = function () {\n  if (!document$1 || !document$1.createElement) {\n    return false;\n  }\n  const video = document$1.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n  if (!videojs.getTech('Html5').isSupported()) {\n    return false;\n  } // HLS manifests can go by many mime-types\n\n  const canPlay = [\n  // Apple santioned\n  'application/vnd.apple.mpegurl',\n  // Apple sanctioned for backwards compatibility\n  'audio/mpegurl',\n  // Very common\n  'audio/x-mpegurl',\n  // Very common\n  'application/x-mpegurl',\n  // Included for completeness\n  'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n  return canPlay.some(function (canItPlay) {\n    return /maybe|probably/i.test(video.canPlayType(canItPlay));\n  });\n}();\nVhs.supportsNativeDash = function () {\n  if (!document$1 || !document$1.createElement || !videojs.getTech('Html5').isSupported()) {\n    return false;\n  }\n  return /maybe|probably/i.test(document$1.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = type => {\n  if (type === 'hls') {\n    return Vhs.supportsNativeHls;\n  }\n  if (type === 'dash') {\n    return Vhs.supportsNativeDash;\n  }\n  return false;\n};\n/**\n * VHS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\nVhs.isSupported = function () {\n  return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n/**\n * A global function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n\nVhs.xhr.onRequest = function (callback) {\n  addOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * A global function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\nVhs.xhr.onResponse = function (callback) {\n  addOnResponseHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onRequest callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offRequest = function (callback) {\n  removeOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onResponse callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offResponse = function (callback) {\n  removeOnResponseHook(Vhs.xhr, callback);\n};\nconst Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of VHS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nclass VhsHandler extends Component {\n  constructor(source, tech, options) {\n    super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n    // use that over the VHS level `bandwidth` option\n\n    if (typeof options.initialBandwidth === 'number') {\n      this.options_.bandwidth = options.initialBandwidth;\n    }\n    this.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n    // so, get it from Video.js via the `playerId`\n\n    if (tech.options_ && tech.options_.playerId) {\n      const _player = videojs.getPlayer(tech.options_.playerId);\n      this.player_ = _player;\n    }\n    this.tech_ = tech;\n    this.source_ = source;\n    this.stats = {};\n    this.ignoreNextSeekingEvent_ = false;\n    this.setOptions_();\n    if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n      tech.overrideNativeAudioTracks(true);\n      tech.overrideNativeVideoTracks(true);\n    } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n      // overriding native VHS only works if audio tracks have been emulated\n      // error early if we're misconfigured\n      throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n    } // listen for fullscreenchange events for this player so that we\n    // can adjust our quality selection quickly\n\n    this.on(document$1, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n      const fullscreenElement = document$1.fullscreenElement || document$1.webkitFullscreenElement || document$1.mozFullScreenElement || document$1.msFullscreenElement;\n      if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n        this.playlistController_.fastQualityChange_();\n      } else {\n        // When leaving fullscreen, since the in page pixel dimensions should be smaller\n        // than full screen, see if there should be a rendition switch down to preserve\n        // bandwidth.\n        this.playlistController_.checkABR_();\n      }\n    });\n    this.on(this.tech_, 'seeking', function () {\n      if (this.ignoreNextSeekingEvent_) {\n        this.ignoreNextSeekingEvent_ = false;\n        return;\n      }\n      this.setCurrentTime(this.tech_.currentTime());\n    });\n    this.on(this.tech_, 'error', function () {\n      // verify that the error was real and we are loaded\n      // enough to have pc loaded.\n      if (this.tech_.error() && this.playlistController_) {\n        this.playlistController_.pauseLoading();\n      }\n    });\n    this.on(this.tech_, 'play', this.play);\n  }\n  /**\n   * Set VHS options based on options from configuration, as well as partial\n   * options to be passed at a later time.\n   *\n   * @param {Object} options A partial chunk of config options\n   */\n\n  setOptions_(options = {}) {\n    this.options_ = merge(this.options_, options); // defaults\n\n    this.options_.withCredentials = this.options_.withCredentials || false;\n    this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n    this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n    this.options_.usePlayerObjectFit = this.options_.usePlayerObjectFit || false;\n    this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n    this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n    this.options_.useNetworkInformationApi = typeof this.options_.useNetworkInformationApi !== 'undefined' ? this.options_.useNetworkInformationApi : true;\n    this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n    this.options_.customTagParsers = this.options_.customTagParsers || [];\n    this.options_.customTagMappers = this.options_.customTagMappers || [];\n    this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n    this.options_.llhls = this.options_.llhls === false ? false : true;\n    this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n    if (typeof this.options_.playlistExclusionDuration !== 'number') {\n      this.options_.playlistExclusionDuration = 60;\n    }\n    if (typeof this.options_.bandwidth !== 'number') {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        const storedObject = getVhsLocalStorage();\n        if (storedObject && storedObject.bandwidth) {\n          this.options_.bandwidth = storedObject.bandwidth;\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'vhs-bandwidth-from-local-storage'\n          });\n        }\n        if (storedObject && storedObject.throughput) {\n          this.options_.throughput = storedObject.throughput;\n          this.tech_.trigger({\n            type: 'usage',\n            name: 'vhs-throughput-from-local-storage'\n          });\n        }\n      }\n    } // if bandwidth was not set by options or pulled from local storage, start playlist\n    // selection at a reasonable bandwidth\n\n    if (typeof this.options_.bandwidth !== 'number') {\n      this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n    } // If the bandwidth number is unchanged from the initial setting\n    // then this takes precedence over the enableLowInitialPlaylist option\n\n    this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n    ['withCredentials', 'useDevicePixelRatio', 'usePlayerObjectFit', 'customPixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n      if (typeof this.source_[option] !== 'undefined') {\n        this.options_[option] = this.source_[option];\n      }\n    });\n    this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n    this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n    this.usePlayerObjectFit = this.options_.usePlayerObjectFit;\n    const customPixelRatio = this.options_.customPixelRatio; // Ensure the custom pixel ratio is a number greater than or equal to 0\n\n    if (typeof customPixelRatio === 'number' && customPixelRatio >= 0) {\n      this.customPixelRatio = customPixelRatio;\n    }\n  } // alias for public method to set options\n\n  setOptions(options = {}) {\n    this.setOptions_(options);\n  }\n  /**\n   * called when player.src gets called, handle a new source\n   *\n   * @param {Object} src the source object to handle\n   */\n\n  src(src, type) {\n    // do nothing if the src is falsey\n    if (!src) {\n      return;\n    }\n    this.setOptions_(); // add main playlist controller options\n\n    this.options_.src = expandDataUri(this.source_.src);\n    this.options_.tech = this.tech_;\n    this.options_.externVhs = Vhs;\n    this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n    this.options_.seekTo = time => {\n      this.tech_.setCurrentTime(time);\n    }; // pass player to allow for player level eventing on construction.\n\n    this.options_.player_ = this.player_;\n    this.playlistController_ = new PlaylistController(this.options_);\n    const playbackWatcherOptions = merge({\n      liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n    }, this.options_, {\n      seekable: () => this.seekable(),\n      media: () => this.playlistController_.media(),\n      playlistController: this.playlistController_\n    });\n    this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n    this.attachStreamingEventListeners_();\n    this.playlistController_.on('error', () => {\n      const player = videojs.players[this.tech_.options_.playerId];\n      let error = this.playlistController_.error;\n      if (typeof error === 'object' && !error.code) {\n        error.code = 3;\n      } else if (typeof error === 'string') {\n        error = {\n          message: error,\n          code: 3\n        };\n      }\n      player.error(error);\n    });\n    const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n    // compatibility with < v2\n\n    this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n    this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n    this.playlists = this.playlistController_.mainPlaylistLoader_;\n    this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n    // controller. Using a custom property for backwards compatibility\n    // with < v2\n\n    Object.defineProperties(this, {\n      selectPlaylist: {\n        get() {\n          return this.playlistController_.selectPlaylist;\n        },\n        set(selectPlaylist) {\n          this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n        }\n      },\n      throughput: {\n        get() {\n          return this.playlistController_.mainSegmentLoader_.throughput.rate;\n        },\n        set(throughput) {\n          this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n          // for the cumulative average\n\n          this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n        }\n      },\n      bandwidth: {\n        get() {\n          let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n          const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n          const tenMbpsAsBitsPerSecond = 10e6;\n          if (this.options_.useNetworkInformationApi && networkInformation) {\n            // downlink returns Mbps\n            // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n            const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n            // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n            // high quality streams are not filtered out.\n\n            if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n              playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n            } else {\n              playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n            }\n          }\n          return playerBandwidthEst;\n        },\n        set(bandwidth) {\n          this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n          // `count` is set to zero that current value of `rate` isn't included\n          // in the cumulative average\n\n          this.playlistController_.mainSegmentLoader_.throughput = {\n            rate: 0,\n            count: 0\n          };\n        }\n      },\n      /**\n       * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n       * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n       * the entire process after that - decryption, transmuxing, and appending - provided\n       * by `throughput`.\n       *\n       * Since the two process are serial, the overall system bandwidth is given by:\n       *   sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n       */\n      systemBandwidth: {\n        get() {\n          const invBandwidth = 1 / (this.bandwidth || 1);\n          let invThroughput;\n          if (this.throughput > 0) {\n            invThroughput = 1 / this.throughput;\n          } else {\n            invThroughput = 0;\n          }\n          const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n          return systemBitrate;\n        },\n        set() {\n          videojs.log.error('The \"systemBandwidth\" property is read-only');\n        }\n      }\n    });\n    if (this.options_.bandwidth) {\n      this.bandwidth = this.options_.bandwidth;\n    }\n    if (this.options_.throughput) {\n      this.throughput = this.options_.throughput;\n    }\n    Object.defineProperties(this.stats, {\n      bandwidth: {\n        get: () => this.bandwidth || 0,\n        enumerable: true\n      },\n      mediaRequests: {\n        get: () => this.playlistController_.mediaRequests_() || 0,\n        enumerable: true\n      },\n      mediaRequestsAborted: {\n        get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n        enumerable: true\n      },\n      mediaRequestsTimedout: {\n        get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n        enumerable: true\n      },\n      mediaRequestsErrored: {\n        get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n        enumerable: true\n      },\n      mediaTransferDuration: {\n        get: () => this.playlistController_.mediaTransferDuration_() || 0,\n        enumerable: true\n      },\n      mediaBytesTransferred: {\n        get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n        enumerable: true\n      },\n      mediaSecondsLoaded: {\n        get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n        enumerable: true\n      },\n      mediaAppends: {\n        get: () => this.playlistController_.mediaAppends_() || 0,\n        enumerable: true\n      },\n      mainAppendsToLoadedData: {\n        get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      audioAppendsToLoadedData: {\n        get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      appendsToLoadedData: {\n        get: () => this.playlistController_.appendsToLoadedData_() || 0,\n        enumerable: true\n      },\n      timeToLoadedData: {\n        get: () => this.playlistController_.timeToLoadedData_() || 0,\n        enumerable: true\n      },\n      buffered: {\n        get: () => timeRangesToArray(this.tech_.buffered()),\n        enumerable: true\n      },\n      currentTime: {\n        get: () => this.tech_.currentTime(),\n        enumerable: true\n      },\n      currentSource: {\n        get: () => this.tech_.currentSource_,\n        enumerable: true\n      },\n      currentTech: {\n        get: () => this.tech_.name_,\n        enumerable: true\n      },\n      duration: {\n        get: () => this.tech_.duration(),\n        enumerable: true\n      },\n      main: {\n        get: () => this.playlists.main,\n        enumerable: true\n      },\n      playerDimensions: {\n        get: () => this.tech_.currentDimensions(),\n        enumerable: true\n      },\n      seekable: {\n        get: () => timeRangesToArray(this.tech_.seekable()),\n        enumerable: true\n      },\n      timestamp: {\n        get: () => Date.now(),\n        enumerable: true\n      },\n      videoPlaybackQuality: {\n        get: () => this.tech_.getVideoPlaybackQuality(),\n        enumerable: true\n      }\n    });\n    this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n    this.tech_.on('bandwidthupdate', () => {\n      if (this.options_.useBandwidthFromLocalStorage) {\n        updateVhsLocalStorage({\n          bandwidth: this.bandwidth,\n          throughput: Math.round(this.throughput)\n        });\n      }\n    });\n    this.playlistController_.on('selectedinitialmedia', () => {\n      // Add the manual rendition mix-in to VhsHandler\n      renditionSelectionMixin(this);\n    });\n    this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n      this.setupEme_();\n    }); // the bandwidth of the primary segment loader is our best\n    // estimate of overall bandwidth\n\n    this.on(this.playlistController_, 'progress', function () {\n      this.tech_.trigger('progress');\n    }); // In the live case, we need to ignore the very first `seeking` event since\n    // that will be the result of the seek-to-live behavior\n\n    this.on(this.playlistController_, 'firstplay', function () {\n      this.ignoreNextSeekingEvent_ = true;\n    });\n    this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n    // this can occur if someone sets the src in player.ready(), for instance\n\n    if (!this.tech_.el()) {\n      return;\n    }\n    this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource); // If we are playing HLS with MSE in Safari, add source elements for both the blob and manifest URLs.\n    // The latter will enable Airplay playback on receiver devices.\n\n    if ((videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS) && this.options_.overrideNative && this.options_.sourceType === 'hls' && typeof this.tech_.addSourceElement === 'function') {\n      this.tech_.addSourceElement(this.mediaSourceUrl_);\n      this.tech_.addSourceElement(this.source_.src);\n    } else {\n      this.tech_.src(this.mediaSourceUrl_);\n    }\n  }\n  createKeySessions_() {\n    const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    this.logger_('waiting for EME key session creation');\n    waitForKeySessionCreation({\n      player: this.player_,\n      sourceKeySystems: this.source_.keySystems,\n      audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n      mainPlaylists: this.playlists.main.playlists\n    }).then(() => {\n      this.logger_('created EME key session');\n      this.playlistController_.sourceUpdater_.initializedEme();\n    }).catch(err => {\n      this.logger_('error while creating EME key session', err);\n      this.player_.error({\n        message: 'Failed to initialize media keys for EME',\n        code: 3\n      });\n    });\n  }\n  handleWaitingForKey_() {\n    // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n    // the key is in the manifest. While this should've happened on initial source load, it\n    // may happen again in live streams where the keys change, and the manifest info\n    // reflects the update.\n    //\n    // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n    // already requested keys for, we don't have to worry about this generating extraneous\n    // requests.\n    this.logger_('waitingforkey fired, attempting to create any new key sessions');\n    this.createKeySessions_();\n  }\n  /**\n   * If necessary and EME is available, sets up EME options and waits for key session\n   * creation.\n   *\n   * This function also updates the source updater so taht it can be used, as for some\n   * browsers, EME must be configured before content is appended (if appending unencrypted\n   * content before encrypted content).\n   */\n\n  setupEme_() {\n    const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n    const didSetupEmeOptions = setupEmeOptions({\n      player: this.player_,\n      sourceKeySystems: this.source_.keySystems,\n      media: this.playlists.media(),\n      audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n    });\n    this.player_.tech_.on('keystatuschange', e => {\n      this.playlistController_.updatePlaylistByKeyStatus(e.keyId, e.status);\n    });\n    this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n    this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n    if (!didSetupEmeOptions) {\n      // If EME options were not set up, we've done all we could to initialize EME.\n      this.playlistController_.sourceUpdater_.initializedEme();\n      return;\n    }\n    this.createKeySessions_();\n  }\n  /**\n   * Initializes the quality levels and sets listeners to update them.\n   *\n   * @method setupQualityLevels_\n   * @private\n   */\n\n  setupQualityLevels_() {\n    const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n    // or qualityLevels_ listeners have already been setup, do nothing.\n\n    if (!player || !player.qualityLevels || this.qualityLevels_) {\n      return;\n    }\n    this.qualityLevels_ = player.qualityLevels();\n    this.playlistController_.on('selectedinitialmedia', () => {\n      handleVhsLoadedMetadata(this.qualityLevels_, this);\n    });\n    this.playlists.on('mediachange', () => {\n      handleVhsMediaChange(this.qualityLevels_, this.playlists);\n    });\n  }\n  /**\n   * return the version\n   */\n\n  static version() {\n    return {\n      '@videojs/http-streaming': version$4,\n      'mux.js': version$3,\n      'mpd-parser': version$2,\n      'm3u8-parser': version$1,\n      'aes-decrypter': version\n    };\n  }\n  /**\n   * return the version\n   */\n\n  version() {\n    return this.constructor.version();\n  }\n  canChangeType() {\n    return SourceUpdater.canChangeType();\n  }\n  /**\n   * Begin playing the video.\n   */\n\n  play() {\n    this.playlistController_.play();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  setCurrentTime(currentTime) {\n    this.playlistController_.setCurrentTime(currentTime);\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  duration() {\n    return this.playlistController_.duration();\n  }\n  /**\n   * a wrapper around the function in PlaylistController\n   */\n\n  seekable() {\n    return this.playlistController_.seekable();\n  }\n  /**\n   * Abort all outstanding work and cleanup.\n   */\n\n  dispose() {\n    if (this.playbackWatcher_) {\n      this.playbackWatcher_.dispose();\n    }\n    if (this.playlistController_) {\n      this.playlistController_.dispose();\n    }\n    if (this.qualityLevels_) {\n      this.qualityLevels_.dispose();\n    }\n    if (this.tech_ && this.tech_.vhs) {\n      delete this.tech_.vhs;\n    }\n    if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n      window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n      this.mediaSourceUrl_ = null;\n    }\n    if (this.tech_) {\n      this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n    }\n    super.dispose();\n  }\n  convertToProgramTime(time, callback) {\n    return getProgramTime({\n      playlist: this.playlistController_.media(),\n      time,\n      callback\n    });\n  } // the player must be playing before calling this\n\n  seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n    return seekToProgramTime({\n      programTime,\n      playlist: this.playlistController_.media(),\n      retryCount,\n      pauseAfterSeek,\n      seekTo: this.options_.seekTo,\n      tech: this.options_.tech,\n      callback\n    });\n  }\n  /**\n   * Adds the onRequest, onResponse, offRequest and offResponse functions\n   * to the VhsHandler xhr Object.\n   */\n\n  setupXhrHooks_() {\n    /**\n     * A player function for setting an onRequest hook\n     *\n     * @param {function} callback for request modifiction\n     */\n    this.xhr.onRequest = callback => {\n      addOnRequestHook(this.xhr, callback);\n    };\n    /**\n     * A player function for setting an onResponse hook\n     *\n     * @param {callback} callback for response data retrieval\n     */\n\n    this.xhr.onResponse = callback => {\n      addOnResponseHook(this.xhr, callback);\n    };\n    /**\n     * Deletes a player onRequest callback if it exists\n     *\n     * @param {function} callback to delete from the player set\n     */\n\n    this.xhr.offRequest = callback => {\n      removeOnRequestHook(this.xhr, callback);\n    };\n    /**\n     * Deletes a player onResponse callback if it exists\n     *\n     * @param {function} callback to delete from the player set\n     */\n\n    this.xhr.offResponse = callback => {\n      removeOnResponseHook(this.xhr, callback);\n    }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n    // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n    this.player_.trigger('xhr-hooks-ready');\n  }\n  attachStreamingEventListeners_() {\n    const playlistControllerEvents = ['seekablerangeschanged', 'bufferedrangeschanged', 'contentsteeringloadstart', 'contentsteeringloadcomplete', 'contentsteeringparsed'];\n    const playbackWatcher = ['gapjumped', 'playedrangeschanged']; // re-emit streaming events and payloads on the player.\n\n    playlistControllerEvents.forEach(eventName => {\n      this.playlistController_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n    playbackWatcher.forEach(eventName => {\n      this.playbackWatcher_.on(eventName, metadata => {\n        this.player_.trigger(_extends({}, metadata));\n      });\n    });\n  }\n}\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\nconst VhsSourceHandler = {\n  name: 'videojs-http-streaming',\n  VERSION: version$4,\n  canHandleSource(srcObj, options = {}) {\n    const localOptions = merge(videojs.options, options); // If not opting to experimentalUseMMS, and playback is only supported with MediaSource, cannot handle source\n\n    if (!localOptions.vhs.experimentalUseMMS && !browserSupportsCodec('avc1.4d400d,mp4a.40.2', false)) {\n      return false;\n    }\n    return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n  },\n  handleSource(source, tech, options = {}) {\n    const localOptions = merge(videojs.options, options);\n    tech.vhs = new VhsHandler(source, tech, localOptions);\n    tech.vhs.xhr = xhrFactory();\n    tech.vhs.setupXhrHooks_();\n    tech.vhs.src(source.src, source.type);\n    return tech.vhs;\n  },\n  canPlayType(type, options) {\n    const simpleType = simpleTypeFromSourceType(type);\n    if (!simpleType) {\n      return '';\n    }\n    const overrideNative = VhsSourceHandler.getOverrideNative(options);\n    const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n    const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n    return canUseMsePlayback ? 'maybe' : '';\n  },\n  getOverrideNative(options = {}) {\n    const {\n      vhs = {}\n    } = options;\n    const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n    const {\n      overrideNative = defaultOverrideNative\n    } = vhs;\n    return overrideNative;\n  }\n};\n/**\n * Check to see if either the native MediaSource or ManagedMediaSource\n * objectx exist and support an MP4 container with both H.264 video\n * and AAC-LC audio.\n *\n * @return {boolean} if  native media sources are supported\n */\n\nconst supportsNativeMediaSources = () => {\n  return browserSupportsCodec('avc1.4d400d,mp4a.40.2', true);\n}; // register source handlers with the appropriate techs\n\nif (supportsNativeMediaSources()) {\n  videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\nif (!videojs.use) {\n  videojs.registerComponent('Vhs', Vhs);\n}\nvideojs.options.vhs = videojs.options.vhs || {};\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n  videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport { videojs as default };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.nc = undefined;","\n      import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./pagination.css\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./pagination.css\";\n       export default content && content.locals ? content.locals : undefined;\n","\n      import API from \"!../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../mini-css-extract-plugin/dist/loader.js!../../css-loader/dist/cjs.js!../../postcss-loader/dist/cjs.js!../../sass-loader/dist/cjs.js!./video-js.css\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../mini-css-extract-plugin/dist/loader.js!../../css-loader/dist/cjs.js!../../postcss-loader/dist/cjs.js!../../sass-loader/dist/cjs.js!./video-js.css\";\n       export default content && content.locals ? content.locals : undefined;\n","import videojs from \"video.js/dist/video\";\nimport 'video.js/dist/video-js.css';\nimport 'videojs-youtube/dist/Youtube.js';\nvar options = {\n    controls: true,\n    preload: 'auto',\n    autoSetup: false,\n    fluid: true,\n    responsive: true\n};\n$(function () {\n    $(\"video\").each(function () {\n        var element = $(this);\n        videojs(element[0], options, function onPlayerReady() { });\n    });\n});\n"],"names":["moment","symbolMap","numberMap","defineLocale","months","split","monthsShort","weekdays","weekdaysShort","weekdaysMin","weekdaysParseExact","longDateFormat","LT","LTS","L","LL","LLL","LLLL","meridiemParse","isPM","input","test","meridiem","hour","minute","isLower","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","s","ss","m","mm","h","hh","d","dd","M","MM","y","yy","preparse","string","replace","match","postformat","dayOfMonthOrdinalParse","ordinal","week","dow","doy","factory","days","directionSetting","alignSetting","findAlignSetting","value","toLowerCase","VTTCue","startTime","endTime","text","this","hasBeenReset","_id","_pauseOnExit","_startTime","_endTime","_text","_region","_vertical","_snapToLines","_line","_lineAlign","_position","_positionAlign","_size","_align","Object","defineProperties","enumerable","get","set","TypeError","setting","findDirectionSetting","SyntaxError","console","warn","Error","displayState","undefined","prototype","getCueAsHTML","WebVTT","convertCueToDOMTree","window","module","exports","monthsParseExact","number","l","ll","lll","llll","meridiemHour","hm","period","day","lastDigit","last2Digits","$","data_click","data_target","getFunction","code","argNames","fn","parts","length","shift","push","Function","constructor","apply","isMethodProxySafe","method","asyncRequest","element","options","confirm","loading","duration","getAttribute","parseInt","extend","type","url","cache","beforeSend","xhr","result","setRequestHeader","asyncOnBeforeSend","arguments","show","complete","hide","success","data","status","contentType","mode","indexOf","toUpperCase","each","i","update","prepend","append","replaceWith","html","asyncOnSuccess","getResponseHeader","error","name","$element","is","attr","formdata","FormData","v","file","files","n","processData","ajax","document","on","evt","preventDefault","href","target","form","parents","offset","Math","round","pageX","left","pageY","top","setTimeout","removeData","currentTarget","validationInfo","clickInfo","clickTarget","isCancel","hasClass","validate","action","concat","serializeArray","jQuery","numbersPast","numbersFuture","translate","withoutSuffix","key","isFuture","verbalNumber","createElement","setAttributes","attributes","insert","weekEndings","num","charAt","hours","minutes","call","monthsShortDot","monthsParse","monthsRegex","format","month","monthsShortRegex","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","w","ww","b","_extends","isFunction","InterceptorsStorage","RetryManager","createXHR","httpHandler","requestInterceptorsStorage","responseInterceptorsStorage","retryManager","parseHeaders","headers","trim","forEach","row","index","slice","Array","isArray","initParams","uri","callback","params","_createXHR","requestType","getIsEnabled","requestInterceptorPayload","body","metadata","retry","timeout","updatedPayload","execute","called","err","response","getBody","responseText","responseType","responseXML","firefoxBugTakenEffect","documentElement","nodeName","e","getXml","isJson","JSON","parse","errorFunc","clearTimeout","timeoutTimer","retryTimeout","statusCode","aborted","shouldRetry","responseInterceptorPayload","failureResponse","responseUrl","responseURL","_updatedPayload","moveToNextAttempt","getCurrentFuzzedDelay","loadFunc","useXDR","rawRequest","getAllResponseHeaders","_updatedPayload2","cors","XDomainRequest","XMLHttpRequest","sync","json","stringify","onreadystatechange","readyState","onload","onerror","onprogress","onabort","ontimeout","open","username","password","withCredentials","abort","hasOwnProperty","obj","isEmpty","send","array","iterator","forEachArray","numbersNouns","numberNoun","hundred","floor","ten","one","word","numberAsNoun","output","time","css","styleElement","styleSheet","cssText","firstChild","removeChild","appendChild","createTextNode","relativeTimeWithMutation","mutationTable","substring","softMutation","mutation","lastNumber","minWeekdaysParse","weekdaysParse","fullWeekdaysParse","shortWeekdaysParse","token","pluralForm","plurals","pluralize","u","f","str","version$5","hooks_","hooks","removeHook","splice","FullscreenApi","prefixed","apiMap","specApi","browserApi","history","log$1","createLogger$1","delimiter","styles","logByType","level","log","args","lvl","levels","lvlRegExp","RegExp","resultName","unshift","info","LogByTypeFactory","createLogger","subName","subDelimiter","subStyles","resultDelimiter","createNewLogger","newName","newDelimiter","newStyles","all","off","debug","DEFAULT","filter","fname","historyItem","clear","disable","enable","toString$1","toString","keys","object","isObject$1","reduce","initial","accum","isPlain","merge$2","sources","source","values$1","defineLazyProperty","getValue","setter","defineProperty","writable","configurable","Obj","freeze","__proto__","isObject","merge","values","ANDROID_VERSION","IS_IPOD","IOS_VERSION","IS_ANDROID","IS_FIREFOX","IS_EDGE","IS_CHROMIUM","IS_CHROME","CHROMIUM_VERSION","CHROME_VERSION","IS_CHROMECAST_RECEIVER","Boolean","cast","framework","CastReceiverContext","IE_VERSION","IS_SAFARI","IS_WINDOWS","IS_IPAD","IS_IPHONE","IS_TIZEN","IS_WEBOS","IS_SMART_TV","TOUCH_ENABLED","isReal","navigator","maxTouchPoints","DocumentTouch","UAD","userAgentData","platform","brands","find","brand","version","USER_AGENT","userAgent","major","parseFloat","minor","exec","IS_IOS","IS_ANY_SAFARI","browser","isNonBlankString","isEl","nodeType","isInFrame","parent","self","x","createQuerier","selector","context","querySelector","ctx","createEl","tagName","properties","content","el","getOwnPropertyNames","propName","val","textContent","attrName","setAttribute","appendContent","innerText","prependTo","child","insertBefore","classToCheck","throwIfWhitespace","classList","contains","addClass","classesToAdd","add","prev","current","removeClass","classesToRemove","remove","toggleClass","classToToggle","predicate","className","toggle","attrValue","removeAttribute","getAttributes","tag","knownBooleans","attrs","attrVal","includes","attribute","blockTextSelection","focus","onselectstart","unblockTextSelection","getBoundingClientRect","parentNode","rect","k","height","computedStyle","width","findPosition","offsetParent","offsetWidth","offsetHeight","fullscreenElement","offsetLeft","offsetTop","getPointerPosition","event","translated","item","transform","map","Number","assignedSlot","parentElement","WebKitCSSMatrix","transformValue","getComputedStyle","matrix","m41","m42","host","position","boxTarget","box","boxW","boxH","offsetY","offsetX","changedTouches","max","min","isTextNode$1","emptyEl","normalizeContent","node","insertContent","isSingleLeftClick","button","buttons","$$","prop","computedStyleValue","getPropertyValue","copyStyleSheetsToWindow","win","styleSheets","cssRules","rule","join","style","head","link","rel","media","mediaText","Dom","isTextNode","videojs$1","_windowLoaded","autoSetup","vids","getElementsByTagName","audios","divs","mediaEls","mediaEl","autoSetupTimeout","player","wait","vjs","setWindowLoaded","removeEventListener","addEventListener","createStyleElement","setTextContent","DomData","WeakMap","_supportsPassive","_guid","newGUID","_cleanUpEvents","elem","has","handlers","dispatcher","detachEvent","disabled","delete","_handleMultipleEvents","types","fixEvent","fixed_","returnTrue","returnFalse","isPropagationStopped","isImmediatePropagationStopped","old","deprecatedProps","srcElement","relatedTarget","fromElement","toElement","returnValue","defaultPrevented","stopPropagation","cancelBubble","stopImmediatePropagation","clientX","doc","scrollLeft","clientLeft","clientY","scrollTop","clientTop","which","charCode","keyCode","passiveEvents","guid","hash","handlersCopy","opts","supportsPassive","passive","attachEvent","removeType","t","trigger","elemData","ownerDocument","bubbles","targetData","func","any","Events","UPDATE_REFRESH_INTERVAL","bind_","uid","bound","bind","throttle","last","performance","now","debounce$1","immediate","debounced","later","cancel","Fn","debounce","EVENT_MAP","EventTarget$2","ael","allowedEvents_","queueTrigger","Map","oldTimeout","size","dispatchEvent","objName","name_","isEvented","eventBusEl_","every","isValidEventType","validateTarget","fnName","validateEventType","validateListener","listener","normalizeListenArgs","isTargetingSelf","listen","EventedMixin","removeListenerOnDispose","removeRemoverOnTargetDispose","wrapper","largs","targetOrType","typeOrListener","evented","eventBusKey","assign","eventedCallbacks","el_","StatefulMixin","state","setState","stateUpdates","changes","from","to","stateful","defaultState","handleStateChanged","toTitleCase$1","titleCaseEquals","str1","str2","Str","toTitleCase","Component$1","ready","play","player_","isDisposed_","parentComponent_","options_","id_","id","c","handleLanguagechange","children_","childIndex_","childNameIndex_","setTimeoutIds_","Set","setIntervalIds_","rafIds_","namedRafs_","clearingTimersOnDispose_","initChildren","reportTouchActivity","enableTouchActivity","dispose","readyQueue_","restoreEl","replaceChild","isDisposed","localize","tokens","defaultValue","language","languages","primaryCode","primaryLang","localizedString","ret","contentEl","contentEl_","children","getChildById","getChild","getDescendant","names","acc","currentChild","setIcon","iconName","experimentalSvgIcons","xmlnsURL","iconContainer","svgEl","createElementNS","setAttributeNS","useEl","iconIsSet_","addChild","component","componentName","componentClassName","componentClass","ComponentClass","getComponent","refNode","childFound","compEl","parentOptions","handleAdd","playerOptions","newChild","workingChildren","Tech","some","wchild","isTech","buildCSSClass","isReady_","triggerReady","readyQueue","lockShowing","unlockShowing","skipListeners","dimension","dimensions","widthOrHeight","pxIndex","currentDimension","computedWidthOrHeight","isNaN","currentDimensions","currentWidth","currentHeight","getPositions","boundingClientRect","right","bottom","center","blur","handleKeyDown","spatialNavigation","enabled","handleKeyPress","emitTapEvents","touchStart","firstTouch","couldBeTap","touches","xdiff","ydiff","sqrt","noTap","reportUserActivity","report","touchHolding","clearInterval","setInterval","touchEnd","timeoutId","clearTimersOnDispose_","interval","intervalId","requestAnimationFrame","requestNamedAnimationFrame","cancelNamedAnimationFrame","cancelAnimationFrame","idName","cancelName","getIsDisabled","getIsExpresslyInert","inert","getIsFocusable","tabIndex","getIsAvailableToBeFocused","isVisibleStyleProperty","elementStyle","thisVisibility","elementCenter","clientWidth","innerWidth","clientHeight","innerHeight","pointContainer","elementFromPoint","isVisible","opacity","registerComponent","ComponentToRegister","isComp","isPrototypeOf","reason","components_","Player","players","playerNames","getRange","valueIndex","ranges","rangeIndex","maxIndex","rangeCheck","createTimeRangesObj","timeRangesObj","start","end","Symbol","createTimeRanges$1","defaultImplementation","seconds","guide","gm","gh","Infinity","implementation","setFormatTime","customImplementation","resetFormatTime","formatTime","Time","createTimeRanges","createTimeRange","bufferedPercent","buffered","bufferedDuration","MediaError","message","defaultMessages","isPromise","then","silencePromise","errorTypes","MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED","trackToJson_","track","cues","cue","textTrackConverter","tech","trackEls","trackObjs","trackEl","src","textTracks","addedTrack","addRemoteTextTrack","addCue","MODAL_CLASS_NAME","ModalDialog","super","handleKeyDown_","close_","close","opened_","hasBeenOpened_","hasBeenFilled_","closeable","uncloseable","role","descEl_","description","label","previouslyActiveEl_","desc","fillAlways","fill","wasPlaying_","paused","pauseOnOpen","pause","hadControls_","controls","conditionalFocus_","opened","conditionalBlur_","temporary","closeable_","temp","controlText","fillWith","parentEl","nextSiblingEl","nextSibling","empty","closeButton","content_","activeEl","activeElement","playerEl","originalEvent","focusableEls","focusableEls_","focusIndex","shiftKey","allChildren","querySelectorAll","HTMLAnchorElement","HTMLAreaElement","hasAttribute","HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLButtonElement","HTMLIFrameElement","HTMLObjectElement","HTMLEmbedElement","TrackList","tracks","tracks_","addTrack","labelchange_","removeTrack","rtrack","getTrackById","change","addtrack","removetrack","labelchange","disableOthers$1","list","disableOthers","selected","TextTrackList","queueChange_","triggerSelectedlanguagechange","triggerSelectedlanguagechange_","kind","selectedlanguagechange_","TextTrackCueList","setCues_","length_","oldLength","cues_","defineProp","getCueById","VideoTrackKind","alternative","captions","main","sign","subtitles","commentary","AudioTrackKind","TextTrackKind","descriptions","chapters","TextTrackMode","hidden","showing","Track","trackProps","newLabel","parseUrl","URL","baseURI","getAbsoluteURL","getFileExtension","path","pathParts","pop","isCrossOrigin","winLoc","location","origin","Url","commonjsGlobal","globalThis","g","createCommonjsModule","window_1","_extends_1","r","__esModule","_extends$1","isFunction_1","alert","prompt","_createForOfIteratorHelperLoose","o","allowArrayLike","it","next","minLen","_arrayLikeToArray","_unsupportedIterableToArray","done","arr","len","arr2","interceptors","typeToInterceptorsMap_","enabled_","_proto","reset","addInterceptor","interceptor","interceptorsSet","removeInterceptor","clearInterceptorsByType","getForType","payload","_step","_iterator","maxAttempts_","delayFactor_","fuzzFactor_","initialDelay_","getMaxAttempts","setMaxAttempts","maxAttempts","getDelayFactor","setDelayFactor","delayFactor","getFuzzFactor","setFuzzFactor","fuzzFactor","getInitialDelay","setInitialDelay","initialDelay","createRetry","_temp","_ref","Retry","currentDelay_","currentAttempt_","_proto2","delayDelta","getCurrentDelay","getCurrentMinPossibleDelay","getCurrentMaxPossibleDelay","lowValue","highValue","random","decodeResponseBody","responseBody","cause","TextDecoder","charset","contentTypeHeader","_contentType$split","decode","String","fromCharCode","Uint8Array","lib","default_1","default","parseCues","srcContent","parser","Parser","vttjs","StringDecoder","errors","oncue","onparsingerror","onflush","groupCollapsed","groupEnd","flush","loadTrack","crossOrigin","tech_","loaded_","TextTrack","settings","srclang","default_","activeCues_","preload_","preloadTextTracks","activeCues","changed","timeupdateHandler","rvf_","requestVideoFrameCallback","stopTracking","startTracking","newMode","ct","currentTime","active","cancelVideoFrameCallback","originalCue","originalCue_","removeCue","cuechange","AudioTrack","newEnabled","VideoTrack","newSelected","HTMLTrackElement","NONE","LOADED","load","LOADING","ERROR","NORMAL","audio","ListClass","changing_","enabledChange_","TrackClass","capitalName","video","selectedChange_","getterName","privateName","REMOTE","remoteText","remoteTextEl","trackElements","trackElements_","addTrackElement_","trackElement","getTrackElementByTrack_","trackElement_","removeTrackElement_","ALL","doccy","topLevel","document_1","_objCreate","create","F","ParsingError","errorData","parseTimeStamp","computeSeconds","Settings","parseOptions","keyValueDelim","groupDelim","groups","kv","parseCue","regionList","oInput","consumeTimeStamp","ts","Errors","BadTimeStamp","skipWhitespace","substr","region","alt","vals","vals0","integer","percent","vertical","line","lineAlign","snapToLines","align","middle","positionAlign","consumeCueSettings","BadSignature","dflt","defaultKey","a","TEXTAREA_ELEMENT","TAG_NAME","ruby","rt","lang","DEFAULT_COLOR_CLASS","white","lime","cyan","red","yellow","magenta","blue","black","TAG_ANNOTATION","NEEDS_PARENT","parseContent","nextToken","shouldAdd","localName","annotation","rootDiv","tagStack","innerHTML","createProcessingInstruction","classes","cl","bgColor","colorName","propValue","strongRTLRanges","isStrongRTLChar","currentRange","determineBidi","cueDiv","nodeStack","childNodes","pushNodes","nextTextNode","charCodeAt","StyleBox","CueStyleBox","styleOptions","color","backgroundColor","display","writingMode","unicodeBidi","applyStyles","div","direction","textAlign","font","whiteSpace","textPos","formatStyle","move","BoxPosition","lh","rects","getClientRects","lineHeight","moveBoxToLinePosition","styleBox","containerBox","boxPositions","boxPosition","linePos","textTrackList","mediaElement","trackList","count","computeLinePos","axis","step","maxPosition","initialAxis","abs","ceil","reverse","calculatedPercentage","bestPosition","specifiedPosition","percentage","overlapsOppositeAxis","within","overlapsAny","p","intersectPercentage","findBestPosition","toCSSCompatValues","WebVTT$1","unit","toMove","overlaps","b2","boxes","container","reference","getSimpleBoxPosition","decodeURIComponent","encodeURIComponent","cuetext","processCues","overlay","paddedOverlay","margin","shouldCompute","fontSize","decoder","buffer","reportOrThrowError","collectNextLine","pos","parseHeader","ontimestampmap","parseTimestampMap","xy","anchor","VTTRegion","lines","regionAnchorX","regionAnchorY","viewportAnchorX","viewportAnchorY","scroll","onregion","parseRegion","stream","alreadyCollectedLine","hasSubstring","vtt","vttcue","scrollSetting","isValidPercentValue","vttregion","_width","_lines","_regionAnchorX","_regionAnchorY","_viewportAnchorX","_viewportAnchorY","_scroll","findScrollSetting","browserIndex","cueShim","regionShim","nativeVTTCue","nativeVTTRegion","shim","restore","onDurationChange_","onDurationChange","trackProgress_","trackProgress","trackCurrentTime_","trackCurrentTime","stopTrackingCurrentTime_","stopTrackingCurrentTime","disposeSourceHandler_","disposeSourceHandler","queuedHanders_","hasStarted_","props","featuresProgressEvents","manualProgressOn","featuresTimeupdateEvents","manualTimeUpdatesOn","nativeCaptions","nativeTextTracks","featuresNativeTextTracks","emulateTextTracks","autoRemoteTextTracks_","initTrackListeners","nativeControlsForTouch","triggerSourceset","manualProgress","manualProgressOff","stopTrackingProgress","progressInterval","numBufferedPercent","bufferedPercent_","duration_","manualTimeUpdates","manualTimeUpdatesOff","currentTimeInterval","manuallyTriggered","clearTracks","removeRemoteTextTrack","cleanupAutoTextTracks","setCrossOrigin","error_","played","setScrubbing","_isScrubbing","scrubbing","setCurrentTime","_seconds","trackListChanges","addWebVttScript_","script","remoteTracks","remoteTextTracks","handleAddTrack","handleRemoveTrack","updateDisplay","textTracksChanges","addTextTrack","createTrackHelper","createRemoteTextTrack","manualCleanup","htmlTrackElement","remoteTextTrackEls","getVideoPlaybackQuality","requestPictureInPicture","Promise","reject","disablePictureInPicture","setDisablePictureInPicture","cb","setPoster","playsinline","setPlaysinline","overrideNativeAudioTracks","override","overrideNativeVideoTracks","canPlayType","_type","canPlaySource","srcObj","registerTech","techs_","defaultTechOrder_","getTech","videojs","featuresVolumeControl","featuresMuteControl","featuresFullscreenResize","featuresPlaybackRate","featuresSourceset","featuresVideoFrameCallback","withSourceHandlers","_Tech","registerSourceHandler","handler","sourceHandlers","can","selectSourceHandler","canHandleSource","sh","originalFn","sourceHandler_","setSource","nativeSourceHandler","currentSource_","handleSource","middlewares","middlewareInstances","TERMINATOR","setSourceHelper","mediate","middleware","arg","callMethod","middlewareValue","middlewareIterator","terminated","mws","mw","executeRight","allowedGetters","muted","seekable","volume","ended","allowedSetters","setMuted","setVolume","allowedMediators","lastRun","mwFactory","mwrest","mwf","mwi","getOrCreateFactory","_src","MimetypesKind","opus","ogv","mp4","mov","m4v","mkv","m4a","mp3","aac","caf","flac","oga","wav","m3u8","mpd","jpg","jpeg","gif","png","svg","webp","getMimetype","ext","filterSource","newsrc","srcobj","fixSource","mimetype","backKeyCode","SpatialNavKeyCodes","codes","ff","rw","back","isEventKey","keyName","getEventName","SpatialNavigation","focusableComponents","isListening_","isPaused_","onKeyDown_","lastFocusedComponent_","updateFocusableComponents","refocusComponent","handlePlayerFocus_","handlePlayerBlur_","errorDisplay","stop","actualEvent","performMediaAction_","userSeek_","liveTracker","isLive","nextSeekedFromUser","resume","nextFocusedElement","isChildrenOfPlayer","currentComponent","getCurrentComponent","closest","searchForTrackSelect_","searchForChildrenCandidates","componentsArray","items","findSuitableDOMChild","buttonContainer","searchForSuitableChild","suitableChild","curComp","currentFocusedComponent","currentPositions","candidates","isInDirection_","bestCandidate","findBestCandidate_","focusedComponent","currentCenter","minDistance","candidate","candidateCenter","distance","calculateDistance_","srcRect","targetRect","userActive","center1","center2","dx","dy","j","techOrder","techName","isSupported","loadTech_","ClickableComponent","handleMouseOver_","handleMouseOver","handleMouseOut_","handleMouseOut","handleClick_","handleClick","tabIndex_","createControlTextEl","controlTextEl_","controlText_","localizedText","nonIconControl","noUITitleAttributes","clickHandler","PosterImage","update_","crossorigin","poster","setSrc","darkGray","lightGray","fontMap","monospace","sansSerif","serif","monospaceSansSerif","monospaceSerif","proportionalSansSerif","proportionalSerif","casual","smallcaps","constructColor","hex","tryUpdateStyle","getCSSPositionValue","updateDisplayHandler","updateDisplayOverlay","toggleDisplay","preselectTrack","screenOrientation","screen","orientation","changeOrientationEvent","modes","userPref","cache_","selectedLanguage","firstDesc","firstCaptions","preferredTrack","clearDisplay","allowMultipleShowingTracks","showingTracks","updateForTrack","descriptionsTrack","captionsSubtitlesTrack","CSS","supports","textTrackDisplay","vjsTextTrackCues","controlBarHeight","controlBar","playerHeight","vjsTextTrackCue","inset","insetStyles","videoHeight","playerWidth","playerAspectRatio","videoAspectRatio","videoWidth","insetInlineMatch","insetBlockMatch","updateDisplayState","overrides","textTrackSettings","getValues","textOpacity","backgroundOpacity","windowColor","windowOpacity","edgeStyle","textShadow","fontPercent","fontFamily","fontVariant","cueEl","isAudio","playerType","dir","Button","BigPlayButton","mouseused_","handleMouseDown","playPromise","playToggle","playFocus","PlayToggle","replay","handlePlay","handlePause","handleEnded","handleSeeked","TimeDisplay","updateTextNode_","span","labelText_","textNode_","enableSmoothSeeking","updateContent","formattedTime_","oldNode","CurrentTimeDisplay","getCache","DurationDisplay","RemainingTimeDisplay","displayNegative","remainingTimeDisplay","remainingTime","updateShowing","SeekToLive","updateLiveEdgeStatus","updateLiveEdgeStatusHandler_","textEl_","atLiveEdge","seekToLiveEdge","clamp","Num","Slider","handleMouseDown_","handleMouseUp_","handleMouseUp","handleMouseMove_","handleMouseMove","bar","barName","playerEvent","progress","getProgress","progress_","sizeKey","toFixed","getPercent","calculateDistance","spatialNavOptions","spatialNavEnabled","horizontalSeek","stepBack","stepForward","bool","vertical_","percentify","partEls_","loadedText","separator","percentageEl_","seekableEnd","bufferedEnd","percent_","part","dataset","seekBarRect","seekBarPoint","tooltipRect","playerRect","seekBarPointPx","spaceLeftOfPoint","spaceRightOfPoint","pullTooltipBy","write","updateTime","liveWindow","secondsBehind","PlayProgressBar","timeTooltip","MouseTimeDisplay","SeekBar","shouldDisableSeekWhileScrubbingOnMobile","disableSeekWhileScrubbingOnMobile","shouldDisableSeekWhileScrubbingOnMobile_","pendingSeekTime_","setEventHandlers_","updateInterval","enableIntervalHandler_","enableInterval_","disableIntervalHandler_","disableInterval_","toggleVisibility_","visibilityState","getCurrentTime_","liveCurrentTime","currentTime_","seekableStart","videoWasPlaying","mouseDown","newTime","mouseTimeDisplay","stepSeconds","handleAction","gotoFraction","pageMultiplier","ProgressControl","throttledHandleMouseSeek","handleMouseSeek","handleMouseUpHandler_","handleMouseDownHandler_","seekBar","playProgressBar","seekBarEl","removeListenersAddedOnMousedownAndTouchstart","PictureInPictureToggle","handlePictureInPictureChange","handlePictureInPictureEnabledChange","handlePictureInPictureAudioModeChange","currentType","audioPosterMode","audioOnlyMode","isInPictureInPicture","exitPictureInPicture","pictureInPictureEnabled","enableDocumentPictureInPicture","FullscreenToggle","handleFullscreenChange","fsApi_","fullscreenEnabled","isFullscreen","exitFullscreen","requestFullscreen","rangeBarRect","rangeBarPoint","volumeBarPointPx","updateVolume","MouseVolumeLevelDisplay","VolumeBar","updateLastVolume_","updateARIAAttributes","mouseVolumeLevelDisplay","volumeBarEl","volumeBarRect","volumeBarPoint","checkMuted","ariaValue","volumeAsPercentage_","volumeBeforeDrag","lastVolume_","VolumeControl","volumeBar","checkVolumeSupport","throttledHandleMouseMove","orientationClass","MuteToggle","checkMuteSupport","vol","lastVolume","volumeToSet","updateIcon_","updateControlText_","VolumePanel","inline","volumeControl","handleKeyPressHandler_","volumePanelState_","muteToggle","handleVolumeControlKeyUp","sliderActive_","sliderInactive_","SkipForward","validOptions","skipTime","getSkipForwardTime","toLocaleString","skipButtons","forward","currentVideoTime","SkipBackward","getSkipBackwardTime","backward","Menu","menuButton_","menuButton","focusedChild_","boundHandleBlur_","handleBlur","boundHandleTapClick_","handleTapClick","addEventListenerForItem","removeEventListenerForItem","addItem","childComponent","contentElType","btn","buttonPressed_","unpressButton","childComponents","foundComponent","stepChild","MenuButton","buttonClass","handleMenuKeyUp_","handleMenuKeyUp","menu","handleMouseLeave","handleSubmenuKeyDown","createMenu","hideThreshold_","title","titleEl","titleComponent","createItems","buildWrapperCSSClass","menuButtonClass","pressButton","handleSubmenuKeyPress","TrackButton","updateHandler","MenuItem","selectable","isSelected_","multiSelectable","menuItemEl","TextTrackMenuItem","kinds","changeHandler","handleTracksChange","selectedLanguageChangeHandler","handleSelectedLanguageChange","onchange","Event","createEvent","initEvent","referenceTrack","shouldBeSelected","OffTextTrackMenuItem","allHidden","TextTrackButton","TrackMenuItem","label_","kinds_","kind_","ChaptersTrackMenuItem","ChaptersButton","selectCurrentItem_","track_","findChaptersTrack","setTrack","updateHandler_","remoteTextTrackEl","getMenuCaption","mi","DescriptionsButton","SubtitlesButton","CaptionSettingsMenuItem","CaptionsButton","SubsCapsMenuItem","parentSpan","SubsCapsButton","language_","AudioTrackMenuItem","audioTracks","featuresNativeAudioTracks","AudioTrackButton","PlaybackRateMenuItem","rate","playbackRate","PlaybackRateMenuButton","labelElId_","updateVisibility","updateLabel","handlePlaybackRateschange","labelEl_","rates","playbackRates","playbackRateSupported","Spacer","ControlBar","ErrorDisplay","TextTrackSelect","selectLabelledbyIds","legendId","labelId","SelectOptions","optionText","optionId","option","TextTrackFieldset","legendElement","legendText","selects","selectConfig","selectConfigs","selectClassName","textTrackSelect","TextTrackSettingsColors","textTrackComponentid","ElFgColorFieldset","fieldSets","ElBgColorFieldset","ElWinColorFieldset","TextTrackSettingsFont","TrackSettingsControls","defaultsDescription","resetButton","doneButton","LOCAL_STORAGE_KEY$1","COLOR_BLACK","COLOR_BLUE","COLOR_CYAN","COLOR_GREEN","COLOR_MAGENTA","COLOR_RED","COLOR_WHITE","COLOR_YELLOW","OPACITY_OPAQUE","OPACITY_SEMI","OPACITY_TRANS","parseOptionValue","renderModalComponents","endDialog","setDefaults","persistTextTrackSettings","bindFunctionsToSelectsAndButtons","restoreSettings","textTrackSettingsColors","textTrackSettingsFont","trackSettingsControls","saveSettings","config","selectedIndex","setValues","setSelectedOption","localStorage","getItem","setItem","removeItem","ttDisplay","RESIZE_OBSERVER_AVAILABLE","ResizeObserver","loadListener_","resizeObserver_","debouncedHandler_","resizeHandler","observe","contentWindow","unloadListener_","unobserve","disconnect","resizeObserver","defaults$1","trackingThreshold","liveTolerance","trackLiveHandler_","trackLive_","handlePlay_","handleFirstTimeupdate_","handleFirstTimeupdate","handleSeeked_","seekToLiveEdge_","reset_","handleDurationchange","toggleTracking","deltaTime","lastTime_","pastSeekEnd_","pastSeekEnd","isBehind","seekedBehindLive_","timeupdateSeen_","behindLiveEdge_","liveui","isTracking","hasStarted","trackingInterval_","timeDiff","nextSeekedFromUser_","lastSeekEnd_","seekableEnds","sort","seekableStarts","behindLiveEdge","updateDom_","els","techEl","techAriaAttrs","techAriaAttr","defaults","initialDisplay","takeFocus","class","preventScroll","forceDisplayTimeout","sourcesetLoad","srcUrls","innerHTMLDescriptorPolyfill","cloneNode","dummy","docFrag","createDocumentFragment","Element","getDescriptor","priority","descriptor","getOwnPropertyDescriptor","firstSourceWatch","resetSourceWatch_","innerDescriptor","HTMLMediaElement","getInnerHTMLDescriptor","appendWrapper","appendFn","retval","srcDescriptorPolyfill","setupSourceset","resetSourceset_","srcDescriptor","getSrcDescriptor","oldSetAttribute","oldLoad","currentSrc","Html5","crossoriginTracks","initNetworkState_","handleLateInit_","enableSourceset","setupSourcesetHandling_","isScrubbing_","hasChildNodes","nodes","nodesLength","removeNodes","proxyNativeTracks_","restoreMetadataTracksInIOSNativePlayer_","setControls","proxyWebkitFullscreen_","disposeMediaElement","metadataTracksPreFullscreenState","takeMetadataTrackSnapshot","storedMode","restoreTrackMode","storedTrack","overrideNative_","lowerCaseType","eventName","proxyNativeTracksForType_","elTracks","techTracks","listeners","removeOldTracks","removeTracks","found","playerElIngest","movingMediaElementInDOM","clone","techId","playerId","preload","settingsAttrs","networkState","loadstartFired","setLoadstartFired","triggerLoadstart","eventsToTrigger","isScrubbing","fastSeek","checkProgress","NaN","endFn","beginFn","webkitPresentationMode","nativeIOSFullscreen","supportsFullScreen","webkitEnterFullScreen","enterFullScreen","HAVE_METADATA","exitFullScreen","webkitDisplayingFullscreen","webkitExitFullScreen","webkitKeys","addSourceElement","srcUrl","mimeType","sourceAttributes","sourceElement","removeSourceElement","sourceElements","resetMediaElement","videoPlaybackQuality","webkitDroppedFrameCount","webkitDecodedFrameCount","droppedVideoFrames","totalVideoFrames","creationTime","TEST_VID","canControlVolume","canControl","canMuteVolume","canControlPlaybackRate","canOverrideAttributes","noop","supportsNativeTextTracks","supportsNativeVideoTracks","videoTracks","supportsNativeAudioTracks","TECH_EVENTS_RETRIGGER","TECH_EVENTS_QUEUE","canplay","canplaythrough","playing","seeked","BREAKPOINT_ORDER","BREAKPOINT_CLASSES","DEFAULT_BREAKPOINTS","tiny","xsmall","small","medium","large","xlarge","huge","getTagSettings","boundDocumentFullscreenChange_","documentFullscreenChange_","boundFullWindowOnEscKey_","fullWindowOnEscKey","boundUpdateStyleEl_","updateStyleEl_","boundApplyInitTime_","applyInitTime_","boundUpdateCurrentBreakpoint_","updateCurrentBreakpoint_","boundHandleTechClick_","handleTechClick_","boundHandleTechDoubleClick_","handleTechDoubleClick_","boundHandleTechTouchStart_","handleTechTouchStart_","boundHandleTechTouchMove_","handleTechTouchMove_","boundHandleTechTouchEnd_","handleTechTouchEnd_","boundHandleTechTap_","handleTechTap_","boundUpdatePlayerHeightOnAudioOnlyMode_","updatePlayerHeightOnAudioOnlyMode_","isFullscreen_","isPosterFromTech_","queuedCallbacks_","userActive_","debugEnabled_","audioOnlyMode_","audioPosterMode_","audioOnlyCache_","hiddenChildren","tagAttributes","languagesToLower","languages_","resetCache_","poster_","controls_","changingSrc_","playCallbacks_","playTerminatedQueue_","autoplay","plugins","scrubbing_","fullscreenchange","fluid_","playerOptionsCopy","middleware_","parsedSVG","DOMParser","parseFromString","sprite","majorVersion","listenForUserActivity_","breakpoints","responsive","styleEl_","playerElIngest_","divEmbed","tabindex","deviceClassNames","VIDEOJS_NO_DYNAMIC_STYLE","defaultsStyleEl","fill_","fluid","aspectRatio","links","linkEl","techGet_","techCall_","posterImage","privDimension","parsedVal","ratio","aspectRatio_","width_","height_","idClass","ratioParts","ratioMultiplier","unloadTech_","titleTechName","camelTechName","techName_","normalizeAutoplay","techOptions","loop","techCanOverridePoster","TechClass","handleTechReady_","textTracksJson_","eventObj","seeking","handleTechLoadStart_","handleTechSourceset_","handleTechWaiting_","handleTechEnded_","handleTechSeeking_","handleTechPlay_","handleTechPause_","handleTechDurationChange_","handleTechFullscreenChange_","handleTechFullscreenError_","handleTechEnterPictureInPicture_","handleTechLeavePictureInPicture_","handleTechError_","handleTechPosterChange_","handleTechTextData_","handleTechRateChange_","usingNativeControls","addTechControlsListeners_","safety","removeTechControlsListeners_","manualAutoplay_","resolveMuted","previouslyMuted","restoreMuted","mutedPromise","catch","promise","updateSourceCaches_","matchingSources","findMimetype","sourceElSources","sourceEls","matchingSourceEls","sourceObj","updateSourceCaches","playerSrc","currentSource","eventSrc","lastSource_","techSrc","request","lastPlaybackRate","queued","timeWhenWaiting","timeUpdateListener","handleTechCanPlay_","handleTechCanPlayThrough_","handleTechPlaying_","handleTechSeeked_","userActions","click","doubleClick","pictureInPictureElement","userWasActive","cancelable","toggleFullscreenClass_","targetPlayer","isFs","matches","fullscreen","togglePictureInPictureClass_","initTime","inactivityTimeout","defaultPlaybackRate","reduceRight","resolve","play_","isSrcReady","isSafariOrIOS","waitToPlay_","resetProgressBar_","runPlayTerminatedQueue_","runPlayCallbacks_","queue","q","callbacks","isFinite","percentAsDecimal","defaultMuted","isFS","oldValue","fullscreenOptions","offHandler","errorHandler","requestFullscreenHelper_","fsOptions","preferFullWindow","enterFullWindow","exitFullscreenHelper_","exitFullWindow","isFullWindow","docOrigOverflow","overflow","isPiP","isInPictureInPicture_","documentPictureInPicture","pipContainer","titleBar","requestWindow","pipWindow","pipVideo","hotkeys","isContentEditable","excludeElement","handleHotkeys","fullscreenKey","keydownEvent","muteKey","playPauseKey","FSToggle","selectSource","techs","findFirstPassingTechSourcePair","outerArray","innerArray","tester","outerChoice","innerChoice","foundSourceAndTech","finder","sourceOrder","handleSrc_","isRetry","resetRetryOnError_","middlewareSource","src_","notSupportedMessage","setTech","stopListeningForErrors","sourceTech","vhs","doReset_","resetControlBarUI_","resetPlaybackRate_","resetVolumeBar_","currentTimeDisplay","durationDisplay","progressControl","loadProgressBar","currentSources","techAutoplay","newPoster","usingNativeControls_","hookFunction","newErr","suppressNotSupportedError","triggerSuppressedError","userActivity_","mouseInProgress","lastMoveX","lastMoveY","handleActivity","handleMouseUpAndMouseLeave","screenX","screenY","isAudio_","enableAudioOnlyUI_","playerChildren","disableAudioOnlyUI_","exitPromises","enablePosterModeUI_","disablePosterModeUI_","toJSON","createModal","modal","currentBreakpoint","candidateBreakpoint","breakpoints_","breakpoint_","removeCurrentBreakpoint_","currentBreakpointClass","responsive_","loadMedia","artist","artwork","tt","getMedia","baseOptions","tagOptions","dataSetup","childName","previousLogLevel_","newRates","html5","userLanguage","navigationUI","BASE_PLUGIN_NAME","PLUGIN_CACHE_KEY","pluginStorage","pluginExists","getPlugin","markPluginAsActive","triggerSetupEvent","before","createPluginFactory","PluginSubClass","plugin","instance","getEventHash","Plugin","VERSION","isBasic","registerPlugin","basicPluginWrapper","createBasicPlugin","deregisterPlugin","getPlugins","getPluginVersion","deprecateForMajor","oldName","warned","deprecate","usingPlugin","hasPlugin","normalizeId","getPlayer","rootNode","getRootNode","ShadowRoot","defaultView","PlayerComponent","hook","hookOnce","original","getPlayers","nId","getAllPlayers","comp","use","writeable","mergeOptions","addLanguage","EventTarget","dom","NetworkBadStatus","NetworkRequestFailed","NetworkRequestAborted","NetworkRequestTimeout","NetworkBodyParserFailed","StreamingHlsPlaylistParserError","StreamingDashManifestParserError","StreamingContentSteeringParserError","StreamingVttParserError","StreamingFailedToSelectNextSegment","StreamingFailedToDecryptSegment","StreamingFailedToTransmuxSegment","StreamingFailedToAppendSegment","StreamingCodecsChangeError","_interopDefaultLegacy","videojs__default","QualityLevel","representation","bitrate","bandwidth","frameRate","QualityLevelList","levels_","selectedIndex_","addQualityLevel","qualityLevel","getQualityLevelById","removeQualityLevel","removed","addqualitylevel","removequalitylevel","initPlugin","originalPluginFn","qualityLevels","qualityLevelList","disposeHandler","DEFAULT_LOCATION","resolveUrl$1","baseUrl","relativeUrl","protocolLess","removeLocation","newUrl","protocol","Stream","_length","_i","pipe","destination","decodeB64ToUint8Array","b64Text","decodedString","atob","Buffer","LineStream","nextNewline","TAB","parseByterange","byterangeString","parseAttributes$1","parseResolution","resolution","ParseStream","customParsers","tagMappers","mapper","mappedLine","newLine","tagType","playlistType","allowed","URI","BYTERANGE","byterange","RESOLUTION","BANDWIDTH","dateTimeString","dateTimeObject","Date","IV","Uint32Array","PRECISE","subkey","clientAttributePattern","isHexaDecimal","isDecimalFloating","addParser","expression","customType","dataParser","segment","addTagMapper","camelCaseKeys","setHoldBack","manifest","serverControl","targetDuration","partTargetDuration","hb","phb","minTargetDuration","minPartDuration","lineStream","parseStream","mainDefinitions","searchParams","lastProgramDateTime","uris","currentMap","currentUri","hasParts","defaultMediaGroups","currentTimeline","allowCache","discontinuityStarts","dateRanges","iFramePlaylists","segments","lastByterangeEnd","lastPartByterangeEnd","dateRangeTags","preloadHints","timeline","preloadSegment","entry","mediaGroup","rendition","definitions","def","endlist","endList","inf","mediaSequence","discontinuitySequence","METHOD","KEYFORMAT","contentProtection","KEYID","schemeIdUri","keyId","pssh","iv","playlist","playlists","mediaGroups","TYPE","NAME","mediaGroupType","autoselect","AUTOSELECT","LANGUAGE","instreamId","CHARACTERISTICS","characteristics","FORCED","forced","discontinuity","getTime","programDateTime","targetduration","timeOffset","precise","cueOut","cueOutCont","cueIn","skip","warnOnMissingAttributes_","segmentIndex","partIndex","renditionReports","canBlockReload","canSkipDateranges","hint","isPart","otherHint","required","partInf","partTarget","dateRange","endDate","startDate","plannedDuration","endOnNextYes","endOnNext","newDateInSeconds","dateRangeWithSameId","findIndex","dateRangeToFind","independentSegments","iFramesOnly","requiredCompatibilityversion","contentSteering","define","addDef","QUERYPARAM","VALUE","IMPORT","comment","custom","currentVersion","targetVersion","identifier","missing","chunk","regexs","webm","ogg","muxerVideo","muxerAudio","muxerText","mediaTypes","upperMediaTypes","translateLegacyCodec","codec","orig","profile","avcLevel","parseCodecs","codecString","codecs","codecType","details","mediaType","isAudioCodec","getMimeForCodec","browserSupportsCodec","withMMS","MediaSource","isTypeSupported","ManagedMediaSource","muxerSupportsCodec","DEFAULT_AUDIO_CODEC","MPEGURL_REGEX","DASH_REGEX","simpleTypeFromSourceType","isArrayBufferView","ArrayBuffer","isView","toUint8","bytes","byteOffset","byteLength","BigInt","BYTE_TABLE","Uint16Array","bytesToNumber","_ref$signed","signed","_ref$le","le","total","byte","exponent","numberToBytes","_temp2","_ref2$le","byteCount","countBits","countBytes","byteIndex","stringToBytes","stringIsBytes","unescape","view","bytesMatch","_temp3","_ref3","_ref3$offset","_ref3$mask","mask","bByte","oc","MIME_TYPE","HTML","isHTML","XML_APPLICATION","XML_TEXT","XML_XHTML_APPLICATION","XML_SVG_IMAGE","NAMESPACE$3","SVG","XML","XMLNS","conventions","ac","NAMESPACE","NAMESPACE$2","notEmptyString","orderedSetReducer","toOrderedSet","splitOnASCIIWhitespace","copy","dest","Class","Super","pt","NodeType","ELEMENT_NODE","ATTRIBUTE_NODE","TEXT_NODE","CDATA_SECTION_NODE","ENTITY_REFERENCE_NODE","ENTITY_NODE","PROCESSING_INSTRUCTION_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_TYPE_NODE","DOCUMENT_FRAGMENT_NODE","NOTATION_NODE","ExceptionCode","ExceptionMessage","INDEX_SIZE_ERR","DOMSTRING_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR","NO_DATA_ALLOWED_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","DOMException","captureStackTrace","NodeList","LiveNodeList","refresh","_node","_refresh","_updateLiveList","inc","_inc","ls","__set__","$$length","NamedNodeMap","_findNodeIndex","_addNamedNode","newAttr","oldAttr","ownerElement","_onRemoveAttribute","namespaceURI","_nsMap","prefix","_onAddAttribute","_removeNamedNode","lastIndex","DOMImplementation$1","Node","_xmlEncoder","_visitNode","Document","_onUpdateChild","cs","_removeChild","previous","previousSibling","lastChild","isDocTypeNode","isElementNode","isElementInsertionPossible","parentChildNodes","docTypeNode","isElementReplacementPossible","assertPreInsertionValidity1to5","hasValidParentNodeType","hasInsertableNodeType","assertPreInsertionValidityInDocument","nodeChildNodes","nodeChildElements","parentElementChild","assertPreReplacementValidityInDocument","hasDoctypeChildThatIsNotChild","_insertBefore","_inDocumentAssertion","cp","newFirst","newLast","pre","Attr","CharacterData","Text","Comment","CDATASection","DocumentType","Notation","Entity","EntityReference","DocumentFragment","ProcessingInstruction","XMLSerializer","nodeSerializeToString","isHtml","nodeFilter","buf","lookupPrefix","visibleNamespaces","namespace","serializeToString","needNamespaceDefine","ns","addSerializedAttribute","qualifiedName","prefixedNodeName","defaultNS","ai","nsi","pubid","publicId","sysid","systemId","sub","internalSubset","importNode","deep","node2","attrs2","_ownerElement","setAttributeNode","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR","getNamedItem","setNamedItem","setNamedItemNS","getNamedItemNS","removeNamedItem","removeNamedItemNS","hasFeature","feature","createDocument","doctype","root","createDocumentType","nodeValue","refChild","oldChild","normalize","appendData","hasAttributes","lookupNamespaceURI","isDefaultNamespace","importedNode","getElementById","rtv","getElementsByClassName","classNames","classNamesSet","base","nodeClassNames","nodeClassNamesSet","createComment","createCDATASection","createAttribute","specified","createEntityReference","pl","createAttributeNS","getAttributeNode","removeAttributeNode","_appendSingleChild","setAttributeNodeNS","removeAttributeNS","getAttributeNodeNS","hasAttributeNS","getAttributeNS","getElementsByTagNameNS","substringData","insertData","replaceData","deleteData","splitText","newText","newNode","getTextContent","entities","XML_ENTITIES","amp","apos","gt","lt","quot","HTML_ENTITIES","Aacute","aacute","Abreve","abreve","acd","acE","Acirc","acirc","acute","Acy","acy","AElig","aelig","af","Afr","afr","Agrave","agrave","alefsym","aleph","Alpha","alpha","Amacr","amacr","amalg","AMP","And","and","andand","andd","andslope","andv","ang","ange","angle","angmsd","angmsdaa","angmsdab","angmsdac","angmsdad","angmsdae","angmsdaf","angmsdag","angmsdah","angrt","angrtvb","angrtvbd","angsph","angst","angzarr","Aogon","aogon","Aopf","aopf","ap","apacir","apE","ape","apid","ApplyFunction","approx","approxeq","Aring","aring","Ascr","ascr","Assign","ast","asymp","asympeq","Atilde","atilde","Auml","auml","awconint","awint","backcong","backepsilon","backprime","backsim","backsimeq","Backslash","Barv","barvee","Barwed","barwed","barwedge","bbrk","bbrktbrk","bcong","Bcy","bcy","bdquo","becaus","Because","because","bemptyv","bepsi","bernou","Bernoullis","Beta","beta","beth","between","Bfr","bfr","bigcap","bigcirc","bigcup","bigodot","bigoplus","bigotimes","bigsqcup","bigstar","bigtriangledown","bigtriangleup","biguplus","bigvee","bigwedge","bkarow","blacklozenge","blacksquare","blacktriangle","blacktriangledown","blacktriangleleft","blacktriangleright","blank","blk12","blk14","blk34","block","bne","bnequiv","bNot","bnot","Bopf","bopf","bot","bowtie","boxbox","boxDL","boxDl","boxdL","boxdl","boxDR","boxDr","boxdR","boxdr","boxh","boxHD","boxHd","boxhD","boxhd","boxHU","boxHu","boxhU","boxhu","boxminus","boxplus","boxtimes","boxUL","boxUl","boxuL","boxul","boxUR","boxUr","boxuR","boxur","boxV","boxv","boxVH","boxVh","boxvH","boxvh","boxVL","boxVl","boxvL","boxvl","boxVR","boxVr","boxvR","boxvr","bprime","Breve","breve","brvbar","Bscr","bscr","bsemi","bsim","bsime","bsol","bsolb","bsolhsub","bull","bullet","bump","bumpE","bumpe","Bumpeq","bumpeq","Cacute","cacute","Cap","cap","capand","capbrcup","capcap","capcup","capdot","CapitalDifferentialD","caps","caret","caron","Cayleys","ccaps","Ccaron","ccaron","Ccedil","ccedil","Ccirc","ccirc","Cconint","ccups","ccupssm","Cdot","cdot","cedil","Cedilla","cemptyv","cent","CenterDot","centerdot","Cfr","cfr","CHcy","chcy","check","checkmark","Chi","chi","cir","circ","circeq","circlearrowleft","circlearrowright","circledast","circledcirc","circleddash","CircleDot","circledR","circledS","CircleMinus","CirclePlus","CircleTimes","cirE","cire","cirfnint","cirmid","cirscir","ClockwiseContourIntegral","CloseCurlyDoubleQuote","CloseCurlyQuote","clubs","clubsuit","Colon","colon","Colone","colone","coloneq","comma","commat","compfn","complement","complexes","cong","congdot","Congruent","Conint","conint","ContourIntegral","Copf","copf","coprod","Coproduct","COPY","copysr","CounterClockwiseContourIntegral","crarr","Cross","cross","Cscr","cscr","csub","csube","csup","csupe","ctdot","cudarrl","cudarrr","cuepr","cuesc","cularr","cularrp","Cup","cup","cupbrcap","CupCap","cupcap","cupcup","cupdot","cupor","cups","curarr","curarrm","curlyeqprec","curlyeqsucc","curlyvee","curlywedge","curren","curvearrowleft","curvearrowright","cuvee","cuwed","cwconint","cwint","cylcty","Dagger","dagger","daleth","Darr","dArr","darr","dash","Dashv","dashv","dbkarow","dblac","Dcaron","dcaron","Dcy","dcy","DD","ddagger","ddarr","DDotrahd","ddotseq","deg","Del","Delta","delta","demptyv","dfisht","Dfr","dfr","dHar","dharl","dharr","DiacriticalAcute","DiacriticalDot","DiacriticalDoubleAcute","DiacriticalGrave","DiacriticalTilde","diam","Diamond","diamond","diamondsuit","diams","die","DifferentialD","digamma","disin","divide","divideontimes","divonx","DJcy","djcy","dlcorn","dlcrop","dollar","Dopf","dopf","Dot","dot","DotDot","doteq","doteqdot","DotEqual","dotminus","dotplus","dotsquare","doublebarwedge","DoubleContourIntegral","DoubleDot","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","DoubleRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DownArrow","Downarrow","downarrow","DownArrowBar","DownArrowUpArrow","DownBreve","downdownarrows","downharpoonleft","downharpoonright","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","DownTee","DownTeeArrow","drbkarow","drcorn","drcrop","Dscr","dscr","DScy","dscy","dsol","Dstrok","dstrok","dtdot","dtri","dtrif","duarr","duhar","dwangle","DZcy","dzcy","dzigrarr","Eacute","eacute","easter","Ecaron","ecaron","ecir","Ecirc","ecirc","ecolon","Ecy","ecy","eDDot","Edot","eDot","edot","ee","efDot","Efr","efr","eg","Egrave","egrave","egs","egsdot","elinters","ell","elsdot","Emacr","emacr","emptyset","EmptySmallSquare","emptyv","EmptyVerySmallSquare","emsp","emsp13","emsp14","ENG","eng","ensp","Eogon","eogon","Eopf","eopf","epar","eparsl","eplus","epsi","Epsilon","epsilon","epsiv","eqcirc","eqcolon","eqsim","eqslantgtr","eqslantless","Equal","equals","EqualTilde","equest","Equilibrium","equiv","equivDD","eqvparsl","erarr","erDot","Escr","escr","esdot","Esim","esim","Eta","eta","ETH","eth","Euml","euml","euro","excl","exist","Exists","expectation","ExponentialE","exponentiale","fallingdotseq","Fcy","fcy","female","ffilig","fflig","ffllig","Ffr","ffr","filig","FilledSmallSquare","FilledVerySmallSquare","fjlig","flat","fllig","fltns","fnof","Fopf","fopf","ForAll","forall","fork","forkv","Fouriertrf","fpartint","frac12","frac13","frac14","frac15","frac16","frac18","frac23","frac25","frac34","frac35","frac38","frac45","frac56","frac58","frac78","frasl","frown","Fscr","fscr","gacute","Gamma","gamma","Gammad","gammad","gap","Gbreve","gbreve","Gcedil","Gcirc","gcirc","Gcy","gcy","Gdot","gdot","gE","ge","gEl","gel","geq","geqq","geqslant","ges","gescc","gesdot","gesdoto","gesdotol","gesl","gesles","Gfr","gfr","Gg","gg","ggg","gimel","GJcy","gjcy","gl","gla","glE","glj","gnap","gnapprox","gnE","gne","gneq","gneqq","gnsim","Gopf","gopf","grave","GreaterEqual","GreaterEqualLess","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterTilde","Gscr","gscr","gsim","gsime","gsiml","Gt","GT","gtcc","gtcir","gtdot","gtlPar","gtquest","gtrapprox","gtrarr","gtrdot","gtreqless","gtreqqless","gtrless","gtrsim","gvertneqq","gvnE","Hacek","hairsp","half","hamilt","HARDcy","hardcy","hArr","harr","harrcir","harrw","Hat","hbar","Hcirc","hcirc","hearts","heartsuit","hellip","hercon","Hfr","hfr","HilbertSpace","hksearow","hkswarow","hoarr","homtht","hookleftarrow","hookrightarrow","Hopf","hopf","horbar","HorizontalLine","Hscr","hscr","hslash","Hstrok","hstrok","HumpDownHump","HumpEqual","hybull","hyphen","Iacute","iacute","ic","Icirc","icirc","Icy","icy","Idot","IEcy","iecy","iexcl","iff","Ifr","ifr","Igrave","igrave","ii","iiiint","iiint","iinfin","iiota","IJlig","ijlig","Im","Imacr","imacr","image","ImaginaryI","imagline","imagpart","imath","imof","imped","Implies","in","incare","infin","infintie","inodot","Int","int","intcal","integers","Integral","intercal","Intersection","intlarhk","intprod","InvisibleComma","InvisibleTimes","IOcy","iocy","Iogon","iogon","Iopf","iopf","Iota","iota","iprod","iquest","Iscr","iscr","isin","isindot","isinE","isins","isinsv","isinv","Itilde","itilde","Iukcy","iukcy","Iuml","iuml","Jcirc","jcirc","Jcy","jcy","Jfr","jfr","jmath","Jopf","jopf","Jscr","jscr","Jsercy","jsercy","Jukcy","jukcy","Kappa","kappa","kappav","Kcedil","kcedil","Kcy","kcy","Kfr","kfr","kgreen","KHcy","khcy","KJcy","kjcy","Kopf","kopf","Kscr","kscr","lAarr","Lacute","lacute","laemptyv","lagran","Lambda","lambda","Lang","langd","langle","lap","Laplacetrf","laquo","Larr","lArr","larr","larrb","larrbfs","larrfs","larrhk","larrlp","larrpl","larrsim","larrtl","lat","lAtail","latail","late","lates","lBarr","lbarr","lbbrk","lbrace","lbrack","lbrke","lbrksld","lbrkslu","Lcaron","lcaron","Lcedil","lcedil","lceil","lcub","Lcy","lcy","ldca","ldquo","ldquor","ldrdhar","ldrushar","ldsh","lE","LeftAngleBracket","LeftArrow","Leftarrow","leftarrow","LeftArrowBar","LeftArrowRightArrow","leftarrowtail","LeftCeiling","LeftDoubleBracket","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftFloor","leftharpoondown","leftharpoonup","leftleftarrows","LeftRightArrow","Leftrightarrow","leftrightarrow","leftrightarrows","leftrightharpoons","leftrightsquigarrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","leftthreetimes","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","lEg","leg","leq","leqq","leqslant","les","lescc","lesdot","lesdoto","lesdotor","lesg","lesges","lessapprox","lessdot","lesseqgtr","lesseqqgtr","LessEqualGreater","LessFullEqual","LessGreater","lessgtr","LessLess","lesssim","LessSlantEqual","LessTilde","lfisht","lfloor","Lfr","lfr","lg","lgE","lHar","lhard","lharu","lharul","lhblk","LJcy","ljcy","Ll","llarr","llcorner","Lleftarrow","llhard","lltri","Lmidot","lmidot","lmoust","lmoustache","lnap","lnapprox","lnE","lne","lneq","lneqq","lnsim","loang","loarr","lobrk","LongLeftArrow","Longleftarrow","longleftarrow","LongLeftRightArrow","Longleftrightarrow","longleftrightarrow","longmapsto","LongRightArrow","Longrightarrow","longrightarrow","looparrowleft","looparrowright","lopar","Lopf","lopf","loplus","lotimes","lowast","lowbar","LowerLeftArrow","LowerRightArrow","loz","lozenge","lozf","lpar","lparlt","lrarr","lrcorner","lrhar","lrhard","lrm","lrtri","lsaquo","Lscr","lscr","Lsh","lsh","lsim","lsime","lsimg","lsqb","lsquo","lsquor","Lstrok","lstrok","Lt","ltcc","ltcir","ltdot","lthree","ltimes","ltlarr","ltquest","ltri","ltrie","ltrif","ltrPar","lurdshar","luruhar","lvertneqq","lvnE","macr","male","malt","maltese","mapsto","mapstodown","mapstoleft","mapstoup","marker","mcomma","Mcy","mcy","mdash","mDDot","measuredangle","MediumSpace","Mellintrf","Mfr","mfr","mho","micro","mid","midast","midcir","middot","minus","minusb","minusd","minusdu","MinusPlus","mlcp","mldr","mnplus","models","Mopf","mopf","mp","Mscr","mscr","mstpos","Mu","mu","multimap","mumap","nabla","Nacute","nacute","nang","nap","napE","napid","napos","napprox","natur","natural","naturals","nbsp","nbump","nbumpe","ncap","Ncaron","ncaron","Ncedil","ncedil","ncong","ncongdot","ncup","Ncy","ncy","ndash","ne","nearhk","neArr","nearr","nearrow","nedot","NegativeMediumSpace","NegativeThickSpace","NegativeThinSpace","NegativeVeryThinSpace","nequiv","nesear","nesim","NestedGreaterGreater","NestedLessLess","NewLine","nexist","nexists","Nfr","nfr","ngE","nge","ngeq","ngeqq","ngeqslant","nges","nGg","ngsim","nGt","ngt","ngtr","nGtv","nhArr","nharr","nhpar","ni","nis","nisd","niv","NJcy","njcy","nlArr","nlarr","nldr","nlE","nle","nLeftarrow","nleftarrow","nLeftrightarrow","nleftrightarrow","nleq","nleqq","nleqslant","nles","nless","nLl","nlsim","nLt","nlt","nltri","nltrie","nLtv","nmid","NoBreak","NonBreakingSpace","Nopf","nopf","Not","not","NotCongruent","NotCupCap","NotDoubleVerticalBar","NotElement","NotEqual","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","NotHumpDownHump","NotHumpEqual","notin","notindot","notinE","notinva","notinvb","notinvc","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","notni","notniva","notnivb","notnivc","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","NotSubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","npar","nparallel","nparsl","npart","npolint","npr","nprcue","npre","nprec","npreceq","nrArr","nrarr","nrarrc","nrarrw","nRightarrow","nrightarrow","nrtri","nrtrie","nsc","nsccue","nsce","Nscr","nscr","nshortmid","nshortparallel","nsim","nsime","nsimeq","nsmid","nspar","nsqsube","nsqsupe","nsub","nsubE","nsube","nsubset","nsubseteq","nsubseteqq","nsucc","nsucceq","nsup","nsupE","nsupe","nsupset","nsupseteq","nsupseteqq","ntgl","Ntilde","ntilde","ntlg","ntriangleleft","ntrianglelefteq","ntriangleright","ntrianglerighteq","Nu","nu","numero","numsp","nvap","nVDash","nVdash","nvDash","nvdash","nvge","nvgt","nvHarr","nvinfin","nvlArr","nvle","nvlt","nvltrie","nvrArr","nvrtrie","nvsim","nwarhk","nwArr","nwarr","nwarrow","nwnear","Oacute","oacute","oast","ocir","Ocirc","ocirc","Ocy","ocy","odash","Odblac","odblac","odiv","odot","odsold","OElig","oelig","ofcir","Ofr","ofr","ogon","Ograve","ograve","ogt","ohbar","ohm","oint","olarr","olcir","olcross","oline","olt","Omacr","omacr","Omega","omega","Omicron","omicron","omid","ominus","Oopf","oopf","opar","OpenCurlyDoubleQuote","OpenCurlyQuote","operp","oplus","Or","or","orarr","ord","order","orderof","ordf","ordm","origof","oror","orslope","orv","oS","Oscr","oscr","Oslash","oslash","osol","Otilde","otilde","Otimes","otimes","otimesas","Ouml","ouml","ovbar","OverBar","OverBrace","OverBracket","OverParenthesis","par","para","parallel","parsim","parsl","PartialD","Pcy","pcy","percnt","permil","perp","pertenk","Pfr","pfr","Phi","phi","phiv","phmmat","phone","Pi","pi","pitchfork","piv","planck","planckh","plankv","plus","plusacir","plusb","pluscir","plusdo","plusdu","pluse","PlusMinus","plusmn","plussim","plustwo","pm","Poincareplane","pointint","Popf","popf","pound","Pr","pr","prap","prcue","prE","prec","precapprox","preccurlyeq","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","preceq","precnapprox","precneqq","precnsim","precsim","Prime","prime","primes","prnap","prnE","prnsim","prod","Product","profalar","profline","profsurf","Proportion","Proportional","propto","prsim","prurel","Pscr","pscr","Psi","psi","puncsp","Qfr","qfr","qint","Qopf","qopf","qprime","Qscr","qscr","quaternions","quatint","quest","questeq","QUOT","rAarr","race","Racute","racute","radic","raemptyv","Rang","rang","rangd","range","rangle","raquo","Rarr","rArr","rarr","rarrap","rarrb","rarrbfs","rarrc","rarrfs","rarrhk","rarrlp","rarrpl","rarrsim","Rarrtl","rarrtl","rarrw","rAtail","ratail","rationals","RBarr","rBarr","rbarr","rbbrk","rbrace","rbrack","rbrke","rbrksld","rbrkslu","Rcaron","rcaron","Rcedil","rcedil","rceil","rcub","Rcy","rcy","rdca","rdldhar","rdquo","rdquor","rdsh","Re","real","realine","realpart","reals","REG","reg","ReverseElement","ReverseEquilibrium","ReverseUpEquilibrium","rfisht","rfloor","Rfr","rfr","rHar","rhard","rharu","rharul","Rho","rho","rhov","RightAngleBracket","RightArrow","Rightarrow","rightarrow","RightArrowBar","RightArrowLeftArrow","rightarrowtail","RightCeiling","RightDoubleBracket","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightFloor","rightharpoondown","rightharpoonup","rightleftarrows","rightleftharpoons","rightrightarrows","rightsquigarrow","RightTee","RightTeeArrow","RightTeeVector","rightthreetimes","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","ring","risingdotseq","rlarr","rlhar","rlm","rmoust","rmoustache","rnmid","roang","roarr","robrk","ropar","Ropf","ropf","roplus","rotimes","RoundImplies","rpar","rpargt","rppolint","rrarr","Rrightarrow","rsaquo","Rscr","rscr","Rsh","rsh","rsqb","rsquo","rsquor","rthree","rtimes","rtri","rtrie","rtrif","rtriltri","RuleDelayed","ruluhar","rx","Sacute","sacute","sbquo","Sc","sc","scap","Scaron","scaron","sccue","scE","sce","Scedil","scedil","Scirc","scirc","scnap","scnE","scnsim","scpolint","scsim","Scy","scy","sdot","sdotb","sdote","searhk","seArr","searr","searrow","sect","semi","seswar","setminus","setmn","sext","Sfr","sfr","sfrown","sharp","SHCHcy","shchcy","SHcy","shcy","ShortDownArrow","ShortLeftArrow","shortmid","shortparallel","ShortRightArrow","ShortUpArrow","shy","Sigma","sigma","sigmaf","sigmav","sim","simdot","sime","simeq","simg","simgE","siml","simlE","simne","simplus","simrarr","slarr","SmallCircle","smallsetminus","smashp","smeparsl","smid","smile","smt","smte","smtes","SOFTcy","softcy","sol","solb","solbar","Sopf","sopf","spades","spadesuit","spar","sqcap","sqcaps","sqcup","sqcups","Sqrt","sqsub","sqsube","sqsubset","sqsubseteq","sqsup","sqsupe","sqsupset","sqsupseteq","squ","Square","square","SquareIntersection","SquareSubset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","squarf","squf","srarr","Sscr","sscr","ssetmn","ssmile","sstarf","Star","star","starf","straightepsilon","straightphi","strns","Sub","subdot","subE","sube","subedot","submult","subnE","subne","subplus","subrarr","Subset","subset","subseteq","subseteqq","SubsetEqual","subsetneq","subsetneqq","subsim","subsub","subsup","succ","succapprox","succcurlyeq","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","succeq","succnapprox","succneqq","succnsim","succsim","SuchThat","Sum","sum","sung","Sup","sup","sup1","sup2","sup3","supdot","supdsub","supE","supe","supedot","Superset","SupersetEqual","suphsol","suphsub","suplarr","supmult","supnE","supne","supplus","Supset","supset","supseteq","supseteqq","supsetneq","supsetneqq","supsim","supsub","supsup","swarhk","swArr","swarr","swarrow","swnwar","szlig","Tab","Tau","tau","tbrk","Tcaron","tcaron","Tcedil","tcedil","Tcy","tcy","tdot","telrec","Tfr","tfr","there4","Therefore","therefore","Theta","theta","thetasym","thetav","thickapprox","thicksim","ThickSpace","thinsp","ThinSpace","thkap","thksim","THORN","thorn","Tilde","tilde","TildeEqual","TildeFullEqual","TildeTilde","times","timesb","timesbar","timesd","tint","toea","topbot","topcir","Topf","topf","topfork","tosa","tprime","TRADE","trade","triangle","triangledown","triangleleft","trianglelefteq","triangleq","triangleright","trianglerighteq","tridot","trie","triminus","TripleDot","triplus","trisb","tritime","trpezium","Tscr","tscr","TScy","tscy","TSHcy","tshcy","Tstrok","tstrok","twixt","twoheadleftarrow","twoheadrightarrow","Uacute","uacute","Uarr","uArr","uarr","Uarrocir","Ubrcy","ubrcy","Ubreve","ubreve","Ucirc","ucirc","Ucy","ucy","udarr","Udblac","udblac","udhar","ufisht","Ufr","ufr","Ugrave","ugrave","uHar","uharl","uharr","uhblk","ulcorn","ulcorner","ulcrop","ultri","Umacr","umacr","uml","UnderBar","UnderBrace","UnderBracket","UnderParenthesis","Union","UnionPlus","Uogon","uogon","Uopf","uopf","UpArrow","Uparrow","uparrow","UpArrowBar","UpArrowDownArrow","UpDownArrow","Updownarrow","updownarrow","UpEquilibrium","upharpoonleft","upharpoonright","uplus","UpperLeftArrow","UpperRightArrow","Upsi","upsi","upsih","Upsilon","upsilon","UpTee","UpTeeArrow","upuparrows","urcorn","urcorner","urcrop","Uring","uring","urtri","Uscr","uscr","utdot","Utilde","utilde","utri","utrif","uuarr","Uuml","uuml","uwangle","vangrt","varepsilon","varkappa","varnothing","varphi","varpi","varpropto","vArr","varr","varrho","varsigma","varsubsetneq","varsubsetneqq","varsupsetneq","varsupsetneqq","vartheta","vartriangleleft","vartriangleright","Vbar","vBar","vBarv","Vcy","vcy","VDash","Vdash","vDash","vdash","Vdashl","Vee","vee","veebar","veeeq","vellip","Verbar","verbar","Vert","vert","VerticalBar","VerticalLine","VerticalSeparator","VerticalTilde","VeryThinSpace","Vfr","vfr","vltri","vnsub","vnsup","Vopf","vopf","vprop","vrtri","Vscr","vscr","vsubnE","vsubne","vsupnE","vsupne","Vvdash","vzigzag","Wcirc","wcirc","wedbar","Wedge","wedge","wedgeq","weierp","Wfr","wfr","Wopf","wopf","wp","wr","wreath","Wscr","wscr","xcap","xcirc","xcup","xdtri","Xfr","xfr","xhArr","xharr","Xi","xi","xlArr","xlarr","xmap","xnis","xodot","Xopf","xopf","xoplus","xotime","xrArr","xrarr","Xscr","xscr","xsqcup","xuplus","xutri","xvee","xwedge","Yacute","yacute","YAcy","yacy","Ycirc","ycirc","Ycy","ycy","yen","Yfr","yfr","YIcy","yicy","Yopf","yopf","Yscr","yscr","YUcy","yucy","Yuml","yuml","Zacute","zacute","Zcaron","zcaron","Zcy","zcy","Zdot","zdot","zeetrf","ZeroWidthSpace","Zeta","zeta","Zfr","zfr","ZHcy","zhcy","zigrarr","Zopf","zopf","Zscr","zscr","zwj","zwnj","entityMap","NAMESPACE$1","nameStartChar","nameChar","tagNamePattern","ParseError$1","locator","XMLReader$1","parse$1","defaultNSMapCopy","domBuilder","entityReplacer","surrogate1","surrogate2","fixedFromCharCode","appendText","xt","characters","lineEnd","linePattern","lineStart","lineNumber","columnNumber","parseStack","currentNSMap","closeMap","tagStart","currentElement","localNSMap","endMatch","endElement","endPrefixMapping","fatalError","parseInstruction","parseDCC","ElementAttributes","parseElementStartPart","closed","fixSelfClosed","warning","locator2","copyLocator","appendElement$1","parseHtmlSpecialContent","addAttribute","qname","startIndex","attributeNames","addValue","setTagName","qName","nsp","nsPrefix","_copy","startPrefixMapping","startElement","elStartEnd","elEndStart","lastIndexOf","startCDATA","endCDATA","matchs","lastMatch","startDTD","endDTD","processingInstruction","defaultNSMap","startDocument","endDocument","getLocalName","getLocator","getQName","getURI","DOMImplementation","ParseError","XMLReader","normalizeLineEndings","DOMParser$1","DOMHandler","cdata","_locator","_toString","chars","java","appendElement","hander","sax","xmlns","setDocumentLocator","errorImpl","isCallback","build","msg","buildErrorHandler","xml","documentURI","ins","ignorableWhitespace","ch","charNode","skippedEntity","comm","impl","dt","__DOMHandler","merge$1","objects","flatten","lists","urlTypeToSegment","indexRange","resolvedUri","startRange","endRange","MAX_SAFE_INTEGER","parseEndNumber","endNumber","segmentRange","static","timescale","sourceDuration","periodDuration","segmentDuration","dynamic","NOW","clientOffset","availabilityStartTime","periodStart","minimumUpdatePeriod","timeShiftBufferDepth","periodStartWC","segmentCount","availableStart","availableEnd","parseByDuration","startNumber","toSegments","sectionDuration","segmentsFromBase","initialization","presentationTime","initSegment","sourceURL","segmentTimeInfo","addSidxSegmentsToPlaylist$1","sidx","sidxByteRange","sidxEnd","mediaReferences","references","referenceType","firstOffset","referencedSize","subsegmentDuration","endIndex","SUPPORTED_MEDIA_TYPES","TIME_FUDGE","getUniqueTimelineStarts","timelineStarts","keyFunction","getMediaGroupPlaylists","mediaGroupPlaylists","master","group","groupKey","labelKey","mediaProperties","updateMediaSequenceForPlaylist","positionManifestOnTimeline","oldManifest","newManifest","oldPlaylists","newPlaylists","oldPlaylist","findPlaylistWithName","firstNewSegment","oldMatchingSegmentIndex","oldSegment","updateSequenceNumbers","generateSidxKey","byteRangeToString","mergeDiscontiguousPlaylists","playlistsByBaseUrl","cur","allPlaylists","playlistGroup","mergedPlaylists","addSidxSegmentsToPlaylist","sidxMapping","sidxKey","sidxMatch","addSidxSegmentsToPlaylists","formatVideoPlaylist","AUDIO","SUBTITLES","CODECS","serviceLocation","videoOnly","audioOnly","vttOnly","flattenMediaGroupPlaylists","mediaGroupObject","labelContents","toM3u8","dashPlaylists","locations","previousManifest","eventStream","suggestedPresentationDelay","videoPlaylists","audioPlaylists","vttPlaylists","captionServices","VIDEO","isAudioOnly","organizedAudioGroup","mainPlaylist","formattedPlaylists","roleLabel","formatted","formatAudioPlaylist","organizeAudioPlaylists","organizedVttGroup","m3u8Attributes","vttPlaylist","formatVttPlaylist","organizeVttPlaylists","playlistTimelineStarts","subs","cc","svcObj","svc","service","channel","easyReader","getLiveRValue","parseByTimeline","segmentTimeline","sIndex","S","repeat","segmentTime","nextS","identifierPattern","constructTemplateUrl","identifierReplacement","segmentsFromTemplate","templateValues","RepresentationID","Bandwidth","mapSegment","parseTemplateInfo","presentationTimeOffset","segmentsFromList","segmentUrls","segmentUrlMap","segmentUrlObject","segmentUrl","mediaRange","SegmentURLToSegmentObject","generateSegments","segmentInfo","segmentAttributes","segmentsFn","template","segmentsInfo","findChildren","getContent","parseDuration","year","second","parsers","mediaPresentationDuration","parseDivisionValue","parsedValue","parseAttributes","parseFn","keySystemsMap","buildBaseUrls","baseUrlElements","baseUrlElement","initialBaseUrl","resolvedBaseUrl","finalBaseUrl","getSegmentInformation","adaptationSet","segmentTemplate","segmentList","segmentBase","segmentTimelineParentNode","segmentInitializationParentNode","segmentInitialization","toEventStream","eventStreamAttributes","eventAttributes","messageData","contentEncoding","toRepresentations","periodAttributes","periodBaseUrls","periodSegmentInfo","adaptationSetAttributes","adaptationSetBaseUrls","roleAttributes","accessibility","flags","opt","labelVal","keySystem","psshNode","representations","adaptationSetSegmentInfo","repBaseUrlElements","repBaseUrls","representationSegmentInfo","inheritBaseUrls","toAdaptationSets","mpdAttributes","mpdBaseUrls","adaptationSets","generateContentSteeringInformation","contentSteeringNodes","eventHandler","infoFromContentSteeringTag","serverURL","queryBeforeStart","stringToMpdXml","manifestString","parsedManifestInfo","manifestUri","periodNodes","periods","priorPeriod","priorPeriodAttributes","mpdType","getPeriodStart","contentSteeringInfo","representationInfo","inheritAttributes","parseUTCTiming","UTCTimingNode","parseUTCTimingScheme","MAX_UINT32","pow","getUint64","uint8","dv","DataView","getBigUint64","getUint32","ID3","getId3Offset","returnSize","getId3Size","normalizePath$1","findBox","paths","normalizePaths$1","results","subarray","EBML_TAGS","EBML","DocType","Segment","SegmentInfo","Tracks","TrackNumber","DefaultDuration","TrackEntry","TrackType","FlagDefault","CodecID","CodecPrivate","Cluster","Timestamp","TimestampScale","BlockGroup","BlockDuration","Block","SimpleBlock","LENGTH_TABLE","getvint","removeLength","getLength","valueBytes","normalizePath","getInfinityDataSize","innerid","dataHeader","findEbml","normalizePaths","dataStart","dataEnd","NAL_TYPE_ONE","NAL_TYPE_TWO","EMULATION_PREVENTION","discardEmulationPreventionBytes","positions","newLength","newData","sourceIndex","findNal","dataType","nalLimit","nalStart","nalsFound","nalOffset","nalType","CONSTANTS","_isLikely","docType","matroska","fmp4","moof","moov","ac3","avi","riff","findH264Nal","findH265Nal","isLikelyTypes","isLikelyFn","secondsToVideoTs","secondsToAudioTs","videoTsToSeconds","audioTsToSeconds","isLikely","detectContainerForBytes","ONE_SECOND_IN_TS","clock_1","sampleRate","timestamp","clock","resolveUrl","resolveManifestRedirect","req","logger","TIME_FUDGE_FACTOR","SAFE_TIME_DELTA","filterRanges","timeRanges","findRange","findNextRange","printableRange","strArr","timeRangesToArray","timeRangesList","lastBufferedEnd","timeAheadOf","segmentDurationWithParts","getPartsAndSegments","si","getLastParts","lastSegment","getKnownPartCount","partCount","liveEdgeDelay","partHoldBack","holdBack","intervalDuration","endSequence","expired","backwardDuration","forwardDuration","totalDuration","sumDurations","defaultDuration","durationList","durations","playlistEnd","useSafeLiveEnd","liveEdgePadding","lastSegmentEndTime","isExcluded","excludeUntil","isIncompatible","isEnabled","excluded","isLowestEnabledRendition","currentBandwidth","MAX_VALUE","playlistMatch","someAudioVariant","groupName","variant","Playlist","getMediaInfoForTime","startingSegmentIndex","startingPartIndex","exactManifestTimings","partsAndSegments","partAndSegment","canUseFudgeFactor","isDisabled","isAes","estimateSegmentRequestTime","bytesReceived","createPlaylistID","groupID","forEachMediaGroup","setupMediaPlaylist","playlistErrors_","addPropertiesToMain","createGroupID","phonyUri","audioOnlyMain","groupId","setupMediaPlaylists","resolveMediaGroupUris","DateRangesStorage","offset_","pendingDateRanges_","processedDateRanges_","setOffset","firstSegment","setPendingDateRanges","trimProcessedDateRanges_","pendingDateRange","processDateRange","getDateRangesToProcess","dateRangeClasses","dateRangesToProcess","classListIndex","getStreamingNetworkErrorMetadata","parseFailure","isBadStatus","isFailure","errorMetadata","isBadStatusOrParseFailure","errorType","timedout","erroType","logFn$1","getCodecs","mediaAttributes","isMaat","unwrapCodecList","codecList","codecCount","codecObj","codecsForPlaylist","codecInfo","audioGroup","isMuxed","defaultCodecs","audioGroupId","audioType","codecsFromDefault","EventTarget$1","updateSegment","skipped","resolveSegmentUris","baseUri","getAllSegments","isPlaylistUnchanged","updateMain$1","newMedia","unchangedCheck","oldMedia","mergedPlaylist","skippedSegments","oldSegments","newSegments","newIndex","newSegment","updateSegments","refreshDelay","lastPart","lastDuration","playlistMetadataPayload","renditions","PlaylistLoader","logger_","vhs_","addDateRangesToTextTrack_","addDateRangesToTextTrack","vhsOptions","customTagParsers","customTagMappers","llhls","dateRangesStorage_","handleMediaupdatetimeout_","handleLoadedPlaylist_","mediaPlaylist","availableDateRanges","parameters","nextMSN","nextPart","_HLS_part","_HLS_msn","canSkipUntil","_HLS_skip","parsedUri","addLLHLSQueryDirectives","playlistRequestError","haveMetadata","playlistString","startingState","parseManifest_","parsed","onwarn","oninfo","customParser","parseManifest","excludeAudioOnlyVariants","hasVideo","codecsList","codecsInfo","playlistObject","playlistInfo","lastRequest","pendingMedia_","media_","updateMediaUpdateTimeout_","parsedPlaylist","stopRequest","mediaUpdateTimeout","finalRenditionTimeout","oldRequest","shouldDelay","delay","mediaChange","mainPlaylistRef","started","setupInitialPlaylist","srcUri","mainForMedia","updateOrDeleteClone","isUpdate","pathway","ID","oldPlaylistUri","oldPlaylistId","newPlaylistUri","createCloneURI_","newPlaylistId","createCloneAttributes_","updatedPlaylist","createClonePlaylist_","updateOrDeleteCloneMedia","oldMediaPlaylist","createClonedMediaGroups_","addClonePathway","basePlaylist","playlistId","baseID","newUri","newPlaylistID","newMediaPlaylist","newProps","hostname","HOST","PARAMS","oldAttributes","getKeyIdSet","keyIds","keysystem","callbackWrapper","reqResponse","responseTime","roundTripTime","requestTime","responseHeaders","xhrFactory","XhrFunction","beforeRequest","Vhs","_requestCallbackSet","_responseCallbackSet","xhrMethod","beforeRequestOptions","requestSet","newOptions","requestCallback","callAllRequestHooks","responseSet","responseCallback","callAllResponseHooks","originalAbort","segmentXhrHeaders","Range","byterangeEnd","byterangeStart","byterangeStr","textRange","formatHexString","formatAsciiString","createTransferableMessage","transferable","initSegmentId","segmentKeyId","hexDump","ascii","utils","tagDump","textRanges","getProgramTime","matchedSegment","segmentEnd","videoTimingInfo","transmuxedPresentationEnd","estimatedStart","transmuxedPresentationStart","findSegmentForPlayerTime","seekTime","programTimeObject","mediaSeconds","programTime","playerTime","transmuxerPrependedSeconds","offsetFromSegmentStart","playerTimeToProgramTime","toISOString","seekToProgramTime","retryCount","seekTo","pauseAfterSeek","verifyProgramDateTimeTags","lastSegmentStart","lastSegmentDuration","findSegmentForProgramTime","mediaOffset","comparisonTimeStamp","segmentDateTime","segmentTimeEpoch","getOffsetFromTimestamp","seekToTime","callbackOnCompleted","containerRequest","id3Offset","finished","endRequestAndCallback","_bytes","progressListener","newPart","_len","buffers","_key","totalLen","tempBuffer","concatTypedArrays","overrideMimeType","loaded","dashPlaylistUnchanged","aSegment","bSegment","aByterange","bByterange","dashGroupId","updateMain","oldMain","newMain","noChanges","playlistUpdate","removeOldMediaGroupLabels","equivalentSidx","compareSidxEntry","oldSidxMapping","newSidxMapping","currentSidxInfo","savedSidxInfo","sidxInfo","DashPlaylistLoader","srcUrlOrPlaylist","mainPlaylistLoader","mainPlaylistLoader_","isMain_","addMetadataToTextTrack","refreshXml_","refreshMedia_","loadedPlaylists_","sidxMapping_","childPlaylist_","isPaused","requestErrored_","addSidxSegments_","mediaRequest_","fin","referenceId","earliestPresentationTime","referenceCount","getUint16","startsWithSap","sapType","sapDeltaTime","parseSidx_1","sidxContainer","internal","playlistExclusionDuration","minimumUpdatePeriodTimeout_","createMupOnMedia_","hasPendingRequest","sidxChanged","isFinalRendition","updateMinimumUpdatePeriodTimeout_","haveMain_","requestMain_","mainChanged","manifestInfo","mainXml_","date","mainLoaded_","handleMain_","syncClientServerClock_","utcTiming","clientOffset_","serverTime","mainXml","parseMainXml","addEventStreamToMetadataTrack_","parsedManifest","mpl","mup","createMUPTimeout_","mediaGroupSidx","filterChangedSidxMappings","mediaID","mediaChanged","createMediaUpdateTimeout","metadataArray","eventStreamNode","cueTime","frames","defaultKID","Config","GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","BACK_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","INITIAL_BANDWIDTH","BANDWIDTH_VARIANCE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BUFFER_HIGH_WATER_LINE","browserWorkerPolyFill","workerObj","objectUrl","createObjectURL","Blob","blob","BlobBuilder","getBlob","worker","Worker","objURL","terminate","revokeObjectURL","getWorkerString","workerCode$1","Stream$8","init","flushSource","partialFlush","endTimeline","dinf","esds","ftyp","mfhd","minf","mvex","mvhd","trak","tkhd","mdia","mdhd","hdlr","sdtp","stbl","stsd","traf","trex","trun$1","MAJOR_BRAND","MINOR_VERSION","AVC1_BRAND","VIDEO_HDLR","AUDIO_HDLR","HDLR_TYPES","VMHD","SMHD","DREF","STCO","STSC","STSZ","STTS","videoSample","audioSample","audioTrun","videoTrun","trunHeader","MAX_UINT32$1","numbers","avc1","avcC","btrt","dref","mdat","mp4a","pasp","smhd","stco","stsc","stsz","stts","styp","tfdt","tfhd","trun","vmhd","setUint32","audioobjecttype","samplingfrequencyindex","channelcount","samplerate","sequenceNumber","trackFragments","samples","dependsOn","isDependedOn","hasRedundancy","avc1Box","sps","pps","sequenceParameterSets","pictureParameterSets","profileIdc","profileCompatibility","levelIdc","sarRatio","hSpacing","vSpacing","samplesize","trackFragmentHeader","trackFragmentDecodeTime","trackFragmentRun","sampleDependencyTable","upperWordBaseMediaDecodeTime","lowerWordBaseMediaDecodeTime","baseMediaDecodeTime","durationPresent","sizePresent","flagsPresent","compositionTimeOffset","bytesOffest","header","sample","isLeading","paddingValue","isNonSyncSample","degradationPriority","silence","audioTsToVideoTs","videoTsToAudioTs","metadataTsToSeconds","mp4Generator","fileType","movie","sampleForFrame","frame","dataOffset","pts","dts","keyFrame","frameUtils$1","groupNalsIntoFrames","nalUnits","currentNal","currentFrame","nalCount","nalUnitType","groupFramesIntoGops","currentGop","gops","extendFirstKeyFrame","generateSampleTable","baseDataOffset","concatenateNalData","nalsByteLength","numberOfNals","generateSampleTableForFrame","concatenateNalDataForFrame","highPrefix","lowPrefix","zeroFill","ONE_SECOND_IN_TS$4","timelineStartPts","keepOriginalTimestamps","clock$2","coneOfSilence","metaTable","clock$1","audioFrameUtils$1","prefixWithSilence","audioAppendStartTs","videoBaseMediaDecodeTime","baseMediaDecodeTimeTs","silentFrame","firstFrame","frameDuration","audioGapDuration","audioFillFrameCount","audioFillDuration","trimAdtsFramesByEarliestDts","adtsFrames","earliestAllowedDts","minSegmentDts","minSegmentPts","concatenateFrameData","sumFrameByteLengths","ONE_SECOND_IN_TS$3","trackDecodeInfo$1","clearDtsInfo","maxSegmentDts","maxSegmentPts","calculateTrackBaseMediaDecodeTime","timelineStartInfo","collectDtsInfo","captionPacketParser","parseSei","payloadType","payloadSize","parseUserData","sei","parseCaptionPackets","userData","ccData","emulationPreventionBytesPositions","USER_DATA_REGISTERED_ITU_T_T35","Stream$7","cea708Parser","CaptionStream$2","parse708captions_","parse708captions","captionPackets_","ccStreams_","Cea608Stream","cc708Stream_","Cea708Stream","newCaptionPackets","escapedRBSP","latestDts_","ignoreNextEqualDts_","numSameDts_","flushCCStreams","flushType","flushStream","idx","presortIndex","packet","dispatchCea608Packet","dispatchCea708Packet","activeCea608Channel_","ccStream","setsTextOrXDSActive","setsChannel1Active","setsChannel2Active","CHARACTER_TRANSLATION_708","within708TextBlock","Cea708Window","windowNum","clearText","pendingNewLine","winAttr","penAttr","penLoc","penColor","visible","rowLock","columnLock","relativePositioning","anchorVertical","anchorHorizontal","anchorPoint","rowCount","virtualRowCount","columnCount","windowStyle","penStyle","getText","rows","rowIdx","beforeRowOverflow","addText","backspace","Cea708Service","serviceNum","encoding","currentWindow","windows","createTextDecoder","startPts","setCurrentWindow","textDecoder_","serviceProps","captionServiceEncodings","serviceName","serviceEncodings","current708Packet","services","new708Packet","add708Bytes","push708Packet","ptsVals","byte0","byte1","packet708","packetData","blockSize","seq","sizeCode","pushServiceBlock","initService","handleText","multiByteCharacter","extendedCommands","defineWindow","clearWindows","deleteWindows","displayWindows","hideWindows","toggleWindows","setWindowAttributes","setPenAttributes","setPenColor","setPenLocation","isExtended","getPts","flushDisplayed","char","charCodeArray","newCode","isMultiByte","extended","currentByte","nextByte","unicode","firstByte","secondByte","fillOpacity","fillRed","fillGreen","fillBlue","borderType","borderRed","borderGreen","borderBlue","wordWrap","printDirection","scrollDirection","justify","effectSpeed","effectDirection","displayEffect","displayedText","winId","endPts","pushCaption","textTag","penSize","italics","underline","edgeType","fontStyle","fgOpacity","fgRed","fgGreen","fgBlue","bgOpacity","bgRed","bgGreen","bgBlue","edgeRed","edgeGreen","edgeBlue","column","CHARACTER_TRANSLATION","getCharFromCode","ROWS","createDisplayBuffer","BOTTOM_ROW","indent","field","dataChannel","field_","dataChannel_","setConstants","swap","char0","char1","lastControlCode_","PADDING_","RESUME_CAPTION_LOADING_","mode_","END_OF_CAPTION_","clearFormatting","displayed_","nonDisplayed_","startPts_","ROLL_UP_2_ROWS_","rollUpRows_","setRollUp","ROLL_UP_3_ROWS_","ROLL_UP_4_ROWS_","CARRIAGE_RETURN_","shiftRowsUp_","BACKSPACE_","row_","ERASE_DISPLAYED_MEMORY_","ERASE_NON_DISPLAYED_MEMORY_","RESUME_DIRECT_CAPTIONING_","isSpecialCharacter","column_","isExtCharacter","isMidRowCode","addFormatting","isOffsetControlCode","isPAC","formatting_","indentations","isColorPAC","isNormalChar","logWarning","topRow_","BASE_","EXT_","CONTROL_","OFFSET_","newBaseRow","popOn","baseRow","rollUp","paintOn","captionStream","CaptionStream","streamTypes","H264_STREAM_TYPE","ADTS_STREAM_TYPE","METADATA_STREAM_TYPE","Stream$6","TYPE_SHARED","handleRollover$1","TimestampRolloverStream$1","lastDTS","referenceDTS","type_","MetadataStream","timestampRolloverStream","TimestampRolloverStream","handleRollover","typedArrayIndexOf","typedArray","fromIndex","currentIndex","textEncodingDescriptionByte","percentEncode$1","parseUtf8","parseIso88591$1","parseSyncSafeInteger$1","frameParsers","mimeTypeEndIndex","descriptionEndIndex","pictureType","pictureData","owner","privateData","parseId3","parseId3Frames","frameSize","frameStart","tagSize","parseSyncSafeInteger","StreamTypes$3","id3","bufferSize","dispatchType","dataAlignmentIndicator","timeStamp","TransportPacketStream","TransportParseStream","ElementaryStream","metadataStream","Stream$4","CaptionStream$1","StreamTypes$2","MP2T_PACKET_LENGTH$1","bytesInBuffer","everything","parsePsi","parsePat","parsePmt","packetsWaitingForPmt","programMapTable","payloadUnitStartIndicator","pat","section_number","last_section_number","pmtPid","pmt","tableEnd","streamType","pid","processPes_","STREAM_TYPES","h264","adts","segmentHadPmt","timedMetadata","forceFlush","fragment","packetFlushable","trackId","pes","ptsDtsFlags","startPrefix","packetLength","parsePes","flushStreams_","m2ts$1","PAT_PID","MP2T_PACKET_LENGTH","AdtsStream$1","m2ts_1","Stream$3","ONE_SECOND_IN_TS$2","ADTS_SAMPLING_FREQUENCIES$1","handlePartialSegments","frameNum","skipWarn_","frameLength","protectionSkipBytes","oldBuffer","sampleCount","adtsFrameDuration","ExpGolomb$1","workingData","workingBytesAvailable","workingWord","workingBitsAvailable","bitsAvailable","loadWord","workingBytes","availableBytes","skipBits","skipBytes","readBits","bits","valu","skipLeadingZeros","leadingZeroCount","skipUnsignedExpGolomb","skipExpGolomb","readUnsignedExpGolomb","clz","readExpGolomb","readBoolean","readUnsignedByte","H264Stream$1","NalByteStream","PROFILES_WITH_OPTIONAL_SPS_DATA","Stream$2","ExpGolomb","syncPoint","swapBuffer","currentPts","currentDts","readSequenceParameterSet","skipScalingList","nalByteStream","nalUnitTypeCode","expGolombDecoder","lastScale","nextScale","chromaFormatIdc","picOrderCntType","numRefFramesInPicOrderCntCycle","picWidthInMbsMinus1","picHeightInMapUnitsMinus1","frameMbsOnlyFlag","scalingListCount","frameCropLeftOffset","frameCropRightOffset","frameCropTopOffset","frameCropBottomOffset","AacStream$1","H264Stream","ADTS_SAMPLING_FREQUENCIES","parseId3TagSize","isLikelyAacData","parseAdtsSize","lowThree","parseType","parseSampleRate","parseAacTimestamp","percentEncode","aacUtils","setTimestamp","bytesLeft","tempLength","VideoSegmentStream","AudioSegmentStream","Transmuxer","CoalesceStream","frameUtils","audioFrameUtils","trackDecodeInfo","m2ts","AdtsStream","AacStream","ONE_SECOND_IN_TS$1","AUDIO_PROPERTIES","VIDEO_PROPERTIES","retriggerForStream","addPipelineLogRetriggers","transmuxer","pipeline","arrayEquals","generateSegmentTimingInfo","startDts","endDts","prependedContentDuration","firstSequenceNumber","setEarliestDts","earliestDts","setVideoBaseMediaDecodeTime","setAudioAppendStart","videoClockCyclesOfSilencePrefixed","gopsToAlignWith","minPTS","gopCache_","nalUnit","gopForFusion","firstGop","lastGop","resetStream_","getGopForFusion_","alignedGops","alignGopsAtEnd","alignGopsAtEnd_","alignGopsAtStart_","gop","dtsDistance","nearestGopObj","currentGopObj","nearestDistance","alignIndex","gopIndex","alignEndIndex","matchFound","trimIndex","alignGopsWith","newGopsToAlignWith","numberOfTracks","remux","remuxTracks","pendingTracks","videoTrack","pendingBoxes","pendingCaptions","pendingMetadata","pendingBytes","emittedTracks","audioTrack","caption","captionStreams","setRemux","hasFlushed","transmuxPipeline_","setupAacPipeline","aacStream","audioTimestampRolloverStream","timedMetadataTimestampRolloverStream","adtsStream","coalesceStream","headOfPipeline","audioSegmentStream","getLogTrigger_","hasAudio","setupTsPipeline","packetStream","elementaryStream","h264Stream","videoSegmentStream","id3Frame","setBaseMediaDecodeTime","isAac","resetCaptions","inspectMp4","textifyMp4","bin","parseType_1","toUnsigned$2","parseType$3","findBox$5","subresults","findBox_1","toUnsigned$1","getUint64$4","parseTfdt$3","parseTfhd$2","baseDataOffsetPresent","sampleDescriptionIndexPresent","defaultSampleDurationPresent","defaultSampleSizePresent","defaultSampleFlagsPresent","durationIsEmpty","defaultBaseIsMoof","sampleDescriptionIndex","defaultSampleDuration","defaultSampleSize","defaultSampleFlags","baseDataOffsetIsMoof","getUint64$3","parseSampleFlags","parseTrun$2","dataOffsetPresent","firstSampleFlagsPresent","sampleDurationPresent","sampleSizePresent","sampleFlagsPresent","sampleCompositionTimeOffsetPresent","getInt32","getUint64$2","parseMp4Date","parseType$2","nalParse","avcStream","avcView","dataReferenceIndex","horizresolution","vertresolution","frameCount","depth","numOfPictureParameterSets","nalSize","configurationVersion","avcProfileIndication","avcLevelIndication","lengthSizeMinusOne","numOfSequenceParameterSets","bufferSizeDB","maxBitrate","avgBitrate","edts","elst","getUint8","edits","entryCount","mediaTime","mediaRate","esId","streamPriority","decoderConfig","objectProfileIndication","decoderConfigDescriptor","audioObjectType","samplingFrequencyIndex","channelConfiguration","majorBrand","minorVersion","compatibleBrands","dataReferences","handlerType","escape","nals","modificationTime","streamDescriptor","nextTrackId","pdin","balance","ctts","compositionOffsets","sampleOffset","stss","syncSamples","chunkOffsets","sampleToChunks","firstChunk","samplesPerChunk","sampleDescriptions","sampleSize","entries","timeToSamples","sampleDelta","layer","alternateGroup","defaultSampleDescriptionIndex","sampleDependsOn","sampleIsDependedOn","sampleHasRedundancy","samplePaddingValue","sampleIsDifferenceSample","sampleDegradationPriority","graphicsmode","opcolor","ab","z","inspectedMp4","compositionStartTime","getVideoTrackIds","getTracks","getTimescaleFromMediaHeader$1","getEmsgID3","mp4Inspector","inspect","textify","parseTraf","parseTfdt","parseHdlr","parseTfhd","parseTrun","parseSidx","uint8ToCString","curChar","retString","getUint64$1","isValidEmsgBox","emsg","hasScheme","scheme_id_uri","isValidV0Box","isDefined","presentation_time_delta","isValidV1Box","presentation_time","emsg$1","parseEmsgBox","boxData","event_duration","emsgBox","message_data","scaleTime","timeDelta","toUnsigned","toHexString","findBox$3","parseType$1","parseTfhd$1","parseTrun$1","parseTfdt$2","window$2","lowestTime","baseTime","scale","timescales","trafBoxes","parsedTrun","traks","videoTrackIds","hdlrs","tkhds","tkhdVersion","codecConfig","codecBox","segmentData","parsedBox","parsedId3Frames","probe$2","getTimescaleFromMediaHeader","findBox$2","window$1","getMdatTrafPairs","trafs","mdats","mdatTrafPairs","matchingTraf","parseSamples","truns","allSamples","findBox$1","parseTfdt$1","getMdatTrafPairs$1","parseSamples$1","mapToSample","approximateOffset","parseCaptionNals","videoTrackId","captionNals","pair","headerInfo","seiNal","lastMatchedSample","logs","seiNals","matchingSample","findSeiNals","captionParser","segmentCache","parsedCaptions","parsingPartial","isInitialized","isPartial","isNewInit","parsedData","cachedSegment","trackNals","parseEmbeddedCaptions","pushNals","nal","clearParsedCaptions","resetCaptionStream","clearAllCaptions","webvttParser","parseSegment","vttCues","mdatBox","trafBox","tfdtBox","tfhdBox","trunBoxes","mdatOffset","textDecoder","sampleData","vttcBox","paylBox","sttgBox","cueText","StreamTypes$1","parsePid","parsePayloadUnitStartIndicator","parseAdaptionField","parseNalUnitType","probe$1","pusi","payloadOffset","parsePesType","parsePesTime","videoPacketContainsKeyFrame","frameBuffer","frameI","frameSyncPoint","foundKeyFrame","StreamTypes","probe","SYNC_BYTE","parseAudioPes_","pesType","endLoop","table","parseVideoPes_","firstKeyFrame","inspectTs_","parsePsi_","tsInspector","baseTimestamp","audioCount","audioTimescale","inspectAac_","audioBaseTimestamp","dtsTime","ptsTime","videoBaseTimestamp","adjustTimestamp_","MessageHandlers","initArray","postMessage","gopInfo","timingInfo","videoSegmentTimingInfo","presentation","audioSegmentTimingInfo","trackInfo","audioTimingInfo","wireTransmuxerEvents","pushMp4Captions","trackIds","initMp4WebVttParser","webVttParser","getMp4WebVttText","mp4VttCues","probeMp4StartTime","probeMp4Tracks","probeEmsgID3","id3Frames","emsgData","probeTs","baseStartTime","tsStartTime","timeInfo","videoStart","audioStart","clearAllMp4Captions","clearParsedMp4Captions","setTimestampOffset","timestampOffset","appendStart","onmessage","messageHandlers","TransmuxWorker","processTransmux","audioAppendStart","onData","onTrackInfo","onAudioTimingInfo","onVideoTimingInfo","onVideoSegmentTimingInfo","onAudioSegmentTimingInfo","onId3","onCaptions","onDone","onEndedTimeline","onTransmuxerLog","isEndOfTimeline","triggerSegmentEventFn","transmuxedData","waitForEndedTimelineEvent","currentTransmux","videoFrameDtsTime","videoFramePtsTime","handleData_","handleGopInfo_","handleDone_","dequeue","segmentInfoPayload","transmuxQueue","processAction","enqueueAction","transmux","segmentTransmuxer","term","workerCallback","endAction","listenForEndEvent","isArrayBuffer","transfers","REQUEST_ERRORS","WEB_VTT_CODEC","abortAll","activeXhrs","handleErrors","handleKeyResponse","finishProcessingFn","errorObj","keyInfo","parseInitSegment","initMp4Text","handleSegmentResponse","newBytes","stringToArrayBuffer","lastReachedChar","stats","getRequestStats","encryptedBytes","transmuxAndNotify","trackInfoFn","timingInfoFn","videoSegmentTimingInfoFn","audioSegmentTimingInfoFn","id3Fn","captionsFn","endedTimelineFn","dataFn","doneFn","fmp4Tracks","audioStartFn","audioEndFn","videoStartFn","videoEndFn","probeResult","handleSegmentBytes","bytesAsUint8Array","isLikelyFmp4MediaSegment","isFmp4","parseMp4TextSegment","audioCodec","videoCodec","finishLoading","decrypt","decryptionWorker","decryptionHandler","decrypted","keyBytes","decryptError","encrypted","waitForCompletion","didError","segmentFinish","requestId","decryptedBytes","decryptSegment","endOfAllRequests","parseError","handleProgress","progressFn","progressEvent","getProgressStats","firstBytesReceivedAt","mediaSegmentRequest","xhrOptions","abortFn","keyRequestOptions","keyRequestCallback","keyXhr","mapKeyRequestOptions","mapKeyRequestCallback","mapKeyXhr","initSegmentOptions","initSegmentRequestCallback","handleInitSegmentResponse","initSegmentXhr","segmentRequestOptions","segmentRequestCallback","segmentXhr","loadendState","activeXhr","calledAbortFn","handleLoadEnd","logFn","representationToString","safeGetComputedStyle","property","stableSort","sortFn","newArray","cmp","comparePlaylistBandwidth","leftBandwidth","rightBandwidth","simpleSelector","playerBandwidth","playerObjectFit","limitRenditionByPlayerDimensions","playlistController","getAudioTrackPlaylists_","sortedPlaylistReps","rep","enabledPlaylistReps","bandwidthPlaylistReps","highestRemainingBandwidthRep","bandwidthBestRep","chosenRep","haveResolution","resolutionBestRepList","resolutionBestRep","resolutionPlusOneList","resolutionPlusOneSmallest","resolutionPlusOneRep","leastPixelDiffRep","leastPixelDiffSelector","leastPixelDiffList","pixelDiff","lastBandwidthSelector","pixelRatio","useDevicePixelRatio","devicePixelRatio","customPixelRatio","systemBandwidth","usePlayerObjectFit","playlistController_","compactSegmentUrlDescription","pathname","addMetadata","inbandTextTracks","videoDuration","Cue","WebKitDataCue","metadataTrack","metadataTrack_","deprecateOldCue","cuesArray","cuesGroupedByStartTime","timeSlot","sortedStartTimes","cueGroup","finiteDuration","nextTime","dateRangeAttr","scte35Out","scte35In","dateRangeKeysToOmit","createMetadataTrackIfNotExists","inBandMetadataTrackDispatchType","removeCuesFromTrack","finite","MIN_SEGMENT_DURATION_TO_SAVE_STATS","segmentInfoString","startOfSegment","mediaIndex","segmentLen","selection","isSyncRequest","independent","hasPartIndex","zeroBasedPartCount","timingInfoPropertyForMedia","shouldWaitForTimelineChange","timelineChangeController","loaderType","audioDisabled","lastMainTimelineChange","lastTimelineChange","pendingAudioTimelineChange","pendingTimelineChange","checkAndFixTimelines","segmentLoader","pendingSegment_","timelineChangeController_","currentTimeline_","loaderType_","audioDisabled_","pendingMainTimelineChange","hasPendingTimelineChanges","differentPendingChanges","shouldFixBadTimelineChanges","isAudioTimelineBehind","segmentTooLong","maxDuration","getTroublesomeSegmentDurationMessage","sourceType","timingInfos","typeTimingInfo","mediaDuration","isSegmentWayTooLong","isSegmentSlightlyTooLong","segmentTooLongMessage","severity","isEncrypted","ke","isMediaInitialization","SegmentLoader","mediaSource","throughput","roundTrip","resetStats_","hasPlayed_","hasPlayed","seekable_","seeking_","mediaSource_","currentMediaInfo_","startingMediaInfo_","segmentMetadataTrack_","segmentMetadataTrack","goalBufferLength_","goalBufferLength","sourceType_","sourceUpdater_","sourceUpdater","inbandTextTracks_","state_","shouldSaveSegmentTimingInfo_","useDtsForTimestampOffset_","useDtsForTimestampOffset","captionServices_","checkBufferTimeout_","shouldForceTimestampOffsetAfterResync_","xhrOptions_","pendingSegments_","isPendingTimestampOffset_","gopBuffer_","timeMapping_","safeAppend_","appendInitSegment_","playlistOfLastInitSegment_","callQueue_","loadQueue_","metadataQueue_","waitingOnRemove_","quotaExceededErrorRetryTimeout_","activeInitSegmentId_","initSegments_","cacheEncryptionKeys_","cacheEncryptionKeys","keyCache_","decrypter_","decrypter","syncController_","syncController","syncPoint_","transmuxer_","createTransmuxer_","triggerSyncInfoUpdate_","isEndOfStream_","ended_","fetchAtBuffer_","newState","hasEnoughInfoToAppend_","processCallQueue_","hasEnoughInfoToLoad_","processLoadQueue_","mediaSequenceSync_","getMediaSequenceSync","mediaBytesTransferred","mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaSecondsLoaded","mediaAppends","abort_","setAudio","removeAudio","clearPendingTimelineChange","monitorBuffer_","abortRequests","checkForAbort_","endOfStream","buffered_","getMediaInfo_","videoBuffered","audioBuffered","initSegmentForMap","storedMap","segmentKey","storedKey","couldBeginLoading_","playlist_","init_","resetEverything","newPlaylist","syncInfo","setDateTimeMappingForStart","oldId","diagnostics","resyncLoader","resetLoader","mediaSequenceDiff","saveExpiredSegmentInfo","resetAppendedStatus","force","removesRemaining","removeFinished","mapping","updatedBuffer","removeGopBuffer","removeVideo","monitorBufferTick_","fillBuffer_","updating","chooseNextRequest_","loadSegment_","appendedLastSegment","appendedLastPart","bufferedTime","preloaded","haveEnoughBuffer","getSyncPoint","targetTime","timelineSegments","getSyncSegmentCandidate","isReliable","getSyncInfoFromMediaSequenceSync_","mediaInfoForTime","nextSegment","hasIndependentSegments","lastSegmentLastPart","forceTimestampOffset","generateSegmentInfo_","finalTargetTime","mediaSequenceSyncInfo","getSyncInfoForTime","isAppended","nextMediaSequenceSyncInfo","overrideCheck","timestampOffsetForSegment_","audioBufferedEnd","audioTimestampOffset","currentTimePts","gopsSafeToAlignWith","videoTimestampOffset","timestampOffsetForSegment","earlyAbortWhenNeeded_","measuredBandwidth","requestTimeRemaining","timeUntilRebuffer$1","timeUntilRebuffer","switchCandidate","compatiblePlaylists","enabledPlaylists","rebufferingEstimates","numRequests","rebufferingImpact","noRebufferingPlaylists","estimate","minRebufferMaxBandwidthSelector","timeSavedBySwitching","minimumTimeSaving","handleAbort_","handleProgress_","simpleSegment","handleTrackInfo_","checkForIllegalMediaSwitch","akeys","bkeys","shallowEqual","handleTimingInfo_","timeType","timingInfoProperty","handleCaptions_","captionData","hasAppendedData_","captionTracks","captionTrack","trackName","captionService","createCaptionsTrackIfNotExists","captionArray","addCaptionData","handleId3_","processMetadataQueue_","callQueue","fun","loadQueue","getCurrentMediaInfo_","getPendingSegmentPlaylist","setTimeMapping_","updateMediaSecondsLoaded_","useVideoTimingInfo","firstVideoFrameTimeForData","trueSegmentStart_","currentStart","currentVideoTimestampOffset","updateAppendInitSegmentStatus","updateSourceBufferTimestampOffset_","updateTimingInfoEnd_","saveSegmentTimingInfo","shouldSaveTimelineMapping","appendData_","changedTimestampOffset","getInitSegmentAndUpdateState_","handleQuotaExceededError_","audioBufferStart","audioBufferEnd","videoBufferStart","videoBufferEnd","appendToSourceBuffer_","timeToRemoveUntil","MIN_BACK_BUFFER","handleAppendError_","segmentObj","concatSegments","appendBuffer","handleSegmentTimingInfo_","segmentTimingInfo","transmuxedDecodeStart","transmuxedDecodeEnd","trimBackBuffer_","updateTransmuxerAndRequestSegment_","shouldUpdateTransmuxerTimestampOffset_","createSimplifiedSegmentObj_","isEndOfStream","isWalkingForward","isDiscontinuity","segmentRequestFinished_","removeToTime","trimTime","maxTrimTime","safeBackBufferTrimTime","previousSegment","saveTransferStats_","saveBandwidthRelatedStats_","bandwidthInfo","handleTimeout_","updateGopBuffer","waitForAppendsToComplete_","timelineMapping","mappingForTimeline","waitForVideo","waitForAudio","waitingOnAppends","checkAppendsDone_","videoQueueCallback","audioQueueCallback","handleAppendsDone_","illegalMediaSwitchError","startingMedia","illegalMediaSwitch","didChange","getSegmentStartTimeForTimestampOffsetCalculation_","prioritizedTimingInfo","markAppended","segmentDurationMessage","recordThroughput_","addSegmentMetadataCue_","badSegmentGuess","badPartGuess","segmentProcessingTime","segmentProcessingThroughput","bufferTypes","sourceBuffer","queuePending","shiftQueue","queueIndex","queueEntry","nextQueueIndexOfType","cleanupBuffer","titleType","inSourceBuffers","sourceBuffers","actions","onError","mime","addSourceBuffer","removeSourceBuffer","newCodecBase","oldCodec","codecsChangeInfo","changeType","pushQueue","onUpdateend","descriptiveString","bufferedRangesStr","bufferedRangesToString","SourceUpdater","sourceopenListener_","audioTimestampOffset_","videoTimestampOffset_","delayedAudioAppendQueue_","videoAppendQueued_","onVideoUpdateEnd_","onAudioUpdateEnd_","onVideoError_","videoError_","onAudioError_","audioError_","createdSourceBuffers_","initializedEme_","triggeredReady_","initializedEme","hasCreatedSourceBuffers","hasInitializedAnyEme","createSourceBuffers","addOrChangeSourceBuffers","canRemoveSourceBuffer","canChangeType","SourceBuffer","processedAppend_","videoBuffer","que","audioBuffer","bufferA","bufferB","arity","extents","bufferIntersection","setDuration","uint8ToUtf8","uintArray","VTT_LINE_TERMINATORS","NoVttJsError","VTTSegmentLoader","subtitlesTrack_","featuresNativeTextTracks_","loadVttJs","combinedByteLength","combinedSegment","timestampOffsetForTimeline","checkTimestampOffset","skipEmptySegments_","stopForError","isMp4WebVttSegmentWithCues","requested","parseVTTCues_","updateTimeMapping_","timelines","uniqueCues","cueKey","removeDuplicateCuesFromTrack","isVttType","isTextResult","parseMp4VttCues_","vttCue","cueSetting","keyValString","decodeBytesToString","timestampmap","MPEGTS","LOCAL","mapData","mappingObj","diff","handleRollover_","firstStart","lastStart","valueIn90khz","referenceIn90khz","findAdCue","adStartTime","adEndTime","SyncInfo","appended","start_","end_","segmentIndex_","partIndex_","appended_","isInRange","SyncInfoData","segmentSyncInfo","partsSyncInfo","segmentSyncInfo_","partsSyncInfo_","hasPartsSyncInfo","resetAppendStatus","partSyncInfo","MediaSequenceSync","storage_","diagnostics_","isReliable_","syncInfoData","isReliablePlaylist_","updateStorage_","calculateBaseTime_","getSyncInfoForMediaSequence","startingMediaSequence","startingTime","newStorage","newDiagnostics","currentMediaSequence","prevSyncInfoData","segmentStart","segmentIsAppended","currentPartStart","partStart","partEnd","partIsAppended","fallback","minMediaSequenceFromStorage","DependantMediaSequenceSync","parent_","syncPointStrategies","run","mediaSequenceSync","timelineToDatetimeMappings","lastDistance","datetimeMapping","discontinuitySync","discontinuities","SyncController","mediaSequenceStorage_","syncPoints","runStrategies_","syncPointInfo","strategy","selectSyncPoint_","getExpiredTime","bestSyncPoint","bestDistance","bestStrategy","newDistance","lastRemovedSegment","playlistTimestamp","didCalculateSegmentTimeMapping","calculateSegmentTimeMapping_","saveDiscontinuitySyncInfo_","dateTime","accuracy","mediaIndexDiff","TimelineChangeController","pendingTimelineChanges_","lastTimelineChanges_","timelineChangeInfo","workerCode","aesTables","AES","tmp","tables","encTable","decTable","sbox","sboxInv","xInv","th","x2","x4","x8","tEnc","tDec","precompute","_tables","keyLen","rcon","encKey","decKey","encrypted0","encrypted1","encrypted2","encrypted3","out","a2","c2","nInnerRounds","kIndex","table0","table1","table2","table3","AsyncStream","jobs","timeout_","processJob_","job","ntoh","Decrypter","initVector","STEP","encrypted32","Int32Array","asyncStream_","decryptChunk_","padded","decipher","decrypted32","init0","init1","init2","init3","wordIx","audioTrackKind_","stopLoaders","activePlaylistLoader","startLoaders","playlistLoader","excludePlaylist","activeTrack","activeGroup","defaultTrack","onTrackChanged","setupListeners","requestOptions","segmentLoaders","initialize","variantLabel","isMainPlaylist","useForcedSubtitles","groupMatch","setupMediaGroups","audioSegmentLoader","mainSegmentLoader","variants","groupKeys","groupPropertyList","onGroupChanged","getActiveGroup","previousActiveLoader","lastGroup","lastGroup_","lastTrack_","onGroupChanging","lastTrack","pc","selectPlaylist","fastQualityChange_","activeTrack_","onAudioTrackChanged","SteeringManifest","priority_","pathwayClones_","version_","ttl","ttl_","reloadUri","reloadUri_","pathwayClones","ContentSteeringController","currentPathway","defaultPathway","availablePathways_","steeringManifest","proxyServerUrl_","manifestType_","ttlTimeout_","request_","currentPathwayClones","nextPathwayClones","excludedSteeringManifestURLs","xhr_","getBandwidth_","assignTagProperties","steeringTag","serverUri","steeringUri","startsWith","decodeDataUriManifest_","pathwayId","defaultServiceLocation","proxyServerURL","requestSteeringManifest","getRequestURI","errorInfo","retrySeconds","startTTLTimeout_","steeringManifestJson","assignSteeringProperties_","parsedMetadata","contentSteeringManifest","setProxyServerUrl_","steeringUrl","steeringUrlObject","proxyServerUrlObject","encodeURI","setSteeringParams_","dataUri","urlObject","getPathway","networkThroughput","pathwayKey","throughputKey","steeringJson","TTL","nextPathway","pathwaysByPriority","chooseNextPathway","proxyURI","steeringURI","ttlMS","clearTTLTimeout_","addAvailablePathway","clearAvailablePathways","excludePathway","didDASHTagChange","baseURL","newTag","getAvailablePathways","Vhs$1","loaderStats","sumLoaderStat","stat","audioSegmentLoader_","mainSegmentLoader_","PlaylistController","externVhs","useCueTags","enableLowInitialPlaylist","bufferBasedABR","experimentalUseMMS","maxPlaylistRetries","useCueTags_","usingManagedMediaSource_","cueTagsTrack_","requestOptions_","pauseLoading","mediaTypes_","createMediaTypes","disableRemotePlayback","handleDurationChange_","handleSourceOpen_","handleSourceEnded_","keyStatusMap_","segmentLoaderSettings","setupMainPlaylistLoaderListeners_","subtitleSegmentLoader_","onLoad","contentSteeringController_","setupSegmentLoaderListeners_","startABRTimer_","stopABRTimer_","triggeredFmp4Usage","loadOnPlay_","timeToLoadedData__","mainAppendsToLoadedData__","audioAppendsToLoadedData__","timeToLoadedDataStart","mainAppendsToLoadedData_","audioAppendsToLoadedData_","appendsToLoadedData_","timeToLoadedData_","checkABR_","nextPlaylist","shouldSwitchToMedia_","switchMedia_","newId","renditionInfo","switchMediaForDASHContentSteering_","dashMediaPlaylists","abrTimer_","defaultPlaylists","defaultGroup","requestTimeout","triggerPresenceUsage_","setupFirstPlay","selectedMedia","attachContentSteeringListeners_","initContentSteeringController_","excludeUnsupportedVariants_","selectInitialPlaylist","initialMedia_","handleUpdatedMediaPlaylist","playlistToExclude","waitingForFastQualityPlaylistReceived_","runFastQualitySwitch_","lastExcludeReason_","stuckAtPlaylistEnd_","updateAdCues_","updateDuration","defaultDemuxed","audioGroupKeys","currentPlaylist","bufferLowWaterLine","bufferHighWaterLine","sharedLogLine","isBuffered","forwardBuffer","maxBufferLowWaterLine","nextBandwidth","currBandwidth","logLine","shouldSwitchToMedia","onSyncInfoUpdate_","onEndOfStream","delegateLoaders_","updateCodecs","tryToCreateSourceBuffers_","getCodecsOrExclude_","mediaSecondsLoaded_","startPoint","mainMediaInfo","absolutePlaylistEnd","pathwayAttribute_","reIncludeDelay","excludeThenChangePathway_","reincluded","errorMessage","delayDuration","fnNames","loaders","dontFilterPlaylist","loader","getSeekableRange_","computeFinalSeekable_","mainSeekable","audioSeekable","mainStart","mainEnd","audioEnd","oldSeekable","seekableRanges","updateDuration_","areMediaTypesKnown_","usingAudioLoader","hasMainMediaInfo","hasAudioMediaInfo","playlistCodecs","supportFunction","unsupportedCodecs","unsupportedAudio","supporter","switchMessages","newCodec","excludeIncompatibleVariants_","ids","unsupported","codecCount_","videoDetails","audioDetails","exclusionReasons","variantCodecs","variantCodecCount","variantVideoDetails","variantAudioDetails","adOffset","adTotal","updateAdCues","newMax","addDateRangeMetadata","resetContentSteeringController_","availablePathways","newPathways","didPathwaysChange","handlePathwayClones_","didEnablePlaylists","differentPathwayId","noExcludeUntil","changeSegmentPathway_","oldClone","equalPathwayClones_","aParams","bParams","excludeNonUsablePlaylistsByKeyId_","nonUsableKeyStatusCount","NON_USABLE","keyIdSet","USABLE","hasUsableKeyStatus","nonUsableExclusion","isNonHD","excludedForNonUsableKey","addKeyStatus_","formattedKeyIdString","uInt8Buffer","padStart","bufferToHexString","updatePlaylistByKeyStatus","excludeNonUsableThenChangePlaylist_","Representation","vhsHandler","qualityChangeFunction","playlistID","changePlaylistFn","incompatible","currentlyEnabled","timerCancelEvents","PlaybackWatcher","allowSeeksWithinUnsafeLiveWindow","liveRangeSafeTimeDelta","playedRanges_","consecutiveUpdates","lastRecordedTime","checkCurrentTimeTimeout_","playHandler","monitorCurrentTime_","canPlayHandler","waitingHandler","techWaiting_","cancelTimerHandler","resetTimeUpdate_","loaderTypes","loaderChecks","resetSegmentDownloads_","updateend","checkSegmentDownloads_","setSeekingHandlers","seekingAppendCheck_","fixesBadSeeks_","clearSeekingAppendCheck_","watchForBadSeeking_","checkCurrentTime_","isBufferedDifferent","isRangeDifferent","bufferedRanges","waiting_","playedRanges","afterSeekableWindow_","beforeSeekableWindow_","minAppendedDuration","bufferedToCheck","nextRange","livePoint","videoUnderflow_","skipTheGap_","allowedEnd","isLLHLS","lastVideoRange","videoRange","audioRange","gapFromVideoUnderflow_","scheduledCurrentTime","gapInfo","gaps","findGaps","defaultOptions","errorInterval","getSource","IWillNotUseThisInPlugins","lastCalled","localOptions","loadedMetadataHandler","cleanupEvents","reloadSourceOnError","version$4","STANDARD_PLAYLIST_SELECTOR","INITIAL_PLAYLIST_SELECTOR","movingAverageBandwidthSelector","decay","average","lastSystemBandwidth","comparePlaylistResolution","leftWidth","rightWidth","LOCAL_STORAGE_KEY","handleVhsMediaChange","waitForKeySessionCreation","sourceKeySystems","audioMedia","mainPlaylists","eme","initializeMediaKeys","keySystemsOptionsArr","keySystems","keySystemsArr","keySystemsOptions","keySystemsObj","keySystemOptions","getAllPsshKeySystemsOptions","initializationFinishedPromises","keySessionCreatedPromises","setupEmeOptions","sourceOptions","audioPlaylist","videoContentType","audioContentType","keySystemContentTypes","emeKeySystems","getVhsLocalStorage","storedObject","addOnRequestHook","addOnResponseHook","removeOnRequestHook","removeOnResponseHook","supportsNativeHls","canItPlay","supportsNativeDash","supportsTypeNatively","onRequest","onResponse","offRequest","offResponse","Component","VhsHandler","initialBandwidth","_player","source_","ignoreNextSeekingEvent_","setOptions_","overrideNative","featuresNativeVideoTracks","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","useBandwidthFromLocalStorage","useNetworkInformationApi","setOptions","playbackWatcherOptions","playbackWatcher_","attachStreamingEventListeners_","defaultSelector","playerBandwidthEst","networkInformation","connection","mozConnection","webkitConnection","tenMbpsAsBitsPerSecond","networkInfoBandwidthEstBitsPerSec","downlink","invBandwidth","invThroughput","mediaRequests_","mediaRequestsAborted_","mediaRequestsTimedout_","mediaRequestsErrored_","mediaTransferDuration_","mediaBytesTransferred_","mediaAppends_","mainAppendsToLoadedData","audioAppendsToLoadedData","appendsToLoadedData","timeToLoadedData","currentTech","playerDimensions","objectToStore","updateVhsLocalStorage","setupEme_","setupQualityLevels_","mediaSourceUrl_","createKeySessions_","audioPlaylistLoader","handleWaitingForKey_","didSetupEmeOptions","qualityLevels_","convertToProgramTime","setupXhrHooks_","VhsSourceHandler","simpleType","getOverrideNative","defaultOverrideNative","A","eval","R","H","T","K","W","X","Y","Z","gb","qc","aa","ba","qd","ra","Qb","mb","uc","I","J","da","$c","Ja","gd","deferUpdates","useOnlyNativeEvents","foreachHidesDestroyed","D","Na","MouseEvents","propertychange","Jc","Lb","Pa","wc","Mb","jb","Nb","bc","Ba","setPrototypeOf","Ab","P","Ga","Tb","removeNode","Yb","la","oa","Ca","va","Xc","Ua","Zc","Db","Ud","vd","compareDocumentPosition","Sb","kd","Ac","Gc","B","za","Fb","fireEvent","O","Eb","baseVal","Bb","Ad","Yc","mergeAttributes","zoom","wd","Pd","Da","Zd","$d","Lc","Nd","hc","Od","includeFields","submitter","submit","Ub","cleanExternalData","yb","G","cleanData","thead","tbody","tfoot","tr","td","optgroup","ua","parseHTML","clean","parentWindow","innerShiv","Md","fc","Uc","ud","Kd","Xb","bd","cd","na","MutationObserver","scheduler","zb","resetForTesting","Sd","Ta","throttleEvaluation","read","rateLimit","Hb","ub","deferred","notifySubscribers","notify","equalityComparer","lc","mc","Ib","fb","Jb","qb","U","subscribe","Qa","Gb","Wa","ed","xc","ob","Dd","nc","sb","rc","Bd","Qc","od","pd","fd","qa","Va","Ya","Yd","ta","ya","xa","Ma","Za","Nc","Ha","trackArrayChanges","removeAll","destroy","_destroy","destroyAll","sorted","reversed","zc","Pc","Pb","Ob","sparse","Kc","nb","ka","Xa","ha","sa","rb","jc","wb","Wc","disposeWhenNodeIsRemoved","Sa","disposeWhen","Rb","V","Ic","C","pure","deferEvaluation","ea","ja","Ka","Vb","La","Ia","Jd","Rd","Hc","zd","yd","N","Oc","Fd","xb","save","ad","Wd","ma","__ko__hasDomDataOptionValue__","$b","unknown","Ra","wa","vb","getBindingHandler","preprocess","valueAccessors","bindingParams","Id","eb","ul","ol","Ea","Vc","Wb","Cd","Vd","ga","nd","nodeHasBindings","getComponentNameForNode","getBindings","getBindingsString","parseBindingsString","tc","getBindingAccessors","Tc","yc","kb","Kb","preprocessNode","bindingContextForDescendants","hd","Zb","Ec","pa","Cb","ca","after","Mc","$data","controlsDescendantBindings","shouldBindDescendants","fa","textarea","$parents","$root","ko","$rawData","dataDependency","exportDependencies","createChildContext","as","noChildContext","$parentContext","$parent","sd","Cc","Fa","notifyImmediately","Td","ib","ld","Oa","vc","Dc","synchronous","definition","Gd","suppressLoaderExceptions","Bc","viewModel","require","Xd","register","tb","unregister","Fc","getConfig","loadComponent","loadTemplate","HTMLElement","loadViewModel","$raw","createViewModel","templateNodes","$component","$componentTemplateNodes","koDescendantsComplete","checked","uniqueName","checkedValue","__ko__cssValue","foreach","Rc","includeDestroyed","afterAdd","beforeRemove","afterRender","beforeMove","afterMove","templateEngine","hasfocus","__ko_hasfocusUpdating","__ko_hasfocusLastValue","hasFocus","let","Q","multiple","ec","selectedOptions","setProperty","opera","textInput","propertyName","textinput","rd","using","autocomplete","renderTemplateSource","createJavaScriptEvaluatorBlock","makeTemplateSource","ia","renderTemplate","isTemplateRewritten","allowTemplateRewriting","rewriteTemplate","kc","xd","Ld","md","lb","jd","bb","gc","dc","Qd","$index","ifnot","moved","dontLimitMoves","Aa","pb","_countWaitingForRemove","E","Ed","$a","Hd","tmpl","koBindingContext","templateOptions","appendTo","fragments","addTemplate","ko_code","ko_with","standalone","isFormat","$0","$1","$2","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","processRelativeTime","relativeTimeWithPlural","forms","monthsShortWithDots","monthsShortWithoutDots","isUpper","translator","words","correctGrammaticalCase","wordKey","eras","since","narrow","abbr","until","eraYearOrdinalRegex","eraYearOrdinalParse","monthsNominative","monthsSubjective","plural","momentToFormat","monthsNominativeEl","monthsGenitiveEl","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","mom","_calendarEl","global","noGlobal","getProto","getPrototypeOf","class2type","hasOwn","fnToString","ObjectFunctionString","support","isWindow","preservedScriptAttributes","nonce","noModule","DOMEval","toType","rhtmlSuffix","isArrayLike","jquery","toArray","pushStack","elems","prevObject","first","eq","even","grep","_elem","odd","copyIsArray","isPlainObject","expando","isReady","proto","Ctor","isEmptyObject","globalEval","makeArray","inArray","isXMLDoc","docElem","invert","callbackExpect","whitespace","rtrimCSS","bup","rcssescape","fcssescape","asCodePoint","escapeSelector","sel","preferredDoc","pushNative","Expr","outermostContext","sortInput","hasDuplicate","documentIsHTML","rbuggyQSA","dirruns","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","booleans","pseudos","rwhitespace","rcomma","rleadingCombinator","rdescend","rpseudo","ridentifier","matchExpr","CLASS","TAG","ATTR","PSEUDO","CHILD","needsContext","rinputs","rheader","rquickExpr","rsibling","runescape","funescape","nonHex","high","unloadHandler","setDocument","inDisabledFieldset","addCombinator","seed","nid","newSelector","newContext","testContext","scope","tokenize","toSelector","qsaError","select","cacheLength","markFunction","assert","createInputPseudo","createButtonPseudo","createDisabledPseudo","createPositionalPseudo","argument","matchIndexes","subWindow","webkitMatchesSelector","msMatchesSelector","getById","getElementsByName","disconnectedMatch","cssHas","attrId","compare","sortDetached","expr","elements","matchesSelector","attrHandle","uniqueSort","duplicates","sortStable","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","expectedNodeName","pattern","operator","what","_argument","simple","ofType","_context","outerCache","nodeIndex","useCache","pseudo","setFilters","matched","matcher","compile","unmatched","elemLang","safeActiveElement","_matchIndexes","nth","radio","checkbox","parseOnly","soFar","preFilters","cached","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","matcherOut","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","compiled","filters","unique","isXML","selectors","truncate","siblings","rneedsContext","rsingleTag","winnow","qualifier","rootjQuery","rparentsprev","guaranteedUnique","contents","sibling","targets","prevAll","addBack","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","rnothtmlwhite","Identity","Thrower","ex","adoptValue","noValue","fail","Callbacks","_","flag","createOptions","firing","memory","fired","locked","firingIndex","fire","once","stopOnFalse","lock","fireWith","Deferred","tuples","always","fns","newDefer","tuple","returned","onFulfilled","onRejected","onProgress","maxDepth","special","that","mightThrow","notifyWith","resolveWith","process","exceptionHook","rejectWith","getErrorHook","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","asyncError","stack","readyException","readyList","completed","readyWait","doScroll","access","chainable","emptyGet","raw","bulk","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","acceptData","Data","hasData","dataPriv","dataUser","rmultiDash","dataAttr","getData","_data","_removeData","startLength","_queueHooks","clearQueue","defer","pnum","rcssNum","cssExpand","isAttached","composed","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","maxIterations","currentValue","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","rcheckableType","rtagName","rscriptType","checkClone","noCloneChecked","wrapMap","col","_default","getAll","setGlobalEval","refElements","colgroup","rhtml","buildFragment","scripts","ignored","wrap","attached","htmlPrefilter","rtypenamespace","origFn","leverageNative","isSetup","saved","isTrigger","delegateType","handleObjIn","eventHandle","events","handleObj","namespaces","origType","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","noBubble","beforeunload","isDefaultPrevented","isSimulated","altKey","ctrlKey","detail","eventPhase","metaKey","pointerId","pointerType","targetTouches","focusMappedHandler","documentMode","simulate","attaches","dataHolder","mouseenter","mouseleave","pointerenter","pointerleave","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","insertAfter","replaceAll","rnumnonpx","rcustomProp","getStyles","opener","rboxStyle","curCSS","computed","minWidth","maxWidth","isCustomProp","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","boxModelAdjustment","isBorderBox","computedVal","extra","marginDelta","getWidthOrHeight","valueIsBorderBox","offsetProp","Tween","easing","cssHooks","animationIterationCount","borderImageSlice","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","orphans","widows","zIndex","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","origName","scrollboxSizeBuggy","padding","border","suffix","expand","expanded","propHooks","eased","fx","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","stopped","prefilters","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflowX","overflowY","prefilter","speed","speeds","fadeTo","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","rquery","parseXML","parserErrorElem","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","triggerHandler","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","serialize","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","lastModified","etag","isLocal","async","accepts","responseFields","converters","ajaxSetup","ajaxPrefilter","ajaxTransport","transport","cacheURL","responseHeadersString","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","requestHeaders","requestHeadersNames","strAbort","statusText","finalText","crossDomain","hasContent","ifModified","nativeStatusText","responses","isSuccess","modified","finalDataType","firstDataType","ajaxHandleResponses","conv2","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","xhrSuccessStatus","xhrSupported","errorCallback","xhrFields","binary","scriptAttrs","scriptCharset","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","keepScripts","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","pageYOffset","pageXOffset","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","rtrim","proxy","holdReady","hold","parseJSON","isNumeric","_jQuery","_$","noConflict","stylesInDOM","getIndexByIdentifier","modulesToDom","idCountMap","identifiers","indexByIdentifier","sourceMap","updater","addElementStyle","byIndex","api","domAPI","newObj","lastIdentifiers","newList","newLastIdentifiers","_index","hookCallback","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","valueOf","createUTC","locale","strict","createLocalOrUTC","utc","getParsingFlags","_pf","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","isValid","parsedParts","isNowValid","_d","invalidWeekday","_strict","bigHour","isFrozen","_isValid","createInvalid","momentProperties","updateInProgress","copyConfig","momentPropertiesLen","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","firstTime","deprecationHandler","argLen","deprecations","deprecateSimple","mergeConfigs","parentConfig","childConfig","Locale","targetLength","forceSign","absNumber","zerosToFill","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","localeData","formatMoment","expandFormat","makeFormatFunction","invalidDate","replaceLongDateFormatTokens","aliases","dates","weekday","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","ms","milliseconds","millisecond","quarters","quarter","weekyears","weekyear","GG","isoweekyears","isoweekyear","weeks","isoweeks","isoweek","years","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","match1to2NoLeadingZero","match1to2HasZero","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","regexEscape","p1","p2","p3","p4","absFloor","toInt","argumentForCoercion","coercedNumber","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","_a","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","getSetYear","makeGetSet","keepTime","set$1","isUTC","getUTCMilliseconds","getMilliseconds","getUTCSeconds","getSeconds","getUTCMinutes","getMinutes","getUTCHours","getHours","getUTCDate","getDate","getUTCDay","getDay","getUTCMonth","getMonth","getUTCFullYear","getFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setSeconds","setUTCMinutes","setMinutes","setUTCHours","setHours","setUTCDate","setDate","setUTCFullYear","setFullYear","daysInMonth","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","setUTCMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","createUTCDate","UTC","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","kInput","_isPm","_meridiem","pos1","pos2","getSetHour","globalLocale","baseConfig","locales","localeFamilies","commonPrefix","arr1","minl","normalizeLocale","loadLocale","oldLocale","isLocaleNameSane","_abbr","getSetGlobalLocale","getLocale","_config","parentLocale","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","weekdayStr","parsedInput","checkWeekday","obsOffset","militaryOffset","numOffset","calculateOffset","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","_useUTC","currentDateArray","weekdayOverflow","curWeek","createLocal","_week","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","ISO_8601","RFC_2822","stringLength","totalParsedInputLength","isPm","meridiemFixWrap","erasConvertYear","prepareConfig","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromStringAndArray","createFromInputFallback","configFromString","dayOrDate","configFromObject","configFromInput","prototypeMin","other","prototypeMax","pickBy","moments","ordering","Duration","unitHasDecimal","orderLen","isDurationValid","_milliseconds","_days","_months","_bubble","isDuration","absRound","utcOffset","offsetFromString","chunkOffset","cloneWithOffset","model","setTime","local","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","diffRes","parseIso","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","addSubtract","isAdding","invalid","isString","isMomentInput","arrayTest","dataTypeTest","isNumberOrStringArray","objectTest","propertyTest","propertyLen","isMomentInputObject","monthDiff","wholeMonthDiff","newLocaleData","defaultFormat","defaultFormatUtc","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","preParsePostFormat","formats","isCalendarSpec","sod","startOf","calendarFormat","asFloat","zoneDelta","endOf","startOfDate","inputString","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","getPrioritizedUnits","prioritizedLen","toObject","toDate","keepOffset","zone","for","unix","creationData","eraName","eraNarrow","eraAbbr","eraYear","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","parseWeekday","parseIsoWeekday","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","isDSTShifted","_isDSTShifted","array1","array2","dontConvert","lengthDiff","diffs","compareArrays","proto$1","get$1","listMonthsImpl","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","tok","_invalidDate","_ordinal","_relativeTime","pastFuture","_eras","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","proto$2","monthsFromDays","argWithSuffix","argThresholds","withSuffix","posNegDuration","relativeTime$1","toIsoString","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","limit","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","suffixes","webpackContext","webpackContextResolve","__webpack_require__","S2","select2","amd","requirejs","undef","makeMap","defined","waiting","defining","aps","jsSuffixRegExp","hasProp","baseName","nameParts","nameSegment","mapValue","foundMap","foundI","foundStarMap","starI","baseParts","starMap","nodeIdCompat","makeRequire","relName","forceSync","makeLoad","depName","callDep","splitPrefix","makeRelParts","makeConfig","relParts","relResourceName","deps","cjsModule","usingExports","callbackType","cfg","_defined","Utils","getMethods","theClass","methods","methodName","Extend","ChildClass","SuperClass","__hasProp","BaseConstructor","__super__","Decorate","DecoratorClass","decoratedMethods","superMethods","DecoratedClass","argCount","calledConstructor","displayName","superMethod","calledMethod","originalMethod","decoratedMethod","Observable","invoke","generateChars","_convertData","originalKey","dataLevel","hasScroll","$el","scrollHeight","scrollWidth","escapeMarkup","markup","replaceMap","__cache","GetUniqueElementId","select2Id","StoreData","GetData","RemoveData","copyNonInternalCssClasses","destinationClasses","clazz","sourceClasses","replacements","Results","dataAdapter","render","$results","displayMessage","hideLoading","$message","hideMessages","$options","$option","$dropdown","sorter","highlightFirstItem","$selected","ensureHighlightVisible","setClasses","selectedIds","showLoading","loadingMore","$loading","_resultId","$children","$child","$childrenContainer","$container","isOpen","$highlighted","getHighlightedResults","nextIndex","$next","currentOffset","nextTop","nextOffset","outerHeight","nextBottom","mousewheel","deltaY","isAtTop","isAtBottom","$this","offsetDelta","BACKSPACE","ENTER","SHIFT","CTRL","ALT","ESC","SPACE","PAGE_UP","PAGE_DOWN","END","HOME","LEFT","UP","RIGHT","DOWN","DELETE","KEYS","BaseSelection","$selection","_tabindex","resultsId","_handleBlur","_attachCloseHandler","_detachCloseHandler","$select","SingleSelection","$rendered","selectionContainer","MultipleSelection","$selections","selectionIdPrefix","selectionId","$remove","Placeholder","decorated","placeholder","normalizePlaceholder","createPlaceholder","$placeholder","placeholderTitle","singlePlaceholder","AllowClear","_handleClear","_handleKeyboardClear","$clear","previousVal","unselectData","prevented","Search","searchLabel","$search","$searchContainer","_transferTabIndex","resizeSearch","_keyUpPrevented","$previousChoice","searchRemoveChoice","msie","disableInputEvents","handleSearch","searchHadFocus","SelectionCSS","selectionCssClass","EventRelay","relayEvents","preventableEvents","Translation","dict","translation","_cache","loadPath","translations","BaseAdapter","query","generateResultId","SelectAdapter","selectedElement","currentData","unselect","addOptions","normalizedData","_normalizeItem","ArrayAdapter","_dataToConvert","convertToOptions","elm","$existing","existingIds","onlyItem","$existingOption","existingData","$newOption","AjaxAdapter","ajaxOptions","_applyDefaults","processResults","failure","$request","_request","_queryTimeout","Tags","tags","createTag","insertTag","_removeOldTags","page","checkChildren","Tokenizer","tokenizer","dropdown","tokenData","separators","termChar","MinimumInputLength","$e","minimumInputLength","minimum","MaximumInputLength","maximumInputLength","maximum","MaximumSelectionLength","maximumSelectionLength","_checkIfMaximumSelected","successCallback","Dropdown","showSearch","HidePlaceholder","removePlaceholder","modifiedData","InfiniteScroll","lastParams","$loadingMore","createLoadingMore","showLoadingMore","loadMoreIfNeeded","isLoadMoreVisible","loadMore","pagination","more","AttachBody","$dropdownParent","_showDropdown","_attachPositioningHandler","_bindContainerResultHandlers","_hideDropdown","_detachPositioningHandler","$dropdownContainer","_containerResultsHandlersBound","_positionDropdown","_resizeDropdown","scrollEvent","resizeEvent","orientationEvent","$watchers","ev","$window","isCurrentlyAbove","isCurrentlyBelow","newDirection","viewport","enoughRoomAbove","enoughRoomBelow","$offsetParent","isConnected","outerWidth","countResults","MinimumResultsForSearch","minimumResultsForSearch","SelectOnClose","_handleSelectOnClose","originalSelect2Event","$highlightedResults","CloseOnSelect","_selectTriggered","DropdownCSS","dropdownCssClass","TagsSearchHighlight","$firstOption","firstElement","errorLoading","inputTooLong","overChars","inputTooShort","maximumSelected","noResults","searching","removeAllItems","search","ResultsList","SelectionSearch","DIACRITICS","SelectData","ArrayData","AjaxData","DropdownSearch","EnglishTranslation","Defaults","tokenSeparators","resultsAdapter","selectOnClose","dropdownAdapter","SearchableDropdown","closeOnSelect","selectionAdapter","allowClear","_resolveLanguage","uniqueLanguages","_processTranslations","stripDiacritics","amdLanguageBase","dropdownAutoWidth","scrollAfterSelect","templateResult","templateSelection","theme","applyFromElement","optionLanguage","defaultLanguage","elementLanguage","parentLanguage","resolvedLanguages","baseLanguage","languageData","convertedData","Options","excludedData","upperCaseLetter","attributeName","dataName","dataValue","Select2","_generateId","DataAdapter","_placeContainer","SelectionAdapter","DropdownAdapter","ResultsAdapter","_bindAdapters","_registerDomEvents","_registerDataEvents","_registerSelectionEvents","_registerDropdownEvents","_registerResultsEvents","_registerEvents","initialData","_syncAttributes","_resolveWidth","WIDTH","styleWidth","elementWidth","_syncA","_syncS","_syncSubtree","_observer","mutations","childList","subtree","nonRelayEvents","toggleDropdown","_isChangeMutation","addedNodes","removedNodes","actualTrigger","preTriggerMap","preTriggerName","preTriggerArgs","newVal","thisMethods","instanceOptions","translateSingular","relativeTimeMr","ezafeNumSuffix","processHoursFunction","nominative","accusative","genitive","firstScriptTag","_isOnMobile","IS_NATIVE_ANDROID","Youtube","isApiReady","initYTPlayer","apiReadyQueue","ytPlayer","stopVideo","divWrapper","ytControls","divBlocker","onclick","playerVars","modestbranding","showinfo","autohide","disablekb","fs","srcEndTime","hl","listId","listType","srcStartTime","customVars","activeVideoId","videoId","activeList","playerConfig","onReady","onPlayerReady","onPlaybackQualityChange","onPlayerPlaybackQualityChange","onPlaybackRateChange","onPlayerPlaybackRateChange","onStateChange","onPlayerStateChange","onVolumeChange","onPlayerVolumeChange","onPlayerError","enablePrivacyEnhancedMode","YT","mute","getAvailablePlaybackRates","playerReady_","playOnReady","cueOnReady","cueVideoById_","lastState","errorNumber","PlayerState","ENDED","PLAYING","isSeeking","onSeeked","PAUSED","BUFFERING","loadVideoById_","startSeconds","endSeconds","loadVideoById","cueVideoById","checkHighResPoster","setAutoplay","setLoop","wasPausedBeforeSeek","playVideo","loadPlaylist","pauseVideo","getCurrentTime","timeBeforeSeek","checkSeekedInPauseInterval","getDuration","getPlaybackRate","setPlaybackRate","suggestedRate","getVolume","isMuted","unMute","getVideoLoadedFraction","getPlayerState","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","Image","naturalHeight","naturalWidth","memo","styleTarget","getTarget","insertStyleElement","needLayer","btoa","styleTagTransform","removeStyleElement","relativeTimeWithSingular","eifelerRegelAppliesToNumber","minDoc","DESCRIPTORS","parseDescriptors","headerSize","_DESCRIPTORS$z","dependsOnEsId","ocrEsId","descriptors","oti","version$6","initPlugin$1","handleVhsLoadedMetadata","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","toStringTag","nmd","locals"],"sourceRoot":""}