@repdf/preview 0.0.11 → 0.0.13

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 (54) hide show
  1. package/dist/index.cjs +15 -12
  2. package/dist/index.js +15 -12
  3. package/dist/preview/.next/BUILD_ID +1 -1
  4. package/dist/preview/.next/build-manifest.json +7 -7
  5. package/dist/preview/.next/cache/.tsbuildinfo +1 -1
  6. package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
  9. package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
  12. package/dist/preview/.next/next-server.js.nft.json +1 -1
  13. package/dist/preview/.next/prerender-manifest.json +1 -1
  14. package/dist/preview/.next/routes-manifest.json +1 -1
  15. package/dist/preview/.next/server/chunks/316.js +1 -0
  16. package/dist/preview/.next/server/chunks/{587.js → 842.js} +2 -2
  17. package/dist/preview/.next/server/functions-config-manifest.json +1 -1
  18. package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
  19. package/dist/preview/.next/server/pages/_app.js +1 -1
  20. package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
  21. package/dist/preview/.next/server/pages/_document.js +1 -1
  22. package/dist/preview/.next/server/pages/_error.js +1 -1
  23. package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
  24. package/dist/preview/.next/server/pages/api/component.js +2 -2
  25. package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
  26. package/dist/preview/.next/server/pages/api/pdf.js +1 -1
  27. package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
  28. package/dist/preview/.next/server/pages/api/trpc/[trpc].js +1 -1
  29. package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +1 -1
  30. package/dist/preview/.next/server/pages/en/404.html +1 -1
  31. package/dist/preview/.next/server/pages/en/500.html +1 -1
  32. package/dist/preview/.next/server/pages/en/hello.html +1 -1
  33. package/dist/preview/.next/server/pages/hello.js.nft.json +1 -1
  34. package/dist/preview/.next/server/pages/index.js +1 -0
  35. package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
  36. package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
  37. package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
  38. package/dist/preview/.next/server/pages-manifest.json +1 -1
  39. package/dist/preview/.next/static/chunks/587-e1c001181b4cec11.js +1 -0
  40. package/dist/preview/.next/static/chunks/pages/_app-7347594c8802fbe6.js +8 -0
  41. package/dist/preview/.next/static/chunks/pages/index-599233e1212fd4c8.js +1 -0
  42. package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-b754b626fb853e1b.js +1 -0
  43. package/dist/preview/.next/static/css/{f94a2eea64dc55ea.css → 4775703643ebce7c.css} +1 -1
  44. package/dist/preview/.next/static/ek5PUJ-kuCFNuyqnUz9I2/_buildManifest.js +1 -0
  45. package/dist/preview/.next/trace +14 -14
  46. package/package.json +10 -10
  47. package/dist/preview/.next/server/chunks/559.js +0 -1
  48. package/dist/preview/.next/server/pages/en.html +0 -1
  49. package/dist/preview/.next/static/ODM3NbAHy2U0LG-NEPdk_/_buildManifest.js +0 -1
  50. package/dist/preview/.next/static/chunks/606-7aa77f75c6740252.js +0 -1
  51. package/dist/preview/.next/static/chunks/pages/_app-d770e97b1da9a6b5.js +0 -8
  52. package/dist/preview/.next/static/chunks/pages/index-74f4892551876c76.js +0 -1
  53. package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-64226fbfe886d0c3.js +0 -1
  54. /package/dist/preview/.next/static/{ODM3NbAHy2U0LG-NEPdk_ → ek5PUJ-kuCFNuyqnUz9I2}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[587],{6743:function(e,t,n){e.exports=n(9721)},1014:function(e,t,n){e.exports=n(5988)},739:function(e,t,n){"use strict";let a,r,o,s;n.d(t,{np:function(){return z},y$:function(){return ek}});var l,i,c,p,u,g,d,y,b,f,m,h,k,w,E,v,x=n(5271),A=n(4814),S=Object.create,F=Object.defineProperty,_=Object.defineProperties,R=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertyNames,O=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,D=(e,t,n)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))N.call(t,n)&&D(e,n,t[n]);if(O)for(var n of O(t))C.call(t,n)&&D(e,n,t[n]);return e},$=(e,t)=>_(e,T(t)),j=(e,t)=>{var n={};for(var a in e)N.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&O)for(var a of O(e))0>t.indexOf(a)&&C.call(e,a)&&(n[a]=e[a]);return n},P=(s=null!=(o=(a={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},a={util:{encode:function e(t){return t instanceof r?new r(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},a.util.type(t)){case"Object":if(n[o=a.util.objId(t)])return n[o];for(var s in r={},n[o]=r,t)t.hasOwnProperty(s)&&(r[s]=e(t[s],n));return r;case"Array":if(n[o=a.util.objId(t)])return n[o];return r=[],n[o]=r,t.forEach(function(t,a){r[a]=e(t,n)}),r;default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var a="no-"+t;e;){var r=e.classList;if(r.contains(t))return!0;if(r.contains(a))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=a.util.clone(a.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||a.languages)[e],s={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var i in n)n.hasOwnProperty(i)&&(s[i]=n[i]);n.hasOwnProperty(l)||(s[l]=o[l])}var c=r[e];return r[e]=s,a.languages.DFS(a.languages,function(t,n){n===c&&t!=e&&(this[t]=s)}),s},DFS:function e(t,n,r,o){o=o||{};var s=a.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var i=t[l],c=a.util.type(i);"Object"!==c||o[s(i)]?"Array"!==c||o[s(i)]||(o[s(i)]=!0,e(i,n,l,o)):(o[s(i)]=!0,e(i,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(a.hooks.run("before-tokenize",o),!o.grammar)throw Error('The language "'+o.language+'" has no grammar.');return o.tokens=a.tokenize(o.code,o.grammar),a.hooks.run("after-tokenize",o),r.stringify(a.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var i in n)t[i]=n[i];delete t.rest}var c=new s;return l(c,c.head,e),function e(t,n,s,i,c,p){for(var u in s)if(s.hasOwnProperty(u)&&s[u]){var g=s[u];g=Array.isArray(g)?g:[g];for(var d=0;d<g.length;++d){if(p&&p.cause==u+","+d)return;var y=g[d],b=y.inside,f=!!y.lookbehind,m=!!y.greedy,h=y.alias;if(m&&!y.pattern.global){var k=y.pattern.toString().match(/[imsuy]*$/)[0];y.pattern=RegExp(y.pattern.source,k+"g")}for(var w=y.pattern||y,E=i.next,v=c;E!==n.tail&&(!p||!(v>=p.reach));v+=E.value.length,E=E.next){var x,A=E.value;if(n.length>t.length)return;if(!(A instanceof r)){var S=1;if(m){if(!(x=o(w,v,t,f))||x.index>=t.length)break;var F=x.index,_=x.index+x[0].length,R=v;for(R+=E.value.length;F>=R;)R+=(E=E.next).value.length;if(R-=E.value.length,v=R,E.value instanceof r)continue;for(var T=E;T!==n.tail&&(R<_||"string"==typeof T.value);T=T.next)S++,R+=T.value.length;S--,A=t.slice(v,R),x.index-=v}else if(!(x=o(w,0,A,f)))continue;var F=x.index,I=x[0],O=A.slice(0,F),L=A.slice(F+I.length),N=v+A.length;p&&N>p.reach&&(p.reach=N);var C=E.prev;if(O&&(C=l(n,C,O),v+=O.length),function(e,t,n){for(var a=t.next,r=0;r<n&&a!==e.tail;r++)a=a.next;t.next=a,a.prev=t,e.length-=r}(n,C,S),E=l(n,C,new r(u,b?a.tokenize(I,b):I,h,I)),L&&l(n,E,L),S>1){var D={cause:u+","+d,reach:N};e(t,n,s,E.prev,v,D),p&&D.reach>p.reach&&(p.reach=D.reach)}}}}}}(e,c,t,c.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(c)},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:r};function r(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function o(e,t,n,a){e.lastIndex=t;var r=e.exec(n);if(r&&a&&r[1]){var o=r[1].length;r.index+=o,r[0]=r[0].slice(o)}return r}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}return r.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},s=t.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(o.classes,s):o.classes.push(s)),a.hooks.run("wrap",o);var l="";for(var i in o.attributes)l+=" "+i+'="'+(o.attributes[i]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+l+">"+o.content+"</"+o.tag+">"},a}();t.exports=n,n.default=n}},function(){return r||(0,a[I(a)[0]])((r={exports:{}}).exports,r),r.exports})())?S(L(o)):{},((e,t,n,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of I(t))N.call(e,n)||void 0===n||F(e,n,{get:()=>t[n],enumerable:!(a=R(t,n))||a.enumerable});return e})(o&&o.__esModule?s:F(s,"default",{value:o,enumerable:!0}),o));P.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},P.languages.markup.tag.inside["attr-value"].inside.entity=P.languages.markup.entity,P.languages.markup.doctype.inside["internal-subset"].inside=P.languages.markup,P.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(P.languages.markup.tag,"addInlined",{value:function(e,t){var n={},n=(n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:P.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),t=(n["language-"+t]={pattern:/[\s\S]+/,inside:P.languages[t]},{});t[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},P.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(P.languages.markup.tag,"addAttribute",{value:function(e,t){P.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:P.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),P.languages.html=P.languages.markup,P.languages.mathml=P.languages.markup,P.languages.svg=P.languages.markup,P.languages.xml=P.languages.extend("markup",{}),P.languages.ssml=P.languages.xml,P.languages.atom=P.languages.xml,P.languages.rss=P.languages.xml,l={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},c=RegExp((c="(?:[^\\\\-]|"+(i=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")")+"-"+c),p={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},P.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:c,inside:{escape:i,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":l,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:i}},"special-escape":l,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":p}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:i,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":p}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},P.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},P.languages.javascript=P.languages.extend("clike",{"class-name":[P.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),P.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,P.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:P.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:P.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:P.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:P.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:P.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),P.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:P.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),P.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),P.languages.markup&&(P.languages.markup.tag.addInlined("script","javascript"),P.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),P.languages.js=P.languages.javascript,P.languages.actionscript=P.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),P.languages.actionscript["class-name"].alias="function",delete P.languages.actionscript.parameter,delete P.languages.actionscript["literal-property"],P.languages.markup&&P.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:P.languages.markup}}),u=/#(?!\{).+/,g={pattern:/#\{[^}]+\}/,alias:"variable"},P.languages.coffeescript=P.languages.extend("javascript",{comment:u,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:g}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),P.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:u,interpolation:g}}}),P.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:P.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:g}}]}),P.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete P.languages.coffeescript["template-string"],P.languages.coffee=P.languages.coffeescript,Object.defineProperty(d=P.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/},"addSupport",{value:function(e,t){(e="string"==typeof e?[e]:e).forEach(function(e){var n=function(e){e.inside||(e.inside={}),e.inside.rest=t},a="doc-comment";if(r=P.languages[e]){var r,o=r[a];if((o=o||(r=P.languages.insertBefore(e,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(o=r[a]={pattern:o}),Array.isArray(o))for(var s=0,l=o.length;s<l;s++)o[s]instanceof RegExp&&(o[s]={pattern:o[s]}),n(o[s]);else n(o)}})}}),d.addSupport(["java","javascript","php"],d),y=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,P.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+y.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+y.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+y.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+y.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:y,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},P.languages.css.atrule.inside.rest=P.languages.css,(y=P.languages.markup)&&(y.tag.addInlined("style","css"),y.tag.addAttribute("style","css")),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(P),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",r=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,t){return t=(t||"").replace(/m/g,"")+"m",RegExp(/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<value>>/g,function(){return e}),t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return a})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<key>>/g,function(){return"(?:"+r+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(P),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,s=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+o+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+o+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,a=t.length;n<a;n++){var r,o=t[n];"code"!==o.type?e(o.content):(r=o.content[1],o=o.content[3],r&&o&&"code-language"===r.type&&"code-block"===o.type&&"string"==typeof r.content&&(r=r.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),r="language-"+(r=(/[a-z][\w-]*/i.exec(r)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,r]:o.alias.push(r):o.alias=[r]))}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",a=0,r=t.classes.length;a<r;a++){var o=t.classes[a],o=/language-(.+)/.exec(o);if(o){n=o[1];break}}var c,p=e.languages[n];p?t.content=e.highlight((0,t.content).replace(s,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){return"#"===(t=t.toLowerCase())[0]?i("x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1))):l[t]||e}),p,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},i=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(P),P.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:P.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},P.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n<t.length;){var a=t[n++];if("keyword"===a.type&&"mutation"===a.content){var r=[];if(p(["definition-mutation","punctuation"])&&"("===t[n+1].content){n+=2;var o=u(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var s=t[n+0];"variable"===s.type&&(g(s,"variable-input"),r.push(s.content))}n=o+1}if(p(["punctuation","property-query"])&&"{"===t[n+0].content&&(g(t[++n+0],"property-mutation"),0<r.length)){var l=u(/^\{$/,/^\}$/);if(-1!==l)for(var i=n;i<l;i++){var c=t[i];"variable"===c.type&&0<=r.indexOf(c.content)&&g(c,"variable-input")}}}}function p(e,a){a=a||0;for(var r=0;r<e.length;r++){var o=t[n+(r+a)];if(!o||o.type!==e[r])return}return 1}function u(e,a){for(var r=1,o=n;o<t.length;o++){var s=t[o],l=s.content;if("punctuation"===s.type&&"string"==typeof l){if(e.test(l))r++;else if(a.test(l)&&0==--r)return o}}return -1}function g(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}}),P.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,a=t.inside.interpolation,r=a.inside["interpolation-punctuation"],o=a.pattern.source;function s(t,a){if(e.languages[t])return{pattern:RegExp("((?:"+a+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(t,n,a){return t={code:t,grammar:n,language:a},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}e.languages.javascript["template-string"]=[s("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),s("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),s("svg",/\bsvg/.source),s("markdown",/\b(?:markdown|md)/.source),s("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),s("sql",/\bsql/.source),t].filter(Boolean);var i={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};e.hooks.add("after-tokenize",function(t){t.language in i&&function t(n){for(var s=0,i=n.length;s<i;s++){var c,p,u,g=n[s];"string"!=typeof g&&(Array.isArray(c=g.content)?"template-string"===g.type?(g=c[1],3===c.length&&"string"!=typeof g&&"embedded-code"===g.type&&(p=function e(t){return"string"==typeof t?t:Array.isArray(t)?t.map(e).join(""):e(t.content)}(g),g=Array.isArray(g=g.alias)?g[0]:g,u=e.languages[g])&&(c[1]=function(t,n,s){var i=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,p={},i=l(i.map(function(e){if("string"==typeof e)return e;for(var n,a,e=e.content;-1!==t.indexOf((a=c++,n="___"+s.toUpperCase()+"_"+a+"___")););return p[n]=e,n}).join(""),n,s),u=Object.keys(p);return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=u.length)return;var s,i,g,d,y,b,f,m=n[o];"string"==typeof m||"string"==typeof m.content?(s=u[c],-1!==(f=(b="string"==typeof m?m:m.content).indexOf(s))&&(++c,i=b.substring(0,f),y=p[s],g=void 0,(d={})["interpolation-punctuation"]=r,3===(d=e.tokenize(y,d)).length&&((g=[1,1]).push.apply(g,l(d[1],e.languages.javascript,"javascript")),d.splice.apply(d,g)),g=new e.Token("interpolation",d,a.alias,y),d=b.substring(f+s.length),y=[],i&&y.push(i),y.push(g),d&&(t(b=[d]),y.push.apply(y,b)),"string"==typeof m?(n.splice.apply(n,[o,1].concat(y)),o+=y.length-1):m.content=y)):Array.isArray(f=m.content)?t(f):t([f])}}(i),new e.Token(s,i,"language-"+s,t)}(p,u,g))):t(c):"string"!=typeof c&&t([c]))}}(t.tokens)})}(P),P.languages.typescript=P.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),P.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete P.languages.typescript.parameter,delete P.languages.typescript["literal-property"],b=P.languages.extend("typescript",{}),delete b["class-name"],P.languages.typescript["class-name"].inside=b,P.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:b}}}}),P.languages.ts=P.languages.typescript,f=P.languages.javascript,h="(@(?:arg|argument|param|property)\\s+(?:"+(m=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source)+"\\s+)?)",P.languages.jsdoc=P.languages.extend("javadoclike",{parameter:{pattern:RegExp(h+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),P.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(h+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:f,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return m})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+m),lookbehind:!0,inside:{string:f.string,number:f.number,boolean:f.boolean,keyword:P.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:f,alias:"language-javascript"}}}}),P.languages.javadoclike.addSupport("javascript",P.languages.jsdoc),P.languages.flow=P.languages.extend("javascript",{}),P.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),P.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete P.languages.flow.parameter,P.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(P.languages.flow.keyword)||(P.languages.flow.keyword=[P.languages.flow.keyword]),P.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0}),P.languages.n4js=P.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),P.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),P.languages.n4jsd=P.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],a=0;a<n.length;a++){var r=n[a],o=e.languages.javascript[r],r=(o="RegExp"===e.util.type(o)?e.languages.javascript[r]={pattern:o}:o).inside||{};(o.inside=r)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(P),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,r=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return RegExp(e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return r}),t)}r=o(r).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",function(t){"jsx"!==t.language&&"tsx"!==t.language||function t(n){for(var a=[],r=0;r<n.length;r++){var o=n[r],l=!1;"string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?0<a.length&&a[a.length-1].tagName===s(o.content[0].content[1])&&a.pop():"/>"!==o.content[o.content.length-1].content&&a.push({tagName:s(o.content[0].content[1]),openedBraces:0}):0<a.length&&"punctuation"===o.type&&"{"===o.content?a[a.length-1].openedBraces++:0<a.length&&0<a[a.length-1].openedBraces&&"punctuation"===o.type&&"}"===o.content?a[a.length-1].openedBraces--:l=!0),(l||"string"==typeof o)&&0<a.length&&0===a[a.length-1].openedBraces&&(l=s(o),r<n.length-1&&("string"==typeof n[r+1]||"plain-text"===n[r+1].type)&&(l+=s(n[r+1]),n.splice(r+1,1)),0<r&&("string"==typeof n[r-1]||"plain-text"===n[r-1].type)&&(l=s(n[r-1])+l,n.splice(r-1,1),r--),n[r]=new e.Token("plain-text",l,null,l)),o.content&&"string"!=typeof o.content&&t(o.content)}}(t.tokens)})}(P),k=P.util.clone(P.languages.typescript),(P.languages.tsx=P.languages.extend("jsx",k),delete P.languages.tsx.parameter,delete P.languages.tsx["literal-property"],k=P.languages.tsx.tag).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+k.pattern.source+")",k.pattern.flags),k.lookbehind=!0,P.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},P.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=P.languages.swift}),P.languages.kotlin=P.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete P.languages.kotlin["class-name"],w={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:P.languages.kotlin}},P.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:w},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:w},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete P.languages.kotlin.string,P.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),P.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),P.languages.kt=P.languages.kotlin,P.languages.kts=P.languages.kotlin,P.languages.c=P.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),P.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),P.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},P.languages.c.string],char:P.languages.c.char,comment:P.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:P.languages.c}}}}),P.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete P.languages.c.boolean,P.languages.objectivec=P.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete P.languages.objectivec["class-name"],P.languages.objc=P.languages.objectivec,P.languages.reason=P.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),P.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete P.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(P),P.languages.go=P.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),P.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete P.languages.go["class-name"],E=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,v=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return E.source}),P.languages.cpp=P.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return E.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:E,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),P.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return v})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),P.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:P.languages.cpp}}}}),P.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),P.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:P.languages.extend("cpp",{})}}),P.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},P.languages.cpp["base-clause"]),P.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},P.languages.python["string-interpolation"].inside.interpolation.inside.rest=P.languages.python,P.languages.py=P.languages.python,P.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},P.languages.webmanifest=P.languages.json;var z={};((e,t)=>{for(var n in t)F(e,n,{get:t[n],enumerable:!0})})(z,{dracula:()=>M,duotoneDark:()=>U,duotoneLight:()=>G,github:()=>Z,gruvboxMaterialDark:()=>el,gruvboxMaterialLight:()=>ei,jettwaveDark:()=>ea,jettwaveLight:()=>er,nightOwl:()=>q,nightOwlLight:()=>W,oceanicNext:()=>K,okaidia:()=>V,oneDark:()=>eo,oneLight:()=>es,palenight:()=>X,shadesOfPurple:()=>Q,synthwave84:()=>J,ultramin:()=>ee,vsDark:()=>et,vsLight:()=>en});var M={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},U={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},G={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},Z={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},q={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},W={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},Y="#c5a5c5",H="#8dc891",K={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Y}},{types:["attr-value"],style:{color:H}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:H}},{types:["punctuation"],style:{color:H}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:Y}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},V={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},X={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},Q={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},J={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},ee={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},et={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},en={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},ea={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},er={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},eo={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},es={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},el={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},ei={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},ec=(e,t)=>{let{plain:n}=e,a=e.styles.reduce((e,n)=>{let{languages:a,style:r}=n;return a&&!a.includes(t)||n.types.forEach(t=>{let n=B(B({},e[t]),r);e[t]=n}),e},{});return a.root=n,a.plain=$(B({},n),{backgroundColor:void 0}),a},ep=(e,t)=>{let[n,a]=(0,x.useState)(ec(t,e)),r=(0,x.useRef)(),o=(0,x.useRef)();return(0,x.useEffect)(()=>{(t!==r.current||e!==o.current)&&(r.current=t,o.current=e,a(ec(t,e)))},[e,t]),n},eu=e=>(0,x.useCallback)(t=>{var{className:n,style:a,line:r}=t;let o=$(B({},j(t,["className","style","line"])),{className:(0,A.Z)("token-line",n)});return"object"==typeof e&&"plain"in e&&(o.style=e.plain),"object"==typeof a&&(o.style=B(B({},o.style||{}),a)),o},[e]),eg=e=>{let t=(0,x.useCallback)(({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map(t=>e[t]))},[e]);return(0,x.useCallback)(e=>{var{token:n,className:a,style:r}=e;let o=$(B({},j(e,["token","className","style"])),{className:(0,A.Z)("token",...n.types,a),children:n.content,style:t(n)});return null!=r&&(o.style=B(B({},o.style||{}),r)),o},[t])},ed=/\r\n|\r|\n/,ey=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},eb=(e,t)=>{let n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},ef=e=>{let t=[[]],n=[e],a=[0],r=[e.length],o=0,s=0,l=[],i=[l];for(;s>-1;){for(;(o=a[s]++)<r[s];){let e;let c=t[s],p=n[s][o];if("string"==typeof p?(c=s>0?c:["plain"],e=p):(c=eb(c,p.type),p.alias&&(c=eb(c,p.alias)),e=p.content),"string"!=typeof e){s++,t.push(c),n.push(e),a.push(0),r.push(e.length);continue}let u=e.split(ed),g=u.length;l.push({types:c,content:u[0]});for(let e=1;e<g;e++)ey(l),i.push(l=[]),l.push({types:c,content:u[e]})}s--,t.pop(),n.pop(),a.pop(),r.pop()}return ey(l),i},em=({prism:e,code:t,grammar:n,language:a})=>{let r=(0,x.useRef)(e);return(0,x.useMemo)(()=>{if(null==n)return ef([t]);let e={code:t,grammar:n,language:a,tokens:[]};return r.current.hooks.run("before-tokenize",e),e.tokens=r.current.tokenize(t,n),r.current.hooks.run("after-tokenize",e),ef(e.tokens)},[t,n,a])},eh=({children:e,language:t,code:n,theme:a,prism:r})=>{let o=t.toLowerCase(),s=ep(o,a),l=eu(s),i=eg(s),c=r.languages[o];return e({tokens:em({prism:r,language:o,code:n,grammar:c}),className:`prism-code language-${o}`,style:null!=s?s.root:{},getLineProps:l,getTokenProps:i})},ek=e=>(0,x.createElement)(eh,$(B({},e),{prism:e.prism||P,theme:e.theme||et,code:e.code,language:e.language}))}}]);
@@ -0,0 +1,8 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{5217:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(4877)}])},3934:function(e,t){"use strict";var r,n,s,i;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 f},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return l},ACTION_REFRESH:function(){return o},ACTION_RESTORE:function(){return u},ACTION_SERVER_ACTION:function(){return h},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return n},PrefetchKind:function(){return r},isThenable:function(){return d}});let o="refresh",a="navigate",u="restore",c="server-patch",l="prefetch",f="fast-refresh",h="server-action";function d(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(s=r||(r={})).AUTO="auto",s.FULL="full",s.TEMPORARY="temporary",(i=n||(n={})).fresh="fresh",i.reusable="reusable",i.expired="expired",i.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)},9629:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return s}});let n=r(6650);function s(e,t,s,i){{let o=r(5879).normalizeLocalePath,a=r(4255).detectDomainLocale,u=t||o(e,s).detectedLocale,c=a(i,void 0,u);if(c){let t="http"+(c.http?"":"s")+"://",r=u===c.defaultLocale?"":"/"+u;return""+t+c.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)},9595:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return O}});let n=r(2430),s=r(2676),i=n._(r(5271)),o=r(8595),a=r(8936),u=r(5301),c=r(3951),l=r(276),f=r(8037),h=r(2947),d=r(4359),p=r(9629),y=r(831),b=r(3934),m=new Set;function v(e,t,r,n,s,i){if(i||(0,a.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let s=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(m.has(s))return;m.add(s)}(async()=>i?e.prefetch(t,s):e.prefetch(t,r,n))().catch(e=>{})}}function g(e){return"string"==typeof e?e:(0,u.formatUrl)(e)}let O=i.default.forwardRef(function(e,t){let r,n;let{href:u,as:m,children:O,prefetch:w=null,passHref:E,replace:S,shallow:R,scroll:C,locale:_,onClick:P,onMouseEnter:T,onTouchStart:I,legacyBehavior:k=!1,...x}=e;r=O,k&&("string"==typeof r||"number"==typeof r)&&(r=(0,s.jsx)("a",{children:r}));let j=i.default.useContext(f.RouterContext),A=i.default.useContext(h.AppRouterContext),M=null!=j?j:A,D=!j,q=!1!==w,N=null===w?b.PrefetchKind.AUTO:b.PrefetchKind.FULL,{href:Q,as:L}=i.default.useMemo(()=>{if(!j){let e=g(u);return{href:e,as:m?g(m):e}}let[e,t]=(0,o.resolveHref)(j,u,!0);return{href:e,as:m?(0,o.resolveHref)(j,m):t||e}},[j,u,m]),U=i.default.useRef(Q),F=i.default.useRef(L);k&&(n=i.default.Children.only(r));let z=k?n&&"object"==typeof n&&n.ref:t,[K,H,W]=(0,d.useIntersection)({rootMargin:"200px"}),V=i.default.useCallback(e=>{(F.current!==L||U.current!==Q)&&(W(),F.current=L,U.current=Q),K(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[L,z,Q,W,K]);i.default.useEffect(()=>{M&&H&&q&&v(M,Q,L,{locale:_},{kind:N},D)},[L,Q,H,_,q,null==j?void 0:j.locale,M,D,N]);let B={ref:V,onClick(e){k||"function"!=typeof P||P(e),k&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),M&&!e.defaultPrevented&&function(e,t,r,n,s,o,u,c,l){let{nodeName:f}=e.currentTarget;if("A"===f.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)||!l&&!(0,a.isLocalURL)(r)))return;e.preventDefault();let h=()=>{let e=null==u||u;"beforePopState"in t?t[s?"replace":"push"](r,n,{shallow:o,locale:c,scroll:e}):t[s?"replace":"push"](n||r,{scroll:e})};l?i.default.startTransition(h):h()}(e,M,Q,L,S,R,C,_,D)},onMouseEnter(e){k||"function"!=typeof T||T(e),k&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),M&&(q||!D)&&v(M,Q,L,{locale:_,priority:!0,bypassPrefetchedCheck:!0},{kind:N},D)},onTouchStart:function(e){k||"function"!=typeof I||I(e),k&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),M&&(q||!D)&&v(M,Q,L,{locale:_,priority:!0,bypassPrefetchedCheck:!0},{kind:N},D)}};if((0,c.isAbsoluteUrl)(L))B.href=L;else if(!k||E||"a"===n.type&&!("href"in n.props)){let e=void 0!==_?_:null==j?void 0:j.locale,t=(null==j?void 0:j.isLocaleDomain)&&(0,p.getDomainLocale)(L,e,null==j?void 0:j.locales,null==j?void 0:j.domainLocales);B.href=t||(0,y.addBasePath)((0,l.addLocale)(L,e,null==j?void 0:j.defaultLocale))}return k?i.default.cloneElement(n,B):(0,s.jsx)("a",{...x,...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)},5879: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(21).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)},4359: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(5271),s=r(590),i="function"==typeof IntersectionObserver,o=new Map,a=[];function u(e){let{rootRef:t,rootMargin:r,disabled:u}=e,c=u||!i,[l,f]=(0,n.useState)(!1),h=(0,n.useRef)(null),d=(0,n.useCallback)(e=>{h.current=e},[]);return(0,n.useEffect)(()=>{if(i){if(c||l)return;let e=h.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:s,elements:i}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=a.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=o.get(n)))return t;let s=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=s.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:s},a.push(r),o.set(r,t),t}(r);return i.set(e,t),s.observe(e),function(){if(i.delete(e),s.unobserve(e),0===i.size){s.disconnect(),o.delete(n);let e=a.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!l){let e=(0,s.requestIdleCallback)(()=>f(!0));return()=>(0,s.cancelIdleCallback)(e)}},[c,r,t,l,h.current]),[d,l,(0,n.useCallback)(()=>{f(!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)},4877:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return S}});var n=r(2676),s=function(){return null},i=r(4942);r(6541);var o=r(6559),a=r.n(o),u=r(9724),c=r(5271),l=r(381);let f=r.n(l)()({transport:{target:"pino-pretty"},level:"debug"}),h="".concat("https:"===window.location.protocol?"wss:":"ws:","//").concat(window.location.host,"/api/ws");function d(e){let{children:t}=e,r=i.h.useUtils(),{sendMessage:s,lastMessage:o,readyState:a}=(0,u.ZP)(h);return(0,c.useEffect)(()=>{null!==o&&(f.info("Received ws message on client:",o.data),o.data.startsWith("file changed")&&r.core.invalidate())},[o]),(0,n.jsx)(n.Fragment,{children:t})}var p=r(4814);let y=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),b=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 m={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 v=(0,c.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:o="",children:a,iconNode:u,...l}=e;return(0,c.createElement)("svg",{ref:t,...m,width:n,height:n,stroke:r,strokeWidth:i?24*Number(s)/Number(n):s,className:b("lucide",o),...l},[...u.map(e=>{let[t,r]=e;return(0,c.createElement)(t,r)}),...Array.isArray(a)?a:[a]])}),g=((e,t)=>{let r=(0,c.forwardRef)((r,n)=>{let{className:s,...i}=r;return(0,c.createElement)(v,{ref:n,iconNode:t,className:b("lucide-".concat(y(e)),s),...i})});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"}]]);function O(){let{data:e}=i.h.core.pdfTemplates.useQuery();return(0,n.jsxs)("div",{className:"h-screen border-r p-4 relative",children:[(0,n.jsx)(a(),{href:"/",children:(0,n.jsx)("h1",{className:"text-2xl font-bold",children:"rePDF"})}),(0,n.jsxs)("div",{className:"mt-5 flex flex-col gap-2",children:[e&&(0,n.jsxs)(n.Fragment,{children:[e.topLevel.map(e=>(0,n.jsx)(a(),{href:"/preview/".concat(e.relTemplatePath),className:"text-sm hover:underline",children:e.fileName},e.fileName)),e.subFolders.map(e=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(g,{className:"w-4 h-4"}),(0,n.jsx)("p",{className:"",children:e.name})]}),(0,n.jsx)("ul",{children:e.pdfTemplates.map(e=>(0,n.jsx)(a(),{href:"/preview/".concat(e.relTemplatePath),className:"text-sm hover:underline",children:e.fileName},e.fileName))})]},e.name))]}),(0,n.jsx)("div",{className:"absolute bottom-0 left-0 p-4 text-sm",children:(0,n.jsx)(w,{})})]})]})}function w(){let{readyState:e}=(0,u.ZP)(h),t=u.kQ[e];return(0,n.jsxs)("div",{className:(0,p.Z)("text-xs rounded-lg bg-gray-300 p-2",{"bg-red-500":e===u.kQ.CLOSED,"bg-green-500":e===u.kQ.OPEN}),children:["Live Preview: ",t]})}function E(e){let{children:t}=e;return(0,n.jsxs)("div",{className:"grid grid-cols-12",children:[(0,n.jsx)("div",{className:"col-span-2",children:(0,n.jsx)(O,{})}),(0,n.jsx)("div",{className:"col-span-10",children:t})]})}var S=i.h.withTRPC(e=>{let{Component:t,pageProps:r}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d,{children:(0,n.jsx)(E,{children:(0,n.jsx)(t,{...r})})}),(0,n.jsx)(s,{initialIsOpen:!1})]})})},4942:function(e,t,r){"use strict";let n;function s(e){let t={subscribe(t){let r=null,n=!1,s=!1,i=!1;function o(){if(null===r){i=!0;return}!s&&(s=!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),o())},complete(){n||(n=!0,t.complete?.(),o())}}),i&&o(),{unsubscribe:o}},pipe:(...e)=>e.reduce(i,t)};return t}function i(e,t){return t(e)}r.d(t,{h:function(){return ra}});let o=()=>{},a=e=>{Object.freeze&&Object.freeze(e)},u=e=>(function e(t,r,n){let s=r.join(".");return n[s]??(n[s]=new Proxy(o,{get(s,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i],n)},apply(e,n,s){let i=r[r.length-1],o={args:s,path:r};return"call"===i?o={args:s.length>=2?[s[1]]:[],path:r.slice(0,-1)}:"apply"===i&&(o={args:s.length>=2?s[1]:[],path:r.slice(0,-1)}),a(o.args),a(o.path),t(o)}})),n[s]})(e,[],Object.create(null)),c=e=>new Proxy(o,{get(t,r){if("string"==typeof r&&"then"!==r)return e(r)}});function l(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 f(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function h(e){return Object.assign(Object.create(null),e)}Symbol();let d="function"==typeof Symbol&&!!Symbol.asyncIterator;class p extends Error{}function y(e){if(e instanceof b||e instanceof Error&&"TRPCError"===e.name)return e;let t=new b({code:"INTERNAL_SERVER_ERROR",cause:e});return e instanceof Error&&e.stack&&(t.stack=e.stack),t}class b 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(f(e)){let t=new p;for(let r in e)t[r]=e[r];return t}}}(e.cause);super(e.message??t?.message??e.code,{cause:t}),this.code=e.code,this.name="TRPCError",this.cause||(this.cause=t)}}Symbol(),Symbol();let m={input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}};class v extends Error{constructor(){super("Unable to transform response from server")}}let g=({shape:e})=>e,O="middlewareMarker";function w(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 E(e,t){let{middlewares:r=[],inputs:n,meta:s,...i}=t;return S({...l(e,i),inputs:[...e.inputs,...n??[]],middlewares:[...e.middlewares,...r],meta:e.meta&&s?{...e.meta,...s}:s??e.meta})}function S(e={}){let t={procedure:!0,inputs:[],middlewares:[],...e};return{_def:t,input(e){let r=w(e);return E(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 b({code:"BAD_REQUEST",cause:e})}let s=f(t.input)&&f(r)?{...t.input,...r}:r;return t.next({input:s})};return t._type="input",t}(r)]})},output(e){let r=w(e);return E(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 b({message:"Output validation failed",code:"INTERNAL_SERVER_ERROR",cause:e})}};return t._type="output",t}(r)]})},meta:e=>E(t,{meta:e}),use:e=>E(t,{middlewares:"_middlewares"in e?e._middlewares:[e]}),unstable_concat:e=>E(t,e._def),query:e=>R({...t,type:"query"},e),mutation:e=>R({...t,type:"mutation"},e),subscription:e=>R({...t,type:"subscription"},e),experimental_caller:e=>E(t,{caller:e})}}function R(e,t){let r=E(e,{resolver:t,middlewares:[async function(e){return{marker:O,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},s=function(e){async function t(t){if(!t||!("getRawInput"in t))throw Error(C);let r=await _(0,e,t);if(!r)throw new b({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),i=r._def.caller;if(!i)return s;let o=async(...e)=>await i({args:e,invoke:s,_def:n});return o._def=n,o}let C=`
2
+ This is a client-only function.
3
+ If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls
4
+ `.trim();async function _(e,t,r){try{let n=t.middlewares[e];return await n({...r,meta:t.meta,input:r.input,next:n=>_(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:y(e),marker:O}}}let P="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:g,transformer:m},I=["then","call","apply"];function k(e){return function(t){let r=new Set(Object.keys(t).filter(e=>I.includes(e)));if(r.size>0)throw Error("Reserved words used in `router({})` call: "+Array.from(r).join(", "));let n=h({}),s=function e(t,r=[]){let s=h({});for(let[i,o]of Object.entries(t??{})){if(o._def&&"router"in o._def){s[i]=e(o._def.record,[...r,i]);continue}if("function"!=typeof o){s[i]=e(o,[...r,i]);continue}let t=[...r,i].join(".");if(n[t])throw Error(`Duplicate key: ${t}`);n[t]=o,s[i]=o}return s}(t),i={_config:e,router:!0,procedures:n,...T,record:s};return{...s,_def:i,createCaller:x()({_def:i})}}}function x(){return function(e){let t=e._def;return function(e,r){return u(async({path:n,args:s})=>{let i;let o=n.join(".");if(1===n.length&&"_def"===n[0])return t;let a=t.procedures[o];try{return i="function"==typeof e?await Promise.resolve(e()):e,await a({path:o,getRawInput:async()=>s[0],ctx:i,type:a._def.type,signal:r?.signal})}catch(e){throw r?.onError?.({ctx:i,error:y(e),input:s[0],path:o,type:a._def.type}),e}})}}}function j(...e){let t=l({},...e.map(e=>e._def.record));return k({errorFormatter:e.reduce((e,t)=>{if(t._def._config.errorFormatter&&t._def._config.errorFormatter!==g){if(e!==g&&e!==t._def._config.errorFormatter)throw Error("You seem to have several error formatters");return t._def._config.errorFormatter}return e},g),transformer:e.reduce((e,t)=>{if(t._def._config.transformer&&t._def._config.transformer!==m){if(e!==m&&e!==t._def._config.transformer)throw Error("You seem to have several transformers");return t._def._config.transformer}return e},m),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 A{context(){return new A}meta(){return new A}create(e){var t;let r={transformer:"input"in(t=e?.transformer??m)?t:{input:t,output:t},isDev:e?.isDev??globalThis.process?.env.NODE_ENV!=="production",allowOutsideOfServer:e?.allowOutsideOfServer??!1,errorFormatter:e?.errorFormatter??g,isServer:e?.isServer??P,$types:null,experimental:e?.experimental??{}};if(!(e?.isServer??P)&&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:S({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:k(r),mergeRouters:j,createCallerFactory:x()}}}new A;class M extends Error{static from(e,t={}){return e instanceof M||e instanceof Error&&"TRPCClientError"===e.name?(t.meta&&(e.meta={...e.meta,...t.meta}),e):f(e)&&f(e.error)&&"number"==typeof e.error.code&&"string"==typeof e.error.message?new M(e.error.message,{...t,result:e}):new M("string"==typeof e?e:f(e)&&"string"==typeof e.message?e.message:"Unknown error",{...t,cause:e})}constructor(e,t){let r=t?.cause;super(e,{cause:r}),this.meta=t?.meta,this.cause=r,this.shape=t?.result?.error,this.data=t?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,M.prototype)}}class D{$request(e){var t;return(t={links:this.links,op:{...e,context:e.context??{},id:++this.requestId}},s(e=>(function e(r=0,n=t.op){let s=t.links[r];if(!s)throw Error("No more links to execute - did you forget to add an ending link?");return s({op:n,next:t=>e(r+1,t)})})().subscribe(e))).pipe(e=>{let t=0,r=null,n=[];return s(s=>(t++,n.push(s),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===s);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 s=!1;function i(){s||(s=!0,o.unsubscribe())}t.signal.addEventListener("abort",()=>{n(t.signal.reason)});let o=e.subscribe({next(e){s=!0,r(e),i()},error(e){n(e)},complete(){t.abort(),i()}})})}(t)).result.data}catch(e){throw M.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:null}).subscribe({next(e){"started"===e.result.type?r.onStarted?.({context:e.context}):"stopped"===e.result.type?r.onStopped?.():r.onData?.(e.result.data)},error(e){r.onError?.(e)},complete(){r.onComplete?.()}})}constructor(e){this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}}let q={query:"query",mutate:"mutation",subscribe:"subscription"},N=e=>q[e],Q=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function L(e){let t=null,r=null,n=()=>{clearTimeout(r),r=null,t=null};function s(){let r=function(t){let r=[[]],n=0;for(;;){let s=t[n];if(!s)break;let i=r[r.length-1];if(s.aborted){s.reject?.(Error("Aborted")),n++;continue}if(e.validate(i.concat(s).map(e=>e.key))){i.push(s),n++;continue}if(0===i.length){s.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:Q,reject:Q},i=new Promise((e,r)=>{n.reject=r,n.resolve=e,t||(t=[]),t.push(n)});return r||(r=setTimeout(s)),i}}}let U=e=>"function"==typeof e;function F(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 z={query:"GET",mutation:"POST",subscription:"PATCH"};function K(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 H=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=K(e);void 0!==t&&"POST"!==e.methodOverride&&n.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return n.length&&(r+="?"+n.join("&")),r},W=e=>{if("query"===e.type&&"POST"!==e.methodOverride)return;let t=K(e);return void 0!==t?JSON.stringify(t):void 0},V=e=>$({...e,contentTypeHeader:"application/json",getUrl:H,getBody:W});class B extends Error{constructor(){let e="AbortError";super(e),this.name=e,this.message=e}}let G=e=>{if(e?.aborted){if(e.throwIfAborted?.(),"undefined"!=typeof DOMException)throw new DOMException("AbortError","AbortError");throw new B}};async function J(e){G(e.signal);let t=e.getUrl(e),r=e.getBody(e),{type:n}=e,s=await (async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),i={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0,...s};return(function(e){if(e)return e;if("undefined"!=typeof window&&U(window.fetch))return window.fetch;if("undefined"!=typeof globalThis&&U(globalThis.fetch))return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(t,{method:e.methodOverride??z[n],signal:e.signal,body:r,headers:i})}async function $(e){let t={},r=await J(e);t.response=r;let n=await r.json();return t.responseJSON=n,{json:n,meta:t}}let Y={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"]}}},Z=({c:e=console,colorMode:t="css",withContext:r})=>n=>{let s=n.input,i="undefined"!=typeof FormData&&s instanceof FormData?Object.fromEntries(s):s,{parts:o,args:a}=function(e){let{direction:t,type:r,withContext:n,path:s,id:i,input:o}=e,a=[],u=[];if("none"===e.colorMode)a.push("up"===t?">>":"<<",r,`#${i}`,s);else if("ansi"===e.colorMode){let[e,n]=Y.ansi.regular[r],[o,u]=Y.ansi.bold[r];a.push("up"===t?e:n,"up"===t?">>":"<<",r,"up"===t?o:u,`#${i}`,s,"\x1b[0m")}else{let[e,n]=Y.css[r],o=`
5
+ background-color: #${"up"===t?e:n};
6
+ color: ${"up"===t?"black":"white"};
7
+ padding: 2px;
8
+ `;a.push("%c","up"===t?">>":"<<",r,`#${i}`,`%c${s}%c`,"%O"),u.push(o,`${o}; font-weight: bold;`,`${o}; font-weight: normal;`)}return"up"===t?u.push(n?{input:o,context:e.context}:{input:o}):u.push({input:o,result:e.result,elapsedMs:e.elapsedMs,...n&&{context:e.context}}),{parts:a,args:u}}({...n,colorMode:t,input:i,withContext:r});e["down"===n.direction&&n.result&&(n.result instanceof Error||"error"in n.result.result)?"error":"log"].apply(null,[o.join(" ")].concat(a))};var X,ee,et=r(5271),er=r(2676),en=et.createContext(void 0),es=e=>{let t=et.useContext(en);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},ei=({client:e,children:t})=>(et.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,er.jsx)(en.Provider,{value:e,children:t}));function eo(e){return e}function ea(e,t,r){if("object"!=typeof t||null===t)return;let n=e.getMutationCache(),s=e.getQueryCache(),i=r?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??eo,o=t.mutations||[],a=t.queries||[];o.forEach(({state:t,...s})=>{n.build(e,{...e.getDefaultOptions().hydrate?.mutations,...r?.defaultOptions?.mutations,...s},t)}),a.forEach(({queryKey:t,state:n,queryHash:o,meta:a,promise:u})=>{let c=s.get(o),l=void 0===n.data?n.data:i(n.data);if(c){if(c.state.dataUpdatedAt<n.dataUpdatedAt){let{fetchStatus:e,...t}=n;c.setState({...t,data:l})}}else c=s.build(e,{...e.getDefaultOptions().hydrate?.queries,...r?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:a},{...n,data:l,fetchStatus:"idle"});if(u){let e=Promise.resolve(u).then(i);c.fetch(void 0,{initialPromise:e})}})}var eu=({children:e,options:t={},state:r,queryClient:n})=>{let s=es(n),[i,o]=et.useState(),a=et.useRef(t);return a.current=t,et.useMemo(()=>{if(r){if("object"!=typeof r)return;let e=s.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=i?.find(e=>e.queryHash===r.queryHash);e&&(!n||r.state.dataUpdatedAt>n.state.dataUpdatedAt)&&u.push(r)}else n.push(r)}n.length>0&&ea(s,{queries:n},a.current),u.length>0&&o(e=>e?[...e,...u]:u)}},[s,i,r]),et.useEffect(()=>{i&&(ea(s,{queries:i},a.current),o(void 0))},[s,i]),e};let ec=["client","ssrContext","ssrState","abortOnUnmount"],el=et.createContext?.(null);var ef="undefined"==typeof window||"Deno"in globalThis;function eh(){}function ed(e){return"number"==typeof e&&e>=0&&e!==1/0}function ep(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ey(e,t){return"function"==typeof e?e(t):e}function eb(e,t){return"function"==typeof e?e(t):e}function em(e,t){let{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==eg(o,t.options))return!1}else if(!ew(t.queryKey,o))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!s||s===t.state.fetchStatus)&&(!i||!!i(t))}function ev(e,t){let{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(eO(t.options.mutationKey)!==eO(i))return!1}else if(!ew(t.options.mutationKey,i))return!1}return(!n||t.state.status===n)&&(!s||!!s(t))}function eg(e,t){return(t?.queryKeyHashFn||eO)(e)}function eO(e){return JSON.stringify(e,(e,t)=>eC(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function ew(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!ew(e[r],t[r]))}function eE(e,t){if(e===t)return e;let r=eR(e)&&eR(t);if(r||eC(e)&&eC(t)){let n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},u=0;for(let s=0;s<o;s++){let o=r?s:i[s];(!r&&n.includes(o)||r)&&void 0===e[o]&&void 0===t[o]?(a[o]=void 0,u++):(a[o]=eE(e[o],t[o]),a[o]===e[o]&&void 0!==e[o]&&u++)}return s===o&&u===s?e:a}return t}function eS(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 eR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function eC(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 eP(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?eE(e,t):t}function eT(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function eI(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ek=Symbol();function ex(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==ek?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function ej(e,t,r){let n=e.flatMap(e=>e.split("."));if(!t&&(!r||"any"===r))return n.length?[n]:[];if("infinite"===r&&f(t)&&("direction"in t||"cursor"in t)){let{cursor:e,direction:r,...s}=t;return[n,{input:s,type:"infinite"}]}return[n,{...void 0!==t&&t!==ek&&{input:t},...r&&"any"!==r&&{type:r}}]}function eA(e){return ej(e,void 0,"any")}let eM=e=>{switch(e){case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";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 eD(e){return u(t=>{let r=t.path,n=r.join("."),[s,i]=t.args;return{queryKey:ej(r,s,"query"),queryFn:()=>e.query(n,s,i?.trpc),...i}})}var eq=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(){}},eN=new class extends eq{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!ef&&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"}},eQ=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},s=e=>setTimeout(e,0),i=n=>{t?e.push(n):s(()=>{r(n)})},o=()=>{let t=e;e=[],t.length&&s(()=>{n(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||o()}return r},batchCalls:e=>(...t)=>{i(()=>{e(...t)})},schedule:i,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{s=e}}}(),eL=new class extends eq{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!ef&&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 eU(){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 eF(e){return Math.min(1e3*2**e,3e4)}function ez(e){return(e??"online")!=="online"||eL.isOnline()}var eK=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function eH(e){return e instanceof eK}function eW(e){let t,r=!1,n=0,s=!1,i=eU(),o=()=>eN.isFocused()&&("always"===e.networkMode||eL.isOnline())&&e.canRun(),a=()=>ez(e.networkMode)&&e.canRun(),u=r=>{s||(s=!0,e.onSuccess?.(r),t?.(),i.resolve(r))},c=r=>{s||(s=!0,e.onError?.(r),t?.(),i.reject(r))},l=()=>new Promise(r=>{t=e=>{(s||o())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,s||e.onContinue?.()}),f=()=>{let t;if(s)return;let i=0===n?e.initialPromise:void 0;try{t=i??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{if(s)return;let i=e.retry??(ef?0:3),a=e.retryDelay??eF,u="function"==typeof a?a(n,t):a,h=!0===i||"number"==typeof i&&n<i||"function"==typeof i&&i(n,t);if(r||!h){c(t);return}n++,e.onFail?.(n,t),new Promise(e=>{setTimeout(e,u)}).then(()=>o()?void 0:l()).then(()=>{r?c(t):f()})})};return{promise:i,cancel:t=>{s||(c(new eK(t)),e.abort?.())},continue:()=>(t?.(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:a,start:()=>(a()?f():l().then(f),i)}}var eV=class{#s;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ed(this.gcTime)&&(this.#s=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ef?1/0:3e5))}clearGcTimeout(){this.#s&&(clearTimeout(this.#s),this.#s=void 0)}},eB=class extends eV{#i;#o;#a;#u;#c;#l;constructor(e){super(),this.#l=!1,this.#c=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=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.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#u?.promise}setOptions(e){this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){let r=eP(this.state.data,e,this.options);return this.#f({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(eh).catch(eh):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some(e=>!1!==eb(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ek||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||!ep(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.#a.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.#l?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#f({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.#l=!0,r.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=ex(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return(n(r),this.#l=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};n(s),this.options.behavior?.onFetch(s,this),this.#o=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#f({type:"fetch",meta:s.fetchOptions?.meta});let i=e=>{eH(e)&&e.silent||this.#f({type:"error",error:e}),eH(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#u=eW({initialPromise:t?.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){i(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){i(e);return}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:i,onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}),this.#u.start()}#f(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,...eG(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(eH(r)&&r.revert&&this.#o)return{...this.#o,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),eQ.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function eG(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ez(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var eJ=class extends eq{constructor(e,t){super(),this.options=t,this.#h=e,this.#d=null,this.#p=eU(),this.options.experimental_prefetchInRender||this.#p.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#h;#y=void 0;#b=void 0;#m=void 0;#v;#g;#p;#d;#O;#w;#E;#S;#R;#C;#_=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#y.addObserver(this),e$(this.#y,this.options)?this.#P():this.updateResult(),this.#T())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return eY(this.#y,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return eY(this.#y,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#I(),this.#k(),this.#y.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.#y;if(this.options=this.#h.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof eb(this.options.enabled,this.#y))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#y.setOptions(this.options),r._defaulted&&!eS(this.options,r)&&this.#h.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#y,observer:this});let s=this.hasListeners();s&&eZ(this.#y,n,this.options,r)&&this.#P(),this.updateResult(t),s&&(this.#y!==n||eb(this.options.enabled,this.#y)!==eb(r.enabled,this.#y)||ey(this.options.staleTime,this.#y)!==ey(r.staleTime,this.#y))&&this.#j();let i=this.#A();s&&(this.#y!==n||eb(this.options.enabled,this.#y)!==eb(r.enabled,this.#y)||i!==this.#C)&&this.#M(i)}getOptimisticResult(e){let t=this.#h.getQueryCache().build(this.#h,e),r=this.createResult(t,e);return eS(this.getCurrentResult(),r)||(this.#m=r,this.#g=this.options,this.#v=this.#y.state),r}getCurrentResult(){return this.#m}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.#_.add(e)}getCurrentQuery(){return this.#y}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#h.defaultQueryOptions(e),r=this.#h.getQueryCache().build(this.#h,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#P({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#m))}#P(e){this.#x();let t=this.#y.fetch(this.options,e);return e?.throwOnError||(t=t.catch(eh)),t}#j(){this.#I();let e=ey(this.options.staleTime,this.#y);if(ef||this.#m.isStale||!ed(e))return;let t=ep(this.#m.dataUpdatedAt,e);this.#S=setTimeout(()=>{this.#m.isStale||this.updateResult()},t+1)}#A(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#y):this.options.refetchInterval)??!1}#M(e){this.#k(),this.#C=e,!ef&&!1!==eb(this.options.enabled,this.#y)&&ed(this.#C)&&0!==this.#C&&(this.#R=setInterval(()=>{(this.options.refetchIntervalInBackground||eN.isFocused())&&this.#P()},this.#C))}#T(){this.#j(),this.#M(this.#A())}#I(){this.#S&&(clearTimeout(this.#S),this.#S=void 0)}#k(){this.#R&&(clearInterval(this.#R),this.#R=void 0)}createResult(e,t){let r;let n=this.#y,s=this.options,i=this.#m,o=this.#v,a=this.#g,u=e!==n?e.state:this.#b,{state:c}=e,l={...c},f=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&e$(e,t),o=r&&eZ(e,n,t,s);(i||o)&&(l={...l,...eG(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(l.fetchStatus="idle")}let{error:h,errorUpdatedAt:d,status:p}=l;if(t.select&&void 0!==l.data){if(i&&l.data===o?.data&&t.select===this.#O)r=this.#w;else try{this.#O=t.select,r=t.select(l.data),r=eP(i?.data,r,t),this.#w=r,this.#d=null}catch(e){this.#d=e}}else r=l.data;if(void 0!==t.placeholderData&&void 0===r&&"pending"===p){let e;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)e=i.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#E?.state.data,this.#E):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=eP(i?.data,e,t),f=!0)}this.#d&&(h=this.#d,r=this.#w,d=Date.now(),p="error");let y="fetching"===l.fetchStatus,b="pending"===p,m="error"===p,v=b&&y,g=void 0!==r,O={status:p,fetchStatus:l.fetchStatus,isPending:b,isSuccess:"success"===p,isError:m,isInitialLoading:v,isLoading:v,data:r,dataUpdatedAt:l.dataUpdatedAt,error:h,errorUpdatedAt:d,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:m&&!g,isPaused:"paused"===l.fetchStatus,isPlaceholderData:f,isRefetchError:m&&g,isStale:eX(e,t),refetch:this.refetch,promise:this.#p};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===O.status?e.reject(O.error):void 0!==O.data&&e.resolve(O.data)},r=()=>{t(this.#p=O.promise=eU())},s=this.#p;switch(s.status){case"pending":e.queryHash===n.queryHash&&t(s);break;case"fulfilled":("error"===O.status||O.data!==s.value)&&r();break;case"rejected":("error"!==O.status||O.error!==s.reason)&&r()}}return O}updateResult(e){let t=this.#m,r=this.createResult(this.#y,this.options);if(this.#v=this.#y.state,this.#g=this.options,void 0!==this.#v.data&&(this.#E=this.#y),eS(r,t))return;this.#m=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.#_.size)return!0;let n=new Set(r??this.#_);return this.options.throwOnError&&n.add("error"),Object.keys(this.#m).some(e=>this.#m[e]!==t[e]&&n.has(e))})()&&(n.listeners=!0),this.#D({...n,...e})}#x(){let e=this.#h.getQueryCache().build(this.#h,this.options);if(e===this.#y)return;let t=this.#y;this.#y=e,this.#b=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#T()}#D(e){eQ.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#m)}),this.#h.getQueryCache().notify({query:this.#y,type:"observerResultsUpdated"})})}};function e$(e,t){return!1!==eb(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&eY(e,t,t.refetchOnMount)}function eY(e,t,r){if(!1!==eb(t.enabled,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&eX(e,t)}return!1}function eZ(e,t,r,n){return(e!==t||!1===eb(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&eX(e,r)}function eX(e,t){return!1!==eb(t.enabled,e)&&e.isStaleByTime(ey(t.staleTime,e))}var e0=et.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),e1=()=>et.useContext(e0);function e2(e,t){return"function"==typeof e?e(...t):!!e}function e4(){}var e3=(e,t)=>{(e.suspense||e.throwOnError)&&!t.isReset()&&(e.retryOnMount=!1)},e5=e=>{et.useEffect(()=>{e.clearReset()},[e])},e9=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&e2(r,[e.error,n]),e8=et.createContext(!1),e7=()=>et.useContext(e8);e8.Provider;var e6=(e,t)=>void 0===t.state.data,te=e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},tt=(e,t)=>e.isLoading&&e.isFetching&&!t,tr=(e,t)=>e?.suspense&&t.isPending,tn=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ts(e,t,r){let n=es(r),s=e7(),i=e1(),o=n.defaultQueryOptions(e);n.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=s?"isRestoring":"optimistic",te(o),e3(o,i),e5(i);let a=!n.getQueryCache().get(o.queryHash),[u]=et.useState(()=>new t(n,o)),c=u.getOptimisticResult(o);if(et.useSyncExternalStore(et.useCallback(e=>{let t=s?()=>void 0:u.subscribe(eQ.batchCalls(e));return u.updateResult(),t},[u,s]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),et.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),tr(o,c))throw tn(o,u,i);if(e9({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash)}))throw c.error;if(n.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.experimental_prefetchInRender&&!ef&&tt(c,s)){let e=a?tn(o,u,i):n.getQueryCache().get(o.queryHash)?.promise;e?.catch(e4).finally(()=>{u.hasListeners()||u.updateResult()})}return o.notifyOnChangeProps?c:u.trackResult(c)}var ti=class extends eV{#q;#N;#u;constructor(e){super(),this.mutationId=e.mutationId,this.#N=e.mutationCache,this.#q=[],this.state=e.state||to(),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.#q.includes(e)||(this.#q.push(e),this.clearGcTimeout(),this.#N.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#q=this.#q.filter(t=>t!==e),this.scheduleGc(),this.#N.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#q.length||("pending"===this.state.status?this.scheduleGc():this.#N.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(e){this.#u=eW({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#N.canRun(this)});let t="pending"===this.state.status,r=!this.#u.canStart();try{if(!t){this.#f({type:"pending",variables:e,isPaused:r}),await this.#N.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#f({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#u.start();return await this.#N.config.onSuccess?.(n,e,this.state.context,this),await this.options.onSuccess?.(n,e,this.state.context),await this.#N.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,e,this.state.context),this.#f({type:"success",data:n}),n}catch(t){try{throw await this.#N.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#N.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.#f({type:"error",error:t})}}finally{this.#N.runNext(this)}}#f(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),eQ.batch(()=>{this.#q.forEach(t=>{t.onMutationUpdate(e)}),this.#N.notify({mutation:this,type:"updated",action:e})})}};function to(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ta=class extends eq{#h;#m=void 0;#Q;#L;constructor(e,t){super(),this.#h=e,this.setOptions(t),this.bindMethods(),this.#U()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#h.defaultMutationOptions(e),eS(this.options,t)||this.#h.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#Q,observer:this}),t?.mutationKey&&this.options.mutationKey&&eO(t.mutationKey)!==eO(this.options.mutationKey)?this.reset():this.#Q?.state.status==="pending"&&this.#Q.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#Q?.removeObserver(this)}onMutationUpdate(e){this.#U(),this.#D(e)}getCurrentResult(){return this.#m}reset(){this.#Q?.removeObserver(this),this.#Q=void 0,this.#U(),this.#D()}mutate(e,t){return this.#L=t,this.#Q?.removeObserver(this),this.#Q=this.#h.getMutationCache().build(this.#h,this.options),this.#Q.addObserver(this),this.#Q.execute(e)}#U(){let e=this.#Q?.state??to();this.#m={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#D(e){eQ.batch(()=>{if(this.#L&&this.hasListeners()){let t=this.#m.variables,r=this.#m.context;e?.type==="success"?(this.#L.onSuccess?.(e.data,t,r),this.#L.onSettled?.(e.data,null,t,r)):e?.type==="error"&&(this.#L.onError?.(e.error,t,r),this.#L.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#m)})})}};function tu(e){return{onFetch:(t,r)=>{let n=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[],a={pages:[],pageParams:[]},u=0,c=async()=>{let r=!1,c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},l=ex(t.options,t.fetchOptions),f=async(e,n,s)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let i={queryKey:t.queryKey,pageParam:n,direction:s?"backward":"forward",meta:t.options.meta};c(i);let o=await l(i),{maxPages:a}=t.options,u=s?eI:eT;return{pages:u(e.pages,o,a),pageParams:u(e.pageParams,n,a)}};if(s&&i.length){let e="backward"===s,t={pages:i,pageParams:o},r=(e?tl:tc)(n,t);a=await f(t,r,e)}else{let t=e??i.length;do{let e=0===u?o[0]??n.initialPageParam:tc(n,a);if(u>0&&null==e)break;a=await f(a,e),u++}while(u<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function tc(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 tl(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var tf=class extends eJ{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:tu()},t)}getOptimisticResult(e){return e.behavior=tu(),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:s}=e,i=super.createResult(e,t),{isFetching:o,isRefetching:a,isError:u,isRefetchError:c}=i,l=s.fetchMeta?.fetchMore?.direction,f=u&&"forward"===l,h=o&&"forward"===l,d=u&&"backward"===l,p=o&&"backward"===l;return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:!!(r=s.data)&&null!=tc(t,r),hasPreviousPage:!!(n=s.data)&&!!t.getPreviousPageParam&&null!=tl(t,n),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:c&&!f&&!d,isRefetching:a&&!h&&!p}}};function th(e,t){return e.filter(e=>!t.includes(e))}var td=class extends eq{#h;#F;#z;#K;#q;#H;#W;#V;constructor(e,t,r){super(),this.#h=e,this.#K=r,this.#z=[],this.#q=[],this.#F=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#q.forEach(e=>{e.subscribe(t=>{this.#B(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#q.forEach(e=>{e.destroy()})}setQueries(e,t,r){this.#z=e,this.#K=t,eQ.batch(()=>{let e=this.#q,t=this.#G(this.#z);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions,r));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=n.some((t,r)=>t!==e[r]);(e.length!==n.length||i)&&(this.#q=n,this.#F=s,this.hasListeners()&&(th(e,n).forEach(e=>{e.destroy()}),th(n,e).forEach(e=>{e.subscribe(t=>{this.#B(e,t)})}),this.#D()))})}getCurrentResult(){return this.#F}getQueries(){return this.#q.map(e=>e.getCurrentQuery())}getObservers(){return this.#q}getOptimisticResult(e,t){let r=this.#G(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[n,e=>this.#J(e??n,t),()=>r.map((e,t)=>{let s=n[t];return e.defaultedQueryOptions.notifyOnChangeProps?s:e.observer.trackResult(s,e=>{r.forEach(t=>{t.observer.trackProp(e)})})})]}#J(e,t){return t?(this.#H&&this.#F===this.#V&&t===this.#W||(this.#W=t,this.#V=this.#F,this.#H=eE(this.#H,t(e))),this.#H):e}#G(e){let t=new Map(this.#q.map(e=>[e.options.queryHash,e])),r=[];return e.forEach(e=>{let n=this.#h.defaultQueryOptions(e),s=t.get(n.queryHash);if(s)r.push({defaultedQueryOptions:n,observer:s});else{let e=this.#q.find(e=>e.options.queryHash===n.queryHash);r.push({defaultedQueryOptions:n,observer:e??new eJ(this.#h,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.#q.indexOf(e);-1!==r&&(this.#F=function(e,t,r){let n=e.slice(0);return n[t]=r,n}(this.#F,r,t),this.#D())}#D(){this.hasListeners()&&this.#H!==this.#J(this.#F,this.#K?.combine)&&eQ.batch(()=>{this.listeners.forEach(e=>{e(this.#F)})})}};function tp({queries:e,...t},r){let n=es(r),s=e7(),i=e1(),o=et.useMemo(()=>e.map(e=>{let t=n.defaultQueryOptions(e);return t._optimisticResults=s?"isRestoring":"optimistic",t}),[e,n,s]);o.forEach(e=>{te(e),e3(e,i)}),e5(i);let[a]=et.useState(()=>new td(n,o,t)),[u,c,l]=a.getOptimisticResult(o,t.combine);et.useSyncExternalStore(et.useCallback(e=>s?()=>void 0:a.subscribe(eQ.batchCalls(e)),[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),et.useEffect(()=>{a.setQueries(o,t,{listeners:!1})},[o,t,a]);let f=u.some((e,t)=>tr(o[t],e))?u.flatMap((e,t)=>{let r=o[t];if(r){let t=new eJ(n,r);if(tr(r,e))return tn(r,t,i);tt(e,s)&&tn(r,t,i)}return[]}):[];if(f.length>0)throw Promise.all(f);let h=u.find((e,t)=>{let r=o[t];return r&&e9({result:e,errorResetBoundary:i,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash)})});if(h?.error)throw h.error;return c(l())}function ty(e,t,r){let n=e[0],s=e[1]?.input;return r&&(s={...s??{},...r.pageParam?{cursor:r.pageParam}:{},direction:r.direction}),[n.join("."),s,t?.trpc]}function tb(e){let t=e.path.join(".");return et.useMemo(()=>({path:t}),[t])}function tm(e){let t=e?.overrides?.useMutation?.onSuccess??(e=>e.originalFn()),r=e?.context??el;function n(){let e=et.useContext(r);if(!e)throw Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return e}function s(e,t){let{queryClient:r,ssrState:s}=n();return s&&"mounted"!==s&&r.getQueryCache().find({queryKey:e})?.state.status==="error"?{retryOnMount:!1,...t}:t}return{Provider:e=>{let{abortOnUnmount:t=!1,client:n,queryClient:s,ssrContext:i}=e,[o,a]=et.useState(e.ssrState??!1),u=et.useMemo(()=>(function(e){let{client:t,queryClient:r}=e,n=t instanceof D?t:t.__untypedClient;return{fetchQuery:(e,t)=>r.fetchQuery({...t,queryKey:e,queryFn:()=>n.query(...ty(e,t))}),fetchInfiniteQuery:(e,t)=>r.fetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:s})=>n.query(...ty(e,t,{pageParam:r,direction:s})),initialPageParam:t?.initialCursor??null}),prefetchQuery:(e,t)=>r.prefetchQuery({...t,queryKey:e,queryFn:()=>n.query(...ty(e,t))}),prefetchInfiniteQuery:(e,t)=>r.prefetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:s})=>n.query(...ty(e,t,{pageParam:r,direction:s})),initialPageParam:t?.initialCursor??null}),ensureQueryData:(e,t)=>r.ensureQueryData({...t,queryKey:e,queryFn:()=>n.query(...ty(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,s)=>r.setQueriesData({...t,queryKey:e},n,s),getQueryData:e=>r.getQueryData(e),setInfiniteQueryData:(e,t,n)=>r.setQueryData(e,t,n),getInfiniteQueryData:e=>r.getQueryData(e),setMutationDefaults:(t,s)=>{let i=t[0];return r.setMutationDefaults(t,"function"==typeof s?s({canonicalMutationFn:t=>n.mutation(...ty([i,{input:t}],e))}):s)},getMutationDefaults:e=>r.getMutationDefaults(e),isMutating:e=>r.isMutating({...e,exact:!0})}})({client:n,queryClient:s}),[n,s]),c=et.useMemo(()=>({abortOnUnmount:t,queryClient:s,client:n,ssrContext:i??null,ssrState:o,...u}),[t,n,u,s,i,o]);return et.useEffect(()=>{a(e=>!!e&&"mounted")},[]),et.createElement(r.Provider,{value:c},e.children)},createClient:e=>new D(e),useContext:n,useUtils:n,useQuery:function(t,r,i){let{abortOnUnmount:o,client:a,ssrState:u,queryClient:c,prefetchQuery:l}=n(),h=ej(t,r,"query"),p=c.getQueryDefaults(h),y=r===ek;"undefined"!=typeof window||"prepass"!==u||i?.trpc?.ssr===!1||(i?.enabled??p?.enabled)===!1||y||c.getQueryCache().find({queryKey:h})||l(h,i);let b=s(h,{...p,...i}),m=i?.trpc?.abortOnUnmount??e?.abortOnUnmount??o,v=ts({...b,queryKey:h,queryFn:y?r:async e=>{let t={...b,trpc:{...b?.trpc,...m?{signal:e.signal}:{signal:null}}},r=await a.query(...ty(h,t));if(d&&f(r)&&Symbol.asyncIterator in r){let t=c.getQueryCache().build(e.queryKey,{queryKey:h});t.setState({data:[],status:"success"});let n=[];for await(let e of r)n.push(e),t.setState({data:[...n]});return n}return r}},eJ,c);return v.trpc=tb({path:t}),v},usePrefetchQuery:function(t,r,s){let i=n(),o=ej(t,r,"query"),a=r===ek,u=s?.trpc?.abortOnUnmount??e?.abortOnUnmount??i.abortOnUnmount;!function(e,t){let r=es(void 0);r.getQueryState(e.queryKey)||r.prefetchQuery(e)}({...s,queryKey:o,queryFn:a?r:e=>{let t={trpc:{...u?{signal:e.signal}:{}}};return i.client.query(...ty(o,t))}})},useSuspenseQuery:function(t,r,s){var i,o;let a=n(),u=ej(t,r,"query"),c=s?.trpc?.abortOnUnmount??e?.abortOnUnmount??a.abortOnUnmount,l=(i={...s,queryKey:u,queryFn:e=>{let t={trpc:{...c?{signal:e.signal}:{signal:null}}};return a.client.query(...ty(u,t))}},o=a.queryClient,ts({...i,enabled:!0,suspense:!0,throwOnError:e6,placeholderData:void 0},eJ,o));return l.trpc=tb({path:t}),[l.data,l]},useQueries:e=>{let{ssrState:t,queryClient:r,prefetchQuery:s,client:i}=n(),o=e(eD(i));if("undefined"==typeof window&&"prepass"===t)for(let e of o)e.trpc?.ssr===!1||r.getQueryCache().find({queryKey:e.queryKey})||s(e.queryKey,e);return tp({queries:o.map(e=>({...e,queryKey:e.queryKey}))},r)},useSuspenseQueries:e=>{var t;let{queryClient:r,client:s}=n(),i=tp({...t={queries:e(eD(s)).map(e=>({...e,queryKey:e.queryKey}))},queries:t.queries.map(e=>({...e,suspense:!0,throwOnError:e6,enabled:!0,placeholderData:void 0}))},r);return[i.map(e=>e.data),i]},useMutation:function(e,r){let{client:s,queryClient:i}=n(),o=eA(e),a=i.defaultMutationOptions(i.getMutationDefaults(o)),u=function(e,t){let r=es(t),[n]=et.useState(()=>new ta(r,e));et.useEffect(()=>{n.setOptions(e)},[n,e]);let s=et.useSyncExternalStore(et.useCallback(e=>n.subscribe(eQ.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=et.useCallback((e,t)=>{n.mutate(e,t).catch(e4)},[n]);if(s.error&&e2(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}({...r,mutationKey:o,mutationFn:t=>s.mutation(...ty([e,{input:t}],r)),onSuccess:(...e)=>t({originalFn:()=>r?.onSuccess?.(...e)??a?.onSuccess?.(...e),queryClient:i,meta:r?.meta??a?.meta??{}})},i);return u.trpc=tb({path:e}),u},useSubscription:function(e,t,r){let s=r?.enabled??t!==ek,i=eO(ej(e,t,"any")),{client:o}=n(),a=et.useRef(r);a.current=r,et.useEffect(()=>{if(!s)return;let r=!1,n=o.subscription(e.join("."),t??void 0,{onStarted:()=>{r||a.current.onStarted?.()},onData:e=>{r||a.current.onData(e)},onError:e=>{r||a.current.onError?.(e)}});return()=>{r=!0,n.unsubscribe()}},[i,s])},useInfiniteQuery:function(e,t,r){let{client:i,ssrState:o,prefetchInfiniteQuery:a,queryClient:u,abortOnUnmount:c}=n(),l=ej(e,t,"infinite"),f=u.getQueryDefaults(l),h=t===ek;"undefined"!=typeof window||"prepass"!==o||r?.trpc?.ssr===!1||(r?.enabled??f?.enabled)===!1||h||u.getQueryCache().find({queryKey:l})||a(l,{...f,...r});let d=s(l,{...f,...r}),p=r?.trpc?.abortOnUnmount??c,y=ts({...d,initialPageParam:r.initialCursor??null,persister:r.persister,queryKey:l,queryFn:h?t:e=>{let t={...d,trpc:{...d?.trpc,...p?{signal:e.signal}:{signal:null}}};return i.query(...ty(l,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},tf,u);return y.trpc=tb({path:e}),y},usePrefetchInfiniteQuery:function(e,t,r){let i=n(),o=ej(e,t,"infinite"),a=i.queryClient.getQueryDefaults(o),u=t===ek,c=s(o,{...a,...r}),l=r?.trpc?.abortOnUnmount??i.abortOnUnmount;!function(e,t){let r=es(void 0);r.getQueryState(e.queryKey)||r.prefetchInfiniteQuery(e)}({...r,initialPageParam:r.initialCursor??null,queryKey:o,queryFn:u?t:e=>{let t={...c,trpc:{...c?.trpc,...l?{signal:e.signal}:{}}};return i.client.query(...ty(o,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}})},useSuspenseInfiniteQuery:function(e,t,r){var i,o;let a=n(),u=ej(e,t,"infinite"),c=a.queryClient.getQueryDefaults(u),l=s(u,{...c,...r}),f=r?.trpc?.abortOnUnmount??a.abortOnUnmount,h=(i={...r,initialPageParam:r.initialCursor??null,queryKey:u,queryFn:e=>{let t={...l,trpc:{...l?.trpc,...f?{signal:e.signal}:{}}};return a.client.query(...ty(u,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},o=a.queryClient,ts({...i,enabled:!0,suspense:!0,throwOnError:e6},tf,o));return h.trpc=tb({path:e}),[h.data,h]}}}var tv=class extends eq{constructor(e={}){super(),this.config=e,this.#z=new Map}#z;build(e,t,r){let n=t.queryKey,s=t.queryHash??eg(n,t),i=this.get(s);return i||(i=new eB({cache:this,queryKey:n,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(i)),i}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(){eQ.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=>em(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>em(e,t)):t}notify(e){eQ.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){eQ.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){eQ.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},tg=class extends eq{constructor(e={}){super(),this.config=e,this.#$=new Map,this.#Y=Date.now()}#$;#Y;build(e,t,r){let n=new ti({mutationCache:this,mutationId:++this.#Y,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){let t=tO(e),r=this.#$.get(t)??[];r.push(e),this.#$.set(t,r),this.notify({type:"added",mutation:e})}remove(e){let t=tO(e);if(this.#$.has(t)){let r=this.#$.get(t)?.filter(t=>t!==e);r&&(0===r.length?this.#$.delete(t):this.#$.set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){let t=this.#$.get(tO(e))?.find(e=>"pending"===e.state.status);return!t||t===e}runNext(e){let t=this.#$.get(tO(e))?.find(t=>t!==e&&t.state.isPaused);return t?.continue()??Promise.resolve()}clear(){eQ.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#$.values()].flat()}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ev(t,e))}findAll(e={}){return this.getAll().filter(t=>ev(e,t))}notify(e){eQ.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return eQ.batch(()=>Promise.all(e.map(e=>e.continue().catch(eh))))}};function tO(e){return e.options.scope?.id??String(e.mutationId)}var tw=class{#Z;#N;#c;#X;#ee;#et;#er;#en;constructor(e={}){this.#Z=e.queryCache||new tv,this.#N=e.mutationCache||new tg,this.#c=e.defaultOptions||{},this.#X=new Map,this.#ee=new Map,this.#et=0}mount(){this.#et++,1===this.#et&&(this.#er=eN.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Z.onFocus())}),this.#en=eL.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.#N.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(ey(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}),s=this.#Z.get(n.queryHash),i=s?.state.data,o="function"==typeof t?t(i):t;if(void 0!==o)return this.#Z.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return eQ.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;eQ.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#Z,n={type:"active",...e};return eQ.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){let r={revert:!0,...t};return Promise.all(eQ.batch(()=>this.#Z.findAll(e).map(e=>e.cancel(r)))).then(eh).catch(eh)}invalidateQueries(e={},t={}){return eQ.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(eQ.batch(()=>this.#Z.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(eh)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(eh)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#Z.build(this,t);return r.isStaleByTime(ey(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(eh).catch(eh)}fetchInfiniteQuery(e){return e.behavior=tu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(eh).catch(eh)}ensureInfiniteQueryData(e){return e.behavior=tu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eL.isOnline()?this.#N.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#Z}getMutationCache(){return this.#N}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#X.set(eO(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#X.values()],r={};return t.forEach(t=>{ew(e,t.queryKey)&&(r={...r,...t.defaultOptions})}),r}setMutationDefaults(e,t){this.#ee.set(eO(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#ee.values()],r={};return t.forEach(t=>{ew(e,t.mutationKey)&&(r={...r,...t.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=eg(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===ek&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#Z.clear(),this.#N.clear()}};let tE=e=>e.queryClient??new tw(e.queryClientConfig);class tS{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 tR{constructor(e){this.generateIdentifier=e,this.kv=new tS}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 tC extends tR{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 t_(e,t){Object.entries(e).forEach(([e,r])=>t(r,e))}function tP(e,t){return -1!==e.indexOf(t)}function tT(e,t){for(let r=0;r<e.length;r++){let n=e[r];if(t(n))return n}}class tI{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 tk=e=>Object.prototype.toString.call(e).slice(8,-1),tx=e=>void 0===e,tj=e=>null===e,tA=e=>"object"==typeof e&&null!==e&&e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype),tM=e=>tA(e)&&0===Object.keys(e).length,tD=e=>Array.isArray(e),tq=e=>"string"==typeof e,tN=e=>"number"==typeof e&&!isNaN(e),tQ=e=>"boolean"==typeof e,tL=e=>e instanceof Map,tU=e=>e instanceof Set,tF=e=>"Symbol"===tk(e),tz=e=>"number"==typeof e&&isNaN(e),tK=e=>tQ(e)||tj(e)||tx(e)||tN(e)||tq(e)||tF(e),tH=e=>e===1/0||e===-1/0,tW=e=>e.replace(/\./g,"\\."),tV=e=>e.map(String).map(tW).join("."),tB=e=>{let t=[],r="";for(let n=0;n<e.length;n++){let s=e.charAt(n);if("\\"===s&&"."===e.charAt(n+1)){r+=".",n++;continue}if("."===s){t.push(r),r="";continue}r+=s}let n=r;return t.push(n),t};function tG(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}let tJ=[tG(tx,"undefined",()=>null,()=>void 0),tG(e=>"bigint"==typeof e,"bigint",e=>e.toString(),e=>"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),tG(e=>e instanceof Date&&!isNaN(e.valueOf()),"Date",e=>e.toISOString(),e=>new Date(e)),tG(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}),tG(e=>e instanceof RegExp,"regexp",e=>""+e,e=>new RegExp(e.slice(1,e.lastIndexOf("/")),e.slice(e.lastIndexOf("/")+1))),tG(tU,"set",e=>[...e.values()],e=>new Set(e)),tG(tL,"map",e=>[...e.entries()],e=>new Map(e)),tG(e=>tz(e)||tH(e),"number",e=>tz(e)?"NaN":e>0?"Infinity":"-Infinity",Number),tG(e=>0===e&&1/e==-1/0,"number",()=>"-0",Number),tG(e=>e instanceof URL,"URL",e=>e.toString(),e=>new URL(e))];function t$(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}let tY=t$((e,t)=>!!tF(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}),tZ=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),tX=t$(e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{let r=tZ[t[1]];if(!r)throw Error("Trying to deserialize unknown typed array");return new r(e)});function t0(e,t){return!!e?.constructor&&!!t.classRegistry.getIdentifier(e.constructor)}let t1=t$(t0,(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)}),t2=t$((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)}),t4=[t1,tY,t2,tX],t3=(e,t)=>{let r=tT(t4,r=>r.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};let n=tT(tJ,r=>r.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation}},t5={};tJ.forEach(e=>{t5[e.annotation]=e});let t9=(e,t,r)=>{if(tD(t))switch(t[0]){case"symbol":return tY.untransform(e,t,r);case"class":return t1.untransform(e,t,r);case"custom":return t2.untransform(e,t,r);case"typed-array":return tX.untransform(e,t,r);default:throw Error("Unknown transformation: "+t)}else{let n=t5[t];if(!n)throw Error("Unknown transformation: "+t);return n.untransform(e,r)}},t8=(e,t)=>{let r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function t7(e){if(tP(e,"__proto__"))throw Error("__proto__ is not allowed as a property");if(tP(e,"prototype"))throw Error("prototype is not allowed as a property");if(tP(e,"constructor"))throw Error("constructor is not allowed as a property")}let t6=(e,t)=>{t7(t);for(let r=0;r<t.length;r++){let n=t[r];if(tU(e))e=t8(e,+n);else if(tL(e)){let s=+n,i=0==+t[++r]?"key":"value",o=t8(e,s);switch(i){case"key":e=o;break;case"value":e=e.get(o)}}else e=e[n]}return e},re=(e,t,r)=>{if(t7(t),0===t.length)return r(e);let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(tD(n))n=n[+r];else if(tA(n))n=n[r];else if(tU(n))n=t8(n,+r);else if(tL(n)){if(e===t.length-2)break;let s=+r,i=0==+t[++e]?"key":"value",o=t8(n,s);switch(i){case"key":n=o;break;case"value":n=n.get(o)}}}let s=t[t.length-1];if(tD(n)?n[+s]=r(n[+s]):tA(n)&&(n[s]=r(n[s])),tU(n)){let e=t8(n,+s),t=r(e);e!==t&&(n.delete(e),n.add(t))}if(tL(n)){let e=t8(n,+t[t.length-2]);switch(0==+s?"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},rt=(e,t)=>tA(e)||tD(e)||tL(e)||tU(e)||t0(e,t),rr=(e,t,r,n,s=[],i=[],o=new Map)=>{let a=tK(e);if(!a){!function(e,t,r){let n=r.get(e);n?n.push(t):r.set(e,[t])}(e,s,t);let r=o.get(e);if(r)return n?{transformedValue:null}:r}if(!rt(e,r)){let t=t3(e,r),n=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return a||o.set(e,n),n}if(tP(i,e))return{transformedValue:null};let u=t3(e,r),c=u?.value??e,l=tD(c)?[]:{},f={};t_(c,(a,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 c=rr(a,t,r,n,[...s,u],[...i,e],o);l[u]=c.transformedValue,tD(c.annotations)?f[u]=c.annotations:tA(c.annotations)&&t_(c.annotations,(e,t)=>{f[tW(u)+"."+t]=e})});let h=tM(f)?{transformedValue:l,annotations:u?[u.type]:void 0}:{transformedValue:l,annotations:u?[u.type,f]:f};return a||o.set(e,h),h};function rn(e){return Object.prototype.toString.call(e).slice(8,-1)}function rs(e){return"Array"===rn(e)}X=function(e){return"Null"===rn(e)},ee=function(e){return"Undefined"===rn(e)},e=>X(e)||ee(e)||!1;class ri{constructor({dedupe:e=!1}={}){this.classRegistry=new tC,this.symbolRegistry=new tR(e=>e.description??""),this.customTransformerRegistry=new tI,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,r=rr(e,t,this,this.dedupe),n={json:r.transformedValue};r.annotations&&(n.meta={...n.meta,values:r.annotations});let s=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[s,...i]=e;0===s.length?r=i.map(tV):n[tV(s)]=i.map(tV)}),r)?tM(n)?[r]:[r,n]:tM(n)?void 0:n}(t,this.dedupe);return s&&(n.meta={...n.meta,referentialEqualities:s}),n}deserialize(e){let{json:t,meta:r}=e,n=function e(t,r={}){return rs(t)?t.map(t=>e(t,r)):!function(e){if("Object"!==rn(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,s)=>{if(rs(r.props)&&!r.props.includes(s))return n;let i=e(t[s],r);return!function(e,t,r,n,s){let i=({}).propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===i&&(e[t]=r),s&&"nonenumerable"===i&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}(n,s,i,t,r.nonenumerable),n},{})}(t);if(r?.values){var s,i,o;s=n,i=r.values,o=this,function e(t,r,n=[]){if(!t)return;if(!tD(t)){t_(t,(t,s)=>e(t,r,[...n,...tB(s)]));return}let[s,i]=t;i&&t_(i,(t,s)=>{e(t,r,[...n,...tB(s)])}),r(s,n)}(i,(e,t)=>{s=re(s,t,t=>t9(t,e,o))}),n=s}return r?.referentialEqualities&&(n=function(e,t){function r(t,r){let n=t6(e,tB(r));t.map(tB).forEach(t=>{e=re(e,t,()=>n)})}if(tD(t)){let[n,s]=t;n.forEach(t=>{e=re(e,tB(t),()=>e)}),s&&t_(s,r)}else t_(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)}}ri.defaultInstance=new ri,ri.serialize=ri.defaultInstance.serialize.bind(ri.defaultInstance),ri.deserialize=ri.defaultInstance.deserialize.bind(ri.defaultInstance),ri.stringify=ri.defaultInstance.stringify.bind(ri.defaultInstance),ri.parse=ri.defaultInstance.parse.bind(ri.defaultInstance),ri.registerClass=ri.defaultInstance.registerClass.bind(ri.defaultInstance),ri.registerSymbol=ri.defaultInstance.registerSymbol.bind(ri.defaultInstance),ri.registerCustom=ri.defaultInstance.registerCustom.bind(ri.defaultInstance),ri.allowErrorProps=ri.defaultInstance.allowErrorProps.bind(ri.defaultInstance),ri.serialize,ri.deserialize,ri.stringify,ri.parse,ri.registerClass,ri.registerCustom,ri.registerSymbol,ri.allowErrorProps,r(4224);let ro=()=>"",ra=function(e){let t=tm(e),r=function(e){let{config:t}=e,r=F(e.transformer);return n=>{let s=tm(e),i=i=>{let[o]=(0,et.useState)(()=>{if(i.trpc)return i.trpc;let r=t({}),n=tE(r),o=s.createClient(r);return{abortOnUnmount:r.abortOnUnmount,queryClient:n,trpcClient:o,ssrState:!!e.ssr&&"mounting",ssrContext:null}}),{queryClient:a,trpcClient:u,ssrState:c,ssrContext:l}=o,f=i.pageProps?.trpcState,h=et.useMemo(()=>f?r.input.deserialize(f):f,[f,u]);return et.createElement(s.Provider,{abortOnUnmount:o.abortOnUnmount??!1,client:u,queryClient:a,ssrState:c,ssrContext:l},et.createElement(ei,{client:a},et.createElement(eu,{state:h},et.createElement(n,Object.assign({},i)))))};e.ssr?e.ssrPrepass({parent:e,AppOrPage:n,WithTRPC:i}):n.getInitialProps&&(i.getInitialProps=async e=>{let t;let r=!!e.Component,s={},i=await n.getInitialProps(e);return t=s={...r?i.pageProps??{}:i,...s},r?{pageProps:t}:t});let o=n.displayName??n.name??"Component";return i.displayName=`withTRPC(${o})`,i}}(e),n=u(({path:e,args:r})=>{let n=[...e],s=n.pop();if("useMutation"===s)return t[s](n,...r);if("_def"===s)return{path:n};let[i,...o]=r,a=o[0]||{};return t[s](n,i,a)});return c(e=>"useContext"===e||"useUtils"===e?()=>{let e=t.useUtils();return(0,et.useMemo)(()=>(function(e){let t=function(e){let t=u(({path:t,args:r})=>{let n=[...t],s=N(n.pop()),i=n.join(".");return e[s](i,...r)});return c(r=>e.hasOwnProperty(r)?e[r]:"__untypedClient"===r?e:t[r])}(e.client),r=u(t=>{let r=[...t.path],n=r.pop(),s=[...t.args],i=s.shift(),o=ej(r,i,eM(n));return({fetch:()=>e.fetchQuery(o,...s),fetchInfinite:()=>e.fetchInfiniteQuery(o,s[0]),prefetch:()=>e.prefetchQuery(o,...s),prefetchInfinite:()=>e.prefetchInfiniteQuery(o,s[0]),ensureData:()=>e.ensureQueryData(o,...s),invalidate:()=>e.invalidateQueries(o,...s),reset:()=>e.resetQueries(o,...s),refetch:()=>e.refetchQueries(o,...s),cancel:()=>e.cancelQuery(o,...s),setData:()=>{e.setQueryData(o,s[0],s[1])},setQueriesData:()=>e.setQueriesData(o,s[0],s[1],s[2]),setInfiniteData:()=>{e.setInfiniteQueryData(o,s[0],s[1])},getData:()=>e.getQueryData(o),getInfiniteData:()=>e.getInfiniteQueryData(o),setMutationDefaults:()=>e.setMutationDefaults(eA(r),i),getMutationDefaults:()=>e.getMutationDefaults(eA(r)),isMutating:()=>e.isMutating({mutationKey:eA(r)})})[n]()});return c(n=>"client"===n?t:ec.includes(n)?e[n]:r[n])})(e),[e])}:"useQueries"===e?t.useQueries:"useSuspenseQueries"===e?t.useSuspenseQueries:"withTRPC"===e?r:n[e])}({config:()=>({links:[function(e={}){let{enabled:t=()=>!0}=e,r=e.colorMode??("undefined"==typeof window?"ansi":"css"),n=e.withContext??"css"===r,{logger:i=Z({c:e.console,colorMode:r,withContext:n})}=e;return()=>({op:e,next:r})=>s(n=>{var o;t({...e,direction:"up"})&&i({...e,direction:"up"});let a=Date.now();function u(r){let n=Date.now()-a;t({...e,direction:"down",result:r})&&i({...e,direction:"down",elapsedMs:n,result:r})}return r(e).pipe((o={next(e){u(e)},error(e){u(e)}},e=>s(t=>e.subscribe({next(e){o.next?.(e),t.next(e)},error(e){o.error?.(e),t.error(e)},complete(){o.complete?.(),t.complete()}})))).subscribe(n)})}({enabled:e=>"down"===e.direction&&e.result instanceof Error}),function(e){let t={url:e.url.toString(),fetch:e.fetch,transformer:F(e.transformer),methodOverride:e.methodOverride},r=e.maxURLLength??1/0;return()=>{let n=n=>({validate(e){if(r===1/0)return!0;let s=e.map(e=>e.path).join(","),i=e.map(e=>e.input);return H({...t,type:n,path:s,inputs:i,signal:null}).length<=r},async fetch(r){let s=r.map(e=>e.path).join(","),i=r.map(e=>e.input),o=function(e){let t=new AbortController;if(e.some(e=>!e.signal))return t;let r=e.length,n=0,s=()=>{++n===r&&t.abort()};for(let t of e){let e=t.signal;e.aborted?s():e.addEventListener("abort",s,{once:!0})}return t}(r),a=await V({...t,path:s,inputs:i,type:n,headers:()=>e.headers?"function"==typeof e.headers?e.headers({opList:r}):e.headers:{},signal:o.signal});return(Array.isArray(a.json)?a.json:r.map(()=>a.json)).map(e=>({meta:a.meta,json:e}))}}),i={query:L(n("query")),mutation:L(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 s=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(e){throw new v}if(!r.ok&&(!f(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!f(r.result))throw new v;return r}(e.json,t.transformer.output);if(!s.ok){r.error(M.from(s.error,{meta:e.meta}));return}r.next({context:e.meta,result:s.result}),r.complete()}).catch(e=>{r.error(M.from(e,{meta:n?.meta}))}),()=>{}})}}({transformer:ri,url:"".concat(ro(),"/api/trpc")})]}),ssr:!1,transformer:ri})},6541:function(){},6559:function(e,t,r){e.exports=r(9595)},4224:function(e){var t,r,n,s=e.exports={};function i(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!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:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u=[],c=!1,l=-1;function f(){c&&n&&(c=!1,n.length?u=n.concat(u):l=-1,u.length&&h())}function h(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(n=u,u=[];++l<t;)n&&n[l].run();l=-1,t=u.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!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(){}s.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||c||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=p,s.addListener=p,s.once=p,s.off=p,s.removeListener=p,s.removeAllListeners=p,s.emit=p,s.prependListener=p,s.prependOnceListener=p,s.listeners=function(e){return[]},s.binding=function(e){throw Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw Error("process.chdir is not supported")},s.umask=function(){return 0}},7828:function(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var s=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var o=Array(i);o[0]=s(e);for(var a=1;a<i;a++)o[a]=s(r[a]);return o.join(" ")}if("string"!=typeof e)return e;var u=r.length;if(0===u)return e;for(var c="",l=0,f=-1,h=e&&e.length||0,d=0;d<h;){if(37===e.charCodeAt(d)&&d+1<h){switch(f=f>-1?f:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=u||null==r[l])break;f<d&&(c+=e.slice(f,d)),c+=Number(r[l]),f=d+2,d++;break;case 105:if(l>=u||null==r[l])break;f<d&&(c+=e.slice(f,d)),c+=Math.floor(Number(r[l])),f=d+2,d++;break;case 79:case 111:case 106:if(l>=u||void 0===r[l])break;f<d&&(c+=e.slice(f,d));var p=typeof r[l];if("string"===p){c+="'"+r[l]+"'",f=d+2,d++;break}if("function"===p){c+=r[l].name||"<anonymous>",f=d+2,d++;break}c+=s(r[l]),f=d+2,d++;break;case 115:if(l>=u)break;f<d&&(c+=e.slice(f,d)),c+=String(r[l]),f=d+2,d++;break;case 37:f<d&&(c+=e.slice(f,d)),c+="%",f=d+2,d++,l--}++l}++d}return -1===f?e:(f<h&&(c+=e.slice(f)),c)}},9724:function(e,t,r){"use strict";t.kQ=t.ZP=void 0;var n=r(5673);Object.defineProperty(t,"ZP",{enumerable:!0,get:function(){return n.useWebSocket}}),r(4250);var s=r(9884);Object.defineProperty(t,"kQ",{enumerable:!0,get:function(){return s.ReadyState}}),r(9500),r(4582)},2326:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.attachListeners=void 0;var s=r(7864),i=r(9731),o=r(9884),a=r(4582),u=function(e,t,r){var n;if(t.current.heartbeat&&e instanceof WebSocket){var s="boolean"==typeof t.current.heartbeat?void 0:t.current.heartbeat;n=(0,i.heartbeat)(e,s)}e.onmessage=function(e){var s;null==n||n(),t.current.onMessage&&t.current.onMessage(e),("function"!=typeof t.current.filter||!0===t.current.filter(e))&&(t.current.heartbeat&&"boolean"!=typeof t.current.heartbeat&&(null===(s=t.current.heartbeat)||void 0===s?void 0:s.returnMessage)===e.data||r(e))}},c=function(e,t,r,n){e.onopen=function(e){t.current.onOpen&&t.current.onOpen(e),n.current=0,r(o.ReadyState.OPEN)}},l=function(e,t,r,n,s){var i;return o.isEventSourceSupported&&e instanceof EventSource?function(){}:((0,a.assertIsWebSocket)(e,t.current.skipAssert),e.onclose=function(e){var a;if(t.current.onClose&&t.current.onClose(e),r(o.ReadyState.CLOSED),t.current.shouldReconnect&&t.current.shouldReconnect(e)){var u=null!==(a=t.current.reconnectAttempts)&&void 0!==a?a:o.DEFAULT_RECONNECT_LIMIT;if(s.current<u){var c="function"==typeof t.current.reconnectInterval?t.current.reconnectInterval(s.current):t.current.reconnectInterval;i=window.setTimeout(function(){s.current++,n()},null!=c?c:o.DEFAULT_RECONNECT_INTERVAL_MS)}else t.current.onReconnectStop&&t.current.onReconnectStop(u),console.warn("Max reconnect attempts of ".concat(u," exceeded"))}},function(){return i&&window.clearTimeout(i)})},f=function(e,t,r,s,i){var a;return e.onerror=function(u){var c;if(t.current.onError&&t.current.onError(u),o.isEventSourceSupported&&e instanceof EventSource&&(t.current.onClose&&t.current.onClose(n(n({},u),{code:1006,reason:"An error occurred with the EventSource: ".concat(u),wasClean:!1})),r(o.ReadyState.CLOSED),e.close()),t.current.retryOnError){if(i.current<(null!==(c=t.current.reconnectAttempts)&&void 0!==c?c:o.DEFAULT_RECONNECT_LIMIT)){var l="function"==typeof t.current.reconnectInterval?t.current.reconnectInterval(i.current):t.current.reconnectInterval;a=window.setTimeout(function(){i.current++,s()},null!=l?l:o.DEFAULT_RECONNECT_INTERVAL_MS)}else t.current.onReconnectStop&&t.current.onReconnectStop(t.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(t.current.reconnectAttempts," exceeded"))}},function(){return a&&window.clearTimeout(a)}};t.attachListeners=function(e,t,r,n,i,a){var h,d,p,y=t.setLastMessage,b=t.setReadyState;return r.current.fromSocketIO&&(h=(0,s.setUpSocketIOPing)(a)),u(e,r,y),c(e,r,b,i),d=l(e,r,b,n,i),p=f(e,r,b,n,i),function(){b(o.ReadyState.CLOSING),d(),p(),e.close(),h&&clearInterval(h)}}},7244:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.attachSharedListeners=void 0;var s=r(2954),i=r(9884),o=r(6514),a=r(7864),u=r(9731),c=function(e,t,r){var n;r&&e instanceof WebSocket&&(n=(0,u.heartbeat)(e,"boolean"==typeof r?void 0:r)),e.onmessage=function(e){null==n||n(),(0,o.getSubscribers)(t).forEach(function(t){t.optionsRef.current.onMessage&&t.optionsRef.current.onMessage(e),("function"!=typeof t.optionsRef.current.filter||!0===t.optionsRef.current.filter(e))&&(r&&"boolean"!=typeof r&&(null==r?void 0:r.returnMessage)===e.data||t.setLastMessage(e))})}},l=function(e,t){e.onopen=function(e){(0,o.getSubscribers)(t).forEach(function(t){t.reconnectCount.current=0,t.optionsRef.current.onOpen&&t.optionsRef.current.onOpen(e),t.setReadyState(i.ReadyState.OPEN)})}},f=function(e,t){e instanceof WebSocket&&(e.onclose=function(e){(0,o.getSubscribers)(t).forEach(function(t){t.optionsRef.current.onClose&&t.optionsRef.current.onClose(e),t.setReadyState(i.ReadyState.CLOSED)}),delete s.sharedWebSockets[t],(0,o.getSubscribers)(t).forEach(function(t){var r;if(t.optionsRef.current.shouldReconnect&&t.optionsRef.current.shouldReconnect(e)){var n=null!==(r=t.optionsRef.current.reconnectAttempts)&&void 0!==r?r:i.DEFAULT_RECONNECT_LIMIT;if(t.reconnectCount.current<n){var s="function"==typeof t.optionsRef.current.reconnectInterval?t.optionsRef.current.reconnectInterval(t.reconnectCount.current):t.optionsRef.current.reconnectInterval;setTimeout(function(){t.reconnectCount.current++,t.reconnect.current()},null!=s?s:i.DEFAULT_RECONNECT_INTERVAL_MS)}else t.optionsRef.current.onReconnectStop&&t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(n," exceeded"))}})})},h=function(e,t){e.onerror=function(r){(0,o.getSubscribers)(t).forEach(function(t){t.optionsRef.current.onError&&t.optionsRef.current.onError(r),i.isEventSourceSupported&&e instanceof EventSource&&(t.optionsRef.current.onClose&&t.optionsRef.current.onClose(n(n({},r),{code:1006,reason:"An error occurred with the EventSource: ".concat(r),wasClean:!1})),t.setReadyState(i.ReadyState.CLOSED))}),i.isEventSourceSupported&&e instanceof EventSource&&e.close()}};t.attachSharedListeners=function(e,t,r,n){var s;return r.current.fromSocketIO&&(s=(0,a.setUpSocketIOPing)(n)),c(e,t,r.current.heartbeat),f(e,t),l(e,t),h(e,t),function(){s&&clearInterval(s)}}},9884:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.isEventSourceSupported=t.isReactNative=t.ReadyState=t.DEFAULT_HEARTBEAT=t.UNPARSABLE_JSON_OBJECT=t.DEFAULT_RECONNECT_INTERVAL_MS=t.DEFAULT_RECONNECT_LIMIT=t.SOCKET_IO_PING_CODE=t.SOCKET_IO_PATH=t.SOCKET_IO_PING_INTERVAL=t.DEFAULT_EVENT_SOURCE_OPTIONS=t.EMPTY_EVENT_HANDLERS=t.DEFAULT_OPTIONS=void 0,t.DEFAULT_OPTIONS={},t.EMPTY_EVENT_HANDLERS={},t.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:t.EMPTY_EVENT_HANDLERS},t.SOCKET_IO_PING_INTERVAL=25e3,t.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",t.SOCKET_IO_PING_CODE="2",t.DEFAULT_RECONNECT_LIMIT=20,t.DEFAULT_RECONNECT_INTERVAL_MS=5e3,t.UNPARSABLE_JSON_OBJECT={},t.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3},(n=r||(t.ReadyState=r={}))[n.UNINSTANTIATED=-1]="UNINSTANTIATED",n[n.CONNECTING=0]="CONNECTING",n[n.OPEN=1]="OPEN",n[n.CLOSING=2]="CLOSING",n[n.CLOSED=3]="CLOSED",t.isReactNative="undefined"!=typeof navigator&&"ReactNative"===navigator.product,t.isEventSourceSupported=!t.isReactNative&&function(){try{return"EventSource"in globalThis}catch(e){return!1}}()},8672:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOrJoinSocket=void 0;var n=r(2954),s=r(9884),i=r(2326),o=r(7244),a=r(6514);t.createOrJoinSocket=function(e,t,r,u,c,l,f,h){if(!s.isEventSourceSupported&&u.current.eventSourceOptions){if(s.isReactNative)throw Error("EventSource is not supported in ReactNative");throw Error("EventSource is not supported")}if(u.current.share){var d,p=null;void 0===n.sharedWebSockets[t]?(n.sharedWebSockets[t]=u.current.eventSourceOptions?new EventSource(t,u.current.eventSourceOptions):new WebSocket(t,u.current.protocols),e.current=n.sharedWebSockets[t],r(s.ReadyState.CONNECTING),p=(0,o.attachSharedListeners)(n.sharedWebSockets[t],t,u,h)):(e.current=n.sharedWebSockets[t],r(n.sharedWebSockets[t].readyState));var y={setLastMessage:c,setReadyState:r,optionsRef:u,reconnectCount:f,reconnect:l};return(0,a.addSubscriber)(t,y),d=p,function(){if((0,a.removeSubscriber)(t,y),!(0,a.hasSubscribers)(t)){try{var e=n.sharedWebSockets[t];e instanceof WebSocket&&(e.onclose=function(e){u.current.onClose&&u.current.onClose(e),r(s.ReadyState.CLOSED)}),e.close()}catch(e){}d&&d(),delete n.sharedWebSockets[t]}}}if(e.current=u.current.eventSourceOptions?new EventSource(t,u.current.eventSourceOptions):new WebSocket(t,u.current.protocols),r(s.ReadyState.CONNECTING),!e.current)throw Error("WebSocket failed to be created");return(0,i.attachListeners)(e.current,{setLastMessage:c,setReadyState:r},u,l.current,f,h)}},3019:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}u((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var r,n,s,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(s=2&a[0]?n.return:a[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;switch(n=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(s=(s=i.trys).length>0&&s[s.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(6===a[0]&&i.label<s[1]){i.label=s[1],s=a;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(a);break}s[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},i=this&&this.__spreadArray||function(e,t,r){if(r||2==arguments.length)for(var n,s=0,i=t.length;s<i;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=void 0;var o=r(7864),a=r(9884);t.getUrl=function(e,r){for(var u=[],c=2;c<arguments.length;c++)u[c-2]=arguments[c];return n(void 0,i([e,r],u,!0),void 0,function(e,r,n){var i,u,c,l,f,h,d;return void 0===n&&(n=0),s(this,function(s){switch(s.label){case 0:if("function"!=typeof e)return[3,10];s.label=1;case 1:return s.trys.push([1,3,,9]),[4,e()];case 2:return i=s.sent(),[3,9];case 3:var p;if(s.sent(),!r.current.retryOnError)return[3,7];if(u=null!==(f=r.current.reconnectAttempts)&&void 0!==f?f:a.DEFAULT_RECONNECT_LIMIT,!(n<u))return[3,5];return[4,(p=null!=(c="function"==typeof r.current.reconnectInterval?r.current.reconnectInterval(n):r.current.reconnectInterval)?c:a.DEFAULT_RECONNECT_INTERVAL_MS,new Promise(function(e){return window.setTimeout(e,p)}))];case 4:return s.sent(),[2,(0,t.getUrl)(e,r,n+1)];case 5:return null===(d=(h=r.current).onReconnectStop)||void 0===d||d.call(h,n),[2,null];case 6:return[3,8];case 7:return[2,null];case 8:return[3,9];case 9:return[3,11];case 10:i=e,s.label=11;case 11:return l=r.current.fromSocketIO?(0,o.parseSocketIOUrl)(i):i,[2,r.current.queryParams?(0,o.appendQueryParams)(l,r.current.queryParams):l]}})})}},2954:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetWebSockets=t.sharedWebSockets=void 0,t.sharedWebSockets={},t.resetWebSockets=function(e){if(e&&t.sharedWebSockets.hasOwnProperty(e))delete t.sharedWebSockets[e];else for(var r in t.sharedWebSockets)t.sharedWebSockets.hasOwnProperty(r)&&delete t.sharedWebSockets[r]}},9731:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.heartbeat=function(e,t){var r=t||{},s=r.interval,i=void 0===s?n.DEFAULT_HEARTBEAT.interval:s,o=r.timeout,a=void 0===o?n.DEFAULT_HEARTBEAT.timeout:o,u=r.message,c=void 0===u?n.DEFAULT_HEARTBEAT.message:u,l=!1,f=setInterval(function(){try{"function"==typeof c?e.send(c()):e.send(c)}catch(e){}},i),h=setInterval(function(){l?l=!1:e.close()},a);return e.addEventListener("close",function(){clearInterval(f),clearInterval(h)}),function(){l=!0}};var n=r(9884)},6514:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetSubscribers=t.removeSubscriber=t.addSubscriber=t.hasSubscribers=t.getSubscribers=void 0;var r={},n=[];t.getSubscribers=function(e){return(0,t.hasSubscribers)(e)?Array.from(r[e]):n},t.hasSubscribers=function(e){var t;return(null===(t=r[e])||void 0===t?void 0:t.size)>0},t.addSubscriber=function(e,t){r[e]=r[e]||new Set,r[e].add(t)},t.removeSubscriber=function(e,t){r[e].delete(t)},t.resetSubscribers=function(e){if(e&&r.hasOwnProperty(e))delete r[e];else for(var t in r)r.hasOwnProperty(t)&&delete r[t]}},1139:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.websocketWrapper=void 0,t.websocketWrapper=function(e,t){return new Proxy(e,{get:function(e,r){var n=e[r];return"reconnect"===r?t:"function"==typeof n?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):n},set:function(e,t,r){return/^on/.test(t)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(e[t]=r,!0)}})},t.default=t.websocketWrapper},7864:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setUpSocketIOPing=t.appendQueryParams=t.parseSocketIOUrl=void 0;var n=r(9884);t.parseSocketIOUrl=function(e){if(e){var t=/^https|wss/.test(e),r=e.replace(/^(https?|wss?)(:\/\/)?/,"").replace(/\/$/,""),s=t?"wss":"ws";return"".concat(s,"://").concat(r).concat(n.SOCKET_IO_PATH)}if(""===e){var t=/^https/.test(window.location.protocol),s=t?"wss":"ws",i=window.location.port?":".concat(window.location.port):"";return"".concat(s,"://").concat(window.location.hostname).concat(i).concat(n.SOCKET_IO_PATH)}return e},t.appendQueryParams=function(e,t){void 0===t&&(t={});var r=/\?([\w]+=[\w]+)/.test(e),n="".concat(Object.entries(t).reduce(function(e,t){var r=t[0],n=t[1];return e+"".concat(r,"=").concat(n,"&")},"").slice(0,-1));return"".concat(e).concat(r?"&":"?").concat(n)},t.setUpSocketIOPing=function(e,t){return void 0===t&&(t=n.SOCKET_IO_PING_INTERVAL),window.setInterval(function(){return e(n.SOCKET_IO_PING_CODE)},t)}},9500:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},s=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.useEventSource=void 0;var i=r(5271),o=r(5673),a=r(9884);t.useEventSource=function(e,t,r){void 0===t&&(t=a.DEFAULT_EVENT_SOURCE_OPTIONS);var u=t.withCredentials,c=t.events,l=s(t,["withCredentials","events"]);void 0===r&&(r=!0);var f=n(n({},l),{eventSourceOptions:{withCredentials:u}}),h=(0,i.useRef)(a.EMPTY_EVENT_HANDLERS);c&&(h.current=c);var d=(0,o.useWebSocket)(e,f,r),p=d.lastMessage,y=d.readyState,b=d.getWebSocket;return(0,i.useEffect)(function(){(null==p?void 0:p.type)&&Object.entries(h.current).forEach(function(e){var t=e[0],r=e[1];t===p.type&&r(p)})},[p]),{lastEvent:p,readyState:y,getEventSource:b}}},4250:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useSocketIO=void 0;var s=r(5271),i=r(5673),o=r(9884),a={type:"empty",payload:null},u=function(e){if(!e||!e.data)return a;var t=e.data.match(/\[.*]/);if(!t)return a;var r=JSON.parse(t);return Array.isArray(r)&&r[1]?{type:r[0],payload:r[1]}:a};t.useSocketIO=function(e,t,r){void 0===t&&(t=o.DEFAULT_OPTIONS),void 0===r&&(r=!0);var a=(0,s.useMemo)(function(){return n(n({},t),{fromSocketIO:!0})},[]),c=(0,i.useWebSocket)(e,a,r),l=c.sendMessage,f=c.sendJsonMessage,h=c.lastMessage,d=c.readyState,p=c.getWebSocket,y=(0,s.useMemo)(function(){return u(h)},[h]);return{sendMessage:l,sendJsonMessage:f,lastMessage:y,lastJsonMessage:y,readyState:d,getWebSocket:p}}},5673:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}u((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,s,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(s=2&a[0]?n.return:a[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;switch(n=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(s=(s=i.trys).length>0&&s[s.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(6===a[0]&&i.label<s[1]){i.label=s[1],s=a;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(a);break}s[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useWebSocket=void 0;var a=r(5271),u=r(967),c=r(9884),l=r(8672),f=r(3019),h=o(r(1139)),d=r(4582);t.useWebSocket=function(e,t,r){void 0===t&&(t=c.DEFAULT_OPTIONS),void 0===r&&(r=!0);var o=(0,a.useState)(null),p=o[0],y=o[1],b=(0,a.useState)({}),m=b[0],v=b[1],g=(0,a.useMemo)(function(){if(p)try{return JSON.parse(p.data)}catch(e){return c.UNPARSABLE_JSON_OBJECT}return null},[p]),O=(0,a.useRef)(null),w=(0,a.useRef)(null),E=(0,a.useRef)(function(){}),S=(0,a.useRef)(0),R=(0,a.useRef)([]),C=(0,a.useRef)(null),_=(0,a.useRef)(t);_.current=t;var P=O.current&&void 0!==m[O.current]?m[O.current]:null!==e&&!0===r?c.ReadyState.CONNECTING:c.ReadyState.UNINSTANTIATED,T=t.queryParams?JSON.stringify(t.queryParams):null,I=(0,a.useCallback)(function(e,t){var r;if(void 0===t&&(t=!0),c.isEventSourceSupported&&w.current instanceof EventSource){console.warn("Unable to send a message from an eventSource");return}(null===(r=w.current)||void 0===r?void 0:r.readyState)===c.ReadyState.OPEN?((0,d.assertIsWebSocket)(w.current,_.current.skipAssert),w.current.send(e)):t&&R.current.push(e)},[]),k=(0,a.useCallback)(function(e,t){void 0===t&&(t=!0),I(JSON.stringify(e),t)},[I]),x=(0,a.useCallback)(function(){return!0!==_.current.share||c.isEventSourceSupported&&w.current instanceof EventSource?w.current:(null===C.current&&w.current&&((0,d.assertIsWebSocket)(w.current,_.current.skipAssert),C.current=(0,h.default)(w.current,E)),C.current)},[]);return(0,a.useEffect)(function(){if(null!==e&&!0===r){var t,o=!1,a=!0,h=function(){return s(void 0,void 0,void 0,function(){var r,s,h;return i(this,function(i){switch(i.label){case 0:return r=O,[4,(0,f.getUrl)(e,_)];case 1:if(r.current=i.sent(),null===O.current)return console.error("Failed to get a valid URL. WebSocket connection aborted."),O.current="ABORTED",(0,u.flushSync)(function(){return v(function(e){return n(n({},e),{ABORTED:c.ReadyState.CLOSED})})}),[2];return s=function(e){o||(0,u.flushSync)(function(){return y(e)})},h=function(e){o||(0,u.flushSync)(function(){return v(function(t){var r;return n(n({},t),O.current&&((r={})[O.current]=e,r))})})},a&&(t=(0,l.createOrJoinSocket)(w,O.current,h,_,s,E,S,I)),[2]}})})};return E.current=function(){o||(C.current&&(C.current=null),null==t||t(),h())},h(),function(){o=!0,a=!1,C.current&&(C.current=null),null==t||t(),y(null)}}(null===e||!1===r)&&(S.current=0,v(function(e){var t;return n(n({},e),O.current&&((t={})[O.current]=c.ReadyState.CLOSED,t))}))},[e,r,T,I]),(0,a.useEffect)(function(){P===c.ReadyState.OPEN&&R.current.splice(0).forEach(function(e){I(e)})},[P]),{sendMessage:I,sendJsonMessage:k,lastMessage:p,lastJsonMessage:g,readyState:P,getWebSocket:x}}},4582:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsWebSocket=function(e,t){if(!t&&e instanceof WebSocket==!1)throw Error("")},t.resetGlobalState=function(e){(0,s.resetSubscribers)(e),(0,n.resetWebSockets)(e)};var n=r(2954),s=r(6514)},381:function(e,t,r){"use strict";let n=r(7828);e.exports=l;let s=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function i(e,t){return"silent"===e?1/0:t.levels.values[e]}let o=Symbol("pino.logFuncs"),a=Symbol("pino.hierarchy"),u={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function c(e,t){let r={logger:t,parent:e[a]};t[a]=r}function l(e){var t,r;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let a=e.browser.write||s;e.browser.write&&(e.browser.asObject=!0);let p=e.serializers||{},y=Array.isArray(t=e.browser.serialize)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(p),b=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(b=!1);let O=Object.keys(e.customLevels||{}),w=["error","fatal","warn","info","debug","trace"].concat(O);"function"==typeof a&&w.forEach(function(e){a[e]=a}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let E=e.level||"info",S=Object.create(a);S.log||(S.log=m),function(e,t,r){let n={};t.forEach(e=>{n[e]=r[e]?r[e]:s[e]||s[u[e]||"log"]||m}),e[o]=n}(S,w,a),c({},S),Object.defineProperty(S,"levelVal",{get:function(){return i(this.level,this)}}),Object.defineProperty(S,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,f(this,R,S,"error"),f(this,R,S,"fatal"),f(this,R,S,"warn"),f(this,R,S,"info"),f(this,R,S,"debug"),f(this,R,S,"trace"),O.forEach(e=>{f(this,R,S,e)})}});let R={transmit:n,serialize:y,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:w,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?v:g,messageKey:e.messageKey||"msg",onChild:e.onChild||m};function C(t,r,s){if(!r)throw Error("missing bindings for child Pino");s=s||{},y&&r.serializers&&(s.serializers=r.serializers);let i=s.serializers;if(y&&i){var o=Object.assign({},p,i),a=!0===e.browser.serialize?Object.keys(o):y;delete r.serializers,h([r],a,o,this._stdErrSerialize)}function u(e){this._childLevel=(0|e._childLevel)+1,this.bindings=r,o&&(this.serializers=o,this._serialize=a),n&&(this._logEvent=d([].concat(e._logEvent.bindings,r)))}u.prototype=this;let l=new u(this);return c(this,l),l.child=function(...e){return C.call(this,t,...e)},l.level=s.level||this.level,t.onChild(l),l}return S.levels=function(e){let t=e.customLevels||{};return{values:Object.assign({},l.levels.values,t),labels:Object.assign({},l.levels.labels,function(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}(t))}}(e),S.level=E,S.setMaxListeners=S.getMaxListeners=S.emit=S.addListener=S.on=S.prependListener=S.once=S.prependOnceListener=S.removeListener=S.removeAllListeners=S.listeners=S.listenerCount=S.eventNames=S.write=S.flush=m,S.serializers=p,S._serialize=y,S._stdErrSerialize=b,S.child=function(...e){return C.call(this,R,...e)},n&&(S._logEvent=d()),S}function f(e,t,r,u){var c,l;if(Object.defineProperty(e,u,{value:i(e.level,r)>i(u,r)?m:r[o][u],writable:!0,enumerable:!0,configurable:!0}),e[u]===m){if(!t.transmit)return;let n=t.transmit.level||e.level,s=r.levels.values[n];if(r.levels.values[u]<s)return}e[u]=(c=e[o][u],function(){let o=t.timestamp(),a=Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===s?s:this;for(var f=0;f<a.length;f++)a[f]=arguments[f];var p=!1;if(t.serialize&&(h(a,this._serialize,this.serializers,this._stdErrSerialize),p=!0),t.asObject||t.formatters?c.call(l,function(e,t,r,s,i){let{level:o,log:a=e=>e}=i.formatters||{},u=r.slice(),c=u[0],l={};s&&(l.time=s),o?Object.assign(l,o(t,e.levels.values[t])):l.level=e.levels.values[t];let f=(0|e._childLevel)+1;if(f<1&&(f=1),null!==c&&"object"==typeof c){for(;f--&&"object"==typeof u[0];)Object.assign(l,u.shift());c=u.length?n(u.shift(),u):void 0}else"string"==typeof c&&(c=n(u.shift(),u));return void 0!==c&&(l[i.messageKey]=c),a(l)}(this,u,a,o,t)):c.apply(l,a),t.transmit){let n=t.transmit.level||e._level,s=r.levels.values[n],c=r.levels.values[u];if(c<s)return;(function(e,t,r,n=!1){let s=t.send,i=t.ts,o=t.methodLevel,a=t.methodValue,u=t.val,c=e._logEvent.bindings;n||h(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(e){return -1===c.indexOf(e)}),e._logEvent.level.label=o,e._logEvent.level.value=a,s(o,e._logEvent,u),e._logEvent=d(c)})(this,{ts:o,methodLevel:u,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:i(e._level,r)},a,p)}});let f=function(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[a];for(;r.parent;)(r=r.parent).logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==f.length&&(e[u]=(l=e[u],function(){return l.apply(this,[...f,...arguments])}))}function h(e,t,r,n){for(let s in e)if(n&&e[s]instanceof Error)e[s]=l.stdSerializers.err(e[s]);else if("object"==typeof e[s]&&!Array.isArray(e[s])&&t)for(let n in e[s])t.indexOf(n)>-1&&n in r&&(e[s][n]=r[n](e[s][n]))}function d(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function y(){return{}}function b(e){return e}function m(){}function v(){return!1}function g(){return Date.now()}l.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},l.stdSerializers={mapHttpRequest:y,mapHttpResponse:y,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:y,res:y,err:p,errWithCause:p},l.stdTimeFunctions=Object.assign({},{nullTime:v,epochTime:g,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=l,e.exports.pino=l},4814:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=function e(t){var r,n,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t){if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n)}return s}(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(5217),t(5988)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{7474:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(7930)}])},7930:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return i},default:function(){return l}});var r=n(2676);n(5271);var o=n(6743),s=n.n(o),i=!0;function l(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("title",{children:"rePDF - live previews of PDF templates"})}),(0,r.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center text-center",children:[(0,r.jsx)("h1",{className:"mb-4 text-4xl font-bold",children:"rePDF"}),(0,r.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Design, Develop, Deploy and Delight with PDFs"}),(0,r.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,r.jsx)("a",{href:"https://github.com/your-repo",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("button",{type:"button",className:"rounded bg-blue-500 px-4 py-2 text-white transition duration-300 hover:bg-blue-700",children:"Documentation"})})]})]})}},6743:function(e,t,n){e.exports=n(9721)}},function(e){e.O(0,[888,774,179],function(){return e(e.s=7474)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[254],{3998:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/preview/[...relTemplatePath]",function(){return t(2810)}])},2810:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return m},default:function(){return f}});var l=t(2676),n=t(6743),s=t.n(n),a=t(1014),i=t(5271),c=t(4942);function d(e){let{children:r}=e,{data:t,isLoading:n}=c.h.core.templateCheck.useQuery({relTemplatePath:"test.txt"});return(0,l.jsx)(l.Fragment,{children:r})}var o=t(739);function h(e){let{relTemplatePath:r}=e,{data:t,isLoading:n}=c.h.core.fileContents.useQuery({relTemplatePath:r});return n?(0,l.jsx)("div",{children:"Loading..."}):t?(0,l.jsx)("div",{children:(0,l.jsx)(o.y$,{theme:o.np.shadesOfPurple,code:t,language:"tsx",children:e=>{let{className:r,style:t,tokens:n,getLineProps:s,getTokenProps:a}=e;return(0,l.jsx)("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word",maxWidth:"100%"},children:n.map((e,r)=>(0,l.jsxs)("div",{...s({line:e}),style:{display:"flex"},children:[(0,l.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:r+1}),(0,l.jsx)("span",{style:{flex:1,overflow:"hidden"},children:e.map((e,r)=>(0,l.jsx)("span",{...a({token:e}),style:{...a({token:e}).style,wordBreak:"break-all",whiteSpace:"pre-wrap"}},r))})]},r))})}})}):(0,l.jsx)("div",{children:"Error"})}function u(e){let{relTemplatePath:r}=e,{data:t}=c.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[n,s]=(0,i.useState)(!0),[a,d]=(0,i.useState)("/api/component?relativeTemplatePath=".concat(r));return(0,i.useEffect)(()=>{t&&(s(!0),d("/api/component?relativeTemplatePath=".concat(r,"&refresh=").concat(t)))},[t,r]),(0,l.jsxs)("div",{className:"relative h-full w-full",children:[n&&(0,l.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:(0,l.jsx)("p",{children:"Rendering Component..."})}),a&&(0,l.jsx)("iframe",{src:a,className:"h-full w-full border-none",onLoad:()=>s(!1)})]})}function p(e){let{relTemplatePath:r}=e,{data:t,isLoading:n}=c.h.core.renderedHtml.useQuery({relTemplatePath:r});return n?(0,l.jsx)("div",{children:"Loading..."}):t?(0,l.jsx)("div",{children:(0,l.jsx)(o.y$,{theme:o.np.shadesOfPurple,code:t,language:"tsx",children:e=>{let{className:r,style:t,tokens:n,getLineProps:s,getTokenProps:a}=e;return(0,l.jsx)("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:n.map((e,r)=>(0,l.jsxs)("div",{...s({line:e}),style:{display:"flex"},children:[(0,l.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:r+1}),(0,l.jsx)("span",{children:e.map((e,r)=>(0,l.jsx)("span",{...a({token:e})},r))})]},r))})}})}):(0,l.jsx)("div",{children:"Error"})}function x(e){let{relTemplatePath:r}=e,{data:t}=c.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[n,s]=(0,i.useState)(!0),[a,d]=(0,i.useState)("/api/pdf?relativeTemplatePath=".concat(r));return(0,i.useEffect)(()=>{t&&(s(!0),d("/api/pdf?relativeTemplatePath=".concat(r,"&refresh=").concat(t)))},[t,r]),(0,l.jsxs)("div",{className:"relative h-full w-full",children:[n&&(0,l.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:(0,l.jsx)("p",{children:"Rendering PDF..."})}),(0,l.jsx)("iframe",{src:a,width:"100%",height:"100%",title:"PDF Preview",onLoad:()=>s(!1)},t)]})}var m=!0;function f(e){let{templateName:r,relTemplatePath:t}=e,n=(0,a.useRouter)(),c=n.query.view,o=e=>{n.push({query:{...n.query,view:e}})};return(0,i.useEffect)(()=>{c||n.push({query:{...n.query,view:"component"}})},[c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s(),{children:(0,l.jsx)("title",{children:"Preview PDF - rePDF"})}),(0,l.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between bg-gray-200 p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:r}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:r!==t?t:"​"})]}),(0,l.jsx)("div",{children:(0,l.jsxs)("ul",{className:"flex",children:[(0,l.jsx)("li",{className:"rounded-l bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("code"),children:"Code"}),(0,l.jsx)("li",{className:"bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("component"),children:"Component"}),(0,l.jsx)("li",{className:"bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("pdf"),children:"PDF"}),(0,l.jsx)("li",{className:"rounded-r bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("html"),children:"HTML"})]})})]}),(0,l.jsx)("div",{className:"flex-grow",children:(0,l.jsxs)(d,{children:["code"===c&&(0,l.jsx)(h,{relTemplatePath:t}),(null===c||"component"===c)&&(0,l.jsx)(u,{relTemplatePath:t}),"html"===c&&(0,l.jsx)(p,{relTemplatePath:t}),"pdf"===c&&(0,l.jsx)(x,{relTemplatePath:t})]})})]})]})}}},function(e){e.O(0,[587,888,774,179],function(){return e(e.s=3998)}),_N_E=e.O()}]);