{"version":3,"file":"index.cjs","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../src/xhrRequest.ts","../src/video/api_getVideoInfo.ts","../src/video/api_getUserUploadVideoList.ts","../src/video/api_getPlayerInfo.ts","../src/video/api_getSubtitleContent.ts","../src/season/api_getSeasonSectionInfo.ts","../src/season/api_getSeasonInfo.ts","../src/utils/getCsrf.ts","../src/season/api_editSeason.ts","../src/season/api_editSeasonSection.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n        if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n            Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n        }\n    }\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};","/**\r\n * 支持的 HTTP 请求方法\r\n */\r\nexport type HttpMethod =\r\n\t'GET'\r\n\t| 'POST'\r\n\r\n/**\r\n * 请求配置项\r\n */\r\nexport interface XhrOptions {\r\n\t/** 请求方法，默认 'GET' */\r\n\tmethod?: HttpMethod;\r\n\t/** 请求头 (Key-Value) */\r\n\theaders?: Record<string, string>;\r\n\t/** 请求体 (普通对象会被自动序列化为 JSON) */\r\n\tbody?: any;\r\n\t/**\r\n\t * 查询参数 (普通对象会被自动序列化为 URLSearchParams)\r\n\t * */\r\n\tparams?: Record<string, string>;\r\n\t/** 是否携带 cookies 和跨域认证信息 */\r\n\twithCredentials?: boolean;\r\n\t/** 超时时间（毫秒），默认 20000 */\r\n\ttimeout?: number;\r\n\t/** 响应类型，决定返回值的解析方式 */\r\n\tresponseType?: XMLHttpRequestResponseType;\r\n\t/** 上传/下载进度回调 */\r\n\tonProgress?: ( event: ProgressEvent ) => void;\r\n}\r\n\r\n/**\r\n * 请求的响应内容\r\n */\r\nexport interface XhrResponse<T> {\r\n\tcode: number;\r\n\tmessage: string;\r\n\tttl: number;\r\n\tdata: T;\r\n}\r\n\r\n\r\n/**\r\n * 辅助：规范化 Headers Key 为小写\r\n */\r\nconst normalizeHeaders = ( headers: Record<string, string> ): Record<string, string> => {\r\n\tconst normalized: Record<string, string> = {};\r\n\tfor ( const key in headers ) {\r\n\t\tnormalized[ key.toLowerCase() ] = headers[ key ];\r\n\t}\r\n\treturn normalized;\r\n};\r\n\r\n/**\r\n * 辅助：智能处理 Body 和 Content-Type\r\n */\r\nconst processBody = (\r\n\tbody: any,\r\n\theaders: Record<string, string>,\r\n): BodyInit | null => {\r\n\tif ( body === undefined || body === null ) return null;\r\n\t\r\n\t// 1. 原生支持的类型，直接返回，不修改 Content-Type (由浏览器自动处理 boundary 等)\r\n\tif (\r\n\t\tbody instanceof FormData ||\r\n\t\tbody instanceof URLSearchParams ||\r\n\t\tbody instanceof Blob ||\r\n\t\tbody instanceof ArrayBuffer ||\r\n\t\tbody instanceof ReadableStream ||\r\n\t\ttypeof body === 'string'\r\n\t) {\r\n\t\treturn body;\r\n\t}\r\n\t\r\n\t// 2. 普通对象，序列化为 JSON\r\n\tif ( typeof body === 'object' ) {\r\n\t\t// 如果用户没有显式设置 Content-Type，则设置为 application/json\r\n\t\tif ( !headers[ 'content-type' ] ) {\r\n\t\t\theaders[ 'content-type' ] = 'application/json;charset=UTF-8';\r\n\t\t}\r\n\t\treturn JSON.stringify( body );\r\n\t}\r\n\t\r\n\t// 3. 其他类型转字符串\r\n\treturn String( body );\r\n};\r\n\r\n/**\r\n * 主函数：发起 XMLHttpRequest 请求\r\n */\r\nexport async function xhrRequest<T = any>(\r\n\turl: string,\r\n\toptions: XhrOptions = {},\r\n): Promise<XhrResponse<T>> {\r\n\t// 1. 默认参数处理\r\n\tconst {\r\n\t\tmethod = 'GET',\r\n\t\twithCredentials = false,\r\n\t\ttimeout = 20_000,\r\n\t\tonProgress,\r\n\t} = options;\r\n\t\r\n\t// 2. Headers 规范化 (全部转小写，方便后续判断)\r\n\tconst headers = normalizeHeaders( options.headers || {} );\r\n\t\r\n\t// 3. Body 处理 & Content-Type 自动补全\r\n\tconst requestBody = processBody( options.body, headers );\r\n\t\r\n\t// 4. 查询参数处理\r\n\tif ( options.params ) {\r\n\t\tconst searchParams = new URLSearchParams( options.params );\r\n\t\turl += `?${ searchParams.toString() }`;\r\n\t}\r\n\t\r\n\t// 5. 智能推断 ResponseType\r\n\t// 如果用户未指定，且 Accept 头包含 json，或者完全未指定，则默认为 json\r\n\tlet responseType = options.responseType;\r\n\tif ( !responseType ) {\r\n\t\tconst accept = headers[ 'accept' ];\r\n\t\tif ( accept?.includes( 'text/html' ) ) {\r\n\t\t\tresponseType = 'document';\r\n\t\t}\r\n\t\telse if ( accept?.includes( 'text/' ) ) {\r\n\t\t\tresponseType = 'text';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// 默认行为：尝试解析为 JSON\r\n\t\t\tresponseType = 'json';\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn new Promise( ( resolve, reject ) => {\r\n\t\tconst xhr = new XMLHttpRequest();\r\n\t\t\r\n\t\txhr.open( method.toUpperCase(), url, true );\r\n\t\txhr.timeout = timeout;\r\n\t\txhr.withCredentials = withCredentials;\r\n\t\txhr.responseType = responseType!;\r\n\t\t\r\n\t\t// 设置请求头\r\n\t\tObject.entries( headers ).forEach( ( [ key, value ] ) => {\r\n\t\t\txhr.setRequestHeader( key, value );\r\n\t\t} );\r\n\t\t\r\n\t\t// 监听进度\r\n\t\tif ( onProgress ) {\r\n\t\t\txhr.addEventListener( 'progress', onProgress );\r\n\t\t}\r\n\t\t\r\n\t\t// 请求成功回调\r\n\t\txhr.addEventListener( 'load', () => {\r\n\t\t\tif ( xhr.status >= 200 && xhr.status < 300 ) {\r\n\t\t\t\t// 如果 responseType 是 json 但返回空，xhr.response 可能是 null\r\n\t\t\t\tresolve( xhr.response as XhrResponse<T> );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treject(\r\n\t\t\t\t\tnew Error(\r\n\t\t\t\t\t\t`HTTP Error ${ xhr.status }: ${ xhr.statusText } @ ${ url }`,\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} );\r\n\t\t\r\n\t\t// 网络错误\r\n\t\txhr.addEventListener( 'error', () => {\r\n\t\t\treject( new Error( `Network Error: Failed to connect to ${ url }` ) );\r\n\t\t} );\r\n\t\t\r\n\t\t// 超时\r\n\t\txhr.addEventListener( 'timeout', () => {\r\n\t\t\txhr.abort();\r\n\t\t\treject( new Error( `Request Timeout: Exceeded ${ timeout }ms` ) );\r\n\t\t} );\r\n\t\t\r\n\t\t// 发送\r\n\t\txhr.send( requestBody as XMLHttpRequestBodyInit );\r\n\t} );\r\n}\r\n\r\n// --------------------------------------------------------------------------\r\n// 静态方法扩展 (使用 Namespace Merging 技巧)\r\n// --------------------------------------------------------------------------\r\n\r\n// 定义静态方法的类型\r\ntype RequestHelper = <T = any>(\r\n\turl: string,\r\n\toptions?: Omit<XhrOptions, 'method'> ) => Promise<XhrResponse<T>>;\r\ntype RequestHelperWithAuth = <T = any>(\r\n\turl: string,\r\n\toptions?: Omit<XhrOptions, 'method' | 'withCredentials'>,\r\n) => Promise<XhrResponse<T>>;\r\n\r\n// 挂载静态方法\r\nxhrRequest.get = ( ( url, options ) => {\r\n\treturn xhrRequest( url, { ...options, method: 'GET' } );\r\n} ) as RequestHelper;\r\n\r\nxhrRequest.getWithCredentials = ( ( url, options ) => {\r\n\treturn xhrRequest( url, {\r\n\t\t...options,\r\n\t\tmethod: 'GET',\r\n\t\twithCredentials: true,\r\n\t} );\r\n} ) as RequestHelperWithAuth;\r\n\r\nxhrRequest.post = ( ( url, options ) => {\r\n\treturn xhrRequest( url, { ...options, method: 'POST' } );\r\n} ) as RequestHelper;\r\n\r\nxhrRequest.postWithCredentials = ( ( url, options ) => {\r\n\treturn xhrRequest( url, {\r\n\t\t...options,\r\n\t\tmethod: 'POST',\r\n\t\twithCredentials: true,\r\n\t} );\r\n} ) as RequestHelperWithAuth;\r\n","import { xhrRequest } from '../xhrRequest.ts';\nimport { IVideoInfo } from './interfaces/IVideoInfo.ts';\n\n\n/**\n * 获取直播详细信息\n *\n * @param id 视频 ID (avid 或者 BVID)\n * @param login 是否携带登录信息\n *\n * @see [获取视频详细信息(web端)](https://socialsisteryi.github.io/bilibili-API-collect/docs/video/info.html#%E8%8E%B7%E5%8F%96%E8%A7%86%E9%A2%91%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF-web%E7%AB%AF)\n */\nexport function api_getVideoInfo(\n\tid: string | number,\n\tlogin: boolean = false,\n) {\n\t// 判断参数\n\tconst params: Record<string, string> = {};\n\tif ( typeof id === 'string' && id.startsWith( 'BV' ) ) {\n\t\tparams.bvid = id;\n\t}\n\telse {\n\t\tparams.aid = id.toString();\n\t}\n\t\n\tconst url = 'https://api.bilibili.com/x/web-interface/view';\n\tif ( login ) {\n\t\treturn xhrRequest.getWithCredentials<IVideoInfo>( url, { params: params } );\n\t}\n\t\n\treturn xhrRequest.get<IVideoInfo>( url, { params: params } );\n}\n\nexport type { IVideoInfo };\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport { IUserUploadVideo } from './interfaces/IUserUploadVideo.ts';\r\n\r\n/**\r\n * 获取用户投稿的视频列表\r\n *\r\n * @see [根据关键词查找视频](https://socialsisteryi.github.io/bilibili-API-collect/docs/video/collection.html#%E6%A0%B9%E6%8D%AE%E5%85%B3%E9%94%AE%E8%AF%8D%E6%9F%A5%E6%89%BE%E8%A7%86%E9%A2%91)\r\n */\r\nexport function api_getUserUploadVideoList(\r\n\tuid: number,\r\n\tpage: number = 1,\r\n\tpageSize: number = 30,\r\n) {\r\n\tpageSize = Math.min( pageSize, 100 );\r\n\t\r\n\treturn xhrRequest.get<IUserUploadVideo>( 'https://api.bilibili.com/x/series/recArchivesByKeywords', {\r\n\t\tparams: {\r\n\t\t\tmid: uid.toString(),\r\n\t\t\tkeywords: '',\r\n\t\t\tpn: page.toString(),\r\n\t\t\tps: pageSize.toString(),\r\n\t\t},\r\n\t} );\r\n}\r\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport { IPlayerInfo } from './interfaces/IPlayerInfo.ts';\r\n\r\n\r\n/**\r\n * web 播放器的信息接口，提供正常播放需要的元数据\r\n */\r\nexport function api_getPlayerInfo(\r\n\tid: number | string,\r\n\tcid: number,\r\n\tlogin?: boolean,\r\n) {\r\n\tconst idParam: Record<string, string> = typeof id === 'number'\r\n\t\t? { aid: String( id ) }\r\n\t\t: { bvid: String( id ) };\r\n\t\r\n\tconst request = login ? xhrRequest.getWithCredentials : xhrRequest.get;\r\n\treturn request<IPlayerInfo>( 'https://api.bilibili.com/x/player/wbi/v2', {\r\n\t\tparams: {\r\n\t\t\tcid: String( cid ),\r\n\t\t\t...idParam,\r\n\t\t},\r\n\t} );\r\n};\r\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport { ISubtitleInfo } from './interfaces/ISubtitleInfo.ts';\r\n\r\n/**\r\n * 获取字幕文件内容\r\n *\r\n * 只能获取 subtitle_url 字段, 在 hdslb.com 域名下的字幕.\r\n * 无法获取 subtitle_url_v2 字段的内容.\r\n *\r\n */\r\nexport function api_getSubtitleContent( url: string ) {\r\n\treturn xhrRequest.get( url ) as unknown as Promise<ISubtitleInfo>;\r\n}\r\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport { ISeasonSectionInfo } from './interface/ISeasonSectionInfo.ts';\r\n\r\n/**\r\n * 获取合集小节中的视频\r\n *\r\n * @see [获取合集小节中的视频](https://socialsisteryi.github.io/bilibili-API-collect/docs/creativecenter/season.html#%E8%8E%B7%E5%8F%96%E5%90%88%E9%9B%86%E5%B0%8F%E8%8A%82%E4%B8%AD%E7%9A%84%E8%A7%86%E9%A2%91)\r\n */\r\nexport function api_getSeasonSectionInfo(\r\n\tsectionId: number,\r\n) {\r\n\treturn xhrRequest.get<ISeasonSectionInfo>( 'https://member.bilibili.com/x2/creative/web/season/section', {\r\n\t\tparams: {\r\n\t\t\tid: sectionId.toString(),\r\n\t\t},\r\n\t} );\r\n}\r\n\r\nexport type { ISeasonSectionInfo };\r\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport ISeasonInfo from './interface/ISeasonInfo.ts';\r\n\r\n/**\r\n * 获取合集信息\r\n */\r\nexport function api_getSeasonInfo( seasonId: number ) {\r\n\treturn xhrRequest.get<ISeasonInfo>( 'https://member.bilibili.com/x2/creative/web/season', {\r\n\t\tparams: {\r\n\t\t\tid: seasonId.toString(),\r\n\t\t},\r\n\t} );\r\n}\r\n","/**\r\n * 获取 CSRF 的值\r\n */\r\nexport const getCsrf = async () => {\r\n\tconst csrfCookie = await cookieStore.get( 'bili_jct' );\r\n\tif ( !csrfCookie || !csrfCookie.value ) {\r\n\t\tthrow new NotLoginError();\r\n\t}\r\n\treturn csrfCookie.value;\r\n};\r\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport { IEditSeasonBody } from './interface/IEditSeason.ts';\r\nimport { getCsrf } from '../utils/getCsrf.ts';\r\n\r\n/**\r\n * 编辑合集信息\r\n *\r\n * @see [编辑合集信息](https://socialsisteryi.github.io/bilibili-API-collect/docs/creativecenter/season.html#%E7%BC%96%E8%BE%91%E5%90%88%E9%9B%86%E4%BF%A1%E6%81%AF)\r\n */\r\nexport async function api_editSeason(\r\n\tseason: IEditSeasonBody['season'],\r\n\tsorts: IEditSeasonBody['sorts'],\r\n) {\r\n\tconst csrf = await getCsrf();\r\n\treturn xhrRequest.postWithCredentials<undefined>( 'https://member.bilibili.com/x2/creative/web/season/edit', {\r\n\t\tparams: {\r\n\t\t\tcsrf: csrf,\r\n\t\t},\r\n\t\tbody: {\r\n\t\t\tseason,\r\n\t\t\tsorts,\r\n\t\t},\r\n\t} );\r\n}\r\n","import { xhrRequest } from '../xhrRequest.ts';\r\nimport { IEditSeasonSectionBody } from './interface/IEditSeasonSection.ts';\r\nimport { getCsrf } from '../utils/getCsrf.ts';\r\n\r\n/**\r\n * 编辑合集小节\r\n *\r\n * @see [编辑合集小节](https://socialsisteryi.github.io/bilibili-API-collect/docs/creativecenter/season.html#%E7%BC%96%E8%BE%91%E5%90%88%E9%9B%86%E5%B0%8F%E8%8A%82)\r\n */\r\nexport async function api_editSeasonSection(\r\n\tsection: IEditSeasonSectionBody['section'],\r\n\tsorts: IEditSeasonSectionBody['sorts'],\r\n) {\r\n\tconst csrf = await getCsrf();\r\n\t\r\n\t// 补充缺失参数\r\n\tsection.title ||= '正片';\r\n\t\r\n\treturn xhrRequest.postWithCredentials<undefined>( 'https://member.bilibili.com/x2/creative/web/season/section/edit', {\r\n\t\tparams: {\r\n\t\t\tcsrf: csrf,\r\n\t\t},\r\n\t\tbody: {\r\n\t\t\tsection,\r\n\t\t\tsorts,\r\n\t\t},\r\n\t} );\r\n}\r\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","normalizeHeaders","headers","normalized","processBody","body","FormData","URLSearchParams","Blob","ArrayBuffer","ReadableStream","JSON","String","xhrRequest","url","options","method","withCredentials","timeout","onProgress","requestBody","searchParams","responseType","accept","Promise","resolve","reject","xhr","XMLHttpRequest","value","Error","api_getVideoInfo","id","login","params","api_getUserUploadVideoList","uid","page","pageSize","Math","api_getPlayerInfo","cid","idParam","request","api_getSubtitleContent","api_getSeasonSectionInfo","sectionId","api_getSeasonInfo","seasonId","getCsrf","csrfCookie","cookieStore","NotLoginError","api_editSeason","season","sorts","csrf","api_editSeasonSection","section"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;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