diff --git a/CHANGELOG.md b/CHANGELOG.md index 7129a85..da2b570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ 格式参考本机发版惯例:按日期分条,`🐛修复` / `✨新功能`。 +## v-fixed42 (2026-10-30) + +### ✨ 新功能 +- 🖱️ 直播页(`/live`):点击播放画面即暂停,再点击恢复播放(暂停时显示大播放键,点它也能继续) + +### 🐛 修复(重要) +- 🔄 根治「老用户看不到新界面」:前端资源文件(首页按钮/公告弹窗/IPv6提示)随版本自动换新文件名,浏览器缓存一年的旧文件不再挡路,升级后首次打开即生效 +- 🧹 Service Worker API 缓存清理:换新缓存名抛弃陈旧空数据,网络等待 10s→20s,慢线路不再出现「首页无数据」 +- 📢 公告弹窗全新美化:渐变头部、圆角卡片、玻璃拟态遮罩、版本徽章 + +### 📦 安装/升级 +- TVBox/影视仓用户无需任何操作,重新打开 App 自动拉到新版 +- 网页用户刷新即升级(无需清缓存) +- 体验地址:https://tv.88531.cn + ## 2026-10-30 → v-fixed41 - ✨ **IPv6 跳转前弹出提示**:探测成功后先显示「⚡ 检测到你的网络支持 IPv6,正在切换到 IPv6 直连(更快更省流量)…」提示,1.8 秒后自动跳转 `https://tv6.88531.cn:4443` 同路径 diff --git a/README.md b/README.md index db573ee..a86b930 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ git clone https://gitea.88531.cn/jinghui/katelyatv.git && cd katelyatv docker pull gitea.88531.cn/jinghui/katelyatv:latest # 国内慢可换腾讯云镜像(东京): # docker pull jpccr.ccs.tencentyun.com/jinghui/katelyatv:latest -docker tag gitea.88531.cn/jinghui/katelyatv:latest katelyatv:fixed41 # 对齐 compose 的 image 名 +docker tag gitea.88531.cn/jinghui/katelyatv:latest katelyatv:fixed42 # 对齐 compose 的 image 名 cp .env.example .env vi .env # 至少填:PASSWORD(站点密码)、NEXTAUTH_SECRET(随机串) @@ -139,14 +139,14 @@ docker/katelyatv/ | `patch_access_log.js` | 访问日志注入([ACCESS] IP/UA/路径,供 `usage-stats.sh` 统计使用人数) | | `patch_license.js` | 授权系统:CardAuth 装机/心跳/公告/版本推送、`/api/license-config` 路由、首页右上角四件套(版本角标+🔔通知铃铛+📺TVBOX接口一键复制配置地址+⭐开源地址指向自建Gitea,仅首页显示;直播页移除开源按钮)、每 IP 限流 429;运行时组件见 `license-hub.js` | -补丁固化在本地镜像(compose 引用,当前 `katelyatv:fixed41`)。上游大版本升级后重放补丁: +补丁固化在本地镜像(compose 引用,当前 `katelyatv:fixed42`)。上游大版本升级后重放补丁: ```bash bash patches/apply.sh # 重放补丁 python3 patches/inject_live.py # 重放直播注入(幂等) docker cp license-hub.js katelyatv:/app/license-hub.js node patches/patch_license.js # 重放授权/角标/限流(幂等) -docker commit katelyatv katelyatv:fixed41 # 固化新镜像 +docker commit katelyatv katelyatv:fixed42 # 固化新镜像 docker compose -f docker-compose.redis.yml up -d ``` diff --git a/docker-compose.redis.yml b/docker-compose.redis.yml index 6a2b06f..955bdab 100644 --- a/docker-compose.redis.yml +++ b/docker-compose.redis.yml @@ -3,7 +3,7 @@ version: '3.8' services: # KatelyaTV 应用服务 katelyatv: - image: katelyatv:fixed41 + image: katelyatv:fixed42 container_name: katelyatv ports: - "3030:3000" diff --git a/public-live/sw.js b/public-live/sw.js index 833d1f8..a1df411 100644 --- a/public-live/sw.js +++ b/public-live/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const n=(n,t)=>(n=new URL(n+".js",t).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(t,a)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(s[c])return;let i={};const r=e=>n(e,c),d={module:{uri:c},exports:i,require:r};s[c]=Promise.all(t.map(e=>d[e]||r(e))).then(e=>(a(...e),i))}}define(["./workbox-e9849328"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"91f275d530cb6b9f82b3f622107ba69f"},{url:"/_next/static/VzjdBH-1tWUTABuCZb9nx/_buildManifest.js",revision:"85aecd8a55db42fc901f52386fd2a680"},{url:"/_next/static/VzjdBH-1tWUTABuCZb9nx/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/151-8711dd3ec7fbfa61.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/242-5a0502f47346ed4a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/256-f3994669d49867be.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/273-fffc7e5390a1c642.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/402-42ae253cc67eee98.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/609-46d66c37b95adf6a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/78-b091442d784a205f.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/866-7f5b3d6941560701.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/_not-found/page-2f2263c5b98c190a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/admin/page-82bf968fc882a918.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/config/page-c5444985ef9acb1a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/douban/page-8ab598f0d244e9ae.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/filter/page-4d01a87b20ac1a73.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/layout-1bfded55fc31a332.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/login/page-47c06d2438938131.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/page-1a01a64271e1f47e.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/play/page-89b0997603e2bb9c.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/search/page-fe31cf3d4e57ebfd.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/settings/page-031109c02196f08e.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/tvbox/page-adec05c5925c4c37.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/warning/page-e6b20b93b37dc516.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/b145b63a-d75d6adf389a7589.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/c72274ce-909438a8a5dd87a5.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/da9543df-c2ce5269243dd748.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/framework-6e06c675866dc992.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/main-19765309852faad8.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/main-app-2cdcfd0e548fd0e6.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/pages/_app-3fcac1a2c632f1ef.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/pages/_error-d3fe151bf402c134.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-f732225cafd52a05.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/css/23100062f5d4aac0.css",revision:"23100062f5d4aac0"},{url:"/_next/static/css/86f54169992d5771.css",revision:"86f54169992d5771"},{url:"/_next/static/css/da6e9b4a73108890.css",revision:"da6e9b4a73108890"},{url:"/_next/static/media/19cfc7226ec3afaa-s.woff2",revision:"9dda5cfc9a46f256d0e131bb535e46f8"},{url:"/_next/static/media/21350d82a1f187e9-s.woff2",revision:"4e2553027f1d60eff32898367dd4d541"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/ba9851c3c22cd980-s.woff2",revision:"9e494903d6b0ffec1a1e14d34427d44d"},{url:"/_next/static/media/c5fe6dc8356a8c31-s.woff2",revision:"027a89e9ab733a145db70f09b8a18b42"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/favicon.ico",revision:"c5de6e56c5664adda146825f75ea6ecf"},{url:"/icons/icon-192x192.png",revision:"4a56c090828a1ad254c903c7aec0389d"},{url:"/icons/icon-256x256.png",revision:"f6409eb1a001f754121e3a8281c0319c"},{url:"/icons/icon-384x384.png",revision:"f6efc3e357b9ffdf4e0d8c14b2ed0ac1"},{url:"/icons/icon-512x512.png",revision:"9c008cbbeb6a576fe07bb1284a83f4d2"},{url:"/logo.png",revision:"40de611b143c47c6291c7bdad2c959ca"},{url:"/manifest.json",revision:"7bd3dabc1cfbfe40f09577efca223d31"},{url:"/robots.txt",revision:"0483b37fb6cf7455cefe516197e39241"},{url:"/screenshot1.png",revision:"10572bfcea54dc93ac4c5f7c9057fc98"},{url:"/screenshot2.png",revision:"f815a8990973a221899976867365c239"},{url:"/screenshot3.png",revision:"49709e96345dfeeab1d8083821d4b44e"},{url:"/screenshot4.png",revision:"a76c751e41e37556048a487e4f8b8b1c"},{url:"/wechat.jpg",revision:"d0f601311802667cd6ca5a37dc69bfa7"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:t})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}); +if(!self.define){let e,s={};const n=(n,t)=>(n=new URL(n+".js",t).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(t,a)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(s[c])return;let i={};const r=e=>n(e,c),d={module:{uri:c},exports:i,require:r};s[c]=Promise.all(t.map(e=>d[e]||r(e))).then(e=>(a(...e),i))}}define(["./workbox-e9849328"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"91f275d530cb6b9f82b3f622107ba69f"},{url:"/_next/static/VzjdBH-1tWUTABuCZb9nx/_buildManifest.js",revision:"85aecd8a55db42fc901f52386fd2a680"},{url:"/_next/static/VzjdBH-1tWUTABuCZb9nx/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/151-8711dd3ec7fbfa61.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/242-5a0502f47346ed4a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/256-f3994669d49867be.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/273-fffc7e5390a1c642.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/402-3f8ac71d6e5b0924.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/609-46d66c37b95adf6a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/78-b091442d784a205f.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/866-7f5b3d6941560701.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/_not-found/page-2f2263c5b98c190a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/admin/page-82bf968fc882a918.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/config/page-c5444985ef9acb1a.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/douban/page-8ab598f0d244e9ae.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/filter/page-4d01a87b20ac1a73.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/layout-7c2e94ab10d85f36.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/login/page-47c06d2438938131.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/page-1a01a64271e1f47e.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/play/page-89b0997603e2bb9c.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/search/page-fe31cf3d4e57ebfd.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/settings/page-031109c02196f08e.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/tvbox/page-adec05c5925c4c37.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/app/warning/page-e6b20b93b37dc516.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/b145b63a-d75d6adf389a7589.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/c72274ce-909438a8a5dd87a5.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/da9543df-c2ce5269243dd748.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/framework-6e06c675866dc992.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/main-19765309852faad8.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/main-app-2cdcfd0e548fd0e6.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/pages/_app-3fcac1a2c632f1ef.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/pages/_error-d3fe151bf402c134.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-f732225cafd52a05.js",revision:"VzjdBH-1tWUTABuCZb9nx"},{url:"/_next/static/css/23100062f5d4aac0.css",revision:"23100062f5d4aac0"},{url:"/_next/static/css/86f54169992d5771.css",revision:"86f54169992d5771"},{url:"/_next/static/css/da6e9b4a73108890.css",revision:"da6e9b4a73108890"},{url:"/_next/static/media/19cfc7226ec3afaa-s.woff2",revision:"9dda5cfc9a46f256d0e131bb535e46f8"},{url:"/_next/static/media/21350d82a1f187e9-s.woff2",revision:"4e2553027f1d60eff32898367dd4d541"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/ba9851c3c22cd980-s.woff2",revision:"9e494903d6b0ffec1a1e14d34427d44d"},{url:"/_next/static/media/c5fe6dc8356a8c31-s.woff2",revision:"027a89e9ab733a145db70f09b8a18b42"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/favicon.ico",revision:"c5de6e56c5664adda146825f75ea6ecf"},{url:"/icons/icon-192x192.png",revision:"4a56c090828a1ad254c903c7aec0389d"},{url:"/icons/icon-256x256.png",revision:"f6409eb1a001f754121e3a8281c0319c"},{url:"/icons/icon-384x384.png",revision:"f6efc3e357b9ffdf4e0d8c14b2ed0ac1"},{url:"/icons/icon-512x512.png",revision:"9c008cbbeb6a576fe07bb1284a83f4d2"},{url:"/logo.png",revision:"40de611b143c47c6291c7bdad2c959ca"},{url:"/manifest.json",revision:"7bd3dabc1cfbfe40f09577efca223d31"},{url:"/robots.txt",revision:"0483b37fb6cf7455cefe516197e39241"},{url:"/screenshot1.png",revision:"10572bfcea54dc93ac4c5f7c9057fc98"},{url:"/screenshot2.png",revision:"f815a8990973a221899976867365c239"},{url:"/screenshot3.png",revision:"49709e96345dfeeab1d8083821d4b44e"},{url:"/screenshot4.png",revision:"a76c751e41e37556048a487e4f8b8b1c"},{url:"/wechat.jpg",revision:"d0f601311802667cd6ca5a37dc69bfa7"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:t})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis2",networkTimeoutSeconds:20,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")});