@repdf/preview 0.0.25 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/index.js +42 -221
  2. package/dist/preview/.next/BUILD_ID +1 -1
  3. package/dist/preview/.next/build-manifest.json +20 -20
  4. package/dist/preview/.next/cache/.tsbuildinfo +1 -1
  5. package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
  8. package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
  9. package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
  10. package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
  11. package/dist/preview/.next/next-server.js.nft.json +1 -1
  12. package/dist/preview/.next/prerender-manifest.json +1 -1
  13. package/dist/preview/.next/react-loadable-manifest.json +2 -2
  14. package/dist/preview/.next/required-server-files.json +1 -1
  15. package/dist/preview/.next/routes-manifest.json +1 -1
  16. package/dist/preview/.next/server/chunks/204.js +1 -0
  17. package/dist/preview/.next/server/chunks/239.js +6 -0
  18. package/dist/preview/.next/server/chunks/370.js +1 -1
  19. package/dist/preview/.next/server/chunks/476.js +1 -1
  20. package/dist/preview/.next/server/chunks/81.js +1 -1
  21. package/dist/preview/.next/server/chunks/865.js +1 -0
  22. package/dist/preview/.next/server/chunks/975.js +4 -0
  23. package/dist/preview/.next/server/functions-config-manifest.json +1 -1
  24. package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
  25. package/dist/preview/.next/server/middleware-react-loadable-manifest.js +1 -1
  26. package/dist/preview/.next/server/pages/_app.js +1 -1
  27. package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
  28. package/dist/preview/.next/server/pages/_document.js +1 -1
  29. package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
  30. package/dist/preview/.next/server/pages/_error.js +1 -1
  31. package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
  32. package/dist/preview/.next/server/pages/api/component.js +2 -2
  33. package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
  34. package/dist/preview/.next/server/pages/api/pdf.js +1 -1
  35. package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
  36. package/dist/preview/.next/server/pages/api/trpc/[trpc].js +82 -2
  37. package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +1 -1
  38. package/dist/preview/.next/server/pages/en/404.html +1 -1
  39. package/dist/preview/.next/server/pages/en/500.html +1 -1
  40. package/dist/preview/.next/server/pages/en/test.html +1 -1
  41. package/dist/preview/.next/server/pages/index.js +2 -2
  42. package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
  43. package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
  44. package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
  45. package/dist/preview/.next/server/pages/test.js.nft.json +1 -1
  46. package/dist/preview/.next/server/pages-manifest.json +1 -1
  47. package/dist/preview/.next/server/webpack-api-runtime.js +1 -1
  48. package/dist/preview/.next/static/3KzSbw8453o_mkesYso5R/_buildManifest.js +1 -0
  49. package/dist/preview/.next/static/chunks/64-33135d2a0b032c99.js +1 -0
  50. package/dist/preview/.next/static/chunks/main-32f0addb06a02100.js +1 -0
  51. package/dist/preview/.next/static/chunks/pages/_app-7207fb686c7ea292.js +184 -0
  52. package/dist/preview/.next/static/chunks/pages/_error-0577f827b4afb66a.js +1 -0
  53. package/dist/preview/.next/static/chunks/pages/{index-7e306d1513d09a1a.js → index-59cca326edb25e5b.js} +1 -1
  54. package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-3e7bbb1e7746e61f.js +1 -0
  55. package/dist/preview/.next/static/chunks/pages/{test-6c9d6a5f356c21ea.js → test-1b0ec700afcdd64b.js} +1 -1
  56. package/dist/preview/.next/static/chunks/webpack-8fa1640cc84ba8fe.js +1 -0
  57. package/dist/preview/.next/static/css/3beae5d5e23b91e8.css +3 -0
  58. package/dist/preview/.next/trace +20 -16
  59. package/package.json +17 -19
  60. package/dist/preview/.next/cache/webpack/client-development/0.pack.gz +0 -0
  61. package/dist/preview/.next/cache/webpack/client-development/index.pack.gz +0 -0
  62. package/dist/preview/.next/server/chunks/515.js +0 -1
  63. package/dist/preview/.next/server/chunks/76.js +0 -6
  64. package/dist/preview/.next/server/chunks/787.js +0 -4
  65. package/dist/preview/.next/server/chunks/992.js +0 -1
  66. package/dist/preview/.next/static/chunks/138-c24eca17d1ad2527.js +0 -1
  67. package/dist/preview/.next/static/chunks/main-58cc12cfc6868a7a.js +0 -1
  68. package/dist/preview/.next/static/chunks/pages/_app-0f9241fc03d167e5.js +0 -8
  69. package/dist/preview/.next/static/chunks/pages/_error-4ad10ca9d415501b.js +0 -1
  70. package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-54953a42a234e88f.js +0 -1
  71. package/dist/preview/.next/static/chunks/webpack-b8f8d6679aaa5f42.js +0 -1
  72. package/dist/preview/.next/static/css/e697c978240c2fce.css +0 -3
  73. package/dist/preview/.next/static/r14XpRGeqXRkqt8lq1z_x/_buildManifest.js +0 -1
  74. /package/dist/preview/.next/static/{r14XpRGeqXRkqt8lq1z_x → 3KzSbw8453o_mkesYso5R}/_ssgManifest.js +0 -0
