UNPKG

@frames.js/debugger

Version:

Debug your Frames.js applications

1 lines 1.91 kB
"use strict";(()=>{var e={};e.id=5812,e.ids=[5812],e.modules={30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},75687:(e,t,a)=>{a.r(t),a.d(t,{headerHooks:()=>d,originalPathname:()=>f,patchFetch:()=>m,requestAsyncStorage:()=>c,routeModule:()=>u,serverHooks:()=>l,staticGenerationAsyncStorage:()=>p,staticGenerationBailout:()=>h});var r={};a.r(r),a.d(r,{GET:()=>i});var s=a(95419),o=a(69108),n=a(99678);async function i(e){let t=new URL(e.url),a=t.searchParams.get("family"),r=t.searchParams.get("weight"),s=t.searchParams.get("text");if(!a)return new Response("Missing family parameter",{status:400});let o=new URL("https://fonts.googleapis.com/css2");o.searchParams.set("family",`${encodeURIComponent(a)}${r?`:wght@${r}`:""}`),s?o.searchParams.set("text",s):o.searchParams.set("subset","latin-ext");let n=await fetch(o,{headers:{"User-Agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"}}),i=await n.text(),u=i.match(/src: url\((.+)\) format\('(opentype|truetype)'\)/)?.[1];if(!u)throw Error("Could not find font URL");return fetch(u).then(e=>new Response(e.body,{headers:{"Content-Type":"font/ttf","Cache-Control":"public, max-age=60"}}))}let u=new s.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/font/route",pathname:"/font",filename:"route",bundlePath:"app/font/route"},resolvedPagePath:"/Users/davidfurlong/Projects/active/frames.js/packages/debugger/app/font/route.ts",nextConfigOutput:"",userland:r}),{requestAsyncStorage:c,staticGenerationAsyncStorage:p,serverHooks:l,headerHooks:d,staticGenerationBailout:h}=u,f="/font/route";function m(){return(0,n.patchFetch)({serverHooks:l,staticGenerationAsyncStorage:p})}},95419:(e,t,a)=>{e.exports=a(30517)}};var t=require("../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[1638],()=>a(75687));module.exports=r})();