PageSourceSearch

https://app.feedspace.io/_next/static/chunks/9307.02fc36b5831d64c8.js

js feedspace.io collected 2026-09-24 18:55:10 UTC 10,677 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9307],{69307:(e,t,i)=>{i.d(t,{y:()=>E});var r,n=i(25307),s=i(10100),l=i(56085),o=i(76376),a=i(41931),u=i(25369),h=i(12642),f=i(10108),m=i(31670),p=function(e,t,i){if(null!=t){var r,n;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(i){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],i&&(n=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");n&&(r=function(){try{n.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:i})}else i&&e.stack.push({async:!0});return t},c=(r="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var r=Error(i);return r.name="SuppressedError",r.error=e,r.suppressed=t,r},function(e){function t(t){e.error=e.hasError?new r(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var i,n=0;return function r(){for(;i=e.stack.pop();)try{if(!i.async&&1===n)return n=0,e.stack.push(i),Promise.resolve().then(r);if(i.dispose){var s=i.dispose.call(i.value);if(i.async)return n|=2,Promise.resolve(s).then(r,function(e){return t(e),r()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()});let d=/^0[xX][0-9a-fA-F]+$/,g=/^data:.*;base64,/i;class E extends l.p{constructor(e,t,i,r){super(e.input,t,i),this.segments=[],this.nextLines=null,this.currentUpdateSegmentsPromise=null,this.streamHasEnded=!1,this.lastSegmentUpdateTime=-1/0,this.refreshInterval=5,this.demuxer=e,this.nextLines=r}runUpdateSegments(){return this.currentUpdateSegmentsPromise??=(async()=>{try{let e=this.getRemainingWaitTimeMs();e>0&&await (0,o.uk)(e),this.lastSegmentUpdateTime=performance.now(),await this.updateSegments()}finally{this.currentUpdateSegmentsPromise=null}})()}getRemainingWaitTimeMs(){let e=performance.now()-this.lastSegmentUpdateTime,t=Math.max(0,1e3*this.refreshInterval-e);return t<=50?0:t}async updateSegments(){let e=this.nextLines;if(this.nextLines=null,!e){let t={stack:[],error:void 0,hasError:!1};try{let i=p(t,await this.demuxer.input._getSourceUncached({path:this.path,isRoot:!1}),!1),r=new a.mP(i.source),n=await r.requestEntireFile();(0,o.vA)(n),e=(0,a.jo)(n,n.length,{ignore:h.nf})}catch(e){t.error=e,t.hasError=!0}finally{c(t)}}let t=!1,i=0,r=null,s=null,l=0,u=null,f=null,E=null,y=null,S=null,v=null,A=!1,w=(0,o._g)(this.segments)??null,b=e=>{let t=e.indexOf("@"),i=Number(-1===t?e:e.slice(0,t));if(!Number.isInteger(i)||i<0)throw Error(`Invalid #EXT-X-BYTERANGE length '${e}'.`);let r=null;if(-1!==t&&(!Number.isInteger(r=Number(e.slice(t+1)))||r<0))throw Error(`Invalid #EXT-X-BYTERANGE offset '${e}'.`);return{length:i,offset:r}},I=e=>{l=e,w&&((0,o.vA)(null!==w.sequenceNumber),w.sequenceNumber<e&&(i=w.timestamp+w.duration,u=w.firstSegment,f=w.initSegment,S=w.lastProgramDateTimeSeconds,w=null))};for(let a=0;a<e.length;a++){let p=e[a];if(!t){if("#EXTM3U"!==p)throw Error("Invalid M3U8 file; expected first line to be #EXTM3U.");t=!0;continue}if(!p.startsWith("#")){if(!w){if(null===r)throw Error("Invalid M3U8 file; a segment must be preceded by an #EXTINF tag.");let e=s;if(e&&"AES-128"===e.method&&!e.iv){let t=new Uint8Array(n.ye),i=(0,o.Zc)(t);i.setUint32(8,Math.floor(l/0x100000000)),i.setUint32(12,l),e={...e,iv:t}}let t={path:(0,o.HS)(this.path,p),offset:y?.offset??0,length:y?.length??null},a={timestamp:i,relativeToUnixEpoch:null!==S,firstSegment:u,sequenceNumber:l,location:t,duration:r,encryption:e,initSegment:f,lastProgramDateTimeSeconds:S};u??=a,i+=r,this.segments.push(a)}r=null,null===y?E=null:y=null,I(l+1)}if(p.startsWith(h.e9)){if(w){A=!0;continue}A||(null===S&&l>0&&null!==v&&(i=l*v),A=!0);let e=p.slice(h.e9.length),t=e.indexOf(","),n=-1===t?e:e.slice(0,t),s=Number(n);if(!Number.isFinite(s)||s<0)throw Error(`Invalid #EXTINF tag duration '${n}'.`);r=s}else if(p.startsWith(h.sA)){let e=new h.Hw(p.slice(h.sA.length)),t=e.get("uri");if(!t)throw Error("Invalid #EXT-X-MAP tag; missing URI attribute.");let n=e.get("byterange"),l=null;if(null!==n&&(l=b(n)),l&&null===l.offset)throw Error("Invalid #EXT-X-MAP tag; BYTERANGE attribute must have a specified offset.");if(!w){let e={path:(0,o.HS)(this.path,t),offset:l?.offset??0,length:l?.length??null};if(s?.method==="AES-128"&&!s.iv)throw Error("IV attribute must be set on #EXT-X-KEY tag preceding the #EXT-X-MAP tag.");f={timestamp:i,relativeToUnixEpoch:null!==S,firstSegment:null,sequenceNumber:null,location:e,duration:0,encryption:s,initSegment:null,lastProgramDateTimeSeconds:S}}r=null,null===y?E=null:y=null}else if(p.startsWith(h.L2)){let e=new h.Hw(p.slice(h.L2.length)),t=e.get("method");if("NONE"===t)s=null;else if("AES-128"===t){let t=e.get("uri");if(!t)throw Error("Invalid #EXT-X-KEY: AES-128 requires a URI attribute.");let i=null,r=e.get("iv");if(r){if(!d.test(r))throw Error(`Unsupported IV format '${r}'.`);let e=r.slice(2);e=e.padStart(2*n.ye,"0"),i=new Uint8Array(n.ye);for(let t=0;t<n.ye;t++){let r=-(2*n.ye)+t;i[t]=parseInt(e.slice(r,r+2),16)}}let l=e.get("keyformat")??"identity";if("identity"!==l)throw Error("For AES-128 encryption, only the 'identity' KEYFORMAT is currently supported. If you think other formats should be supported, please raise an issue.");s={method:"AES-128",keyUri:(0,o.HS)(this.path,t),iv:i,keyFormat:l}}else if("SAMPLE-AES"===t||"SAMPLE-AES-CTR"===t){let i=e.get("uri");if(!i)throw Error(`Invalid #EXT-X-KEY: ${t} requires a URI attribute.`);if("identity"===(e.get("keyformat")??"identity"))throw Error("For SAMPLE-AES and SAMPLE-AES-CTR encryption, the 'identity' KEYFORMAT is not supported. If you think this format should be supported, please raise an issue.");let r=null;if(g.test(i)){let e=i.indexOf(","),t=(0,o.Kp)(i.slice(e+1));if(t.length>=8&&112===t[4]&&115===t[5]&&115===t[6]&&104===t[7]){let e=(0,o.Zc)(t).getUint32(0);r=(0,m.j1)(t.subarray(8,Math.min(e,t.length)))}}s={method:t,psshBox:r}}else throw Error(`Unsupported encryption method '${t}'. If you think this method should be supported, please raise an issue.`)}else if(p.startsWith(h._2)){let e=p.slice(h._2.length),t=Number(e);if(!Number.isInteger(t)||t<0)throw Error(`Invalid EXT-X-MEDIA-SEQUENCE value '${e}'.`);I(t)}else if(p.startsWith(h.v6)){let e=b(p.slice(h.v6.length));if(null===e.offset){if(null===E)throw Error("Invalid M3U8 file; #EXT-X-BYTERANGE without offset requires a previous byte range.");e.offset=E}y=e,E=e.offset+e.length}else if(p.startsWith(h.bW)){if(w)continue;let e=Date.parse(p.slice(h.bW.length));if(!Number.isFinite(e))continue;let t=e/1e3;if(S===t)continue;if(null===S&&this.segments.length>0){let e=(0,o._g)(this.segments),r=t-(e.timestamp+e.duration);for(let e of this.segments)e.timestamp+=r,e.relativeToUnixEpoch=!0;i+=r}S=t,i=t}else if(p===h.i$)u=null;else if(p.startsWith(h.xe)){let e=p.slice(h.xe.length),t=Number(e);if(!Number.isFinite(t)||t<0)throw Error(`Invalid EXT-X-TARGETDURATION value '${e}'.`);this.refreshInterval=t,v=t}else if(p===h.dY){this.streamHasEnded=!0;break}else p.startsWith(h.zA)&&"vod"===p.slice(h.zA.length).toLowerCase()&&(this.streamHasEnded=!0)}if(!t)throw Error("Invalid M3U8 file; no #EXTM3U header.")}async getFirstSegment(){return 0===this.segments.length&&await this.runUpdateSegments(),this.segments[0]??null}async getSegmentAt(e,t){0===this.segments.length&&await this.runUpdateSegments();let i=!!t.skipLiveWait&&this.getRemainingWaitTimeMs()>0;for(;;){let r=(0,o.eE)(this.segments,e,e=>e.timestamp);if(-1===r)return null;if(r<this.segments.length-1||this.streamHasEnded||i)return this.segments[r];let n=this.segments[r];if(e<n.timestamp+n.duration)return n;await this.runUpdateSegments(),t.skipLiveWait&&(i=!0)}}async getNextSegment(e,t){let i=this.segments.indexOf(e);(0,o.vA)(-1!==i);let r=i+1,n=!!t.skipLiveWait&&this.getRemainingWaitTimeMs()>0;for(;;){if(r<this.segments.length)return this.segments[r];if(this.streamHasEnded||n)return null;await this.runUpdateSegments(),t.skipLiveWait&&(n=!0)}}async getPreviousSegment(e){let t=this.segments.indexOf(e);return(0,o.vA)(-1!==t),this.segments[t-1]??null}getInputForSegment(e){let t=this.inputCache.find(t=>t.segment===e);if(t)return t.age=this.nextInputCacheAge++,t.input;let i=null;(e.initSegment||e.firstSegment)&&(i=this.getInputForSegment(e.initSegment??e.firstSegment));let r={...this.input._formatOptions,isobmff:{...this.input._formatOptions.isobmff,resolveKeyId:this.input._formatOptions.isobmff?.resolveKeyId&&
1(t=>{if(!e.encryption||"SAMPLE-AES"!==e.encryption.method&&"SAMPLE-AES-CTR"!==e.encryption.method||!e.encryption.psshBox)return this.input._formatOptions.isobmff.resolveKeyId(t);let i=t.psshBoxes,{psshBox:r}=e.encryption;return(null===r.keyIds||r.keyIds.includes(t.keyId))&&!i.some(e=>(0,m.MG)(e,r))&&(i=[...i,r]),this.input._formatOptions.isobmff.resolveKeyId({...t,psshBoxes:i})})}},l=new s.pd({source:new u.r3(e.location.path,async t=>{let i;(0,o.vA)(t.isRoot);let r={...t,isRoot:!1},l=e.location.offset>0||null!==e.location.length;if(e.encryption&&"SAMPLE-AES"!==e.encryption.method&&"SAMPLE-AES-CTR"!==e.encryption.method)if("AES-128"===e.encryption.method){let t=e.encryption;(0,o.vA)(t.iv);let h=await this.input._getSourceCached(r);if(l){let t=h.source.slice(e.location.offset,e.location.length??void 0).ref();h.free(),h=t}let f=new a.mP(h.source),m=(0,n.U4)(f,async()=>{let e={stack:[],error:void 0,hasError:!1};try{let i=p(e,await this.input._getSourceCached({path:t.keyUri,isRoot:!1},s.Ng),!1),r=new a.mP(i.source),l=await r.requestSlice(0,n.ye);if(!l)throw Error("Invalid AES-128 key; expected at least 16 bytes of data.");return{key:(0,a.io)(l,n.ye),iv:t.iv}}catch(t){e.error=t,e.hasError=!0}finally{c(e)}},()=>{h.free()});i=new u.m6(m).ref()}else(0,o.vA)(!1);else if(i=await this.input._getSourceCached(r),l){let t=i.source.slice(e.location.offset,e.location.length??void 0).ref();i.free(),i=t}return i}),formats:this.input._formats.filter(e=>!(e instanceof f.rp)),initInput:i??void 0,formatOptions:r});if(l._onFormatDetermined=t=>{if((e.encryption?.method==="SAMPLE-AES"||e.encryption?.method==="SAMPLE-AES-CTR")&&!t._isIsobmff)throw Error("The SAMPLE-AES and SAMPLE-AES-CTR encryption methods are currently only supported for ISOBMFF files.")},this.inputCache.push({segment:e,input:l,age:this.nextInputCacheAge++}),this.inputCache.length>4){let e=(0,o.Yg)(this.inputCache,e=>e.age);(0,o.vA)(-1!==e),this.inputCache.splice(e,1)}return l}
1async getLiveRefreshInterval(){return 0===this.getRemainingWaitTimeMs()&&await this.runUpdateSegments(),this.streamHasEnded?null:this.refreshInterval}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.