@@ -0,0 +1,184 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{5580:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(6445)}])},1084:function(e,t){"use strict";var r,n,i,s;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_FAST_REFRESH:function(){return h},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return a},ACTION_RESTORE:function(){return u},ACTION_SERVER_ACTION:function(){return f},ACTION_SERVER_PATCH:function(){return l},PrefetchCacheEntryStatus:function(){return n},PrefetchKind:function(){return r},isThenable:function(){return d}});let a="refresh",o="navigate",u="restore",l="server-patch",c="prefetch",h="fast-refresh",f="server-action";function d(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=r||(r={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(s=n||(n={})).fresh="fresh",s.reusable="reusable",s.expired="expired",s.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4309:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return i}});let n=r(1271);function i(e,t,i,s){{let a=r(4496).normalizeLocalePath,o=r(7248).detectDomainLocale,u=t||a(e,i).detectedLocale,l=o(s,void 0,u);if(l){let t="http"+(l.http?"":"s")+"://",r=u===l.defaultLocale?"":"/"+u;return""+t+l.domain+(0,n.normalizePathTrailingSlash)(""+r+e)}return!1}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3246:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let n=r(7940),i=r(1549),s=n._(r(4194)),a=r(178),o=r(2474),u=r(6735),l=r(3066),c=r(3386),h=r(9384),f=r(8110),d=r(3026),p=r(4309),y=r(5135),m=r(1084),g=new Set;function b(e,t,r,n,i,s){if(s||(0,o.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(g.has(i))return;g.add(i)}(async()=>s?e.prefetch(t,i):e.prefetch(t,r,n))().catch(e=>{})}}function v(e){return"string"==typeof e?e:(0,u.formatUrl)(e)}let w=s.default.forwardRef(function(e,t){let r,n;let{href:u,as:g,children:w,prefetch:O=null,passHref:x,replace:E,shallow:C,scroll:R,locale:P,onClick:S,onMouseEnter:q,onTouchStart:Q,legacyBehavior:j=!1,...I}=e;r=w,j&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let k=s.default.useContext(h.RouterContext),T=s.default.useContext(f.AppRouterContext),D=null!=k?k:T,_=!k,M=!1!==O,A=null===O?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:F,as:U}=s.default.useMemo(()=>{if(!k){let e=v(u);return{href:e,as:g?v(g):e}}let[e,t]=(0,a.resolveHref)(k,u,!0);return{href:e,as:g?(0,a.resolveHref)(k,g):t||e}},[k,u,g]),N=s.default.useRef(F),L=s.default.useRef(U);j&&(n=s.default.Children.only(r));let z=j?n&&"object"==typeof n&&n.ref:t,[K,H,$]=(0,d.useIntersection)({rootMargin:"200px"}),V=s.default.useCallback(e=>{(L.current!==U||N.current!==F)&&($(),L.current=U,N.current=F),K(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[U,z,F,$,K]);s.default.useEffect(()=>{D&&H&&M&&b(D,F,U,{locale:P},{kind:A},_)},[U,F,H,P,M,null==k?void 0:k.locale,D,_,A]);let B={ref:V,onClick(e){j||"function"!=typeof S||S(e),j&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),D&&!e.defaultPrevented&&function(e,t,r,n,i,a,u,l,c){let{nodeName:h}=e.currentTarget;if("A"===h.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,o.isLocalURL)(r)))return;e.preventDefault();let f=()=>{let e=null==u||u;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:l,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};c?s.default.startTransition(f):f()}(e,D,F,U,E,C,R,P,_)},onMouseEnter(e){j||"function"!=typeof q||q(e),j&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),D&&(M||!_)&&b(D,F,U,{locale:P,priority:!0,bypassPrefetchedCheck:!0},{kind:A},_)},onTouchStart:function(e){j||"function"!=typeof Q||Q(e),j&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),D&&(M||!_)&&b(D,F,U,{locale:P,priority:!0,bypassPrefetchedCheck:!0},{kind:A},_)}};if((0,l.isAbsoluteUrl)(U))B.href=U;else if(!j||x||"a"===n.type&&!("href"in n.props)){let e=void 0!==P?P:null==k?void 0:k.locale,t=(null==k?void 0:k.isLocaleDomain)&&(0,p.getDomainLocale)(U,e,null==k?void 0:k.locales,null==k?void 0:k.domainLocales);B.href=t||(0,y.addBasePath)((0,c.addLocale)(U,e,null==k?void 0:k.defaultLocale))}return j?s.default.cloneElement(n,B):(0,i.jsx)("a",{...I,...B,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4496:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});let n=(e,t)=>r(1856).normalizeLocalePath(e,t);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3026:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});let n=r(4194),i=r(5965),s="function"==typeof IntersectionObserver,a=new Map,o=[];function u(e){let{rootRef:t,rootMargin:r,disabled:u}=e,l=u||!s,[c,h]=(0,n.useState)(!1),f=(0,n.useRef)(null),d=(0,n.useCallback)(e=>{f.current=e},[]);return(0,n.useEffect)(()=>{if(s){if(l||c)return;let e=f.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:s}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=o.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},o.push(r),a.set(r,t),t}(r);return s.set(e,t),i.observe(e),function(){if(s.delete(e),i.unobserve(e),0===s.size){i.disconnect(),a.delete(n);let e=o.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&o.splice(e,1)}}}(e,e=>e&&h(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!c){let e=(0,i.requestIdleCallback)(()=>h(!0));return()=>(0,i.cancelIdleCallback)(e)}},[l,r,t,c,f.current]),[d,c,(0,n.useCallback)(()=>{h(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6445:function(e,t,r){"use strict";let n,i;r.r(t),r.d(t,{default:function(){return eP}});var s,a=r(1549),o=function(){return null},u=r(6249),l=r(4194);let c={data:""},h=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||c,f=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,d=/\/\*[^]*?\*\/| +/g,p=/\n+/g,y=(e,t)=>{let r="",n="",i="";for(let s in e){let a=e[s];"@"==s[0]?"i"==s[1]?r=s+" "+a+";":n+="f"==s[1]?y(a,s):s+"{"+y(a,"k"==s[1]?"":t)+"}":"object"==typeof a?n+=y(a,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=a&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=y.p?y.p(s,a):s+":"+a+";")}return r+(t&&i?t+"{"+i+"}":i)+n},m={},g=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+g(e[r]);return t}return e},b=(e,t,r,n,i)=>{var s;let a=g(e),o=m[a]||(m[a]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(a));if(!m[o]){let t=a!==e?e:(e=>{let t,r,n=[{}];for(;t=f.exec(e.replace(d,""));)t[4]?n.shift():t[3]?(r=t[3].replace(p," ").trim(),n.unshift(n[0][r]=n[0][r]||{})):n[0][t[1]]=t[2].replace(p," ").trim();return n[0]})(e);m[o]=y(i?{["@keyframes "+o]:t}:t,r?"":"."+o)}let u=r&&m.g?m.g:null;return r&&(m.g=m[o]),s=m[o],u?t.data=t.data.replace(u,s):-1===t.data.indexOf(s)&&(t.data=n?s+t.data:t.data+s),o},v=(e,t,r)=>e.reduce((e,n,i)=>{let s=t[i];if(s&&s.call){let e=s(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":y(e,""):!1===e?"":e}return e+n+(null==s?"":s)},"");function w(e){let t=this||{},r=e.call?e(t.p):e;return b(r.unshift?r.raw?v(r,[].slice.call(arguments,1),t.p):r.reduce((e,r)=>Object.assign(e,r&&r.call?r(t.p):r),{}):r,h(t.target),t.g,t.o,t.k)}w.bind({g:1});let O,x,E,C=w.bind({k:1});function R(e,t){let r=this||{};return function(){let n=arguments;function i(s,a){let o=Object.assign({},s),u=o.className||i.className;r.p=Object.assign({theme:x&&x()},o),r.o=/ *go\d+/.test(u),o.className=w.apply(r,n)+(u?" "+u:""),t&&(o.ref=a);let l=e;return e[0]&&(l=o.as||e,delete o.as),E&&l[0]&&E(o),O(l,o)}return t?t(i):i}}var P=e=>"function"==typeof e,S=(e,t)=>P(e)?e(t):e,q=(n=0,()=>(++n).toString()),Q=()=>{if(void 0===i&&"u">typeof window){let e=matchMedia("(prefers-reduced-motion: reduce)");i=!e||e.matches}return i},j=new Map,I=e=>{if(j.has(e))return;let t=setTimeout(()=>{j.delete(e),M({type:4,toastId:e})},1e3);j.set(e,t)},k=e=>{let t=j.get(e);t&&clearTimeout(t)},T=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return t.toast.id&&k(t.toast.id),{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return e.toasts.find(e=>e.id===r.id)?T(e,{type:1,toast:r}):T(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?I(n):e.toasts.forEach(e=>{I(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||void 0===n?{...e,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+i}))}}},D=[],_={toasts:[],pausedAt:void 0},M=e=>{_=T(_,e),D.forEach(e=>{e(_)})},A={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},F=(e={})=>{let[t,r]=(0,l.useState)(_);(0,l.useEffect)(()=>(D.push(r),()=>{let e=D.indexOf(r);e>-1&&D.splice(e,1)}),[t]);let n=t.toasts.map(t=>{var r,n;return{...e,...e[t.type],...t,duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||A[t.type],style:{...e.style,...null==(n=e[t.type])?void 0:n.style,...t.style}}});return{...t,toasts:n}},U=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(null==r?void 0:r.id)||q()}),N=e=>(t,r)=>{let n=U(t,e,r);return M({type:2,toast:n}),n.id},L=(e,t)=>N("blank")(e,t);L.error=N("error"),L.success=N("success"),L.loading=N("loading"),L.custom=N("custom"),L.dismiss=e=>{M({type:3,toastId:e})},L.remove=e=>M({type:4,toastId:e}),L.promise=(e,t,r)=>{let n=L.loading(t.loading,{...r,...null==r?void 0:r.loading});return e.then(e=>(L.success(S(t.success,e),{id:n,...r,...null==r?void 0:r.success}),e)).catch(e=>{L.error(S(t.error,e),{id:n,...r,...null==r?void 0:r.error})}),e};var z=(e,t)=>{M({type:1,toast:{id:e,height:t}})},K=()=>{M({type:5,time:Date.now()})},H=e=>{let{toasts:t,pausedAt:r}=F(e);(0,l.useEffect)(()=>{if(r)return;let e=Date.now(),n=t.map(t=>{if(t.duration===1/0)return;let r=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(r<0){t.visible&&L.dismiss(t.id);return}return setTimeout(()=>L.dismiss(t.id),r)});return()=>{n.forEach(e=>e&&clearTimeout(e))}},[t,r]);let n=(0,l.useCallback)(()=>{r&&M({type:6,time:Date.now()})},[r]),i=(0,l.useCallback)((e,r)=>{let{reverseOrder:n=!1,gutter:i=8,defaultPosition:s}=r||{},a=t.filter(t=>(t.position||s)===(e.position||s)&&t.height),o=a.findIndex(t=>t.id===e.id),u=a.filter((e,t)=>t<o&&e.visible).length;return a.filter(e=>e.visible).slice(...n?[u+1]:[0,u]).reduce((e,t)=>e+(t.height||0)+i,0)},[t]);return{toasts:t,handlers:{updateHeight:z,startPause:K,endPause:n,calculateOffset:i}}},$=C`
2
+ from {
3
+ transform: scale(0) rotate(45deg);
4
+ opacity: 0;
5
+ }
6
+ to {
7
+ transform: scale(1) rotate(45deg);
8
+ opacity: 1;
9
+ }`,V=C`
10
+ from {
11
+ transform: scale(0);
12
+ opacity: 0;
13
+ }
14
+ to {
15
+ transform: scale(1);
16
+ opacity: 1;
17
+ }`,B=C`
18
+ from {
19
+ transform: scale(0) rotate(90deg);
20
+ opacity: 0;
21
+ }
22
+ to {
23
+ transform: scale(1) rotate(90deg);
24
+ opacity: 1;
25
+ }`,G=R("div")`
26
+ width: 20px;
27
+ opacity: 0;
28
+ height: 20px;
29
+ border-radius: 10px;
30
+ background: ${e=>e.primary||"#ff4b4b"};
31
+ position: relative;
32
+ transform: rotate(45deg);
33
+
34
+ animation: ${$} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
35
+ forwards;
36
+ animation-delay: 100ms;
37
+
38
+ &:after,
39
+ &:before {
40
+ content: '';
41
+ animation: ${V} 0.15s ease-out forwards;
42
+ animation-delay: 150ms;
43
+ position: absolute;
44
+ border-radius: 3px;
45
+ opacity: 0;
46
+ background: ${e=>e.secondary||"#fff"};
47
+ bottom: 9px;
48
+ left: 4px;
49
+ height: 2px;
50
+ width: 12px;
51
+ }
52
+
53
+ &:before {
54
+ animation: ${B} 0.15s ease-out forwards;
55
+ animation-delay: 180ms;
56
+ transform: rotate(90deg);
57
+ }
58
+ `,W=C`
59
+ from {
60
+ transform: rotate(0deg);
61
+ }
62
+ to {
63
+ transform: rotate(360deg);
64
+ }
65
+ `,J=R("div")`
66
+ width: 12px;
67
+ height: 12px;
68
+ box-sizing: border-box;
69
+ border: 2px solid;
70
+ border-radius: 100%;
71
+ border-color: ${e=>e.secondary||"#e0e0e0"};
72
+ border-right-color: ${e=>e.primary||"#616161"};
73
+ animation: ${W} 1s linear infinite;
74
+ `,Y=C`
75
+ from {
76
+ transform: scale(0) rotate(45deg);
77
+ opacity: 0;
78
+ }
79
+ to {
80
+ transform: scale(1) rotate(45deg);
81
+ opacity: 1;
82
+ }`,Z=C`
83
+ 0% {
84
+ height: 0;
85
+ width: 0;
86
+ opacity: 0;
87
+ }
88
+ 40% {
89
+ height: 0;
90
+ width: 6px;
91
+ opacity: 1;
92
+ }
93
+ 100% {
94
+ opacity: 1;
95
+ height: 10px;
96
+ }`,X=R("div")`
97
+ width: 20px;
98
+ opacity: 0;
99
+ height: 20px;
100
+ border-radius: 10px;
101
+ background: ${e=>e.primary||"#61d345"};
102
+ position: relative;
103
+ transform: rotate(45deg);
104
+
105
+ animation: ${Y} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
106
+ forwards;
107
+ animation-delay: 100ms;
108
+ &:after {
109
+ content: '';
110
+ box-sizing: border-box;
111
+ animation: ${Z} 0.2s ease-out forwards;
112
+ opacity: 0;
113
+ animation-delay: 200ms;
114
+ position: absolute;
115
+ border-right: 2px solid;
116
+ border-bottom: 2px solid;
117
+ border-color: ${e=>e.secondary||"#fff"};
118
+ bottom: 6px;
119
+ left: 6px;
120
+ height: 10px;
121
+ width: 6px;
122
+ }
123
+ `,ee=R("div")`
124
+ position: absolute;
125
+ `,et=R("div")`
126
+ position: relative;
127
+ display: flex;
128
+ justify-content: center;
129
+ align-items: center;
130
+ min-width: 20px;
131
+ min-height: 20px;
132
+ `,er=C`
133
+ from {
134
+ transform: scale(0.6);
135
+ opacity: 0.4;
136
+ }
137
+ to {
138
+ transform: scale(1);
139
+ opacity: 1;
140
+ }`,en=R("div")`
141
+ position: relative;
142
+ transform: scale(0.6);
143
+ opacity: 0.4;
144
+ min-width: 20px;
145
+ animation: ${er} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
146
+ forwards;
147
+ `,ei=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return void 0!==t?"string"==typeof t?l.createElement(en,null,t):t:"blank"===r?null:l.createElement(et,null,l.createElement(J,{...n}),"loading"!==r&&l.createElement(ee,null,"error"===r?l.createElement(G,{...n}):l.createElement(X,{...n})))},es=e=>`
148
+ 0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}
149
+ 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
150
+ `,ea=e=>`
151
+ 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
152
+ 100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}
153
+ `,eo=R("div")`
154
+ display: flex;
155
+ align-items: center;
156
+ background: #fff;
157
+ color: #363636;
158
+ line-height: 1.3;
159
+ will-change: transform;
160
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
161
+ max-width: 350px;
162
+ pointer-events: auto;
163
+ padding: 8px 10px;
164
+ border-radius: 8px;
165
+ `,eu=R("div")`
166
+ display: flex;
167
+ justify-content: center;
168
+ margin: 4px 10px;
169
+ color: inherit;
170
+ flex: 1 1 auto;
171
+ white-space: pre-line;
172
+ `,el=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=Q()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[es(r),ea(r)];return{animation:t?`${C(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${C(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ec=l.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?el(e.position||t||"top-center",e.visible):{opacity:0},s=l.createElement(ei,{toast:e}),a=l.createElement(eu,{...e.ariaProps},S(e.message,e));return l.createElement(eo,{className:e.className,style:{...i,...r,...e.style}},"function"==typeof n?n({icon:s,message:a}):l.createElement(l.Fragment,null,s,a))});s=l.createElement,y.p=void 0,O=s,x=void 0,E=void 0;var eh=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let s=l.useCallback(t=>{if(t){let r=()=>{n(e,t.getBoundingClientRect().height)};r(),new MutationObserver(r).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return l.createElement("div",{ref:s,className:t,style:r},i)},ef=(e,t)=>{let r=e.includes("top"),n=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Q()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...r?{top:0}:{bottom:0},...n}},ed=w`
173
+ z-index: 9999;
174
+ > * {
175
+ pointer-events: auto;
176
+ }
177
+ `,ep=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:s,containerClassName:a})=>{let{toasts:o,handlers:u}=H(r);return l.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...s},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},o.map(r=>{let s=r.position||t,a=ef(s,u.calculateOffset(r,{reverseOrder:e,gutter:n,defaultPosition:t}));return l.createElement(eh,{id:r.id,key:r.id,onHeightUpdate:u.updateHeight,className:r.visible?ed:"",style:a},"custom"===r.type?S(r.message,r):i?i(r):l.createElement(ec,{toast:r,position:s}))}))};r(1952);var ey=r(7829);let em=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eg=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var eb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let ev=(0,l.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:u,...c}=e;return(0,l.createElement)("svg",{ref:t,...eb,width:n,height:n,stroke:r,strokeWidth:s?24*Number(i)/Number(n):i,className:eg("lucide",a),...c},[...u.map(e=>{let[t,r]=e;return(0,l.createElement)(t,r)}),...Array.isArray(o)?o:[o]])}),ew=((e,t)=>{let r=(0,l.forwardRef)((r,n)=>{let{className:i,...s}=r;return(0,l.createElement)(ev,{ref:n,iconNode:t,className:eg("lucide-".concat(em(e)),i),...s})});return r.displayName="".concat(e),r})("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var eO=r(6370),ex=r.n(eO);function eE(){let{data:e}=u.h.core.pdfTemplates.useQuery();return(0,a.jsxs)("div",{className:"h-full min-h-screen border-r p-4 relative",children:[(0,a.jsx)(ex(),{href:"/",children:(0,a.jsx)("h1",{className:"text-2xl font-bold",children:"rePDF"})}),(0,a.jsxs)("div",{className:"mt-5 flex flex-col gap-2",children:[e&&(0,a.jsxs)(a.Fragment,{children:[e.topLevel.map(e=>(0,a.jsx)(ex(),{href:"/preview/".concat(e.relTemplatePath),className:"text-sm hover:underline pl-1.5",children:e.fileName},e.fileName)),e.subFolders.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(ew,{className:"w-4 h-4"}),(0,a.jsx)("p",{className:"",children:e.name})]}),(0,a.jsx)("ul",{children:e.pdfTemplates.map(e=>(0,a.jsx)(ex(),{href:"/preview/".concat(e.relTemplatePath),className:"text-sm hover:underline pl-1.5",children:e.fileName},e.fileName))})]},e.name))]}),(0,a.jsx)("div",{className:"fixed bottom-4 left-0 p-4 text-sm",children:(0,a.jsx)(eC,{})})]})]})}function eC(){let e=u.h.useUtils(),[t,r]=(0,l.useState)(null),{data:n}=u.h.watcher.heartbeat.useSubscription(void 0,{onData:e=>{r(e.timestamp)}}),{data:i}=u.h.watcher.fileChange.useSubscription(void 0,{onData:t=>{e.core.invalidate()}});return(0,l.useEffect)(()=>{let e=setInterval(()=>{r(e=>e&&Date.now()-new Date(e).getTime()>5e3?null:e)},5e3);return()=>clearInterval(e)},[]),(0,a.jsx)("div",{className:(0,ey.Z)("text-xs rounded-lg bg-gray-300 p-2 bg-opacity-30",{"bg-gray-500":!t,"bg-green-500":!!t}),children:"Live Preview"})}function eR(e){let{children:t}=e;return(0,a.jsxs)("div",{className:"grid grid-cols-12",children:[(0,a.jsx)("div",{className:"col-span-2",children:(0,a.jsx)(eE,{})}),(0,a.jsx)("div",{className:"col-span-10",children:t})]})}var eP=u.h.withTRPC(e=>{let{Component:t,pageProps:r}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eR,{children:(0,a.jsx)(t,{...r})}),(0,a.jsx)(ep,{}),(0,a.jsx)(o,{initialIsOpen:!1})]})})},6249:function(e,t,r){"use strict";let n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){let t={subscribe(t){let r=null,n=!1,i=!1,s=!1;function a(){if(null===r){s=!0;return}!i&&(i=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){n||t.next?.(e)},error(e){n||(n=!0,t.error?.(e),a())},complete(){n||(n=!0,t.complete?.(),a())}}),s&&a(),{unsubscribe:a}},pipe:(...e)=>e.reduce(a,t)};return t}function a(e,t){return t(e)}function o(e){return s(t=>(function t(r=0,n=e.op){let i=e.links[r];if(!i)throw Error("No more links to execute - did you forget to add an ending link?");return i({op:n,next:e=>t(r+1,e)})})().subscribe(t))}r.d(t,{h:function(){return rv}}),Symbol();let u=()=>{},l=e=>{Object.freeze&&Object.freeze(e)},c=e=>(function e(t,r,n){let i=r.join(".");return n[i]??(n[i]=new Proxy(u,{get(i,s){if("string"==typeof s&&"then"!==s)return e(t,[...r,s],n)},apply(e,n,i){let s=r[r.length-1],a={args:i,path:r};return"call"===s?a={args:i.length>=2?[i[1]]:[],path:r.slice(0,-1)}:"apply"===s&&(a={args:i.length>=2?i[1]:[],path:r.slice(0,-1)}),l(a.args),l(a.path),t(a)}})),n[i]})(e,[],Object.create(null)),h=e=>new Proxy(u,{get(t,r){if("string"==typeof r&&"then"!==r)return e(r)}});function f(e,...t){let r=Object.assign(Object.create(null),e);for(let e of t)for(let t in e){if(t in r&&r[t]!==e[t])throw Error(`Duplicate key ${t}`);r[t]=e[t]}return r}function d(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function p(e){return Object.assign(Object.create(null),e)}Symbol();let y="function"==typeof Symbol&&!!Symbol.asyncIterator;function m(e){return y&&d(e)&&Symbol.asyncIterator in e}let g=e=>e();function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class v extends Error{}function w(e){if(e instanceof O||e instanceof Error&&"TRPCError"===e.name)return e;let t=new O({code:"INTERNAL_SERVER_ERROR",cause:e});return e instanceof Error&&e.stack&&(t.stack=e.stack),t}class O extends Error{constructor(e){let t=function(e){if(e instanceof Error)return e;let t=typeof e;if("undefined"!==t&&"function"!==t&&null!==e){if("object"!==t)return Error(String(e));if(d(e)){let t=new v;for(let r in e)t[r]=e[r];return t}}}(e.cause);super(e.message??t?.message??e.code,{cause:t}),b(this,"cause",void 0),b(this,"code",void 0),this.code=e.code,this.name="TRPCError",this.cause||(this.cause=t)}}new WeakMap,Symbol(),Symbol(),Symbol("ping");let x={input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}};class E extends Error{constructor(){super("Unable to transform response from server")}}let C=({shape:e})=>e,R="middlewareMarker";function P(e){if("function"==typeof e&&"function"==typeof e.assert)return e.assert.bind(e);if("function"==typeof e)return e;if("function"==typeof e.parseAsync)return e.parseAsync.bind(e);if("function"==typeof e.parse)return e.parse.bind(e);if("function"==typeof e.validateSync)return e.validateSync.bind(e);if("function"==typeof e.create)return e.create.bind(e);if("function"==typeof e.assert)return t=>(e.assert(t),t);throw Error("Could not find a validator fn")}function S(e,t){let{middlewares:r=[],inputs:n,meta:i,...s}=t;return q({...f(e,s),inputs:[...e.inputs,...n??[]],middlewares:[...e.middlewares,...r],meta:e.meta&&i?{...e.meta,...i}:i??e.meta})}function q(e={}){let t={procedure:!0,inputs:[],middlewares:[],...e};return{_def:t,input(e){let r=P(e);return S(t,{inputs:[e],middlewares:[function(e){let t=async function(t){let r;let n=await t.getRawInput();try{r=await e(n)}catch(e){throw new O({code:"BAD_REQUEST",cause:e})}let i=d(t.input)&&d(r)?{...t.input,...r}:r;return t.next({input:i})};return t._type="input",t}(r)]})},output(e){let r=P(e);return S(t,{output:e,middlewares:[function(e){let t=async function({next:t}){let r=await t();if(!r.ok)return r;try{let t=await e(r.data);return{...r,data:t}}catch(e){throw new O({message:"Output validation failed",code:"INTERNAL_SERVER_ERROR",cause:e})}};return t._type="output",t}(r)]})},meta:e=>S(t,{meta:e}),use:e=>S(t,{middlewares:"_middlewares"in e?e._middlewares:[e]}),unstable_concat:e=>S(t,e._def),query:e=>Q({...t,type:"query"},e),mutation:e=>Q({...t,type:"mutation"},e),subscription:e=>Q({...t,type:"subscription"},e),experimental_caller:e=>S(t,{caller:e})}}function Q(e,t){let r=S(e,{resolver:t,middlewares:[async function(e){return{marker:R,ok:!0,data:await t(e),ctx:e.ctx}}]}),n={...r._def,type:e.type,experimental_caller:!!r._def.caller,meta:r._def.meta,$types:null},i=function(e){async function t(t){if(!t||!("getRawInput"in t))throw Error(j);let r=await I(0,e,t);if(!r)throw new O({code:"INTERNAL_SERVER_ERROR",message:"No result from middlewares - did you forget to `return next()`?"});if(!r.ok)throw r.error;return r.data}return t._def=e,t}(r._def),s=r._def.caller;if(!s)return i;let a=async(...e)=>await s({args:e,invoke:i,_def:n});return a._def=n,a}let j=`
178
+ This is a client-only function.
179
+ If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls
180
+ `.trim();async function I(e,t,r){try{let n=t.middlewares[e];return await n({...r,meta:t.meta,input:r.input,next:n=>I(e+1,t,{...r,ctx:n?.ctx?{...r.ctx,...n.ctx}:r.ctx,input:n&&"input"in n?n.input:r.input,getRawInput:n?.getRawInput??r.getRawInput})})}catch(e){return{ok:!1,error:w(e),marker:R}}}let k="undefined"==typeof window||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||!!globalThis.process?.env?.JEST_WORKER_ID||!!globalThis.process?.env?.VITEST_WORKER_ID,T={_ctx:null,_errorShape:null,_meta:null,queries:{},mutations:{},subscriptions:{},errorFormatter:C,transformer:x},D=["then","call","apply"];function _(e){return function(t){let r=new Set(Object.keys(t).filter(e=>D.includes(e)));if(r.size>0)throw Error("Reserved words used in `router({})` call: "+Array.from(r).join(", "));let n=p({}),i=function e(t,r=[]){let i=p({});for(let[s,a]of Object.entries(t??{})){if(a._def&&"router"in a._def){i[s]=e(a._def.record,[...r,s]);continue}if("function"!=typeof a){i[s]=e(a,[...r,s]);continue}let t=[...r,s].join(".");if(n[t])throw Error(`Duplicate key: ${t}`);n[t]=a,i[s]=a}return i}(t),s={_config:e,router:!0,procedures:n,...T,record:i};return{...i,_def:s,createCaller:M()({_def:s})}}}function M(){return function(e){let t=e._def;return function(e,r){return c(async({path:n,args:i})=>{let s;let a=n.join(".");if(1===n.length&&"_def"===n[0])return t;let o=t.procedures[a];try{return s="function"==typeof e?await Promise.resolve(e()):e,await o({path:a,getRawInput:async()=>i[0],ctx:s,type:o._def.type,signal:r?.signal})}catch(e){throw r?.onError?.({ctx:s,error:w(e),input:i[0],path:a,type:o._def.type}),e}})}}}function A(...e){let t=f({},...e.map(e=>e._def.record));return _({errorFormatter:e.reduce((e,t)=>{if(t._def._config.errorFormatter&&t._def._config.errorFormatter!==C){if(e!==C&&e!==t._def._config.errorFormatter)throw Error("You seem to have several error formatters");return t._def._config.errorFormatter}return e},C),transformer:e.reduce((e,t)=>{if(t._def._config.transformer&&t._def._config.transformer!==x){if(e!==x&&e!==t._def._config.transformer)throw Error("You seem to have several transformers");return t._def._config.transformer}return e},x),isDev:e.every(e=>e._def._config.isDev),allowOutsideOfServer:e.every(e=>e._def._config.allowOutsideOfServer),isServer:e.every(e=>e._def._config.isServer),$types:e[0]?._def._config.$types})(t)}class F{context(){return new F}meta(){return new F}create(e){var t;let r={transformer:"input"in(t=e?.transformer??x)?t:{input:t,output:t},isDev:e?.isDev??globalThis.process?.env.NODE_ENV!=="production",allowOutsideOfServer:e?.allowOutsideOfServer??!1,errorFormatter:e?.errorFormatter??C,isServer:e?.isServer??k,$types:null,experimental:e?.experimental??{}};if(!(e?.isServer??k)&&e?.allowOutsideOfServer!==!0)throw Error("You're trying to use @trpc/server in a non-server environment. This is not supported by default.");return{_config:r,procedure:q({meta:e?.defaultMeta}),middleware:function(e){return function e(t){return{_middlewares:t,unstable_pipe:r=>e([...t,..."_middlewares"in r?r._middlewares:[r]])}}([e])},router:_(r),mergeRouters:A,createCallerFactory:M()}}}new F;class U extends Error{static from(e,t={}){return e instanceof U||e instanceof Error&&"TRPCClientError"===e.name?(t.meta&&(e.meta={...e.meta,...t.meta}),e):d(e)&&d(e.error)&&"number"==typeof e.error.code&&"string"==typeof e.error.message?new U(e.error.message,{...t,result:e}):new U("string"==typeof e?e:d(e)&&"string"==typeof e.message?e.message:"Unknown error",{...t,cause:e})}constructor(e,t){let r=t?.cause;super(e,{cause:r}),i(this,"cause",void 0),i(this,"shape",void 0),i(this,"data",void 0),i(this,"meta",void 0),this.meta=t?.meta,this.cause=r,this.shape=t?.result?.error,this.data=t?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,U.prototype)}}class N{$request(e){return o({links:this.links,op:{...e,context:e.context??{},id:++this.requestId}}).pipe(e=>{let t=0,r=null,n=[];return s(i=>(t++,n.push(i),r||(r=e.subscribe({next(e){for(let t of n)t.next?.(e)},error(e){for(let t of n)t.error?.(e)},complete(){for(let e of n)e.complete?.()}})),{unsubscribe(){t--,function(){if(0===t&&r){let e=r;r=null,e.unsubscribe()}}();let e=n.findIndex(e=>e===i);e>-1&&n.splice(e,1)}}))})}async requestAsPromise(e){try{let t=this.$request(e);return(await function(e){let t=new AbortController;return new Promise((r,n)=>{let i=!1;function s(){i||(i=!0,a.unsubscribe())}t.signal.addEventListener("abort",()=>{n(t.signal.reason)});let a=e.subscribe({next(e){i=!0,r(e),s()},error(e){n(e)},complete(){t.abort(),s()}})})}(t)).result.data}catch(e){throw U.from(e)}}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:r?.context,signal:r?.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:r?.context,signal:r?.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r?.context,signal:r.signal}).subscribe({next(e){switch(e.result.type){case"state":r.onConnectionStateChange?.(e.result);break;case"started":r.onStarted?.({context:e.context});break;case"stopped":r.onStopped?.();break;case"data":case void 0:r.onData?.(e.result.data)}},error(e){r.onError?.(e)},complete(){r.onComplete?.()}})}constructor(e){i(this,"links",void 0),i(this,"runtime",void 0),i(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}}let L={query:"query",mutate:"mutation",subscribe:"subscription"},z=e=>L[e],K=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function H(e){let t=null,r=null,n=()=>{clearTimeout(r),r=null,t=null};function i(){let r=function(t){let r=[[]],n=0;for(;;){let i=t[n];if(!i)break;let s=r[r.length-1];if(i.aborted){i.reject?.(Error("Aborted")),n++;continue}if(e.validate(s.concat(i).map(e=>e.key))){s.push(i),n++;continue}if(0===s.length){i.reject?.(Error("Input is too big for a single dispatch")),n++;continue}r.push([])}return r}(t);for(let t of(n(),r)){if(!t.length)continue;let r={items:t};for(let e of t)e.batch=r;e.fetch(r.items.map(e=>e.key)).then(async e=>{for(let t of(await Promise.all(e.map(async(e,t)=>{let n=r.items[t];try{let t=await Promise.resolve(e);n.resolve?.(t)}catch(e){n.reject?.(e)}n.batch=null,n.reject=null,n.resolve=null})),r.items))t.reject?.(Error("Missing result")),t.batch=null}).catch(e=>{for(let t of r.items)t.reject?.(e),t.batch=null})}}return{load:function(e){let n={aborted:!1,key:e,batch:null,resolve:K,reject:K},s=new Promise((e,r)=>{n.reject=r,n.resolve=e,t||(t=[]),t.push(n)});return r||(r=setTimeout(i)),s}}}let $=e=>"function"==typeof e;function V(e){return e?"input"in e?e:{input:e,output:e}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}let B={query:"GET",mutation:"POST",subscription:"PATCH"};function G(e){return"input"in e?e.transformer.input.serialize(e.input):function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[r]=n}return t}(e.inputs.map(t=>e.transformer.input.serialize(t)))}let W=e=>{let t=e.url.split("?"),r=t[0].replace(/\/$/,"")+"/"+e.path,n=[];if(t[1]&&n.push(t[1]),"inputs"in e&&n.push("batch=1"),"query"===e.type||"subscription"===e.type){let t=G(e);void 0!==t&&"POST"!==e.methodOverride&&n.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return n.length&&(r+="?"+n.join("&")),r},J=e=>{if("query"===e.type&&"POST"!==e.methodOverride)return;let t=G(e);return void 0!==t?JSON.stringify(t):void 0},Y=e=>et({...e,contentTypeHeader:"application/json",getUrl:W,getBody:J});class Z extends Error{constructor(){let e="AbortError";super(e),this.name=e,this.message=e}}let X=e=>{if(e?.aborted){if(e.throwIfAborted?.(),"undefined"!=typeof DOMException)throw new DOMException("AbortError","AbortError");throw new Z}};async function ee(e){X(e.signal);let t=e.getUrl(e),r=e.getBody(e),{type:n}=e,i=await (async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),s={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0,...i};return(function(e){if(e)return e;if("undefined"!=typeof window&&$(window.fetch))return window.fetch;if("undefined"!=typeof globalThis&&$(globalThis.fetch))return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(t,{method:e.methodOverride??B[n],signal:e.signal,body:r,headers:s})}async function et(e){let t={},r=await ee(e);t.response=r;let n=await r.json();return t.responseJSON=n,{json:n,meta:t}}let er={css:{query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},ansi:{regular:{query:["\x1b[30;46m","\x1b[97;46m"],mutation:["\x1b[30;45m","\x1b[97;45m"],subscription:["\x1b[30;42m","\x1b[97;42m"]},bold:{query:["\x1b[1;30;46m","\x1b[1;97;46m"],mutation:["\x1b[1;30;45m","\x1b[1;97;45m"],subscription:["\x1b[1;30;42m","\x1b[1;97;42m"]}}},en=({c:e=console,colorMode:t="css",withContext:r})=>n=>{let i=n.input,s="undefined"!=typeof FormData&&i instanceof FormData?Object.fromEntries(i):i,{parts:a,args:o}=function(e){let{direction:t,type:r,withContext:n,path:i,id:s,input:a}=e,o=[],u=[];if("none"===e.colorMode)o.push("up"===t?">>":"<<",r,`#${s}`,i);else if("ansi"===e.colorMode){let[e,n]=er.ansi.regular[r],[a,u]=er.ansi.bold[r];o.push("up"===t?e:n,"up"===t?">>":"<<",r,"up"===t?a:u,`#${s}`,i,"\x1b[0m")}else{let[e,n]=er.css[r],a=`
181
+ background-color: #${"up"===t?e:n};
182
+ color: ${"up"===t?"black":"white"};
183
+ padding: 2px;
184
+ `;o.push("%c","up"===t?">>":"<<",r,`#${s}`,`%c${i}%c`,"%O"),u.push(a,`${a}; font-weight: bold;`,`${a}; font-weight: normal;`)}return"up"===t?u.push(n?{input:a,context:e.context}:{input:a}):u.push({input:a,result:e.result,elapsedMs:e.elapsedMs,...n&&{context:e.context}}),{parts:o,args:u}}({...n,colorMode:t,input:s,withContext:r});e["down"===n.direction&&n.result&&(n.result instanceof Error||"error"in n.result.result&&n.result.result.error)?"error":"log"].apply(null,[a.join(" ")].concat(o))};function ei(e){return Array.isArray(e)?e:[e]}let es=(e,...t)=>"function"==typeof e?e(...t):e;async function ea(e){let t=await es(e.url);if(e.connectionParams){let r=await es(e.connectionParams),n=t.includes("?")?"&":"?";t+=n+"connectionParams="+encodeURIComponent(JSON.stringify(r))}return t}let eo=[-32603,-32603,-32603,-32603];var eu,el,ec=r(4194),eh=r(1549),ef=ec.createContext(void 0),ed=e=>{let t=ec.useContext(ef);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},ep=({client:e,children:t})=>(ec.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,eh.jsx)(ef.Provider,{value:e,children:t}));function ey(e){return e}function em(e,t,r){if("object"!=typeof t||null===t)return;let n=e.getMutationCache(),i=e.getQueryCache(),s=r?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??ey,a=t.mutations||[],o=t.queries||[];a.forEach(({state:t,...i})=>{n.build(e,{...e.getDefaultOptions().hydrate?.mutations,...r?.defaultOptions?.mutations,...i},t)}),o.forEach(({queryKey:t,state:n,queryHash:a,meta:o,promise:u})=>{let l=i.get(a),c=void 0===n.data?n.data:s(n.data);if(l){if(l.state.dataUpdatedAt<n.dataUpdatedAt){let{fetchStatus:e,...t}=n;l.setState({...t,data:c})}}else l=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...r?.defaultOptions?.queries,queryKey:t,queryHash:a,meta:o},{...n,data:c,fetchStatus:"idle"});if(u){let e=Promise.resolve(u).then(s);l.fetch(void 0,{initialPromise:e})}})}var eg=({children:e,options:t={},state:r,queryClient:n})=>{let i=ed(n),[s,a]=ec.useState(),o=ec.useRef(t);return o.current=t,ec.useMemo(()=>{if(r){if("object"!=typeof r)return;let e=i.getQueryCache(),t=r.queries||[],n=[],u=[];for(let r of t){let t=e.get(r.queryHash);if(t){let e=r.state.dataUpdatedAt>t.state.dataUpdatedAt,n=s?.find(e=>e.queryHash===r.queryHash);e&&(!n||r.state.dataUpdatedAt>n.state.dataUpdatedAt)&&u.push(r)}else n.push(r)}n.length>0&&em(i,{queries:n},o.current),u.length>0&&a(e=>e?[...e,...u]:u)}},[i,s,r]),ec.useEffect(()=>{s&&(em(i,{queries:s},o.current),a(void 0))},[i,s]),e};let eb=["client","ssrContext","ssrState","abortOnUnmount"],ev=ec.createContext?.(null);var ew="undefined"==typeof window||"Deno"in globalThis;function eO(){}function ex(e){return"number"==typeof e&&e>=0&&e!==1/0}function eE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function eC(e,t){return"function"==typeof e?e(t):e}function eR(e,t){return"function"==typeof e?e(t):e}function eP(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(n){if(t.queryHash!==eq(a,t.options))return!1}else if(!ej(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function eS(e,t){let{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(eQ(t.options.mutationKey)!==eQ(s))return!1}else if(!ej(t.options.mutationKey,s))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function eq(e,t){return(t?.queryKeyHashFn||eQ)(e)}function eQ(e){return JSON.stringify(e,(e,t)=>eD(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function ej(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!ej(e[r],t[r]))}function eI(e,t){if(e===t)return e;let r=eT(e)&&eT(t);if(r||eD(e)&&eD(t)){let n=r?e:Object.keys(e),i=n.length,s=r?t:Object.keys(t),a=s.length,o=r?[]:{},u=0;for(let i=0;i<a;i++){let a=r?i:s[i];(!r&&n.includes(a)||r)&&void 0===e[a]&&void 0===t[a]?(o[a]=void 0,u++):(o[a]=eI(e[a],t[a]),o[a]===e[a]&&void 0!==e[a]&&u++)}return i===a&&u===i?e:o}return t}function ek(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function eT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function eD(e){if(!e_(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(e_(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function e_(e){return"[object Object]"===Object.prototype.toString.call(e)}function eM(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?eI(e,t):t}function eA(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function eF(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var eU=Symbol();function eN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==eU?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function eL(e,t,r){let n=e.flatMap(e=>e.split("."));if(!t&&(!r||"any"===r))return n.length?[n]:[];if("infinite"===r&&d(t)&&("direction"in t||"cursor"in t)){let{cursor:e,direction:r,...i}=t;return[n,{input:i,type:"infinite"}]}return[n,{...void 0!==t&&t!==eU&&{input:t},...r&&"any"!==r&&{type:r}}]}function ez(e){return eL(e,void 0,"any")}let eK=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function eH(e){return c(t=>{let r=t.path,n=r.join("."),[i,s]=t.args;return{queryKey:eL(r,i,"query"),queryFn:()=>e.query(n,i,s?.trpc),...s}})}var e$=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},eV=new class extends e${#e;#t;#r;constructor(){super(),this.#r=e=>{if(!ew&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},eB=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0),s=n=>{t?e.push(n):i(()=>{r(n)})},a=()=>{let t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||a()}return r},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),eG=new class extends e${#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!ew&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function eW(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function eJ(e){return Math.min(1e3*2**e,3e4)}function eY(e){return(e??"online")!=="online"||eG.isOnline()}var eZ=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function eX(e){return e instanceof eZ}function e0(e){let t,r=!1,n=0,i=!1,s=eW(),a=()=>eV.isFocused()&&("always"===e.networkMode||eG.isOnline())&&e.canRun(),o=()=>eY(e.networkMode)&&e.canRun(),u=r=>{i||(i=!0,e.onSuccess?.(r),t?.(),s.resolve(r))},l=r=>{i||(i=!0,e.onError?.(r),t?.(),s.reject(r))},c=()=>new Promise(r=>{t=e=>{(i||a())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,i||e.onContinue?.()}),h=()=>{let t;if(i)return;let s=0===n?e.initialPromise:void 0;try{t=s??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{if(i)return;let s=e.retry??(ew?0:3),o=e.retryDelay??eJ,u="function"==typeof o?o(n,t):o,f=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);if(r||!f){l(t);return}n++,e.onFail?.(n,t),new Promise(e=>{setTimeout(e,u)}).then(()=>a()?void 0:c()).then(()=>{r?l(t):h()})})};return{promise:s,cancel:t=>{i||(l(new eZ(t)),e.abort?.())},continue:()=>(t?.(),s),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:o,start:()=>(o()?h():c().then(h),s)}}var e1=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ex(this.gcTime)&&(this.#i=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ew?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},e2=class extends e1{#s;#a;#o;#u;#l;#c;constructor(e){super(),this.#c=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#s=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#s,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#u?.promise}setOptions(e){this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){let r=eM(this.state.data,e,this.options);return this.#h({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#h({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(eO).catch(eO):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#s)}isActive(){return this.observers.some(e=>!1!==eR(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eU||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!eE(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#u&&(this.#c?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#c=!0,r.signal)})},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=eN(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return(n(r),this.#c=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};n(i),this.options.behavior?.onFetch(i,this),this.#a=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#h({type:"fetch",meta:i.fetchOptions?.meta});let s=e=>{eX(e)&&e.silent||this.#h({type:"error",error:e}),eX(e)||(this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#u=e0({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){s(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){s(e);return}this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:s,onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#u.start()}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...e3(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if(eX(r)&&r.revert&&this.#a)return{...this.#a,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),eB.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function e3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eY(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var e4=class extends e${constructor(e,t){super(),this.options=t,this.#f=e,this.#d=null,this.#p=eW(),this.options.experimental_prefetchInRender||this.#p.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#f;#y=void 0;#m=void 0;#g=void 0;#b;#v;#p;#d;#w;#O;#x;#E;#C;#R;#P=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#y.addObserver(this),e5(this.#y,this.options)?this.#S():this.updateResult(),this.#q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return e6(this.#y,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return e6(this.#y,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#Q(),this.#j(),this.#y.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.#y;if(this.options=this.#f.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof eR(this.options.enabled,this.#y))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#I(),this.#y.setOptions(this.options),r._defaulted&&!ek(this.options,r)&&this.#f.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#y,observer:this});let i=this.hasListeners();i&&e9(this.#y,n,this.options,r)&&this.#S(),this.updateResult(t),i&&(this.#y!==n||eR(this.options.enabled,this.#y)!==eR(r.enabled,this.#y)||eC(this.options.staleTime,this.#y)!==eC(r.staleTime,this.#y))&&this.#k();let s=this.#T();i&&(this.#y!==n||eR(this.options.enabled,this.#y)!==eR(r.enabled,this.#y)||s!==this.#R)&&this.#D(s)}getOptimisticResult(e){let t=this.#f.getQueryCache().build(this.#f,e),r=this.createResult(t,e);return ek(this.getCurrentResult(),r)||(this.#g=r,this.#v=this.options,this.#b=this.#y.state),r}getCurrentResult(){return this.#g}trackResult(e,t){let r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),t?.(n),e[n])})}),r}trackProp(e){this.#P.add(e)}getCurrentQuery(){return this.#y}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#f.defaultQueryOptions(e),r=this.#f.getQueryCache().build(this.#f,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#S({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#g))}#S(e){this.#I();let t=this.#y.fetch(this.options,e);return e?.throwOnError||(t=t.catch(eO)),t}#k(){this.#Q();let e=eC(this.options.staleTime,this.#y);if(ew||this.#g.isStale||!ex(e))return;let t=eE(this.#g.dataUpdatedAt,e);this.#E=setTimeout(()=>{this.#g.isStale||this.updateResult()},t+1)}#T(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#y):this.options.refetchInterval)??!1}#D(e){this.#j(),this.#R=e,!ew&&!1!==eR(this.options.enabled,this.#y)&&ex(this.#R)&&0!==this.#R&&(this.#C=setInterval(()=>{(this.options.refetchIntervalInBackground||eV.isFocused())&&this.#S()},this.#R))}#q(){this.#k(),this.#D(this.#T())}#Q(){this.#E&&(clearTimeout(this.#E),this.#E=void 0)}#j(){this.#C&&(clearInterval(this.#C),this.#C=void 0)}createResult(e,t){let r;let n=this.#y,i=this.options,s=this.#g,a=this.#b,o=this.#v,u=e!==n?e.state:this.#m,{state:l}=e,c={...l},h=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&e5(e,t),a=r&&e9(e,n,t,i);(s||a)&&(c={...c,...e3(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:f,errorUpdatedAt:d,status:p}=c;if(t.select&&void 0!==c.data){if(s&&c.data===a?.data&&t.select===this.#w)r=this.#O;else try{this.#w=t.select,r=t.select(c.data),r=eM(s?.data,r,t),this.#O=r,this.#d=null}catch(e){this.#d=e}}else r=c.data;if(void 0!==t.placeholderData&&void 0===r&&"pending"===p){let e;if(s?.isPlaceholderData&&t.placeholderData===o?.placeholderData)e=s.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#x?.state.data,this.#x):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#d=null}catch(e){this.#d=e}void 0!==e&&(p="success",r=eM(s?.data,e,t),h=!0)}this.#d&&(f=this.#d,r=this.#O,d=Date.now(),p="error");let y="fetching"===c.fetchStatus,m="pending"===p,g="error"===p,b=m&&y,v=void 0!==r,w={status:p,fetchStatus:c.fetchStatus,isPending:m,isSuccess:"success"===p,isError:g,isInitialLoading:b,isLoading:b,data:r,dataUpdatedAt:c.dataUpdatedAt,error:f,errorUpdatedAt:d,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!m,isLoadingError:g&&!v,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:g&&v,isStale:e7(e,t),refetch:this.refetch,promise:this.#p};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===w.status?e.reject(w.error):void 0!==w.data&&e.resolve(w.data)},r=()=>{t(this.#p=w.promise=eW())},i=this.#p;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":("error"===w.status||w.data!==i.value)&&r();break;case"rejected":("error"!==w.status||w.error!==i.reason)&&r()}}return w}updateResult(e){let t=this.#g,r=this.createResult(this.#y,this.options);if(this.#b=this.#y.state,this.#v=this.options,void 0!==this.#b.data&&(this.#x=this.#y),ek(r,t))return;this.#g=r;let n={};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#P.size)return!0;let n=new Set(r??this.#P);return this.options.throwOnError&&n.add("error"),Object.keys(this.#g).some(e=>this.#g[e]!==t[e]&&n.has(e))})()&&(n.listeners=!0),this.#_({...n,...e})}#I(){let e=this.#f.getQueryCache().build(this.#f,this.options);if(e===this.#y)return;let t=this.#y;this.#y=e,this.#m=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#q()}#_(e){eB.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#g)}),this.#f.getQueryCache().notify({query:this.#y,type:"observerResultsUpdated"})})}};function e5(e,t){return!1!==eR(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&e6(e,t,t.refetchOnMount)}function e6(e,t,r){if(!1!==eR(t.enabled,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&e7(e,t)}return!1}function e9(e,t,r,n){return(e!==t||!1===eR(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&e7(e,r)}function e7(e,t){return!1!==eR(t.enabled,e)&&e.isStaleByTime(eC(t.staleTime,e))}var e8=ec.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),te=()=>ec.useContext(e8);function tt(e,t){return"function"==typeof e?e(...t):!!e}function tr(){}var tn=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},ti=e=>{ec.useEffect(()=>{e.clearReset()},[e])},ts=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&tt(r,[e.error,n]),ta=ec.createContext(!1),to=()=>ec.useContext(ta);ta.Provider;var tu=(e,t)=>void 0===t.state.data,tl=e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},tc=(e,t)=>e.isLoading&&e.isFetching&&!t,th=(e,t)=>e?.suspense&&t.isPending,tf=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function td(e,t,r){let n=ed(r),i=to(),s=te(),a=n.defaultQueryOptions(e);n.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",tl(a),tn(a,s),ti(s);let o=!n.getQueryCache().get(a.queryHash),[u]=ec.useState(()=>new t(n,a)),l=u.getOptimisticResult(a);if(ec.useSyncExternalStore(ec.useCallback(e=>{let t=i?()=>void 0:u.subscribe(eB.batchCalls(e));return u.updateResult(),t},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),ec.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),th(a,l))throw tf(a,u,s);if(ts({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:n.getQueryCache().get(a.queryHash)}))throw l.error;if(n.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!ew&&tc(l,i)){let e=o?tf(a,u,s):n.getQueryCache().get(a.queryHash)?.promise;e?.catch(tr).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?l:u.trackResult(l)}var tp=class extends e1{#M;#A;#u;constructor(e){super(),this.mutationId=e.mutationId,this.#A=e.mutationCache,this.#M=[],this.state=e.state||ty(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#M.includes(e)||(this.#M.push(e),this.clearGcTimeout(),this.#A.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#M=this.#M.filter(t=>t!==e),this.scheduleGc(),this.#A.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#M.length||("pending"===this.state.status?this.scheduleGc():this.#A.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(e){this.#u=e0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#A.canRun(this)});let t="pending"===this.state.status,r=!this.#u.canStart();try{if(!t){this.#h({type:"pending",variables:e,isPaused:r}),await this.#A.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#h({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#u.start();return await this.#A.config.onSuccess?.(n,e,this.state.context,this),await this.options.onSuccess?.(n,e,this.state.context),await this.#A.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,e,this.state.context),this.#h({type:"success",data:n}),n}catch(t){try{throw await this.#A.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#A.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#h({type:"error",error:t})}}finally{this.#A.runNext(this)}}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),eB.batch(()=>{this.#M.forEach(t=>{t.onMutationUpdate(e)}),this.#A.notify({mutation:this,type:"updated",action:e})})}};function ty(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tm=class extends e${#f;#g=void 0;#F;#U;constructor(e,t){super(),this.#f=e,this.setOptions(t),this.bindMethods(),this.#N()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#f.defaultMutationOptions(e),ek(this.options,t)||this.#f.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#F,observer:this}),t?.mutationKey&&this.options.mutationKey&&eQ(t.mutationKey)!==eQ(this.options.mutationKey)?this.reset():this.#F?.state.status==="pending"&&this.#F.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#F?.removeObserver(this)}onMutationUpdate(e){this.#N(),this.#_(e)}getCurrentResult(){return this.#g}reset(){this.#F?.removeObserver(this),this.#F=void 0,this.#N(),this.#_()}mutate(e,t){return this.#U=t,this.#F?.removeObserver(this),this.#F=this.#f.getMutationCache().build(this.#f,this.options),this.#F.addObserver(this),this.#F.execute(e)}#N(){let e=this.#F?.state??ty();this.#g={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#_(e){eB.batch(()=>{if(this.#U&&this.hasListeners()){let t=this.#g.variables,r=this.#g.context;e?.type==="success"?(this.#U.onSuccess?.(e.data,t,r),this.#U.onSettled?.(e.data,null,t,r)):e?.type==="error"&&(this.#U.onError?.(e.error,t,r),this.#U.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#g)})})}};function tg(e){return{onFetch:(t,r)=>{let n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},u=0,l=async()=>{let r=!1,l=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},c=eN(t.options,t.fetchOptions),h=async(e,n,i)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let s={queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};l(s);let a=await c(s),{maxPages:o}=t.options,u=i?eF:eA;return{pages:u(e.pages,a,o),pageParams:u(e.pageParams,n,o)}};if(i&&s.length){let e="backward"===i,t={pages:s,pageParams:a},r=(e?tv:tb)(n,t);o=await h(t,r,e)}else{let t=e??s.length;do{let e=0===u?a[0]??n.initialPageParam:tb(n,o);if(u>0&&null==e)break;o=await h(o,e),u++}while(u<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=l}}}function tb(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function tv(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var tw=class extends e4{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:tg()},t)}getOptimisticResult(e){return e.behavior=tg(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var r,n;let{state:i}=e,s=super.createResult(e,t),{isFetching:a,isRefetching:o,isError:u,isRefetchError:l}=s,c=i.fetchMeta?.fetchMore?.direction,h=u&&"forward"===c,f=a&&"forward"===c,d=u&&"backward"===c,p=a&&"backward"===c;return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:!!(r=i.data)&&null!=tb(t,r),hasPreviousPage:!!(n=i.data)&&!!t.getPreviousPageParam&&null!=tv(t,n),isFetchNextPageError:h,isFetchingNextPage:f,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:l&&!h&&!d,isRefetching:o&&!f&&!p}}};function tO(e,t){return e.filter(e=>!t.includes(e))}var tx=class extends e${#f;#L;#z;#K;#M;#H;#$;#V;constructor(e,t,r){super(),this.#f=e,this.#K=r,this.#z=[],this.#M=[],this.#L=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#M.forEach(e=>{e.subscribe(t=>{this.#B(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#M.forEach(e=>{e.destroy()})}setQueries(e,t,r){this.#z=e,this.#K=t,eB.batch(()=>{let e=this.#M,t=this.#G(this.#z);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions,r));let n=t.map(e=>e.observer),i=n.map(e=>e.getCurrentResult()),s=n.some((t,r)=>t!==e[r]);(e.length!==n.length||s)&&(this.#M=n,this.#L=i,this.hasListeners()&&(tO(e,n).forEach(e=>{e.destroy()}),tO(n,e).forEach(e=>{e.subscribe(t=>{this.#B(e,t)})}),this.#_()))})}getCurrentResult(){return this.#L}getQueries(){return this.#M.map(e=>e.getCurrentQuery())}getObservers(){return this.#M}getOptimisticResult(e,t){let r=this.#G(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[n,e=>this.#W(e??n,t),()=>r.map((e,t)=>{let i=n[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,e=>{r.forEach(t=>{t.observer.trackProp(e)})})})]}#W(e,t){return t?(this.#H&&this.#L===this.#V&&t===this.#$||(this.#$=t,this.#V=this.#L,this.#H=eI(this.#H,t(e))),this.#H):e}#G(e){let t=new Map(this.#M.map(e=>[e.options.queryHash,e])),r=[];return e.forEach(e=>{let n=this.#f.defaultQueryOptions(e),i=t.get(n.queryHash);if(i)r.push({defaultedQueryOptions:n,observer:i});else{let e=this.#M.find(e=>e.options.queryHash===n.queryHash);r.push({defaultedQueryOptions:n,observer:e??new e4(this.#f,n)})}}),r.sort((t,r)=>e.findIndex(e=>e.queryHash===t.defaultedQueryOptions.queryHash)-e.findIndex(e=>e.queryHash===r.defaultedQueryOptions.queryHash))}#B(e,t){let r=this.#M.indexOf(e);-1!==r&&(this.#L=function(e,t,r){let n=e.slice(0);return n[t]=r,n}(this.#L,r,t),this.#_())}#_(){this.hasListeners()&&this.#H!==this.#W(this.#L,this.#K?.combine)&&eB.batch(()=>{this.listeners.forEach(e=>{e(this.#L)})})}};function tE({queries:e,...t},r){let n=ed(r),i=to(),s=te(),a=ec.useMemo(()=>e.map(e=>{let t=n.defaultQueryOptions(e);return t._optimisticResults=i?"isRestoring":"optimistic",t}),[e,n,i]);a.forEach(e=>{tl(e),tn(e,s)}),ti(s);let[o]=ec.useState(()=>new tx(n,a,t)),[u,l,c]=o.getOptimisticResult(a,t.combine);ec.useSyncExternalStore(ec.useCallback(e=>i?()=>void 0:o.subscribe(eB.batchCalls(e)),[o,i]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),ec.useEffect(()=>{o.setQueries(a,t,{listeners:!1})},[a,t,o]);let h=u.some((e,t)=>th(a[t],e))?u.flatMap((e,t)=>{let r=a[t];if(r){let t=new e4(n,r);if(th(r,e))return tf(r,t,s);tc(e,i)&&tf(r,t,s)}return[]}):[];if(h.length>0)throw Promise.all(h);let f=u.find((e,t)=>{let r=a[t];return r&&ts({result:e,errorResetBoundary:s,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash)})});if(f?.error)throw f.error;return l(c())}function tC(e,t,r){let n=e[0],i=e[1]?.input;return r&&(i={...i??{},...r.pageParam?{cursor:r.pageParam}:{},direction:r.direction}),[n.join("."),i,t?.trpc]}function tR(e){return{path:e.path.join(".")}}function tP(e){let t=tR(e);return ec.useMemo(()=>t,[t])}async function tS(e,t,r){let n=t.getQueryCache().build(t,{queryKey:r});n.setState({data:[],status:"success"});let i=[];for await(let t of e)i.push(t),n.setState({data:[...i]});return i}let tq=(e,t)=>new Proxy(e,{get:(e,r)=>(t(r),e[r])});function tQ(e){let t=e?.overrides?.useMutation?.onSuccess??(e=>e.originalFn()),r=e?.context??ev;function n(){let e=ec.useContext(r);if(!e)throw Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return e}function i(e,t){let{queryClient:r,ssrState:i}=n();return i&&"mounted"!==i&&r.getQueryCache().find({queryKey:e})?.state.status==="error"?{retryOnMount:!1,...t}:t}return{Provider:e=>{let{abortOnUnmount:t=!1,client:n,queryClient:i,ssrContext:s}=e,[a,o]=ec.useState(e.ssrState??!1),u=ec.useMemo(()=>(function(e){let{client:t,queryClient:r}=e,n=t instanceof N?t:t.__untypedClient;return{infiniteQueryOptions:(e,t,r)=>{let i=t[1]?.input===eU,s=async e=>{let i={...r,trpc:{...r?.trpc,...r?.trpc?.abortOnUnmount?{signal:e.signal}:{signal:null}}};return await n.query(...tC(t,i,{direction:e.direction,pageParam:e.pageParam}))};return Object.assign({...r,initialData:r?.initialData,queryKey:t,queryFn:i?eU:s,initialPageParam:r?.initialCursor??null},{trpc:tR({path:e})})},queryOptions:(e,t,i)=>{let s=t[1]?.input===eU,a=async e=>{let s={...i,trpc:{...i?.trpc,...i?.trpc?.abortOnUnmount?{signal:e.signal}:{signal:null}}},a=await n.query(...tC(t,s));return m(a)?tS(a,r,t):a};return Object.assign({...i,initialData:i?.initialData,queryKey:t,queryFn:s?eU:a},{trpc:tR({path:e})})},fetchQuery:(e,t)=>r.fetchQuery({...t,queryKey:e,queryFn:()=>n.query(...tC(e,t))}),fetchInfiniteQuery:(e,t)=>r.fetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:i})=>n.query(...tC(e,t,{pageParam:r,direction:i})),initialPageParam:t?.initialCursor??null}),prefetchQuery:(e,t)=>r.prefetchQuery({...t,queryKey:e,queryFn:()=>n.query(...tC(e,t))}),prefetchInfiniteQuery:(e,t)=>r.prefetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:i})=>n.query(...tC(e,t,{pageParam:r,direction:i})),initialPageParam:t?.initialCursor??null}),ensureQueryData:(e,t)=>r.ensureQueryData({...t,queryKey:e,queryFn:()=>n.query(...tC(e,t))}),invalidateQueries:(e,t,n)=>r.invalidateQueries({...t,queryKey:e},n),resetQueries:(e,t,n)=>r.resetQueries({...t,queryKey:e},n),refetchQueries:(e,t,n)=>r.refetchQueries({...t,queryKey:e},n),cancelQuery:(e,t)=>r.cancelQueries({queryKey:e},t),setQueryData:(e,t,n)=>r.setQueryData(e,t,n),setQueriesData:(e,t,n,i)=>r.setQueriesData({...t,queryKey:e},n,i),getQueryData:e=>r.getQueryData(e),setInfiniteQueryData:(e,t,n)=>r.setQueryData(e,t,n),getInfiniteQueryData:e=>r.getQueryData(e),setMutationDefaults:(t,i)=>{let s=t[0];return r.setMutationDefaults(t,"function"==typeof i?i({canonicalMutationFn:t=>n.mutation(...tC([s,{input:t}],e))}):i)},getMutationDefaults:e=>r.getMutationDefaults(e),isMutating:e=>r.isMutating({...e,exact:!0})}})({client:n,queryClient:i}),[n,i]),l=ec.useMemo(()=>({abortOnUnmount:t,queryClient:i,client:n,ssrContext:s??null,ssrState:a,...u}),[t,n,u,i,s,a]);return ec.useEffect(()=>{o(e=>!!e&&"mounted")},[]),ec.createElement(r.Provider,{value:l},e.children)},createClient:e=>new N(e),useContext:n,useUtils:n,useQuery:function(t,r,s){let{abortOnUnmount:a,client:o,ssrState:u,queryClient:l,prefetchQuery:c}=n(),h=eL(t,r,"query"),f=l.getQueryDefaults(h),d=r===eU;"undefined"!=typeof window||"prepass"!==u||s?.trpc?.ssr===!1||(s?.enabled??f?.enabled)===!1||d||l.getQueryCache().find({queryKey:h})||c(h,s);let p=i(h,{...f,...s}),y=s?.trpc?.abortOnUnmount??e?.abortOnUnmount??a,g=td({...p,queryKey:h,queryFn:d?r:async e=>{let t={...p,trpc:{...p?.trpc,...y?{signal:e.signal}:{signal:null}}},r=await o.query(...tC(h,t));return m(r)?tS(r,l,h):r}},e4,l);return g.trpc=tP({path:t}),g},usePrefetchQuery:function(t,r,i){let s=n(),a=eL(t,r,"query"),o=r===eU,u=i?.trpc?.abortOnUnmount??e?.abortOnUnmount??s.abortOnUnmount;!function(e,t){let r=ed(void 0);r.getQueryState(e.queryKey)||r.prefetchQuery(e)}({...i,queryKey:a,queryFn:o?r:e=>{let t={trpc:{...i?.trpc,...u?{signal:e.signal}:{}}};return s.client.query(...tC(a,t))}})},useSuspenseQuery:function(t,r,i){var s,a;let o=n(),u=eL(t,r,"query"),l=i?.trpc?.abortOnUnmount??e?.abortOnUnmount??o.abortOnUnmount,c=(s={...i,queryKey:u,queryFn:e=>{let t={...i,trpc:{...i?.trpc,...l?{signal:e.signal}:{signal:null}}};return o.client.query(...tC(u,t))}},a=o.queryClient,td({...s,enabled:!0,suspense:!0,throwOnError:tu,placeholderData:void 0},e4,a));return c.trpc=tP({path:t}),[c.data,c]},useQueries:e=>{let{ssrState:t,queryClient:r,prefetchQuery:i,client:s}=n(),a=e(eH(s));if("undefined"==typeof window&&"prepass"===t)for(let e of a)e.trpc?.ssr===!1||r.getQueryCache().find({queryKey:e.queryKey})||i(e.queryKey,e);return tE({queries:a.map(e=>({...e,queryKey:e.queryKey}))},r)},useSuspenseQueries:e=>{var t;let{queryClient:r,client:i}=n(),s=tE({...t={queries:e(eH(i)).map(e=>({...e,queryFn:e.queryFn,queryKey:e.queryKey}))},queries:t.queries.map(e=>({...e,suspense:!0,throwOnError:tu,enabled:!0,placeholderData:void 0}))},r);return[s.map(e=>e.data),s]},useMutation:function(e,r){let{client:i,queryClient:s}=n(),a=ez(e),o=s.defaultMutationOptions(s.getMutationDefaults(a)),u=function(e,t){let r=ed(t),[n]=ec.useState(()=>new tm(r,e));ec.useEffect(()=>{n.setOptions(e)},[n,e]);let i=ec.useSyncExternalStore(ec.useCallback(e=>n.subscribe(eB.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),s=ec.useCallback((e,t)=>{n.mutate(e,t).catch(tr)},[n]);if(i.error&&tt(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}({...r,mutationKey:a,mutationFn:t=>i.mutation(...tC([e,{input:t}],r)),onSuccess:(...e)=>t({originalFn:()=>r?.onSuccess?.(...e)??o?.onSuccess?.(...e),queryClient:s,meta:r?.meta??o?.meta??{}})},s);return u.trpc=tP({path:e}),u},useSubscription:function(e,t,r){let i=r?.enabled??t!==eU,s=eQ(eL(e,t,"any")),{client:a}=n(),o=ec.useRef(r);o.current=r;let u=ec.useRef(new Set([])),l=ec.useCallback(e=>{u.current.add(e)},[]),c=ec.useRef(),h=ec.useCallback(()=>{if(c.current?.(),m(f),!i)return;let r=!1,n=a.subscription(e.join("."),t??void 0,{onStarted:()=>{r||(o.current.onStarted?.(),m(e=>({...e,status:"pending",error:null})))},onData:e=>{r||(o.current.onData?.(e),m(t=>({...t,status:"pending",data:e,error:null})))},onError:e=>{r||(o.current.onError?.(e),m(t=>({...t,status:"error",error:e})))},onConnectionStateChange:e=>{let t={status:e.state,error:e.error};m(e=>({...e,...t}))}});c.current=()=>{r=!0,n.unsubscribe()}},[s,i]),f=ec.useCallback(()=>i?{data:void 0,error:null,status:"connecting",reset:h}:{data:void 0,error:null,status:"idle",reset:h},[i,h]),d=ec.useRef(f()),[p,y]=ec.useState(tq(d.current,l));p.reset=h;let m=ec.useCallback(e=>{let t=d.current,r=d.current=e(t),n=!1;for(let e of u.current)if(t[e]!==r[e]){n=!0;break}n&&y(tq(r,l))},[l]);return ec.useEffect(()=>{if(i)return h(),()=>{c.current?.()}},[h,i]),p},useInfiniteQuery:function(e,t,r){let{client:s,ssrState:a,prefetchInfiniteQuery:o,queryClient:u,abortOnUnmount:l}=n(),c=eL(e,t,"infinite"),h=u.getQueryDefaults(c),f=t===eU;"undefined"!=typeof window||"prepass"!==a||r?.trpc?.ssr===!1||(r?.enabled??h?.enabled)===!1||f||u.getQueryCache().find({queryKey:c})||o(c,{...h,...r});let d=i(c,{...h,...r}),p=r?.trpc?.abortOnUnmount??l,y=td({...d,initialPageParam:r.initialCursor??null,persister:r.persister,queryKey:c,queryFn:f?t:e=>{let t={...d,trpc:{...d?.trpc,...p?{signal:e.signal}:{signal:null}}};return s.query(...tC(c,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},tw,u);return y.trpc=tP({path:e}),y},usePrefetchInfiniteQuery:function(e,t,r){let s=n(),a=eL(e,t,"infinite"),o=s.queryClient.getQueryDefaults(a),u=t===eU,l=i(a,{...o,...r}),c=r?.trpc?.abortOnUnmount??s.abortOnUnmount;!function(e,t){let r=ed(void 0);r.getQueryState(e.queryKey)||r.prefetchInfiniteQuery(e)}({...r,initialPageParam:r.initialCursor??null,queryKey:a,queryFn:u?t:e=>{let t={...l,trpc:{...l?.trpc,...c?{signal:e.signal}:{}}};return s.client.query(...tC(a,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}})},useSuspenseInfiniteQuery:function(e,t,r){var s,a;let o=n(),u=eL(e,t,"infinite"),l=o.queryClient.getQueryDefaults(u),c=i(u,{...l,...r}),h=r?.trpc?.abortOnUnmount??o.abortOnUnmount,f=(s={...r,initialPageParam:r.initialCursor??null,queryKey:u,queryFn:e=>{let t={...c,trpc:{...c?.trpc,...h?{signal:e.signal}:{}}};return o.client.query(...tC(u,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},a=o.queryClient,td({...s,enabled:!0,suspense:!0,throwOnError:tu},tw,a));return f.trpc=tP({path:e}),[f.data,f]}}}var tj=class extends e${constructor(e={}){super(),this.config=e,this.#z=new Map}#z;build(e,t,r){let n=t.queryKey,i=t.queryHash??eq(n,t),s=this.get(i);return s||(s=new e2({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(s)),s}add(e){this.#z.has(e.queryHash)||(this.#z.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#z.get(e.queryHash);t&&(e.destroy(),t===e&&this.#z.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){eB.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#z.get(e)}getAll(){return[...this.#z.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>eP(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>eP(e,t)):t}notify(e){eB.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){eB.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){eB.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},tI=class extends e${constructor(e={}){super(),this.config=e,this.#J=new Map,this.#Y=Date.now()}#J;#Y;build(e,t,r){let n=new tp({mutationCache:this,mutationId:++this.#Y,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){let t=tk(e),r=this.#J.get(t)??[];r.push(e),this.#J.set(t,r),this.notify({type:"added",mutation:e})}remove(e){let t=tk(e);if(this.#J.has(t)){let r=this.#J.get(t)?.filter(t=>t!==e);r&&(0===r.length?this.#J.delete(t):this.#J.set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){let t=this.#J.get(tk(e))?.find(e=>"pending"===e.state.status);return!t||t===e}runNext(e){let t=this.#J.get(tk(e))?.find(t=>t!==e&&t.state.isPaused);return t?.continue()??Promise.resolve()}clear(){eB.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#J.values()].flat()}find(e){let t={exact:!0,...e};return this.getAll().find(e=>eS(t,e))}findAll(e={}){return this.getAll().filter(t=>eS(e,t))}notify(e){eB.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return eB.batch(()=>Promise.all(e.map(e=>e.continue().catch(eO))))}};function tk(e){return e.options.scope?.id??String(e.mutationId)}var tT=class{#Z;#A;#l;#X;#ee;#et;#er;#en;constructor(e={}){this.#Z=e.queryCache||new tj,this.#A=e.mutationCache||new tI,this.#l=e.defaultOptions||{},this.#X=new Map,this.#ee=new Map,this.#et=0}mount(){this.#et++,1===this.#et&&(this.#er=eV.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Z.onFocus())}),this.#en=eG.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Z.onOnline())}))}unmount(){this.#et--,0===this.#et&&(this.#er?.(),this.#er=void 0,this.#en?.(),this.#en=void 0)}isFetching(e){return this.#Z.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#A.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#Z.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{let r=this.defaultQueryOptions(e),n=this.#Z.build(this,r);return e.revalidateIfStale&&n.isStaleByTime(eC(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return this.#Z.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=this.#Z.get(n.queryHash),s=i?.state.data,a="function"==typeof t?t(s):t;if(void 0!==a)return this.#Z.build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return eB.batch(()=>this.#Z.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#Z.get(t.queryHash)?.state}removeQueries(e){let t=this.#Z;eB.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#Z,n={type:"active",...e};return eB.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){let r={revert:!0,...t};return Promise.all(eB.batch(()=>this.#Z.findAll(e).map(e=>e.cancel(r)))).then(eO).catch(eO)}invalidateQueries(e={},t={}){return eB.batch(()=>{if(this.#Z.findAll(e).forEach(e=>{e.invalidate()}),"none"===e.refetchType)return Promise.resolve();let r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){let r={...t,cancelRefetch:t?.cancelRefetch??!0};return Promise.all(eB.batch(()=>this.#Z.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(eO)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(eO)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#Z.build(this,t);return r.isStaleByTime(eC(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(eO).catch(eO)}fetchInfiniteQuery(e){return e.behavior=tg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(eO).catch(eO)}ensureInfiniteQueryData(e){return e.behavior=tg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eG.isOnline()?this.#A.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#Z}getMutationCache(){return this.#A}getDefaultOptions(){return this.#l}setDefaultOptions(e){this.#l=e}setQueryDefaults(e,t){this.#X.set(eQ(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#X.values()],r={};return t.forEach(t=>{ej(e,t.queryKey)&&(r={...r,...t.defaultOptions})}),r}setMutationDefaults(e,t){this.#ee.set(eQ(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#ee.values()],r={};return t.forEach(t=>{ej(e,t.mutationKey)&&(r={...r,...t.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#l.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=eq(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===eU&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#l.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#Z.clear(),this.#A.clear()}};let tD=e=>e.queryClient??new tT(e.queryClientConfig);class t_{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class tM{constructor(e){this.generateIdentifier=e,this.kv=new t_}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}}class tA extends tM{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){"object"==typeof t?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}}function tF(e,t){Object.entries(e).forEach(([e,r])=>t(r,e))}function tU(e,t){return -1!==e.indexOf(t)}function tN(e,t){for(let r=0;r<e.length;r++){let n=e[r];if(t(n))return n}}class tL{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return function(e,t){let r=function(e){if("values"in Object)return Object.values(e);let t=[];for(let r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}(e);if("find"in r)return r.find(t);for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}}let tz=e=>Object.prototype.toString.call(e).slice(8,-1),tK=e=>void 0===e,tH=e=>null===e,t$=e=>"object"==typeof e&&null!==e&&e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype),tV=e=>t$(e)&&0===Object.keys(e).length,tB=e=>Array.isArray(e),tG=e=>"string"==typeof e,tW=e=>"number"==typeof e&&!isNaN(e),tJ=e=>"boolean"==typeof e,tY=e=>e instanceof Map,tZ=e=>e instanceof Set,tX=e=>"Symbol"===tz(e),t0=e=>"number"==typeof e&&isNaN(e),t1=e=>tJ(e)||tH(e)||tK(e)||tW(e)||tG(e)||tX(e),t2=e=>e===1/0||e===-1/0,t3=e=>e.replace(/\./g,"\\."),t4=e=>e.map(String).map(t3).join("."),t5=e=>{let t=[],r="";for(let n=0;n<e.length;n++){let i=e.charAt(n);if("\\"===i&&"."===e.charAt(n+1)){r+=".",n++;continue}if("."===i){t.push(r),r="";continue}r+=i}let n=r;return t.push(n),t};function t6(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}let t9=[t6(tK,"undefined",()=>null,()=>void 0),t6(e=>"bigint"==typeof e,"bigint",e=>e.toString(),e=>"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),t6(e=>e instanceof Date&&!isNaN(e.valueOf()),"Date",e=>e.toISOString(),e=>new Date(e)),t6(e=>e instanceof Error,"Error",(e,t)=>{let r={name:e.name,message:e.message};return t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r},(e,t)=>{let r=Error(e.message);return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r}),t6(e=>e instanceof RegExp,"regexp",e=>""+e,e=>new RegExp(e.slice(1,e.lastIndexOf("/")),e.slice(e.lastIndexOf("/")+1))),t6(tZ,"set",e=>[...e.values()],e=>new Set(e)),t6(tY,"map",e=>[...e.entries()],e=>new Map(e)),t6(e=>t0(e)||t2(e),"number",e=>t0(e)?"NaN":e>0?"Infinity":"-Infinity",Number),t6(e=>0===e&&1/e==-1/0,"number",()=>"-0",Number),t6(e=>e instanceof URL,"URL",e=>e.toString(),e=>new URL(e))];function t7(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}let t8=t7((e,t)=>!!tX(e)&&!!t.symbolRegistry.getIdentifier(e),(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{let n=r.symbolRegistry.getValue(t[1]);if(!n)throw Error("Trying to deserialize unknown symbol");return n}),re=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),rt=t7(e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{let r=re[t[1]];if(!r)throw Error("Trying to deserialize unknown typed array");return new r(e)});function rr(e,t){return!!e?.constructor&&!!t.classRegistry.getIdentifier(e.constructor)}let rn=t7(rr,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};let n={};return r.forEach(t=>{n[t]=e[t]}),n},(e,t,r)=>{let n=r.classRegistry.getValue(t[1]);if(!n)throw Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(n.prototype),e)}),ri=t7((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{let n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),rs=[rn,t8,ri,rt],ra=(e,t)=>{let r=tN(rs,r=>r.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};let n=tN(t9,r=>r.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation}},ro={};t9.forEach(e=>{ro[e.annotation]=e});let ru=(e,t,r)=>{if(tB(t))switch(t[0]){case"symbol":return t8.untransform(e,t,r);case"class":return rn.untransform(e,t,r);case"custom":return ri.untransform(e,t,r);case"typed-array":return rt.untransform(e,t,r);default:throw Error("Unknown transformation: "+t)}else{let n=ro[t];if(!n)throw Error("Unknown transformation: "+t);return n.untransform(e,r)}},rl=(e,t)=>{let r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function rc(e){if(tU(e,"__proto__"))throw Error("__proto__ is not allowed as a property");if(tU(e,"prototype"))throw Error("prototype is not allowed as a property");if(tU(e,"constructor"))throw Error("constructor is not allowed as a property")}let rh=(e,t)=>{rc(t);for(let r=0;r<t.length;r++){let n=t[r];if(tZ(e))e=rl(e,+n);else if(tY(e)){let i=+n,s=0==+t[++r]?"key":"value",a=rl(e,i);switch(s){case"key":e=a;break;case"value":e=e.get(a)}}else e=e[n]}return e},rf=(e,t,r)=>{if(rc(t),0===t.length)return r(e);let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(tB(n))n=n[+r];else if(t$(n))n=n[r];else if(tZ(n))n=rl(n,+r);else if(tY(n)){if(e===t.length-2)break;let i=+r,s=0==+t[++e]?"key":"value",a=rl(n,i);switch(s){case"key":n=a;break;case"value":n=n.get(a)}}}let i=t[t.length-1];if(tB(n)?n[+i]=r(n[+i]):t$(n)&&(n[i]=r(n[i])),tZ(n)){let e=rl(n,+i),t=r(e);e!==t&&(n.delete(e),n.add(t))}if(tY(n)){let e=rl(n,+t[t.length-2]);switch(0==+i?"key":"value"){case"key":{let t=r(e);n.set(t,n.get(e)),t!==e&&n.delete(e);break}case"value":n.set(e,r(n.get(e)))}}return e},rd=(e,t)=>t$(e)||tB(e)||tY(e)||tZ(e)||rr(e,t),rp=(e,t,r,n,i=[],s=[],a=new Map)=>{let o=t1(e);if(!o){!function(e,t,r){let n=r.get(e);n?n.push(t):r.set(e,[t])}(e,i,t);let r=a.get(e);if(r)return n?{transformedValue:null}:r}if(!rd(e,r)){let t=ra(e,r),n=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return o||a.set(e,n),n}if(tU(s,e))return{transformedValue:null};let u=ra(e,r),l=u?.value??e,c=tB(l)?[]:{},h={};tF(l,(o,u)=>{if("__proto__"===u||"constructor"===u||"prototype"===u)throw Error(`Detected property ${u}. This is a prototype pollution risk, please remove it from your object.`);let l=rp(o,t,r,n,[...i,u],[...s,e],a);c[u]=l.transformedValue,tB(l.annotations)?h[u]=l.annotations:t$(l.annotations)&&tF(l.annotations,(e,t)=>{h[t3(u)+"."+t]=e})});let f=tV(h)?{transformedValue:c,annotations:u?[u.type]:void 0}:{transformedValue:c,annotations:u?[u.type,h]:h};return o||a.set(e,f),f};function ry(e){return Object.prototype.toString.call(e).slice(8,-1)}function rm(e){return"Array"===ry(e)}eu=function(e){return"Null"===ry(e)},el=function(e){return"Undefined"===ry(e)},e=>eu(e)||el(e)||!1;class rg{constructor({dedupe:e=!1}={}){this.classRegistry=new tA,this.symbolRegistry=new tM(e=>e.description??""),this.customTransformerRegistry=new tL,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,r=rp(e,t,this,this.dedupe),n={json:r.transformedValue};r.annotations&&(n.meta={...n.meta,values:r.annotations});let i=function(e,t){let r;let n={};return(e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...s]=e;0===i.length?r=s.map(t4):n[t4(i)]=s.map(t4)}),r)?tV(n)?[r]:[r,n]:tV(n)?void 0:n}(t,this.dedupe);return i&&(n.meta={...n.meta,referentialEqualities:i}),n}deserialize(e){let{json:t,meta:r}=e,n=function e(t,r={}){return rm(t)?t.map(t=>e(t,r)):!function(e){if("Object"!==ry(e))return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(t)?t:[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)].reduce((n,i)=>{if(rm(r.props)&&!r.props.includes(i))return n;let s=e(t[i],r);return!function(e,t,r,n,i){let s=({}).propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===s&&(e[t]=r),i&&"nonenumerable"===s&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}(n,i,s,t,r.nonenumerable),n},{})}(t);if(r?.values){var i,s,a;i=n,s=r.values,a=this,function e(t,r,n=[]){if(!t)return;if(!tB(t)){tF(t,(t,i)=>e(t,r,[...n,...t5(i)]));return}let[i,s]=t;s&&tF(s,(t,i)=>{e(t,r,[...n,...t5(i)])}),r(i,n)}(s,(e,t)=>{i=rf(i,t,t=>ru(t,e,a))}),n=i}return r?.referentialEqualities&&(n=function(e,t){function r(t,r){let n=rh(e,t5(r));t.map(t5).forEach(t=>{e=rf(e,t,()=>n)})}if(tB(t)){let[n,i]=t;n.forEach(t=>{e=rf(e,t5(t),()=>e)}),i&&tF(i,r)}else tF(t,r);return e}(n,r.referentialEqualities)),n}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}}rg.defaultInstance=new rg,rg.serialize=rg.defaultInstance.serialize.bind(rg.defaultInstance),rg.deserialize=rg.defaultInstance.deserialize.bind(rg.defaultInstance),rg.stringify=rg.defaultInstance.stringify.bind(rg.defaultInstance),rg.parse=rg.defaultInstance.parse.bind(rg.defaultInstance),rg.registerClass=rg.defaultInstance.registerClass.bind(rg.defaultInstance),rg.registerSymbol=rg.defaultInstance.registerSymbol.bind(rg.defaultInstance),rg.registerCustom=rg.defaultInstance.registerCustom.bind(rg.defaultInstance),rg.allowErrorProps=rg.defaultInstance.allowErrorProps.bind(rg.defaultInstance),rg.serialize,rg.deserialize,rg.stringify,rg.parse,rg.registerClass,rg.registerCustom,rg.registerSymbol,rg.allowErrorProps,r(3656);let rb=()=>"",rv=function(e){let t=tQ(e),r=function(e){let{config:t}=e,r=V(e.transformer);return n=>{let i=tQ(e),s=s=>{let[a]=(0,ec.useState)(()=>{if(s.trpc)return s.trpc;let r=t({}),n=tD(r),a=i.createClient(r);return{abortOnUnmount:r.abortOnUnmount,queryClient:n,trpcClient:a,ssrState:!!e.ssr&&"mounting",ssrContext:null}}),{queryClient:o,trpcClient:u,ssrState:l,ssrContext:c}=a,h=s.pageProps?.trpcState,f=ec.useMemo(()=>h?r.input.deserialize(h):h,[h,u]);return ec.createElement(i.Provider,{abortOnUnmount:a.abortOnUnmount??!1,client:u,queryClient:o,ssrState:l,ssrContext:c},ec.createElement(ep,{client:o},ec.createElement(eg,{state:f},ec.createElement(n,s))))};e.ssr?e.ssrPrepass({parent:e,AppOrPage:n,WithTRPC:s}):n.getInitialProps&&(s.getInitialProps=async e=>{let t;let r=!!e.Component,i={},s=await n.getInitialProps(e);return t=i={...r?s.pageProps??{}:s,...i},r?{pageProps:t}:t});let a=n.displayName??n.name??"Component";return s.displayName=`withTRPC(${a})`,s}}(e),n=c(({path:e,args:r})=>{let n=[...e],i=n.pop();if("useMutation"===i)return t[i](n,...r);if("_def"===i)return{path:n};let[s,...a]=r,o=a[0]||{};return t[i](n,s,o)});return h(e=>"useContext"===e||"useUtils"===e?()=>{let e=t.useUtils();return(0,ec.useMemo)(()=>(function(e){let t=function(e){let t=c(({path:t,args:r})=>{let n=[...t],i=z(n.pop()),s=n.join(".");return e[i](s,...r)});return h(r=>e.hasOwnProperty(r)?e[r]:"__untypedClient"===r?e:t[r])}(e.client),r=c(t=>{let r=[...t.path],n=r.pop(),i=[...t.args],s=i.shift(),a=eL(r,s,eK(n));return({infiniteQueryOptions:()=>e.infiniteQueryOptions(r,a,i[0]),queryOptions:()=>e.queryOptions(r,a,...i),fetch:()=>e.fetchQuery(a,...i),fetchInfinite:()=>e.fetchInfiniteQuery(a,i[0]),prefetch:()=>e.prefetchQuery(a,...i),prefetchInfinite:()=>e.prefetchInfiniteQuery(a,i[0]),ensureData:()=>e.ensureQueryData(a,...i),invalidate:()=>e.invalidateQueries(a,...i),reset:()=>e.resetQueries(a,...i),refetch:()=>e.refetchQueries(a,...i),cancel:()=>e.cancelQuery(a,...i),setData:()=>{e.setQueryData(a,i[0],i[1])},setQueriesData:()=>e.setQueriesData(a,i[0],i[1],i[2]),setInfiniteData:()=>{e.setInfiniteQueryData(a,i[0],i[1])},getData:()=>e.getQueryData(a),getInfiniteData:()=>e.getInfiniteQueryData(a),setMutationDefaults:()=>e.setMutationDefaults(ez(r),s),getMutationDefaults:()=>e.getMutationDefaults(ez(r)),isMutating:()=>e.isMutating({mutationKey:ez(r)})})[n]()});return h(n=>"client"===n?t:eb.includes(n)?e[n]:r[n])})(e),[e])}:"useQueries"===e?t.useQueries:"useSuspenseQueries"===e?t.useSuspenseQueries:"withTRPC"===e?r:n[e])}({config:()=>{var e;return{links:[function(e={}){let{enabled:t=()=>!0}=e,r=e.colorMode??("undefined"==typeof window?"ansi":"css"),n=e.withContext??"css"===r,{logger:i=en({c:e.console,colorMode:r,withContext:n})}=e;return()=>({op:e,next:r})=>s(n=>{var a;t({...e,direction:"up"})&&i({...e,direction:"up"});let o=Date.now();function u(r){let n=Date.now()-o;t({...e,direction:"down",result:r})&&i({...e,direction:"down",elapsedMs:n,result:r})}return r(e).pipe((a={next(e){u(e)},error(e){u(e)}},e=>s(t=>e.subscribe({next(e){a.next?.(e),t.next(e)},error(e){a.error?.(e),t.error(e)},complete(){a.complete?.(),t.complete()}})))).subscribe(n)})}({enabled:e=>"down"===e.direction&&e.result instanceof Error}),(e={condition:e=>"subscription"===e.type,true:function(e){let t=V(e.transformer);return()=>({op:r})=>s(n=>{let{type:i,path:a,input:o}=r;if("subscription"!==i)throw Error("httpSubscriptionLink only supports subscriptions");let u=new AbortController,l=function(e){let{deserialize:t=e=>e}=e,r=e.signal,n=null,i=new ReadableStream({async start(i){let[s,a]=await Promise.all([e.url(),e.init()]),o=n=new e.EventSource(s,a);i.enqueue({type:"connecting",eventSource:n,event:null}),o.addEventListener("open",()=>{i.enqueue({type:"opened",eventSource:o})}),o.addEventListener("serialized-error",e=>{i.enqueue({type:"serialized-error",error:t(JSON.parse(e.data)),eventSource:o})}),o.addEventListener("error",e=>{o.readyState===EventSource.CLOSED?i.error(e):i.enqueue({type:"connecting",eventSource:o,event:e})}),o.addEventListener("message",e=>{let r={data:t(JSON.parse(e.data))};e.lastEventId&&(r.id=e.lastEventId),i.enqueue({type:"data",data:r,eventSource:o})});let u=()=>{i.close(),o.close()};r.aborted?u():r.addEventListener("abort",u)},cancel(){n?.close()}});return{[Symbol.asyncIterator](){let e=i.getReader();return{async next(){let t=await e.read();return t.done?{value:void 0,done:!0}:{value:t.value,done:!1}},return:async()=>(e.releaseLock(),{value:void 0,done:!0})}}}}({url:async()=>W({transformer:t,url:await ea(e),input:o,path:a,type:i,signal:null}),init:()=>es(e.eventSourceOptions,{op:r}),signal:function(...e){let t=new AbortController;for(let r of e)r?.aborted?t.abort():r?.addEventListener("abort",()=>t.abort(),{once:!0});return t.signal}(r.signal,u.signal),deserialize:t.output.deserialize,EventSource:e.EventSource??globalThis.EventSource}),c=function(e){let t=e,r=[],n=e=>{void 0!==t&&e.next(t),r.push(e)},i=e=>{r.splice(r.indexOf(e),1)},a=s(e=>(n(e),()=>{i(e)}));return a.next=e=>{if(t!==e)for(let n of(t=e,r))n.next(e)},a.get=()=>t,a}({type:"state",state:"connecting",error:null}),h=c.subscribe({next(e){n.next({result:e})}});return g(async()=>{for await(let e of l)switch(e.type){case"data":let t=e.data,r="id"in t?t:t.data;n.next({result:{data:r},context:{eventSource:e.eventSource}});break;case"opened":n.next({result:{type:"started"},context:{eventSource:e.eventSource}}),c.next({type:"state",state:"pending",error:null});break;case"serialized-error":{let t=U.from({error:e.error});if(eo.includes(e.error.code)){c.next({type:"state",state:"connecting",error:t});break}throw t}case"connecting":{let t=c.get(),r=e.event&&U.from(e.event);if(!r&&"connecting"===t.state)break;c.next({type:"state",state:"connecting",error:r})}}n.next({result:{type:"stopped"}}),n.complete()}).catch(e=>{n.error(U.from(e))}),()=>{n.complete(),u.abort(),h.unsubscribe()}})}({url:"".concat(rb(),"/api/trpc"),transformer:rg}),false:function(e){let t={url:e.url.toString(),fetch:e.fetch,transformer:V(e.transformer),methodOverride:e.methodOverride},r=e.maxURLLength??1/0;return()=>{let n=n=>({validate(e){if(r===1/0)return!0;let i=e.map(e=>e.path).join(","),s=e.map(e=>e.input);return W({...t,type:n,path:i,inputs:s,signal:null}).length<=r},async fetch(r){let i=r.map(e=>e.path).join(","),s=r.map(e=>e.input),a=function(...e){let t=new AbortController,r=e.length,n=0,i=()=>{++n===r&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener("abort",i,{once:!0});return t.signal}(...r.map(e=>e.signal)),o=await Y({...t,path:i,inputs:s,type:n,headers:()=>e.headers?"function"==typeof e.headers?e.headers({opList:r}):e.headers:{},signal:a});return(Array.isArray(o.json)?o.json:r.map(()=>o.json)).map(e=>({meta:o.meta,json:e}))}}),i={query:H(n("query")),mutation:H(n("mutation"))};return({op:e})=>s(r=>{let n;if("subscription"===e.type)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");return i[e.type].load(e).then(e=>{n=e;let i=function(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.deserialize(e.result.data)}}}}(e,t)}catch{throw new E}if(!r.ok&&(!d(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!d(r.result))throw new E;return r}(e.json,t.transformer.output);if(!i.ok){r.error(U.from(i.error,{meta:e.meta}));return}r.next({context:e.meta,result:i.result}),r.complete()}).catch(e=>{r.error(U.from(e,{meta:n?.meta}))}),()=>{}})}}({transformer:rg,url:"".concat(rb(),"/api/trpc")})},t=>{let r=ei(e.true).map(e=>e(t)),n=ei(e.false).map(e=>e(t));return t=>s(i=>{let s=e.condition(t.op)?r:n;return o({op:t.op,links:s}).subscribe(i)})})]}},ssr:!1,transformer:rg})},1952:function(){},6370:function(e,t,r){e.exports=r(3246)},3656:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u=[],l=!1,c=-1;function h(){l&&n&&(l=!1,n.length?u=n.concat(u):c=-1,u.length&&f())}function f(){if(!l){var e=o(h);l=!0;for(var t=u.length;t;){for(n=u,u=[];++c<t;)n&&n[c].run();c=-1,t=u.length}n=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||l||o(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},7829:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(n&&(n+=" "),n+=t);return n}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(5580),t(5470)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{2915:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(821)}])}},function(n){n.O(0,[888,774,179],function(){return n(n.s=2915)}),_N_E=n.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5238:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(9206)}])},9206:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return c},default:function(){return p}});var t=s(1549),r=s(4194),i=s(1578),a=s.n(i),l=s(7406),o=s(7829);function d(e){let{code:n}=e,[s,i]=function(){let[e,n]=(0,r.useState)(null);return[e,(0,r.useCallback)(async e=>{var s;if(!(null===(s=navigator)||void 0===s?void 0:s.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),n(e),!0}catch(e){return console.warn("Copy failed",e),n(null),!1}},[])]}(),[a,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(d){let e=setTimeout(()=>{d(!1)},800);return()=>{clearTimeout(e)}}},[s,a]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{className:(0,o.Z)("absolute right-2 bg-gray-200 hover:bg-gray-300 text-gray-800 font-semibold py-1 px-2 rounded text-sm"),onClick:()=>{i(n),d(!0)},children:a?"Copied!":"Copy"}),(0,t.jsx)(l.y$,{theme:l.np.vsLight,code:n,language:"tsx",children:e=>{let{className:n,style:s,tokens:r,getLineProps:i,getTokenProps:a}=e;return(0,t.jsx)("pre",{style:{...s,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:r.map((e,n)=>(0,t.jsxs)("div",{...i({line:e}),style:{display:"flex"},children:[(0,t.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:n+1}),(0,t.jsx)("span",{children:e.map((e,n)=>(0,t.jsx)("span",{...a({token:e})},n))})]},n))})}})]})}var c=!0;function p(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a(),{children:(0,t.jsx)("title",{children:"rePDF - live previews of PDF templates"})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex h-96 flex-col items-center justify-center text-center",children:[(0,t.jsx)("h1",{className:"mb-4 text-4xl font-bold",children:"rePDF"}),(0,t.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Design, Develop, Deploy and Delight with PDFs"}),(0,t.jsx)("p",{className:"mb-8 max-w-2xl text-lg",children:"The modern way to build PDFs, automatic previews and best practice components to make it easy to go from development to deployment."}),(0,t.jsx)("a",{href:"https://github.com/your-repo",target:"_blank",rel:"noopener noreferrer",children:(0,t.jsx)("button",{type:"button",className:"rounded bg-blue-500 px-4 py-2 text-white transition duration-300 hover:bg-blue-700",children:"Documentation"})})]}),(0,t.jsx)("div",{className:"w-[800px] mx-auto",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:"Creating your first PDF in rePDF"}),(0,t.jsx)("p",{children:" Easy to get started. See documentation for more details"}),(0,t.jsxs)("div",{className:"rounded border",children:[(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("p",{className:"font-bold",children:[(0,t.jsx)("span",{className:"bg-blue-300 rounded-lg p-2",children:"1"})," Basic Template"]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(d,{code:'import { Tailwind, Image, Document } from "@repdf/core";\n\nexport default function WelcomePdf() {\n return (\n <Document>\n <Tailwind>\n <div className="p-4">\n <h1 className="text-4xl font-bold">Welcome To Your First PDF!</h1>\n <p>\n This is a simple PDF template that you can use as a starting point\n for your own PDFs.\n </p>\n </div>\n </Tailwind>\n </Document>\n );\n}'})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("p",{children:"Interesting Things to Note:"}),(0,t.jsx)("ul",{className:"list-disc list-inside space-y-4",children:(0,t.jsxs)("li",{children:["The PDF template is"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"export default function"})]})})]})]}),(0,t.jsxs)("div",{className:"rounded border mt-5",children:[(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("p",{className:"font-bold",children:[(0,t.jsx)("span",{className:"bg-blue-300 rounded-lg p-2",children:"2"})," Add some preview props and pdf settings"]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(d,{code:'import { Tailwind, Image, Document } from "@repdf/core";\nimport type { PdfPreviewSettings } from "@repdf/core";\n\n\ntype WelcomePdfProps = {\n name: string;\n};\n\nexport default function WelcomePdf({ name }: WelcomePdfProps) {\n return (\n <Document>\n <Tailwind>\n <div className="p-4">\n <h1 className="text-4xl font-bold">Welcome To Your First PDF, {name}!</h1>\n <p>\n This is a simple PDF template that you can use as a starting point\n for your own PDFs.\n </p>\n </div>\n </Tailwind>\n </Document>\n );\n}\n\nWelcomePdf.PreviewSettings = {\n pdfSettings: {\n format: "A4",\n },\n previewProps: [\n {\n name: "John",\n },\n {\n name: "Jane",\n },\n ],\n} satisfies PdfPreviewSettings<WelcomePdfProps>;'})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("p",{children:"Interesting:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside space-y-4",children:[(0,t.jsxs)("li",{children:["Preview Settings consist of"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"pdfSettings"})," ","which are passed to html renderer and"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"previewProps"})," ","(and array of preview props) which is data used to preview pdf during development."]}),(0,t.jsxs)("li",{children:["You can make this all typesafe by using"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"satisfies PdfPreviewSettings<YourCustomType>"})]})]})]})]})]})})]})]})}}},function(e){e.O(0,[138,888,774,179],function(){return e(e.s=5238)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{2705:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(2518)}])},2518:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return c},default:function(){return p}});var t=s(1549),r=s(4194),i=s(4695),a=s.n(i),l=s(7406),o=s(7829);function d(e){let{code:n}=e,[s,i]=function(){let[e,n]=(0,r.useState)(null);return[e,(0,r.useCallback)(async e=>{var s;if(!(null===(s=navigator)||void 0===s?void 0:s.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),n(e),!0}catch(e){return console.warn("Copy failed",e),n(null),!1}},[])]}(),[a,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(d){let e=setTimeout(()=>{d(!1)},800);return()=>{clearTimeout(e)}}},[s,a]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{className:(0,o.Z)("absolute right-2 bg-gray-200 hover:bg-gray-300 text-gray-800 font-semibold py-1 px-2 rounded text-sm"),onClick:()=>{i(n),d(!0)},children:a?"Copied!":"Copy"}),(0,t.jsx)(l.y$,{theme:l.np.vsLight,code:n,language:"tsx",children:e=>{let{className:n,style:s,tokens:r,getLineProps:i,getTokenProps:a}=e;return(0,t.jsx)("pre",{style:{...s,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:r.map((e,n)=>(0,t.jsxs)("div",{...i({line:e}),style:{display:"flex"},children:[(0,t.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:n+1}),(0,t.jsx)("span",{children:e.map((e,n)=>(0,t.jsx)("span",{...a({token:e})},n))})]},n))})}})]})}var c=!0;function p(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a(),{children:(0,t.jsx)("title",{children:"rePDF - live previews of PDF templates"})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex h-96 flex-col items-center justify-center text-center",children:[(0,t.jsx)("h1",{className:"mb-4 text-4xl font-bold",children:"rePDF"}),(0,t.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Design, Develop, Deploy and Delight with PDFs"}),(0,t.jsx)("p",{className:"mb-8 max-w-2xl text-lg",children:"The modern way to build PDFs, automatic previews and best practice components to make it easy to go from development to deployment."}),(0,t.jsx)("a",{href:"https://github.com/your-repo",target:"_blank",rel:"noopener noreferrer",children:(0,t.jsx)("button",{type:"button",className:"rounded bg-blue-500 px-4 py-2 text-white transition duration-300 hover:bg-blue-700",children:"Documentation"})})]}),(0,t.jsx)("div",{className:"w-[800px] mx-auto",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:"Creating your first PDF in rePDF"}),(0,t.jsx)("p",{children:" Easy to get started. See documentation for more details"}),(0,t.jsxs)("div",{className:"rounded border",children:[(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("p",{className:"font-bold",children:[(0,t.jsx)("span",{className:"bg-blue-300 rounded-lg p-2",children:"1"})," Basic Template"]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(d,{code:'import { Tailwind, Image, Document } from "@repdf/core";\n\nexport default function WelcomePdf() {\n return (\n <Document>\n <Tailwind>\n <div className="p-4">\n <h1 className="text-4xl font-bold">Welcome To Your First PDF!</h1>\n <p>\n This is a simple PDF template that you can use as a starting point\n for your own PDFs.\n </p>\n </div>\n </Tailwind>\n </Document>\n );\n}'})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("p",{children:"Interesting Things to Note:"}),(0,t.jsx)("ul",{className:"list-disc list-inside space-y-4",children:(0,t.jsxs)("li",{children:["The PDF template is"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"export default function"})]})})]})]}),(0,t.jsxs)("div",{className:"rounded border mt-5",children:[(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("p",{className:"font-bold",children:[(0,t.jsx)("span",{className:"bg-blue-300 rounded-lg p-2",children:"2"})," Add some preview props and pdf settings"]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(d,{code:'import { Tailwind, Image, Document } from "@repdf/core";\nimport type { PdfPreviewSettings } from "@repdf/core";\n\n\ntype WelcomePdfProps = {\n name: string;\n};\n\nexport default function WelcomePdf({ name }: WelcomePdfProps) {\n return (\n <Document>\n <Tailwind>\n <div className="p-4">\n <h1 className="text-4xl font-bold">Welcome To Your First PDF, {name}!</h1>\n <p>\n This is a simple PDF template that you can use as a starting point\n for your own PDFs.\n </p>\n </div>\n </Tailwind>\n </Document>\n );\n}\n\nWelcomePdf.PreviewSettings = {\n pdfSettings: {\n format: "A4",\n },\n previewProps: [\n {\n name: "John",\n },\n {\n name: "Jane",\n },\n ],\n} satisfies PdfPreviewSettings<WelcomePdfProps>;'})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("p",{children:"Interesting:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside space-y-4",children:[(0,t.jsxs)("li",{children:["Preview Settings consist of"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"pdfSettings"})," ","which are passed to html renderer and"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"previewProps"})," ","(and array of preview props) which is data used to preview pdf during development."]}),(0,t.jsxs)("li",{children:["You can make this all typesafe by using"," ",(0,t.jsx)("span",{className:" bg-gray-300 rounded p-0.5",children:"satisfies PdfPreviewSettings<YourCustomType>"})]})]})]})]})]})})]})]})}}},function(e){e.O(0,[64,888,774,179],function(){return e(e.s=2705)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[254],{2285:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/preview/[...relTemplatePath]",function(){return t(8654)}])},8654:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return v},default:function(){return w}});var n=t(1549),l=t(7829),i=t(4695),s=t.n(i),a=t(6226),o=t(4194),c=t(6249);function p(e){let{children:r}=e,{data:t,isLoading:l}=c.h.core.templateCheck.useQuery({relTemplatePath:"test.txt"});return(0,n.jsx)(n.Fragment,{children:r})}var u=t(7406);function d(e){let{relTemplatePath:r}=e,{data:t,isLoading:l}=c.h.core.fileContents.useQuery({relTemplatePath:r});return l?(0,n.jsx)("div",{children:"Loading..."}):t?(0,n.jsx)("div",{children:(0,n.jsx)(u.y$,{theme:u.np.shadesOfPurple,code:t,language:"tsx",children:e=>{let{className:r,style:t,tokens:l,getLineProps:i,getTokenProps:s}=e;return(0,n.jsx)("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word",maxWidth:"100%"},children:l.map((e,r)=>(0,n.jsxs)("div",{...i({line:e}),style:{display:"flex"},children:[(0,n.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:r+1}),(0,n.jsx)("span",{style:{flex:1,overflow:"hidden"},children:e.map((e,r)=>(0,n.jsx)("span",{...s({token:e}),style:{...s({token:e}).style,wordBreak:"break-all",whiteSpace:"pre-wrap"}},r))})]},r))})}})}):(0,n.jsx)("div",{children:"Error"})}function h(e){let{relTemplatePath:r,previewPropGroup:t}=e,{data:l}=c.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[i,s]=(0,o.useState)(!0),[a,p]=(0,o.useState)("/api/component?relativeTemplatePath=".concat(r,"&previewPropGroup=").concat(null!=t?t:""));return(0,o.useEffect)(()=>{l&&(s(!0),p("/api/component?relativeTemplatePath=".concat(r,"&refresh=").concat(l,"&previewPropGroup=").concat(null!=t?t:"")))},[l,r,t]),(0,n.jsxs)("div",{className:"relative h-full w-full",children:[i&&(0,n.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:(0,n.jsx)("p",{children:"Rendering Component..."})}),a&&(0,n.jsx)("iframe",{src:a,className:"h-full w-full border-none",onLoad:()=>s(!1)})]})}function x(e){let{relTemplatePath:r}=e,{data:t,isLoading:l}=c.h.core.renderedHtml.useQuery({relTemplatePath:r});return l?(0,n.jsx)("div",{children:"Loading..."}):t?(0,n.jsx)("div",{children:(0,n.jsx)(u.y$,{theme:u.np.shadesOfPurple,code:t,language:"tsx",children:e=>{let{className:r,style:t,tokens:l,getLineProps:i,getTokenProps:s}=e;return(0,n.jsx)("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:l.map((e,r)=>(0,n.jsxs)("div",{...i({line:e}),style:{display:"flex"},children:[(0,n.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:r+1}),(0,n.jsx)("span",{children:e.map((e,r)=>(0,n.jsx)("span",{...s({token:e})},r))})]},r))})}})}):(0,n.jsx)("div",{children:"Error"})}function m(e){let{relTemplatePath:r,previewPropGroup:t}=e,{data:l}=c.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[i,s]=(0,o.useState)(!0),[a,p]=(0,o.useState)("/api/pdf?relativeTemplatePath=".concat(r,"&previewPropGroup=").concat(null!=t?t:""));return(0,o.useEffect)(()=>{l&&(s(!0),p("/api/pdf?relativeTemplatePath=".concat(r,"&refresh=").concat(l,"&previewPropGroup=").concat(null!=t?t:"")))},[l,r,t]),(0,n.jsxs)("div",{className:"relative h-full w-full",children:[i&&(0,n.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:(0,n.jsx)("p",{children:"Rendering PDF..."})}),(0,n.jsx)("iframe",{src:a,width:"100%",height:"100%",title:"PDF Preview",onLoad:()=>s(!1)},l)]})}function f(e){let{relTemplatePath:r}=e,t=(0,a.useRouter)(),{data:l}=c.h.core.templateDetails.useQuery({relTemplatePath:r}),i=t.query.previewPropGroup?parseInt(t.query.previewPropGroup,10):void 0;return l&&0!==l.previewPropChoices.length?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("select",{className:"rounded-md border border-gray-300 p-2",onChange:e=>{let r=parseInt(e.target.value);t.push({query:{...t.query,previewPropGroup:r}})},value:i,children:l.previewPropChoices.map((e,r)=>(0,n.jsxs)("option",{value:r,children:["Prop Group ",r+1]},r))})}):null}var v=!0;function w(e){let{templateName:r,relTemplatePath:t}=e,i=(0,a.useRouter)(),c=i.query.view,u=e=>{i.push({query:{...i.query,view:e}})};return(0,o.useEffect)(()=>{c||i.push({query:{...i.query,view:"component"}})},[c]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s(),{children:(0,n.jsx)("title",{children:"Preview PDF - rePDF"})}),(0,n.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between bg-gray-200 p-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:r}),(0,n.jsx)("p",{className:"text-sm text-gray-500",children:r!==t?t:"​"})]}),(0,n.jsx)("div",{children:(0,n.jsx)(f,{relTemplatePath:t})}),(0,n.jsx)("div",{children:(0,n.jsxs)("ul",{className:"flex",children:[(0,n.jsx)("li",{className:(0,l.Z)("rounded-l bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","code"===c&&"bg-gray-400 text-white"),onClick:()=>u("code"),children:"Code"}),(0,n.jsx)("li",{className:(0,l.Z)(" bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","component"===c&&"bg-gray-400 text-white"),onClick:()=>u("component"),children:"Component"}),(0,n.jsx)("li",{className:(0,l.Z)(" bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","pdf"===c&&"bg-gray-400 text-white"),onClick:()=>u("pdf"),children:"PDF"}),(0,n.jsx)("li",{className:(0,l.Z)("rounded-r bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white cursor-pointer","html"===c&&"bg-gray-400 text-white"),onClick:()=>u("html"),children:"HTML"})]})})]}),(0,n.jsx)("div",{className:"flex-grow",children:(0,n.jsxs)(p,{children:["code"===c&&(0,n.jsx)(d,{relTemplatePath:t}),(null===c||"component"===c)&&(0,n.jsx)(h,{relTemplatePath:t,previewPropGroup:i.query.previewPropGroup}),"html"===c&&(0,n.jsx)(x,{relTemplatePath:t}),"pdf"===c&&(0,n.jsx)(m,{relTemplatePath:t,previewPropGroup:i.query.previewPropGroup})]})})]})]})}},6226:function(e,r,t){e.exports=t(5470)}},function(e){e.O(0,[64,888,774,179],function(){return e(e.s=2285)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[378],{3961:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/test",function(){return t(7798)}])},7798:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return r}});var i=t(1549);function r(){return(0,i.jsx)("div",{id:"componentPreviewBody",style:{width:"100%",display:"flex",justifyContent:"center"},children:(0,i.jsxs)("div",{id:"componentPreviewSizer",style:{width:"210mm",height:"297mm",border:"1px solid #e5e7eb",backgroundColor:"white",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",marginTop:"1.25rem"},children:[" ",(0,i.jsx)("h1",{className:"text-2xl font-bold",children:"Test!"}),(0,i.jsx)("p",{children:"Some content. This is great content."}),(0,i.jsx)("div",{className:"w-full flex justify-center",children:(0,i.jsx)("div",{className:"h-96 w-96 bg-gray-200 border rounded"})})]})})}}},function(e){e.O(0,[888,774,179],function(){return e(e.s=3961)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[378],{1764:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/test",function(){return t(8960)}])},8960:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return r}});var i=t(1549);function r(){return(0,i.jsx)("div",{id:"componentPreviewBody",style:{width:"100%",display:"flex",justifyContent:"center"},children:(0,i.jsxs)("div",{id:"componentPreviewSizer",style:{width:"210mm",height:"297mm",border:"1px solid #e5e7eb",backgroundColor:"white",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",marginTop:"1.25rem"},children:[" ",(0,i.jsx)("h1",{className:"text-2xl font-bold",children:"Test!"}),(0,i.jsx)("p",{children:"Some content. This is great content."}),(0,i.jsx)("div",{className:"w-full flex justify-center",children:(0,i.jsx)("div",{className:"h-96 w-96 bg-gray-200 border rounded"})})]})})}}},function(e){e.O(0,[888,774,179],function(){return e(e.s=1764)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ !function(){"use strict";var e,n,r,t,o={},u={};function i(e){var n=u[e];if(void 0!==n)return n.exports;var r=u[e]={exports:{}},t=!0;try{o[e](r,r.exports,i),t=!1}finally{t&&delete u[e]}return r.exports}i.m=o,e=[],i.O=function(n,r,t,o){if(r){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,t,o];return}for(var f=1/0,u=0;u<e.length;u++){for(var r=e[u][0],t=e[u][1],o=e[u][2],l=!0,c=0;c<r.length;c++)f>=o&&Object.keys(i.O).every(function(e){return i.O[e](r[c])})?r.splice(c--,1):(l=!1,o<f&&(f=o));if(l){e.splice(u--,1);var a=t();void 0!==a&&(n=a)}}return n},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,{a:n}),n},i.d=function(e,n){for(var r in n)i.o(n,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="/_next/",n={272:0},i.O.j=function(e){return 0===n[e]},r=function(e,r){var t,o,u=r[0],f=r[1],l=r[2],c=0;if(u.some(function(e){return 0!==n[e]})){for(t in f)i.o(f,t)&&(i.m[t]=f[t]);if(l)var a=l(i)}for(e&&e(r);c<u.length;c++)o=u[c],i.o(n,o)&&n[o]&&n[o][0](),n[o]=0;return i.O(a)},(t=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))}();
@@ -0,0 +1,3 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
+ ! tailwindcss v3.4.14 | MIT License | https://tailwindcss.com
3
+ */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-4{bottom:1rem}.left-0{left:0}.right-2{right:.5rem}.col-span-10{grid-column:span 10/span 10}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-4{height:1rem}.h-96{height:24rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-4{width:1rem}.w-96{width:24rem}.w-\[800px\]{width:800px}.w-full{width:100%}.max-w-2xl{max-width:42rem}.flex-grow{flex-grow:1}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-r{border-right-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-opacity-30{--tw-bg-opacity:0.3}.bg-opacity-50{--tw-bg-opacity:0.5}.p-0\.5{padding:.125rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-1\.5{padding-left:.375rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}