try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="31301785-6c89-4ba2-9b7b-96dc9d66bf6b",e._sentryDebugIdIdentifier="sentry-dbid-31301785-6c89-4ba2-9b7b-96dc9d66bf6b")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"c0350839ef3136eeae1b60b8bb4a23f67fa6a369"};!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(globalThis,(function(){return function(){const e=["/api/recommend/item_list/","/api/following/item_list/","/api/post/item_list/","/api/challenge/item_list/","/api/music/item_list/","/api/topic/item_list/","/api/search/general/full/","/api/related/item_list/","api/explore/item_list"],t={recommend:"foryou",following:"following",post:"channel",challenge:"hashtag",music:"music",topic:"foryou",search:"search",related:"related",explore:"explore"},o=window.fetch;window.fetch=function(...n){return o(...n).then((async o=>{if(e.some((e=>{var t;return null==o||null===(t=o.url)||void 0===t?void 0:t.includes(e)}))){const e=new URL(o.url).pathname.split("/")[2],l=(n=t,i=e,Object.prototype.hasOwnProperty.call(n,i)&&t[e]);if(l){const e=await o.clone().json().catch((()=>o.text())),t={url:o.url,data:e,page:l};document.dispatchEvent(new CustomEvent("tiktokAjaxResponse",{detail:t}))}}var n,i;return o})).catch((e=>{throw console.error(new Error(e)),new Error(e)}))}}(),{}}));
//# sourceMappingURL=tiktokFetchHandler.bundle.js.map