cpl.sli.ke Open in urlscan Pro
2600:9000:2156:7400:1b:2208:d180:93a1  Public Scan

URL: https://cpl.sli.ke/cleo.sw.js?v=0.1.4
Submission: On March 13 via manual from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

/*! For license information please see cleo.sw.js.LICENSE.txt */
self.cleoServiceWorker=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ePlayListMode=t.FAKE_VTT_TEXT=t._BRANCH_=t._BUILD_=t._COMMITHASH_=t._VERSION_=t._SERVE_=t.SecurityLevel=t.CUE_PRIVATE_PREFIX=t.CUE_PUBLIC_PREFIX=t.CONTENT_IV=t.CUE_IV=t.MSG_ROUTES=t.EVT_FETCH_FREQUENCY=t.CONTENT_TYPE=void 0,t.CONTENT_TYPE={M3U8:"application/x-mpegURL",WEBVTT:"text/vtt",TS:"video/mp2t"},t.EVT_FETCH_FREQUENCY=2e3,t.MSG_ROUTES={SET_CONFIG:"SET_CONFIG",CUE_DATA:"CUE_DATA",FRAG_DATA:"FRAG_DATA",EVT_DATA:"EVT_DATA",PING:"PING",PONG:"PONG",FRAGMENT:"FRAGMENT",SW_READY:"SW_READY",STOP_INTERCEPTION:"STOP_INTERCEPTION",DESTROY_CONFIG:"DESTROY_CONFIG",CHANGE_STREAM_MODE:"CHANGE_STREAM_MODE",FLV_DATA:"FLV_DATA"},t.CUE_IV="slike123server13",t.CONTENT_IV="chFNcOFvriGPvmco",t.CUE_PUBLIC_PREFIX=":::",t.CUE_PRIVATE_PREFIX="___",function(e){e[e.NONE=0]="NONE",e[e.ONLY_NAME=1]="ONLY_NAME",e[e.WITH_CONTENT=2]="WITH_CONTENT"}(t.SecurityLevel||(t.SecurityLevel={})),t._SERVE_=void 0,t._VERSION_="1.0.0",t._COMMITHASH_="387ace040a78ff68b79d8b64eabe1908c4e2b666",t._BUILD_="prod",t._BRANCH_="dev",t.FAKE_VTT_TEXT="!~~~~~~!",function(e){e[e.ALL=0]="ALL",e[e.PRIMARY=1]="PRIMARY",e[e.BACKUP=2]="BACKUP"}(t.ePlayListMode||(t.ePlayListMode={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onFragmentLoaded=t.getSWUrl=t.destroyConfig=t.stopInterception=t.setMasterResponse=t.setPlayerMode=t.setConfig=t.SW_CONFIG=void 0;const r=n(0),o=n(3),i=n(0);t.SW_CONFIG={};const s={cueFetchFrequency:r.EVT_FETCH_FREQUENCY,segmentFrequency:r.EVT_FETCH_FREQUENCY,debounce:!1,evtDataArr:[],idle:!0,stopInterception:!1};t.setConfig=function(e){"string"==typeof e&&(e=JSON.parse(e));const n=Object.assign(Object.assign(Object.assign({},s),e),{idle:!1,mode:i.ePlayListMode.ALL});t.SW_CONFIG[e.streamId]=n;try{self instanceof ServiceWorkerGlobalScope&&o.sendMsgToClient({streamId:e.streamId,route:r.MSG_ROUTES.SW_READY},e.streamId)}catch(e){}},t.setPlayerMode=function(e,n){try{if(self instanceof ServiceWorkerGlobalScope&&t.SW_CONFIG[e])return void(t.SW_CONFIG[e].mode=n)}catch(e){}o.sendMsgToSW({route:r.MSG_ROUTES.CHANGE_STREAM_MODE,streamId:e,mode:n})},t.setMasterResponse=function(e,n){try{if(self instanceof ServiceWorkerGlobalScope&&t.SW_CONFIG[e])return void(t.SW_CONFIG[e].masterResponse=Object.assign(Object.assign({},t.SW_CONFIG[e].masterResponse),n))}catch(e){}o.sendMsgToSW({route:r.MSG_ROUTES.FLV_DATA,streamId:e,payload:n})},t.stopInterception=function(e){try{if(self instanceof ServiceWorkerGlobalScope&&t.SW_CONFIG[e])return void(t.SW_CONFIG[e].stopInterception=!0)}catch(e){}o.sendMsgToSW({route:r.MSG_ROUTES.STOP_INTERCEPTION,streamId:e})},t.destroyConfig=function(e){t.SW_CONFIG[e]&&delete t.SW_CONFIG[e]},t.getSWUrl=function(e){return e.swUrl?e.swUrl:"dev"===r._BUILD_?"/cleo.sw.dev.js":"/cleo.sw.js"},t.onFragmentLoaded=function(e,n){if(t.SW_CONFIG[e])try{self instanceof ServiceWorkerGlobalScope&&o.sendMsgToClient({streamId:e,route:r.MSG_ROUTES.FRAG_DATA,sn:n},e)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatMillisecond=t.bytesToASCIIString=t.asciiToUint8Array=t.prepareResponse=t.noop=t.isLocalhost=t.isWebWorker=t.isWWSupported=t.isSWSupported=void 0,t.isSWSupported=function(){return"serviceWorker"in navigator},t.isWWSupported=function(){return"Worker"in window},t.isWebWorker=function(){return void 0===self.document},t.isLocalhost=function(){return Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},t.noop=(...e)=>{},t.prepareResponse=function(e){return new Response(e.data,{status:e.status||200,statusText:e.statusText||"OK",headers:Object.assign({},e.headers)})},t.asciiToUint8Array=function(e){const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return new Uint8Array(t)},t.bytesToASCIIString=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))},t.formatMillisecond=function(e){const t=[],n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5};return["hours","minutes","seconds","milliseconds"].forEach((r,o)=>{t[o]=Math.floor(e/n[r]),e%=n[r]}),t.reduce((e,n,r)=>(e+=n.toString().length<2?"0"+n:n,r===t.length-2?e+=".":r<t.length-1&&(e+=":"),e),"")}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.destroySW=t.registerSW=t.sendMsgToSW=t.sendMsgToClient=t.unregisterSW=void 0;const i=o(n(9)),s=n(0),a=n(1),u=n(2);n(10);let c=!1;function f(){return r(this,void 0,void 0,(function*(){if(u.isSWSupported()){try{if(navigator.serviceWorker.controller){(yield navigator.serviceWorker.ready).unregister()}return!0}catch(e){}return!1}}))}function l(e){try{navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage(e)}catch(e){}}function d(e){c=!0;const t=a.SW_CONFIG[e];navigator.serviceWorker.onmessage=i.default,l({route:s.MSG_ROUTES.SET_CONFIG,config:{streamId:t.streamId,debounce:t.debounce,tsDomainReplacePair:t.tsDomainReplacePair,stopInterception:t.stopInterception,authDetails:t.authDetails,manifestLess:t.manifestLess,enableDvr:t.enableDvr}})}function p(e){const t=setTimeout(()=>{window.location.reload()},3e3);navigator.serviceWorker.addEventListener("controllerchange",()=>{d(e),clearTimeout(t)})}t.unregisterSW=f,t.sendMsgToClient=function(e,t){try{if(self instanceof ServiceWorkerGlobalScope){self.clients.matchAll().then(n=>{n.forEach(n=>{(""==t||n.url.includes(t))&&n.postMessage(e)})})}}catch(e){}},t.sendMsgToSW=l,t.registerSW=function(e,t){return r(this,void 0,void 0,(function*(){!function(e){r(this,void 0,void 0,(function*(){const t=localStorage.getItem("sw-hash");if(t&&t!==s._COMMITHASH_)return yield f(),localStorage.setItem("sw-hash",s._COMMITHASH_),void e(!0);localStorage.setItem("sw-hash",s._COMMITHASH_),e(!1)}))}((function(n){return r(this,void 0,void 0,(function*(){navigator.serviceWorker.ready.then(()=>{n?p(e):navigator.serviceWorker.controller?d(e):p(e)});try{yield navigator.serviceWorker.register(t)}catch(t){a.SW_CONFIG&&a.SW_CONFIG[e].onError&&a.SW_CONFIG[e].onError(t)}}))}))}))},t.destroySW=function(e){return r(this,void 0,void 0,(function*(){c&&l({route:s.MSG_ROUTES.DESTROY_CONFIG,streamId:e})}))}},function(e,t,n){var r,o,i,s,a;r=n(14),o=n(5).utf8,i=n(15),s=n(5).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var n=r.bytesToWords(e),u=8*e.length,c=1732584193,f=-271733879,l=-1732584194,d=271733878,p=0;p<n.length;p++)n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[u>>>5]|=128<<u%32,n[14+(u+64>>>9<<4)]=u;var h=a._ff,_=a._gg,y=a._hh,v=a._ii;for(p=0;p<n.length;p+=16){var g=c,S=f,T=l,E=d;c=h(c,f,l,d,n[p+0],7,-680876936),d=h(d,c,f,l,n[p+1],12,-389564586),l=h(l,d,c,f,n[p+2],17,606105819),f=h(f,l,d,c,n[p+3],22,-1044525330),c=h(c,f,l,d,n[p+4],7,-176418897),d=h(d,c,f,l,n[p+5],12,1200080426),l=h(l,d,c,f,n[p+6],17,-1473231341),f=h(f,l,d,c,n[p+7],22,-45705983),c=h(c,f,l,d,n[p+8],7,1770035416),d=h(d,c,f,l,n[p+9],12,-1958414417),l=h(l,d,c,f,n[p+10],17,-42063),f=h(f,l,d,c,n[p+11],22,-1990404162),c=h(c,f,l,d,n[p+12],7,1804603682),d=h(d,c,f,l,n[p+13],12,-40341101),l=h(l,d,c,f,n[p+14],17,-1502002290),c=_(c,f=h(f,l,d,c,n[p+15],22,1236535329),l,d,n[p+1],5,-165796510),d=_(d,c,f,l,n[p+6],9,-1069501632),l=_(l,d,c,f,n[p+11],14,643717713),f=_(f,l,d,c,n[p+0],20,-373897302),c=_(c,f,l,d,n[p+5],5,-701558691),d=_(d,c,f,l,n[p+10],9,38016083),l=_(l,d,c,f,n[p+15],14,-660478335),f=_(f,l,d,c,n[p+4],20,-405537848),c=_(c,f,l,d,n[p+9],5,568446438),d=_(d,c,f,l,n[p+14],9,-1019803690),l=_(l,d,c,f,n[p+3],14,-187363961),f=_(f,l,d,c,n[p+8],20,1163531501),c=_(c,f,l,d,n[p+13],5,-1444681467),d=_(d,c,f,l,n[p+2],9,-51403784),l=_(l,d,c,f,n[p+7],14,1735328473),c=y(c,f=_(f,l,d,c,n[p+12],20,-1926607734),l,d,n[p+5],4,-378558),d=y(d,c,f,l,n[p+8],11,-2022574463),l=y(l,d,c,f,n[p+11],16,1839030562),f=y(f,l,d,c,n[p+14],23,-35309556),c=y(c,f,l,d,n[p+1],4,-1530992060),d=y(d,c,f,l,n[p+4],11,1272893353),l=y(l,d,c,f,n[p+7],16,-155497632),f=y(f,l,d,c,n[p+10],23,-1094730640),c=y(c,f,l,d,n[p+13],4,681279174),d=y(d,c,f,l,n[p+0],11,-358537222),l=y(l,d,c,f,n[p+3],16,-722521979),f=y(f,l,d,c,n[p+6],23,76029189),c=y(c,f,l,d,n[p+9],4,-640364487),d=y(d,c,f,l,n[p+12],11,-421815835),l=y(l,d,c,f,n[p+15],16,530742520),c=v(c,f=y(f,l,d,c,n[p+2],23,-995338651),l,d,n[p+0],6,-198630844),d=v(d,c,f,l,n[p+7],10,1126891415),l=v(l,d,c,f,n[p+14],15,-1416354905),f=v(f,l,d,c,n[p+5],21,-57434055),c=v(c,f,l,d,n[p+12],6,1700485571),d=v(d,c,f,l,n[p+3],10,-1894986606),l=v(l,d,c,f,n[p+10],15,-1051523),f=v(f,l,d,c,n[p+1],21,-2054922799),c=v(c,f,l,d,n[p+8],6,1873313359),d=v(d,c,f,l,n[p+15],10,-30611744),l=v(l,d,c,f,n[p+6],15,-1560198380),f=v(f,l,d,c,n[p+13],21,1309151649),c=v(c,f,l,d,n[p+4],6,-145523070),d=v(d,c,f,l,n[p+11],10,-1120210379),l=v(l,d,c,f,n[p+2],15,718787259),f=v(f,l,d,c,n[p+9],21,-343485551),c=c+g>>>0,f=f+S>>>0,l=l+T>>>0,d=d+E>>>0}return r.endian([c,f,l,d])})._ff=function(e,t,n,r,o,i,s){var a=e+(t&n|~t&r)+(o>>>0)+s;return(a<<i|a>>>32-i)+t},a._gg=function(e,t,n,r,o,i,s){var a=e+(t&r|n&~r)+(o>>>0)+s;return(a<<i|a>>>32-i)+t},a._hh=function(e,t,n,r,o,i,s){var a=e+(t^n^r)+(o>>>0)+s;return(a<<i|a>>>32-i)+t},a._ii=function(e,t,n,r,o,i,s){var a=e+(n^(t|~r))+(o>>>0)+s;return(a<<i|a>>>32-i)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(a(e,t));return t&&t.asBytes?n:t&&t.asString?s.bytesToString(n):r.bytesToHex(n)}},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.destroyWebWorker=t.getWorkerMethod=t.registerWebWorker=void 0;const a=n(1),u=i(n(21)),c=n(2);let f;const l={setConfig:a.setConfig,destroyConfig:a.destroyConfig};c.isWebWorker()&&u.expose(l),t.registerWebWorker=function(e,t){return s(this,void 0,void 0,(function*(){try{const n=new Worker(t+"?worker=true");f=u.wrap(n),yield f.setConfig(JSON.stringify(e))}catch(e){}}))},t.getWorkerMethod=function(e){return f&&f[e]?f[e]:l&&l[e]?function(...t){return new Promise(n=>{n(l[e].apply(null,Array.prototype.slice.call(t)))})}:null},t.destroyWebWorker=function(e){return s(this,void 0,void 0,(function*(){f&&(yield f.destroyConfig(e))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2),o=n(8),i=n(6),s=n(0),a=n(1),u={register:o.register,isSupported:r.isSWSupported,unregister:o.unregister,version:s._VERSION_,hash:s._COMMITHASH_,sendMessage:o.sendMessage,stopInterception:a.stopInterception,getWorkerMethod:i.getWorkerMethod,destroy:o.destroy,switchPlaylist:o.switchPlaylist,setMasterData:o.setMasterData};t.default=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.setMasterData=t.destroy=t.unregister=t.switchPlaylist=t.register=t.sendMessage=void 0;const o=n(2),i=n(1),s=n(3),a=n(6),u=(n(0),n(1)),c={onError:o.noop,onMessage:o.noop,onReady:o.noop,onCueData:o.noop};t.sendMessage=function(e){s.sendMsgToSW(e)},t.register=function(e=c){if(e.skipSW&&i.setConfig(e),!e.skipSW){if(!o.isSWSupported())return void(e.onError&&e.onError());{const t=i.getSWUrl(e);i.setConfig(e),s.registerSW(e.streamId,t)}}if(e.webWorker&&o.isWWSupported()){const t=i.getSWUrl(e);a.registerWebWorker(e,t)}},t.switchPlaylist=function(e,t){var n;(null===(n=u.SW_CONFIG[e])||void 0===n?void 0:n.mode)!==t&&i.setPlayerMode(e,t)},t.unregister=function(){return r(this,void 0,void 0,(function*(){return s.unregisterSW()}))},t.destroy=function(e){return r(this,void 0,void 0,(function*(){a.destroyWebWorker(e),s.destroySW(e)}))},t.setMasterData=function(e,t){u.SW_CONFIG[e].manifestLess&&i.setMasterResponse(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(0);t.default=function(e){const t=e.data.streamId;if(e&&e.data&&t&&r.SW_CONFIG[t]){if(e.data.route===o.MSG_ROUTES.SW_READY){r.SW_CONFIG[t].onReady()}r.SW_CONFIG[t].onMessage(e)}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});n(0);const i=o(n(11)),s=o(n(12));try{if(self instanceof ServiceWorkerGlobalScope){const e=self;e.addEventListener("install",t=>{t.waitUntil(e.skipWaiting())}),e.addEventListener("activate",t=>{t.waitUntil(e.clients.claim())}),e.addEventListener("fetch",(function(e){return r(this,void 0,void 0,(function*(){e&&e.request&&s.default(e)}))})),e.addEventListener("message",(function(e){return r(this,void 0,void 0,(function*(){e&&i.default(e)}))}))}}catch(e){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(0),o=n(1);t.default=function(e){e&&e.data&&(e.data.route===r.MSG_ROUTES.SET_CONFIG?o.setConfig(Object.assign({},e.data.config)):e.data.route===r.MSG_ROUTES.CUE_DATA||e.data.route===r.MSG_ROUTES.FRAGMENT||(e.data.route===r.MSG_ROUTES.STOP_INTERCEPTION?o.stopInterception(e.data.streamId):e.data.route===r.MSG_ROUTES.DESTROY_CONFIG?o.destroyConfig(e.data.streamId):e.data.route===r.MSG_ROUTES.CHANGE_STREAM_MODE?o.setPlayerMode(e.data.streamId,e.data.mode):e.data.route===r.MSG_ROUTES.FLV_DATA&&o.setMasterResponse(e.data.streamId,e.data.payload)))}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),s=o(n(13)),a=n(0),u=n(20),c=(e,t,n)=>-1!==e.indexOf(t);t.default=function(e){return r(this,void 0,void 0,(function*(){if(e&&e.request){const t=e.request.url,n=t.substring(t.lastIndexOf("/")+1),r=((e,t)=>{const n=Object.keys(i.SW_CONFIG);let r;for(let e=0;e<n.length;e++)if(c(t,n[e],i.SW_CONFIG[n[e]])){r=n[e];break}if(r){if(-1!==e.indexOf(".ts"))return r;if(-1!==e.indexOf(".m3u8"))return r}return""})(n,t);if(r){if(i.SW_CONFIG[r].stopInterception)return;if(-1!==t.indexOf("skipsw"))return;if("stream.m3u8"===n||n===r+".m3u8"){if(function(e,t){const n=i.SW_CONFIG[t].mode;if(n!==a.ePlayListMode.ALL){const t=e.includes("_b");return!(n!==a.ePlayListMode.PRIMARY||!t)||n===a.ePlayListMode.BACKUP&&!t}return!1}(t,r))return void e.respondWith(new Response("NO DATA FOUND",{status:404}));if(i.SW_CONFIG[r].manifestLess){try{const t=function(e){if(i.SW_CONFIG[e]&&i.SW_CONFIG[e].masterResponse){const t=i.SW_CONFIG[e].masterResponse,n=Date.now(),r=1e3*parseInt(t.d)/2;let o=parseInt(t.ts);0!==t.reqTime&&n-t.reqTime<r&&o>0&&o--;const s=Object.assign(Object.assign({},t),{ts:o.toString()});if(o++,i.SW_CONFIG[e].masterResponse=Object.assign(Object.assign({},t),{ts:o.toString(),reqTime:n}),i.SW_CONFIG[e].enableDvr&&t.dvrManifest){const n=u.prepareDvrFlavourM3u8(t.dvrManifest,s);return i.SW_CONFIG[e].masterResponse=Object.assign(Object.assign({},i.SW_CONFIG[e].masterResponse),{dvrManifest:n}),n}return u.makeFlavourM3u8(s)}}(r);e.respondWith(new Response(t,{status:200}))}catch(e){}return}}else if(-1!==n.indexOf(".ts")){const n=s.default(r,i.SW_CONFIG[r].authDetails,t);e.respondWith(n())}}else n.indexOf("fake-url")}}))}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOriginalFragmentUrl=t.getDecryptedResponse=void 0;const i=o(n(4)),s=n(16),a=n(0),u=n(19),c=n(2),f=n(1);function l(e){return r(this,void 0,void 0,(function*(){try{const t=yield u.request({url:e,responseType:"arrayBuffer"});return new Uint8Array(t.data)}catch(e){}}))}function d(e,t,n){return r(this,void 0,void 0,(function*(){const r=e.encBase+t+e.encid,o=e.iv,a=i.default(r);return yield s.decryptTsContent(a,o,n)}))}function p(e){const t=new URL(e).pathname.split("/");return t[t.length-1]}function h(e,t){const n=p(t),r=e.encBase+n+e.encid,o=s.getOriginalTsName(r,n);return[n,t.replace(n,o)]}t.getDecryptedResponse=d,t.getOriginalFragmentUrl=h,t.default=function(e,t,n){return()=>r(this,void 0,void 0,(function*(){let r,o;if(t.mode!==a.SecurityLevel.NONE){const e=h(t,n);o=e[0];const i=e[1];r=yield l(i),r&&t.mode===a.SecurityLevel.WITH_CONTENT&&(r=yield d(t,o,r))}else o=p(n),r=yield l(n);if(r){const t=new Blob([r]);return f.onFragmentLoaded(e,function(e){const t=e.split("_");return parseInt(t[t.length-1].replace(".ts",""))}(o)),c.prepareResponse({data:t,headers:{"Content-Type":a.CONTENT_TYPE.TS,"Content-Length":t.size}})}return c.prepareResponse({data:"No data found",status:404,headers:{"Content-Type":a.CONTENT_TYPE.TS}})}))}},function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],r=0;r<e.length;r+=3)for(var o=e[r]<<16|e[r+1]<<8|e[r+2],i=0;i<4;i++)8*r+6*i<=8*e.length?t.push(n.charAt(o>>>6*(3-i)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,o=0;r<e.length;o=++r%4)0!=o&&t.push((n.indexOf(e.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|n.indexOf(e.charAt(r))>>>6-2*o);return t}},e.exports=r},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOriginalTsName=t.decryptTsContent=t.utf8ToBytes=t.hexToBytes=t.decryptNative=t.decrypt=void 0;const i=o(n(4)),s=n(2),a=o(n(17)),u=n(18);function c(e,t,n){return r(this,void 0,void 0,(function*(){let r,o;try{r=yield crypto.subtle.importKey("raw",n,"AES-CBC",!1,["decrypt"])}catch(e){}if(r)try{o=yield crypto.subtle.decrypt({name:"AES-CBC",iv:t},r,e)}catch(e){}return o||null}))}function f(e){return parseInt(e)===e}function l(e){if(!f(e.length))return!1;for(let t=0;t<e.length;t++)if(!f(e[t])||e[t]<0||e[t]>255)return!1;return!0}t.decrypt=function(e,t,n){try{const[r,o]=function(e,t){const n=e.split("").reverse().join("");return[s.asciiToUint8Array(i.default(e+n+e+n).substr(0,16)),s.asciiToUint8Array(t)]}(e,t),u=new a.default(r,o).decrypt(n),c=s.bytesToASCIIString(u),f=c.indexOf("["),l=c.lastIndexOf("]");return c.substr(f,l+1)}catch(e){return null}},t.decryptNative=c,t.hexToBytes=e=>{const t=[];for(let n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},t.utf8ToBytes=e=>{const t=[];let n=0;for(e=encodeURI(e);n<e.length;){const r=e.charCodeAt(n++);37===r?(t.push(parseInt(e.substr(n,2),16)),n+=2):t.push(r)}return function(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!l(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(f(e.length)&&l(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}(t,!1)},t.decryptTsContent=function(e,n,o){return r(this,void 0,void 0,(function*(){try{const r=t.hexToBytes(e),i=t.utf8ToBytes(n),s=new Uint8Array(r);return yield c(o,i,s)}catch(e){return null}}))},t.getOriginalTsName=function(e,t){const n=u.crc32(e);return new Uint32Array([n])[0]+"_"+t}},function(e,t,n){"use strict";n.r(t);const r={16:10,24:12,32:14},o=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],i=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],s=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],a=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],u=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],c=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],f=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],l=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],d=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],p=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],h=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function _(e){return parseInt(e)===e}function y(e){if(!_(e.length))return!1;for(let t=0;t<e.length;t++)if(!_(e[t])||e[t]<0||e[t]>255)return!1;return!0}function v(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!y(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(_(e.length)&&y(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function g(e){return new Uint8Array(e)}function S(e,t,n,r,o){null==r&&null==o||(e=e.slice?e.slice(r,o):Array.prototype.slice.call(e,r,o)),t.set(e,n)}function T(e){const t=[];for(let n=0;n<e.length;n+=4)t.push(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]);return t}var E=function(e){if(!(this instanceof E))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:v(e,!0)}),this._prepare()};E.prototype._prepare=function(){const e=r[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);const n=4*(e+1),s=this.key.length/4,a=T(this.key);let u;for(t=0;t<s;t++)u=t>>2,this._Ke[u][t%4]=a[t],this._Kd[e-u][t%4]=a[t];let c,f=0,_=s;for(;_<n;){if(c=a[s-1],a[0]^=i[c>>16&255]<<24^i[c>>8&255]<<16^i[255&c]<<8^i[c>>24&255]^o[f]<<24,f+=1,8!=s)for(t=1;t<s;t++)a[t]^=a[t-1];else{for(t=1;t<s/2;t++)a[t]^=a[t-1];c=a[s/2-1],a[s/2]^=i[255&c]^i[c>>8&255]<<8^i[c>>16&255]<<16^i[c>>24&255]<<24;for(t=s/2+1;t<s;t++)a[t]^=a[t-1]}for(t=0;t<s&&_<n;)y=_>>2,v=_%4,this._Ke[y][v]=a[t],this._Kd[e-y][v]=a[t++],_++}for(var y=1;y<e;y++)for(var v=0;v<4;v++)c=this._Kd[y][v],this._Kd[y][v]=l[c>>24&255]^d[c>>16&255]^p[c>>8&255]^h[255&c]},E.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");const t=this._Kd.length-1,n=[0,0,0,0];let r=T(e);for(var o=0;o<4;o++)r[o]^=this._Kd[0][o];for(let e=1;e<t;e++){for(o=0;o<4;o++)n[o]=a[r[o]>>24&255]^u[r[(o+3)%4]>>16&255]^c[r[(o+2)%4]>>8&255]^f[255&r[(o+1)%4]]^this._Kd[e][o];r=n.slice()}let i,l=g(16);for(o=0;o<4;o++)i=this._Kd[t][o],l[4*o]=255&(s[r[o]>>24&255]^i>>24),l[4*o+1]=255&(s[r[(o+3)%4]>>16&255]^i>>16),l[4*o+2]=255&(s[r[(o+2)%4]>>8&255]^i>>8),l[4*o+3]=255&(s[255&r[(o+1)%4]]^i);return l};var O=function(e,t){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=g(16);this._lastCipherblock=v(t,!0),this._aes=new E(e)};O.prototype.decrypt=function(e){if((e=v(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");const t=g(e.length);let n=g(16);for(let r=0;r<e.length;r+=16){S(e,n,0,r,r+16),n=this._aes.decrypt(n);for(let e=0;e<16;e++)t[r+e]=n[e]^this._lastCipherblock[e];S(e,this._lastCipherblock,0,r,r+16)}return t};const m=O;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crc32=void 0;const r=function(){let e;const t=[];for(let n=0;n<256;n++){e=n;for(let t=0;t<8;t++)e=1&e?3582100097^e>>>1:e>>>1;t[n]=e}return t}();t.crc32=function(e){let t=-1;for(let n=0;n<e.length;n++)t=t>>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}},function(e,t,n){"use strict";function r(e,t){return new Promise((e,n)=>{t.status>=200&&t.status<300?e(t):n(new Error("Invalid response code"))})}function o(e,t){return t[e.responseType]()}Object.defineProperty(t,"__esModule",{value:!0}),t.request=void 0,t.request=function(e){return new Promise((t,n)=>{const i={method:e.method||"GET"};e.headers&&(i.headers=e.headers),e.body&&(i.body=e.body),fetch(e.url,Object.assign({},i)).then(r.bind(null,e)).then(o.bind(null,e)).then(e=>{t({data:e})}).catch(e=>{n({error:e&&e.message?e.message:"Failed to fetch"})})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareDvrFlavourM3u8=t.makeFlavourM3u8=void 0,t.makeFlavourM3u8=function(e){let t,n,r="";const o=function(e,t){const n=parseFloat(e),r=parseFloat(t);let o;return o=n-r<0?0:n-r+1,o.toString()}(e.ts,e.c),i=["#EXTM3U","#EXT-X-VERSION:3","#EXT-X-DISCONTINUITY-SEQUENCE:<<DIS>>","#EXT-X-TARGETDURATION:<<TGD>>","#EXT-X-MEDIA-SEQUENCE:<<SQN>>"];for(let e=0;e<i.length;e++)r+=i[e]+"\n";r=r.replace("<<DIS>>",e.discontinuitySeq),r=r.replace("<<TGD>>",e.d),r=r.replace("<<SQN>>",o);for(let i=parseInt(o);i<=parseInt(e.ts);i++)n="#EXTINF:"+parseFloat(e.d).toFixed(6),t=e.dis+"_"+i+".ts",r+=n+",\n",r+=t+"\n";return r},t.prepareDvrFlavourM3u8=function(e,t){let n=e;const r=t.dis+"_"+parseInt(t.ts)+".ts";return n.includes(r)||(n+="#EXTINF:"+parseFloat(t.d).toFixed(6)+",\n",n+=r+"\n"),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"createEndpoint",(function(){return o})),n.d(t,"expose",(function(){return c})),n.d(t,"proxy",(function(){return y})),n.d(t,"proxyMarker",(function(){return r})),n.d(t,"releaseProxy",(function(){return i})),n.d(t,"transfer",(function(){return _})),n.d(t,"transferHandlers",(function(){return u})),n.d(t,"windowEndpoint",(function(){return v})),n.d(t,"wrap",(function(){return l}));const r=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),s=Symbol("Comlink.thrown"),a=e=>"object"==typeof e&&null!==e||"function"==typeof e,u=new Map([["proxy",{canHandle:e=>a(e)&&e[r],serialize(e){const{port1:t,port2:n}=new MessageChannel;return c(e,t),[n,[n]]},deserialize:e=>(e.start(),l(e))}],["throw",{canHandle:e=>a(e)&&s in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function c(e,t=self){t.addEventListener("message",(function n(r){if(!r||!r.data)return;const{id:o,type:i,path:a}=Object.assign({path:[]},r.data),u=(r.data.argumentList||[]).map(S);let l;try{const t=a.slice(0,-1).reduce((e,t)=>e[t],e),n=a.reduce((e,t)=>e[t],e);switch(i){case"GET":l=n;break;case"SET":t[a.slice(-1)[0]]=S(r.data.value),l=!0;break;case"APPLY":l=n.apply(t,u);break;case"CONSTRUCT":l=y(new n(...u));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;c(e,n),l=_(t,[t])}break;case"RELEASE":l=void 0;break;default:return}}catch(e){l={value:e,[s]:0}}Promise.resolve(l).catch(e=>({value:e,[s]:0})).then(e=>{const[r,s]=g(e);t.postMessage(Object.assign(Object.assign({},r),{id:o}),s),"RELEASE"===i&&(t.removeEventListener("message",n),f(t))})})),t.start&&t.start()}function f(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function l(e,t){return function e(t,n=[],r=function(){}){let s=!1;const a=new Proxy(r,{get(r,o){if(d(s),o===i)return()=>T(t,{type:"RELEASE",path:n.map(e=>e.toString())}).then(()=>{f(t),s=!0});if("then"===o){if(0===n.length)return{then:()=>a};const e=T(t,{type:"GET",path:n.map(e=>e.toString())}).then(S);return e.then.bind(e)}return e(t,[...n,o])},set(e,r,o){d(s);const[i,a]=g(o);return T(t,{type:"SET",path:[...n,r].map(e=>e.toString()),value:i},a).then(S)},apply(r,i,a){d(s);const u=n[n.length-1];if(u===o)return T(t,{type:"ENDPOINT"}).then(S);if("bind"===u)return e(t,n.slice(0,-1));const[c,f]=p(a);return T(t,{type:"APPLY",path:n.map(e=>e.toString()),argumentList:c},f).then(S)},construct(e,r){d(s);const[o,i]=p(r);return T(t,{type:"CONSTRUCT",path:n.map(e=>e.toString()),argumentList:o},i).then(S)}});return a}(e,[],t)}function d(e){if(e)throw new Error("Proxy has been released and is not useable")}function p(e){const t=e.map(g);return[t.map(e=>e[0]),(n=t.map(e=>e[1]),Array.prototype.concat.apply([],n))];var n}const h=new WeakMap;function _(e,t){return h.set(e,t),e}function y(e){return Object.assign(e,{[r]:!0})}function v(e,t=self,n="*"){return{postMessage:(t,r)=>e.postMessage(t,n,r),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function g(e){for(const[t,n]of u)if(n.canHandle(e)){const[r,o]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},o]}return[{type:"RAW",value:e},h.get(e)||[]]}function S(e){switch(e.type){case"HANDLER":return u.get(e.name).deserialize(e.value);case"RAW":return e.value}}function T(e,t,n){return new Promise(r=>{const o=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.addEventListener("message",(function t(n){n.data&&n.data.id&&n.data.id===o&&(e.removeEventListener("message",t),r(n.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:o},t),n)})}}]).default;