@next-font/plugin-vite 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +11 -11
  2. package/README.md +24 -24
  3. package/dist/{escodegen-DyMV8y05.js → escodegen-C_Z-CdZV.js} +1 -1
  4. package/dist/{index-zBNqiqVh.js → index-3r20UDzC.js} +1 -1
  5. package/dist/index-CwSLpYSN.js +76 -0
  6. package/dist/index.js +1 -3
  7. package/package.json +3 -3
  8. package/dist/escodegen-BgZHbZlI.js +0 -5298
  9. package/dist/escodegen-BgZHbZlI.js.map +0 -1
  10. package/dist/escodegen-CE_3K55m.js +0 -5298
  11. package/dist/escodegen-CE_3K55m.js.map +0 -1
  12. package/dist/escodegen-CcjHPeru.js +0 -5298
  13. package/dist/escodegen-CcjHPeru.js.map +0 -1
  14. package/dist/escodegen-CvnByJYb.js +0 -5298
  15. package/dist/escodegen-CvnByJYb.js.map +0 -1
  16. package/dist/escodegen-CyyYl3Ru.js +0 -5298
  17. package/dist/escodegen-CyyYl3Ru.js.map +0 -1
  18. package/dist/escodegen-D-UqarBv.js +0 -5298
  19. package/dist/escodegen-D-UqarBv.js.map +0 -1
  20. package/dist/escodegen-D1ExFsOu.js +0 -5298
  21. package/dist/escodegen-D1ExFsOu.js.map +0 -1
  22. package/dist/escodegen-DhS8gxED.js +0 -5298
  23. package/dist/escodegen-DhS8gxED.js.map +0 -1
  24. package/dist/escodegen-o7sNOZ-d.js +0 -5298
  25. package/dist/escodegen-o7sNOZ-d.js.map +0 -1
  26. package/dist/index-B6M1BKem.js +0 -3852
  27. package/dist/index-B6M1BKem.js.map +0 -1
  28. package/dist/index-BBnr2Ij5.js +0 -6970
  29. package/dist/index-BBnr2Ij5.js.map +0 -1
  30. package/dist/index-BUL3xgiH.js +0 -3851
  31. package/dist/index-BUL3xgiH.js.map +0 -1
  32. package/dist/index-Bgbg2WYx.js +0 -6970
  33. package/dist/index-Bgbg2WYx.js.map +0 -1
  34. package/dist/index-BiSz54YK.js +0 -6970
  35. package/dist/index-BiSz54YK.js.map +0 -1
  36. package/dist/index-BjC6MXVP.js +0 -3851
  37. package/dist/index-BjC6MXVP.js.map +0 -1
  38. package/dist/index-BknOo0Zr.js +0 -6970
  39. package/dist/index-BknOo0Zr.js.map +0 -1
  40. package/dist/index-C-zBTUD_.js +0 -3852
  41. package/dist/index-C-zBTUD_.js.map +0 -1
  42. package/dist/index-C0NlOFro.js +0 -3851
  43. package/dist/index-C0NlOFro.js.map +0 -1
  44. package/dist/index-C7SN2-vF.js +0 -6970
  45. package/dist/index-C7SN2-vF.js.map +0 -1
  46. package/dist/index-CLLYtm7D.js +0 -3853
  47. package/dist/index-CLLYtm7D.js.map +0 -1
  48. package/dist/index-CZZp2BW0.js +0 -79
  49. package/dist/index-CyE6nKxy.js +0 -3856
  50. package/dist/index-CyE6nKxy.js.map +0 -1
  51. package/dist/index-D-QcVmRl.js +0 -3850
  52. package/dist/index-D-QcVmRl.js.map +0 -1
  53. package/dist/index-D15_W2rR.js +0 -6970
  54. package/dist/index-D15_W2rR.js.map +0 -1
  55. package/dist/index-Dgy5wars.js +0 -6970
  56. package/dist/index-Dgy5wars.js.map +0 -1
  57. package/dist/index-Dob7-G92.js +0 -6970
  58. package/dist/index-Dob7-G92.js.map +0 -1
  59. package/dist/index-PLAGUBZD.js +0 -6970
  60. package/dist/index-PLAGUBZD.js.map +0 -1
  61. package/dist/index-y2m5QvKY.js +0 -3851
  62. package/dist/index-y2m5QvKY.js.map +0 -1
  63. package/dist/index.js.map +0 -1
@@ -0,0 +1,76 @@
1
+ import{isCSSRequest as e}from"vite";import t,{fileURLToPath as r}from"node:url";import i from"node:path";import n,{win32 as o,posix as s}from"path";import a from"crypto";import l from"postcss";let h="%[a-f0-9]{2}",u=RegExp("("+h+")|([^%]+?)","gi"),c=RegExp("("+h+")+","gi");function f(e,t){if("string"!=typeof e||"string"!=typeof t)throw TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];let r=e.indexOf(t);return -1===r?[]:[e.slice(0,r),e.slice(r+t.length)]}let d=Symbol("encodeFragmentIdentifier");function p(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function g(e,t){return t.encode?t.strict?encodeURIComponent(e).replaceAll(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`):encodeURIComponent(e):e}function A(e,t){if(t.decode){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{var r=e;let t={"%FE%FF":"��","%FF%FE":"��"},i=c.exec(r);for(;i;){try{t[i[0]]=decodeURIComponent(i[0])}catch{let e=function(e){try{return decodeURIComponent(e)}catch{let t=e.match(u)||[];for(let r=1;r<t.length;r++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;r=r||1;let i=t.slice(0,r),n=t.slice(r);return Array.prototype.concat.call([],e(i),e(n))})(t,r).join("")).match(u)||[];return e}}(i[0]);e!==i[0]&&(t[i[0]]=e)}i=c.exec(r)}for(let e of(t["%C2"]="�",Object.keys(t)))r=r.replace(RegExp(e,"g"),t[e]);return r}}return e}function m(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function y(e,t,r){return"string"===r&&"string"==typeof e?e:"function"==typeof r&&"string"==typeof e?r(e):"boolean"===r&&null===e||("boolean"===r&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())?"true"===e.toLowerCase():"boolean"===r&&null!==e&&("1"===e.toLowerCase()||"0"===e.toLowerCase())?"1"===e.toLowerCase():"string[]"===r&&"none"!==t.arrayFormat&&"string"==typeof e?[e]:"number[]"!==r||"none"===t.arrayFormat||Number.isNaN(Number(e))||"string"!=typeof e||""===e.trim()?"number"!==r||Number.isNaN(Number(e))||"string"!=typeof e||""===e.trim()?t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())?"true"===e.toLowerCase():t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?Number(e):e:Number(e):[Number(e)])}function I(e){let t=(e=m(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function C(e,t){p((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t}).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,i)=>{if(t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),!t){i[e]=r;return}void 0===i[e]&&(i[e]={}),i[e][t[1]]=r};case"bracket":return(e,r,i)=>{if(t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),!t){i[e]=r;return}if(void 0===i[e]){i[e]=[r];return}i[e]=[...i[e],r]};case"colon-list-separator":return(e,r,i)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){i[e]=r;return}if(void 0===i[e]){i[e]=[r];return}i[e]=[...i[e],r]};case"comma":case"separator":return(t,r,i)=>{let n="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!n&&A(r,e).includes(e.arrayFormatSeparator);r=o?A(r,e):r;let s=n||o?r.split(e.arrayFormatSeparator).map(t=>A(t,e)):null===r?r:A(r,e);i[t]=s};case"bracket-separator":return(t,r,i)=>{let n=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!n){i[t]=r?A(r,e):r;return}let o=null===r?[]:A(r,e).split(e.arrayFormatSeparator);if(void 0===i[t]){i[t]=o;return}i[t]=[...i[t],...o]};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[...[r[e]].flat(),t]}}}(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let n of e.split("&")){if(""===n)continue;let e=t.decode?n.replaceAll("+"," "):n,[o,s]=f(e,"=");void 0===o&&(o=e),s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:A(s,t),r(A(o,t),s,i)}for(let[e,r]of Object.entries(i))if("object"==typeof r&&null!==r&&"string"!==t.types[e])for(let[i,n]of Object.entries(r)){let o=t.types[e]?t.types[e].replace("[]",""):void 0;r[i]=y(n,t,o)}else"object"==typeof r&&null!==r&&"string"===t.types[e]?i[e]=Object.values(r).join(t.arrayFormatSeparator):i[e]=y(r,t,t.types[e]);return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{let r=i[t];return e[t]=r&&"object"==typeof r&&!Array.isArray(r)?function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):r,e},Object.create(null))}function E(e,t){t={encode:!0,strict:!0,[d]:!0,...t};let r=m(e.url).split("?")[0]||"",i=function(e,t){if(!e)return"";p((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);let r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],i=function(e){switch(e.arrayFormat){case"index":return t=>(r,i)=>{let n=r.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,g(t,e)+"["+n+"]"]:[...r,g(t,e)+"["+g(n,e)+"]="+g(i,e)]};case"bracket":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,g(t,e)+"[]"]:[...r,g(t,e)+"[]="+g(i,e)];case"colon-list-separator":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,g(t,e)+":list="]:[...r,g(t,e)+":list="+g(i,e)];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:(n=null===n?"":n,0===i.length)?[[g(r,e),t,g(n,e)].join("")]:[[i,g(n,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,g(t,e)]:[...r,g(t,e)+"="+g(i,e)]}}(t),n={};for(let[t,i]of Object.entries(e))r(t)||(n[t]=i);let o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map(r=>{let n=e[r];return void 0===n?"":null===n?g(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?g(r,t)+"[]":n.reduce(i(r),[]).join("&"):g(r,t)+"="+g(n,t)}).filter(e=>e.length>0).join("&")}({...C(I(e.url),{sort:!1,...t}),...e.query},t);i&&=`?${i}`;let n=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);if("string"==typeof e.fragmentIdentifier){let i=new URL(r);i.hash=e.fragmentIdentifier,n=t[d]?i.hash:`#${e.fragmentIdentifier}`}return`${r}${i}${n}`}let b=e=>{let t=e.indexOf("?");return -1===t?"":e.slice(t)},v=e=>{let t=e.indexOf("?");return -1===t?e:e.slice(0,t)},w=e=>{let t;return()=>(t||(t=e().then(e=>(t=e,e))),t)},x=async e=>{try{return{data:await e,error:null}}catch(e){return{data:null,error:e}}},S=async e=>import.meta.resolve(v(e));function B(e){if(e.startsWith("data:"))return e;let t=e.replace(Q,""),r=t!==e?e.slice(t.length):"";return encodeURI(t)+r}let Q=/[?#].*$/,F=e=>[""].concat(["_next",e].filter(Boolean)).join("/"),k=e=>E({url:v(e),query:D(C(b(e)),["arguments","path","import","variableName"])}),D=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e))),N="undefined"!=typeof process&&"win32"===process.platform,_=/\\/g;function $(e){return i.posix.normalize(N?e.replace(_,"/"):e)}let R=e=>{let r=j(e)?t.fileURLToPath(e):e;return N&&(r=r.replace(/^((\\|\/)?)[Cc]:/,"")),r},j=e=>{try{let{protocol:t}=new URL(e);return"file:"===t}catch{return!1}},O=(e,t)=>{let r=R(e),i=R(t);return r==i||$(r)===$(i)||B($(r))===B($(i))};var M,U,L,P,J,q,G,z,T,H,W,Y,X,K,Z,V,ee,et,er,ei="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function en(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}let eo=RegExp(`\\${o.sep}`,"g"),es=function(e){return e.replace(eo,s.sep)},ea=new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" "));ea.add("");let el=function(e){let t=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g,"_");return(/\d/.test(t[0])||ea.has(t))&&(t=`_${t}`),t||"_"};function eh(e){return(JSON.stringify(e)||"undefined").replace(/[\u2028\u2029]/g,e=>`\\u${`000${e.charCodeAt(0).toString(16)}`.slice(-4)}`)}function eu(e,t,r){if("object"==typeof e&&null!==e){if(Array.isArray(e)){let i="[",n=t?`
2
+ ${r}${t}`:"";for(let o=0;o<e.length;o++){let s=e[o];i+=`${o>0?",":""}${n}${eu(s,t,r+t)}`}return`${i}${t?`
3
+ ${r}`:""}]`}return e instanceof Date?`new Date(${e.getTime()})`:e instanceof RegExp?e.toString():function(e,t,r){let i="{",n=t?`
4
+ ${r}${t}`:"",o=Object.entries(e);for(let e=0;e<o.length;e++){let[s,a]=o[e],l=el(s)===s?s:eh(s);i+=`${e>0?",":""}${n}${l}:${t?" ":""}${eu(a,t,r+t)}`}return`${i}${t?`
5
+ ${r}`:""}}`}(e,t,r)}if("number"==typeof e){if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(0===e)return 1/e==1/0?"0":"-0";if(e!=e)return"NaN"}if("symbol"==typeof e){let t=Symbol.keyFor(e);if(void 0!==t)return`Symbol.for(${eh(t)})`}return"bigint"==typeof e?`${e}n`:eh(e)}let ec="isWellFormed"in String.prototype,ef=function(e,t={}){var r,i;let n=t.compact?"":"indent"in t?t.indent:" ",o=t.compact?"":" ",s=t.compact?"":"\n",a=t.preferConst?"const":"var";if(!1===t.namedExports||"object"!=typeof e||Array.isArray(e)||e instanceof Date||e instanceof RegExp||null===e){let r=eu(e,t.compact?null:n,""),i=o||(/^[{[\-\/]/.test(r)?"":" ");return`export default${i}${r};`}let l=0;for(let t of Object.keys(e)){let e=null!=(i=null==(r=/^(_+)/.exec(t))?void 0:r[0].length)?i:0;e>l&&(l=e)}let h=`${"_".repeat(l+1)}arbitrary`,u="",c=[],f=[];for(let[r,i]of Object.entries(e))if(r===el(r))t.objectShorthand?c.push(r):c.push(`${r}:${o}${r}`),u+=`export ${a} ${r}${o}=${o}${eu(i,t.compact?null:n,"")};${s}`;else if(c.push(`${eh(r)}:${o}${eu(i,t.compact?null:n,"")}`),t.includeArbitraryNames&&(ec?r.isWellFormed():!/\p{Surrogate}/u.test(r))){let e=`${h}${f.length}`;u+=`${a} ${e}${o}=${o}${eu(i,t.compact?null:n,"")};${s}`,f.push(`${e} as ${JSON.stringify(r)}`)}let d=f.length>0?`export${o}{${s}${n}${f.join(`,${s}${n}`)}${s}};${s}`:"",p=`export default${o}{${s}${n}${c.join(`,${s}${n}`)}${s}};${s}`;return`${u}${d}${p}`};var ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ep=new Uint8Array(64),eg=new Uint8Array(128);for(let e=0;e<ed.length;e++){let t=ed.charCodeAt(e);ep[e]=t,eg[t]=e}function eA(e,t,r){let i=t-r;i=i<0?-i<<1|1:i<<1;do{let t=31&i;(i>>>=5)>0&&(t|=32),e.write(ep[t])}while(i>0);return t}var em="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}},ey=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){let{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=em.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:r}=this;return r>0?t+em.decode(e.subarray(0,r)):t}};class eI{constructor(e){this.bits=e instanceof eI?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}class eC{constructor(e,t,r){this.start=e,this.end=t,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new eC(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,r){return this.content=e,r||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let t=e-this.start,r=this.original.slice(0,t),i=this.original.slice(t);this.original=r;let n=new eC(e,this.end,i);return n.outro=this.outro,this.outro="",this.end=e,this.edited?(n.edit("",!1),this.content=""):this.content=r,n.next=this.next,n.next&&(n.next.previous=n),n.previous=this,this.next=n,n}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let t=this.content.replace(e,"");if(t.length){if(t!==this.content){let e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}}let eE="undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};class eb{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=function(e){let t=new ey,r=0,i=0,n=0,o=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(59),0===a.length)continue;let l=0;for(let e=0;e<a.length;e++){let s=a[e];e>0&&t.write(44),l=eA(t,s[0],l),1!==s.length&&(r=eA(t,s[1],r),i=eA(t,s[2],i),n=eA(t,s[3],n),4!==s.length&&(o=eA(t,s[4],o)))}}return t.flush()}(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+eE(this.toString())}}let ev=Object.prototype.toString;function ew(e){let t=e.split("\n"),r=[];for(let e=0,i=0;e<t.length;e++)r.push(i),i+=t[e].length+1;return function(e){let t=0,i=r.length;for(;t<i;){let n=t+i>>1;e<r[n]?i=n:t=n+1}let n=t-1,o=e-r[n];return{line:n,column:o}}}let ex=/\w/;class eS{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,r,i){if(t.length){let n=t.length-1,o=t.indexOf("\n",0),s=-1;for(;o>=0&&n>o;){let n=[this.generatedCodeColumn,e,r.line,r.column];i>=0&&n.push(i),this.rawSegments.push(n),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=o,o=t.indexOf("\n",o+1)}let a=[this.generatedCodeColumn,e,r.line,r.column];i>=0&&a.push(i),this.rawSegments.push(a),this.advance(t.slice(s+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,r,i,n){let o=t.start,s=!0,a=!1;for(;o<t.end;){if("\n"===r[o])i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=!0,a=!1;else{if(this.hires||s||n.has(o)){let t=[this.generatedCodeColumn,e,i.line,i.column];"boundary"===this.hires?ex.test(r[o])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}i.column+=1,this.generatedCodeColumn+=1,s=!1}o+=1}this.pending=null}advance(e){if(!e)return;let t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}let eB={insertLeft:!1,insertRight:!1,storeName:!1};class eQ{constructor(e,t={}){let r=new eC(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new eI},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=r,this.byEnd[e.length]=r}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw TypeError("inserted content must be a string");this._split(e);let r=this.byEnd[e];return r?r.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw TypeError("inserted content must be a string");this._split(e);let r=this.byStart[e];return r?r.appendRight(t):this.outro+=t,this}clone(){let e=new eQ(this.original,{filename:this.filename,offset:this.offset}),t=this.firstChunk,r=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[r.start]=r,e.byEnd[r.end]=r;let i=t.next,n=i&&i.clone();n&&(r.next=n,n.previous=r,r=n),t=i}return e.lastChunk=r,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new eI(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};let t=Object.keys(this.storedNames),r=new eS(e.hires),i=ew(this.original);return this.intro&&r.advance(this.intro),this.firstChunk.eachNext(e=>{let n=i(e.start);e.intro.length&&r.advance(e.intro),e.edited?r.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):r.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&r.advance(e.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?function(e,t){let r=e.split(/[/\\]/),i=t.split(/[/\\]/);for(r.pop();r[0]===i[0];)r.shift(),i.shift();if(r.length){let e=r.length;for(;e--;)r[e]=".."}return r.concat(i).join("/")}(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:r.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new eb(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){let t=e.split("\n"),r=t.filter(e=>/^\t+/.test(e)),i=t.filter(e=>/^ {2,}/.test(e));return 0===r.length&&0===i.length?null:r.length>=i.length?" ":Array(i.reduce((e,t)=>Math.min(/^ +/.exec(t)[0].length,e),1/0)+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?" ":this.indentStr}indent(e,t){var r;let i=/^[^\r\n]/gm;if(r=e,"[object Object]"===ev.call(r)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||" "),""===e)return this;let n={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)n[t]=!0});let o=!1!==t.indentStart,s=t=>o?`${e}${t}`:(o=!0,t);this.intro=this.intro.replace(i,s);let a=0,l=this.firstChunk;for(;l;){let t=l.end;if(l.edited)!n[a]&&(l.content=l.content.replace(i,s),l.content.length&&(o="\n"===l.content[l.content.length-1]));else for(a=l.start;a<t;){if(!n[a]){let t=this.original[a];"\n"===t?o=!0:"\r"!==t&&o&&(o=!1,a===l.start?l.prependRight(e):(this._splitChunk(l,a),(l=l.next).prependRight(e)))}a+=1}a=l.end,l=l.next}return this.outro=this.outro.replace(i,s),this}insert(){throw Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return eB.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),eB.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return eB.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),eB.insertRight=!0),this.prependRight(e,t)}move(e,t,r){if(e+=this.offset,t+=this.offset,(r+=this.offset)>=e&&r<=t)throw Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(r);let i=this.byStart[e],n=this.byEnd[t],o=i.previous,s=n.next,a=this.byStart[r];if(!a&&n===this.lastChunk)return this;let l=a?a.previous:this.lastChunk;return o&&(o.next=s),s&&(s.previous=o),l&&(l.next=i),a&&(a.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,n.next=a||null,l||(this.firstChunk=i),a||(this.lastChunk=n),this}overwrite(e,t,r,i){return i=i||{},this.update(e,t,r,{...i,overwrite:!i.contentOnly})}update(e,t,r,i){if(e+=this.offset,t+=this.offset,"string"!=typeof r)throw TypeError("replacement content must be a string");if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw Error("end is out of bounds");if(e===t)throw Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(eB.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),eB.storeName=!0),i={storeName:!0});let n=void 0!==i&&i.storeName,o=void 0!==i&&i.overwrite;if(n){let r=this.original.slice(e,t);Object.defineProperty(this.storedNames,r,{writable:!0,value:!0,enumerable:!0})}let s=this.byStart[e],a=this.byEnd[t];if(s){let e=s;for(;e!==a;){if(e.next!==this.byStart[e.end])throw Error("Cannot overwrite across a split point");(e=e.next).edit("",!1)}s.edit(r,n,!o)}else{let i=new eC(e,t,"").edit(r,n);a.next=i,i.previous=a}return this}prepend(e){if("string"!=typeof e)throw TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw TypeError("inserted content must be a string");this._split(e);let r=this.byEnd[e];return r?r.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw TypeError("inserted content must be a string");this._split(e);let r=this.byStart[e];return r?r.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw Error("Character is out of bounds");if(e>t)throw Error("end must be greater than start");this._split(e),this._split(t);let r=this.byStart[e];for(;r;)r.intro="",r.outro="",r.edit(""),r=t>r.end?this.byStart[r.end]:null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw Error("Character is out of bounds");if(e>t)throw Error("end must be greater than start");this._split(e),this._split(t);let r=this.byStart[e];for(;r;)r.reset(),r=t>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf("\n");if(-1!==e)return this.outro.substr(e+1);let t=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(-1!==(e=r.outro.lastIndexOf("\n")))return r.outro.substr(e+1)+t;t=r.outro+t}if(r.content.length>0){if(-1!==(e=r.content.lastIndexOf("\n")))return r.content.substr(e+1)+t;t=r.content+t}if(r.intro.length>0){if(-1!==(e=r.intro.lastIndexOf("\n")))return r.intro.substr(e+1)+t;t=r.intro+t}}while(r=r.previous);return -1!==(e=this.intro.lastIndexOf("\n"))?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let r="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<t&&i.end>=t)return r;i=i.next}if(i&&i.edited&&i.start!==e)throw Error(`Cannot use replaced character ${e} as slice start anchor.`);let n=i;for(;i;){i.intro&&(n!==i||i.start===e)&&(r+=i.intro);let o=i.start<t&&i.end>=t;if(o&&i.edited&&i.end!==t)throw Error(`Cannot use replaced character ${t} as slice end anchor.`);let s=n===i?e-i.start:0,a=o?i.content.length+t-i.end:i.content.length;if(r+=i.content.slice(s,a),i.outro&&(!o||i.end===t)&&(r+=i.outro),o)break;i=i.next}return r}snip(e,t){let r=this.clone();return r.remove(0,e),r.remove(t,r.original.length),r}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,r=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=r?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){let r=ew(this.original)(t);throw Error(`Cannot split a chunk that has already been edited (${r.line}:${r.column} – "${e.original}")`)}let r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do t+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){let t=RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.lastChunk;do{let e=r.end,i=r.trimEnd(t);if(r.end!==e&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),i)return!0;r=r.previous}while(r);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){let t=RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.firstChunk;do{let e=r.end,i=r.trimStart(t);if(r.end!==e&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),i)return!0;r=r.next}while(r);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function r(e,r){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,(t,r)=>"$"===r?"$":"&"===r?e[0]:+r<e.length?e[+r]:`$${r}`):t(...e,e.index,r,e.groups)}if(e.global)(function(e,t){let r,i=[];for(;r=e.exec(t);)i.push(r);return i})(e,this.original).forEach(e=>{if(null!=e.index){let t=r(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}});else{let t=this.original.match(e);if(t&&null!=t.index){let e=r(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){let{original:r}=this,i=r.indexOf(e);return -1!==i&&this.overwrite(i,i+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){let{original:r}=this,i=e.length;for(let n=r.indexOf(e);-1!==n;n=r.indexOf(e,n+i))r.slice(n,n+i)!==t&&this.overwrite(n,n+i,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}var eF={},ek={exports:{}};function eD(){if(J)return ek.exports;J=1;let e=-4&Math.floor(16368);class t{constructor(e,t,r,i){let n=e.exports;n.init(),this.exports=n,this.mem=Buffer.from(n.memory.buffer,0,65536),this.buffered=0,this.instancesPool=t,this.chunkSize=r,this.digestSize=i}reset(){this.buffered=0,this.exports.init()}update(t,r){if("string"==typeof t){for(;t.length>e;)this._updateWithShortString(t.slice(0,e),r),t=t.slice(e);return this._updateWithShortString(t,r),this}return this._updateWithBuffer(t),this}_updateWithShortString(e,t){let r,{exports:i,buffered:n,mem:o,chunkSize:s}=this;if(e.length<70)if(t&&"utf-8"!==t&&"utf8"!==t)if("latin1"===t){r=n;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);o[r++]=i}}else r=n+o.write(e,n,t);else{r=n;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);if(n<128)o[r++]=n;else if(n<2048)o[r]=n>>6|192,o[r+1]=63&n|128,r+=2;else{r+=o.write(e.slice(i),r,t);break}}}else r=n+o.write(e,n,t);if(r<s)this.buffered=r;else{let e=r&~(this.chunkSize-1);i.update(e);let t=r-e;this.buffered=t,t>0&&o.copyWithin(0,e,r)}}_updateWithBuffer(e){let{exports:t,buffered:r,mem:i}=this,n=e.length;if(r+n<this.chunkSize)e.copy(i,r,0,n),this.buffered+=n;else{let o=r+n&~(this.chunkSize-1);if(o>65536){let n=65536-r;e.copy(i,r,0,n),t.update(65536);let s=o-r-65536;for(;n<s;)e.copy(i,0,n,n+65536),t.update(65536),n+=65536;e.copy(i,0,n,o-r),t.update(o-r-n)}else e.copy(i,r,0,o-r),t.update(o);let s=n+r-o;this.buffered=s,s>0&&e.copy(i,0,n-s,n)}}digest(e){let{exports:t,buffered:r,mem:i,digestSize:n}=this;t.final(r),this.instancesPool.push(this);let o=i.toString("latin1",0,n);return"hex"===e?o:"binary"!==e&&e?Buffer.from(o,"hex").toString(e):Buffer.from(o,"hex")}}return ek.exports=(e,r,i,n)=>{if(!(r.length>0))return new t(new WebAssembly.Instance(e),r,i,n);{let e=r.pop();return e.reset(),e}},ek.exports.MAX_SHORT_STRING=e,ek.exports}function eN(){if(T)return z;T=1;let e=eD().MAX_SHORT_STRING;return z=class{constructor(e){this.string=void 0,this.encoding=void 0,this.hash=e}update(t,r){if(void 0!==this.string){if("string"==typeof t&&r===this.encoding&&this.string.length+t.length<e)return this.string+=t,this;this.hash.update(this.string,this.encoding),this.string=void 0}return"string"==typeof t?!(t.length<e)||r&&r.startsWith("ba")?this.hash.update(t,r):(this.string=t,this.encoding=r):this.hash.update(t),this}digest(e){return void 0!==this.string&&this.hash.update(this.string,this.encoding),this.hash.digest(e)}}}function e_(){if(X)return Y;X=1;let e={};return Y=class{constructor(e,t){this.hashKey=t,"function"==typeof e?(this.hashFactory=e,this.hash=void 0):(this.hashFactory=void 0,this.hash=e),this.buffer=""}update(e,t){return void 0!==t||"string"!=typeof e||e.length>2e3?(void 0===this.hash&&(this.hash=this.hashFactory()),this.buffer.length>0&&(this.hash.update(this.buffer),this.buffer=""),this.hash.update(e,t)):(this.buffer+=e,this.buffer.length>2e3&&(void 0===this.hash&&(this.hash=this.hashFactory()),this.hash.update(this.buffer),this.buffer="")),this}digest(t){let r,i=this.buffer;if(void 0===this.hash){let n=`${this.hashKey}-${t}`;void 0===(r=e[n])&&(r=e[n]=new Map);let o=r.get(i);if(void 0!==o)return o;this.hash=this.hashFactory()}i.length>0&&this.hash.update(i);let n=this.hash.digest(t);return void 0!==r&&r.set(i,n),n}}}function e$(){let e,t,r,i,n;if(Z)return K;Z=1;let o={26:"abcdefghijklmnopqrstuvwxyz",32:"123456789abcdefghjkmnpqrstuvwxyz",36:"0123456789abcdefghijklmnopqrstuvwxyz",49:"abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",52:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",62:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",64:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"};return K=function(s,l,h,u){let c;return(u=u||9999,"xxhash64"===(l=l||"xxhash64")?(void 0===t&&(t=function(){if(G)return q;G=1;let e=eD(),t=new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL","base64"));return q=e.bind(null,t,[],32,16)}(),void 0===i&&(i=eN())),c=new i(t())):"md4"===l?(void 0===r&&(r=function(){if(W)return H;W=1;let e=eD(),t=new WebAssembly.Module(Buffer.from("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","base64"));return H=e.bind(null,t,[],64,32)}(),void 0===i&&(i=eN())),c=new i(r())):"native-md4"===l?(void 0===e&&(e=a,void 0===n&&(n=e_())),c=new n(()=>e.createHash("md4"),"md4")):(void 0===e&&(e=a,void 0===n&&(n=e_())),c=new n(()=>e.createHash(l),l)),c.update(s),"base26"===h||"base32"===h||"base36"===h||"base49"===h||"base52"===h||"base58"===h||"base62"===h||"base64safe"===h)?function(e,t,r){let i=o[t];if(!i)throw Error("Unknown encoding base"+t);r=Math.min(r,Math.ceil(8*e.length/Math.log2(t)));let n=new Uint32Array(Math.ceil(e.length/4));e.copy(Buffer.from(n.buffer));let s="";for(let e=0;e<r;e++)s=i[function(e,t){let r=0;for(let i=e.length-1;i>=0;i--){let n=0x100000000*r+e[i];r=n%t,e[i]=Math.floor(n/t)}return r}(n,t)]+s;return s}(c.digest(),"base64safe"===h?64:h.substr(4),u):c.digest(h||"hex").substr(0,u)}}function eR(){if(ee)return V;ee=1;let e=e$();return V=function(t,r,i={}){let o,s=t.resourceQuery&&t.resourceQuery.length>1;o="function"==typeof r?r(t.resourcePath,s?t.resourceQuery:void 0):r||"[hash].[ext]";let a=i.context,l=i.content,h=i.regExp,u="bin",c="file",f="",d="",p="";if(t.resourcePath){let e=n.parse(t.resourcePath),r=t.resourcePath;e.ext&&(u=e.ext.substr(1)),e.dir&&(c=e.name,r=e.dir+n.sep),(f=void 0!==a?(f=n.relative(a,r+"_").replace(/\\/g,"/").replace(/\.\.(\/)?/g,"_$1")).substr(0,f.length-1):r.replace(/\\/g,"/").replace(/\.\.(\/)?/g,"_$1")).length<=1?f="":d=n.basename(f)}if(t.resourceQuery&&t.resourceQuery.length>1){let e=(p=t.resourceQuery).indexOf("#");e>=0&&(p=p.substr(0,e))}let g=o;if(l&&(g=g.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi,(t,r,i,n)=>e(l,r,i,parseInt(n,10)))),g=g.replace(/\[ext\]/gi,()=>u).replace(/\[name\]/gi,()=>c).replace(/\[path\]/gi,()=>f).replace(/\[folder\]/gi,()=>d).replace(/\[query\]/gi,()=>p),h&&t.resourcePath){let e=t.resourcePath.match(new RegExp(h));e&&e.forEach((e,t)=>{g=g.replace(RegExp("\\["+t+"\\]","ig"),e)})}return"object"==typeof t.options&&"function"==typeof t.options.customInterpolateName&&(g=t.options.customInterpolateName.call(t,g,r,i)),g}}var ej=en(function(){if(et)return eF;et=1;let e=U?M:(U=1,M=function(e){return!!/^data:/i.test(e)||!(/^[a-z][a-z0-9+.-]*:/i.test(e)&&!n.win32.isAbsolute(e)||/^\/\//.test(e)||/^#/.test(e))}),t=function(){if(P)return L;P=1;let e=/^[A-Z]:[/\\]|^\\\\/i;return L=function(t,r){let i;if(""===t)return"";let n=/^[^?]*~/;if(e.test(t))i=t;else if(void 0!==r&&!1!==r&&/^\//.test(t))switch(typeof r){case"string":i=n.test(r)?r.replace(/([^~/])$/,"$1/")+t.slice(1):r+t;break;case"boolean":i=t;break;default:throw Error("Unexpected parameters to loader-utils 'urlToRequest': url = "+t+", root = "+r+".")}else i=/^\.\.?\//.test(t)?t:"./"+t;return n.test(i)&&(i=i.replace(n,"")),i}}(),r=e$(),i=eR();return eF.urlToRequest=t,eF.getHashDigest=r,eF.interpolateName=i,eF.isUrlRequest=e,eF}()),eO={},eM=en(function(){var e;if(er)return eO;er=1;Object.defineProperty(eO,"__esModule",{value:!0}),Object.defineProperty(eO,"default",{enumerable:!0,get:function(){return i}});let t=(e=l)&&e.__esModule?e:{default:e},r=({exports:e,fallbackFonts:r=[],adjustFontFallback:i,variable:n,weight:o,style:s})=>({postcssPlugin:"postcss-next-font",Once(a){let l,h,u=e=>e.replace(/['"]/g,""),c=e=>`'${e}'`;for(let e of a.nodes)if("atrule"===e.type&&"font-face"===e.name){let t=e.nodes.find(e=>"font-family"===e.prop);if(!t)continue;l||(l=u(t.value)),t.value=c(l)}if(!l)throw Object.defineProperty(Error("Font loaders must return one or more @font-face's"),"__NEXT_ERROR_CODE",{value:"E428",enumerable:!1,configurable:!0});if(i){h=c(`${l} Fallback`);let e=t.default.atRule({name:"font-face"}),{fallbackFont:r,ascentOverride:n,descentOverride:o,lineGapOverride:s,sizeAdjust:u}=i;e.nodes=[new t.default.Declaration({prop:"font-family",value:h}),new t.default.Declaration({prop:"src",value:`local("${r}")`}),...n?[new t.default.Declaration({prop:"ascent-override",value:n})]:[],...o?[new t.default.Declaration({prop:"descent-override",value:o})]:[],...s?[new t.default.Declaration({prop:"line-gap-override",value:s})]:[],...u?[new t.default.Declaration({prop:"size-adjust",value:u})]:[]],a.nodes.push(e)}let f=e=>e.trim().includes(" "),d=[c(l),...h?[h]:[],...r].join(", "),p=new t.default.Rule({selector:".className"});if(p.nodes=[new t.default.Declaration({prop:"font-family",value:d}),...o&&!f(o)?[new t.default.Declaration({prop:"font-weight",value:o})]:[],...s&&!f(s)?[new t.default.Declaration({prop:"font-style",value:s})]:[]],a.nodes.push(p),n){let e=new t.default.Rule({selector:".variable"});e.nodes=[new t.default.Declaration({prop:n,value:d})],a.nodes.push(e)}e.push({name:"style",value:{fontFamily:d,fontWeight:Number.isNaN(Number(o))?void 0:Number(o),fontStyle:s&&!f(s)?s:void 0}})}});r.postcss=!0;let i=r;return eO}());let eU=w(()=>import("./index-3r20UDzC.js").then(function(e){return e.i})),eL=w(()=>import("postcss")),eP=async(e,{css:t,fallbackFonts:r,weight:i,style:n,adjustFontFallback:o,variable:s})=>{let a,l=ej.getHashDigest(Buffer.from(t),"sha1","hex",6),h=[],u=await eJ({postcssPlugins:[(eM.default||eM)({exports:h,fallbackFonts:r,weight:i,style:n,adjustFontFallback:o,variable:s}),(await eU()).default({generateScopedName:e=>`__${e}_${l}`,getJSON(e,t,r){a=t}})],postcssOptions:{from:e},code:t});return{exports:h,...u,modules:a}},eJ=async({postcssPlugins:e=[],postcssOptions:t={},code:r})=>{let i;try{let n=await eL();i=await n.default(e).process(r,t)}catch(e){if("object"==typeof e&&null!==e&&"message"in e&&"file"in e&&"line"in e&&"column"in e&&"number"==typeof e.column)throw Object.assign({},{message:`[postcss] ${e.message}`,code:r,loc:{file:e.file,line:e.line,column:e.column-1}})}return{code:i.css,map:{mappings:""}}},eq=w(()=>import("next-font/google/loader").then(e=>e.default)),eG=w(()=>import("next-font/local/loader").then(e=>e.default));class ez{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,t,r,i){e&&t&&(null!=r?e[t][r]=i:e[t]=i)}remove(e,t,r){e&&t&&(null!=r?e[t].splice(r,1):delete e[t])}}class eT extends ez{constructor(e,t){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e},this.enter=e,this.leave=t}visit(e,t,r,i){if(e){let n;if(this.enter){let n=this.should_skip,o=this.should_remove,s=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,r,i),this.replacement&&(e=this.replacement,this.replace(t,r,i,e)),this.should_remove&&this.remove(t,r,i);let a=this.should_skip,l=this.should_remove;if(this.should_skip=n,this.should_remove=o,this.replacement=s,a)return e;if(l)return null}for(n in e){let t=e[n];if(t&&"object"==typeof t)if(Array.isArray(t))for(let r=0;r<t.length;r+=1){let i=t[r];eH(i)&&!this.visit(i,e,n,r)&&r--}else eH(t)&&this.visit(t,e,n,null)}if(this.leave){let n=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,r,i),this.replacement&&(e=this.replacement,this.replace(t,r,i,e)),this.should_remove&&this.remove(t,r,i);let s=this.should_remove;if(this.replacement=n,this.should_remove=o,s)return null}}return e}}function eH(e){return null!==e&&"object"==typeof e&&"type"in e&&"string"==typeof e.type}function eW(e,{enter:t,leave:r}){return new eT(t,r).visit(e,null)}class eY{constructor({state:e}){this.state=e}visit(e){eW(e,{enter:e=>{"Identifier"===e.type&&this.visitIdent(e)}})}visitIdent(e){if(e.name in this.state.fontFunctions&&!this.state.fontFunctionsInAllowedScope.includes(e.start))throw Error("Font loaders must be called and assigned to a const in the module scope")}}class eX{constructor({state:e,fontLoaders:t,remapImports:r}){this.state=e,this.fontLoaders=t,this.remapImports=r}visit(e){eW(e,{enter:e=>{"ImportDeclaration"===e.type&&this.visitImportDecl(e)}})}visitImportDecl(e){if("string"!=typeof e.source.value)return;let t=null;try{t=import.meta.resolve(v(this.remapImports[e.source.value]||e.source.value))}catch{}if(null!=t&&this.fontLoaders.some(e=>O(import.meta.resolve(e),t)))for(let t of(this.state.removeableModuleItems.push(e.start),e.specifiers)){let{local:r,functionName:i}=(()=>{switch(t.type){case"ImportSpecifier":{let{local:e,imported:r}=t,i="Identifier"===r.type?r.name:e.name;return{local:e,functionName:i}}case"ImportDefaultSpecifier":{let{local:e}=t;return{local:e}}case"ImportNamespaceSpecifier":throw Error("Font loaders can't have namespace imports")}})();this.state.fontFunctionsInAllowedScope.push(r.start),this.state.fontFunctions[r.name]={functionName:i,loader:e.source.value}}}}let eK={start:0,end:0},eZ=e=>{switch(e.type){case"Literal":return e.value;case"ObjectExpression":return eV(e);case"ArrayExpression":return e.elements.map(e=>{if(e){if("SpreadElement"===e.type)throw Error("Unexpected spread");return eZ(e)}throw Error("Unexpected empty value in array")});default:throw Error("Font loader values must be explicitly written literals.")}},eV=e=>{let t={};for(let r of e.properties){if("SpreadElement"===r.type)throw Error("Unexpected spread");if("init"!==r.kind)throw Error("Unexpected key");if("Identifier"!==r.key.type)throw Error("Unexpected object key type");t[r.key.name]=eZ(r.value)}return t},e0=new WeakMap,e1=0;function e3(e){let t=typeof e,r=e&&e.constructor,i=r===Date;if(Object(e)===e&&!i&&r!=RegExp){let t,i=e0.get(e);if(i)return i;if(i=++e1+"~",e0.set(e,i),r===Array){for(i="@",t=0;t<e.length;t++)i+=e3(e[t])+",";e0.set(e,i)}else if(r===Object){i="#";let r=Object.keys(e).sort();for(;void 0!==(t=r.pop());)void 0!==e[t]&&(i+=t+":"+e3(e[t])+",");e0.set(e,i)}return i}return i?e.toJSON():"symbol"===t?e.toString():"string"===t?JSON.stringify(e):""+e}class e4{constructor({state:e,id:t,remapImports:r}){this.state=e,this.id=t,this.remapImports=r}visit(e){eW(e,{enter:e=>{if("VariableDeclaration"===e.type&&this.checkVarDecl(e),"VariableDeclaration"===e.type&&null!=this.checkVarDecl(e)&&this.state.removeableModuleItems.push(e.start),("ExportNamedDeclaration"===e.type||"ExportDefaultDeclaration"===e.type)&&e.declaration?.type==="VariableDeclaration"){let t=e.declaration,r=this.checkVarDecl(t);r&&(this.state.removeableModuleItems.push(e.start),this.state.fontExports.push({type:"ExportNamedDeclaration",specifiers:[{type:"ExportSpecifier",local:r,exported:{name:r.name,type:"Identifier",...eK},...eK}],attributes:[],...eK}))}}})}checkVarDecl(e){let t=e.declarations[0],r=t?.id,i=t?.init;if(i?.type==="CallExpression"){let t=this.checkCallExpr(i,r);if(t){if("const"!==e.kind)throw Error("Font loader calls must be assigned to a const");if(!r)throw Error("Font loader calls must be assigned to an identifier");return t.specifiers=[{type:"ImportDefaultSpecifier",local:r,...eK}],this.state.fontImports.map(e3).includes(e3(t))||this.state.fontImports.push(t),r}}}checkCallExpr(e,t){if("Identifier"===e.callee.type){let r=e.callee,n=this.state.fontFunctions[r.name];if(n){this.state.fontFunctionsInAllowedScope.push(r.start);let o=e.arguments.map(e=>{if("SpreadElement"===e.type)throw Error("Font loaders don't accept spreads");return eZ(e)}),s=n.functionName??"",a={path:this.id,import:s,arguments:o,variableName:t?.name??""};return{type:"ImportDeclaration",source:{type:"Literal",value:"virtual:"+E({url:i.posix.join(this.remapImports[n.loader]||n.loader,"target.css"),query:Object.assign({},a,{arguments:JSON.stringify(a.arguments)})}),...eK},specifiers:[],attributes:[],...eK}}}}}let e2=w(()=>import("./escodegen-C_Z-CdZV.js").then(function(e){return e.e})),e6=()=>{let t=[],n=new Proxy({},{get:(e,t,r)=>Reflect.get(e,t,r),set:(e,t,r,i)=>Reflect.set(e,t,r,i)}),o={isUsingSizeAdjust:!1},s=()=>{for(let e of t){let t=r(import.meta.resolve("next-font/manifest")),i=e.moduleGraph.getModuleById(t);i&&(e.reloadModule(i),e.moduleGraph.invalidateModule(i),e.moduleGraph.onFileChange(t),e.ws.send({type:"full-reload",path:t}))}},a=async e=>{for(let[t,r]of e)for(let e of Object.values(r)){o.isUsingSizeAdjust||(o.isUsingSizeAdjust=e.some(e=>e.includes("-s")));let r=e.filter(e=>/\.p\.(woff|woff2|eot|ttf|otf)$/.test(e));e.length>0&&(o[t]||=[],o[t]=Array.from(new Set(o[t].concat(r))))}s()},[{resetCalledFinished:l,removeTargetCss:h},u]=(({nextFontManifest:t,fontImports:r,onFinished:n})=>{let o=null,s=new Map,a={google:{css:new Map,font:new Map},local:{css:new Map,font:new Map}},l=[{id:"virtual:next-font/google/target.css",loader:eq(),cache:a.google},{id:"virtual:next-font/local/target.css",loader:eG(),cache:a.local}],h=new Map,u=new Map,c=null,f=!1;return[{resetCalledFinished:()=>{f=!1},removeTargetCss:e=>{h.delete(e);let{path:r}=C(b(e)),n=i.join(o.root,r),a=s.get(n)?.[e];if(a)for(let e of(t[n]&&(t[n]=t[n].filter(e=>!a.includes(e))),a))u.set(F(e),Object.assign({},u.get(F(e)),{serve:!1}))}},[{name:"next-font:loader:scan",enforce:"pre",async configResolved(e){o=e},configureServer:e=>()=>{e.middlewares.use((e,t,r)=>{if(!e.originalUrl)return r();let i=u.get(e.originalUrl);i?.serve?t.end(i.content):r()})}},{name:"next-font:loader",resolveId:e=>/\.css(?:$|\?)/.test(e)&&l.some(t=>e.startsWith(t.id))?"\0"+e:null,load:{order:"pre",async handler(e,t){if(!/\.css(?:$|\?)/.test(e))return null;let a=l.find(t=>"\0"+t.id===v(e));if(!a)return null;let{loader:d,cache:p}=a,g=k(e),A=o?.command==="serve";if(A&&h.has(g)&&c===this.environment.name)return;c=this.environment.name;let{path:m,import:y,arguments:I,variableName:E}=C(b(e)),w=JSON.parse(I),x=[],S=(e,t,r,i)=>{let n=ej.interpolateName({},`static/media/[hash]${i?"-s":""}${r?".p":""}.${t}`,{content:e});x.push(n);let o=F(n);return A||this.emitFile({type:"asset",fileName:o.slice(1),source:e}),u.set(o,{content:e,serve:A}),o},B=i.join(o.root,m),Q=await (await d)({functionName:y,variableName:E,data:w,emitFontFile:S,loaderContext:this,cache:p,isDev:A,isServer:t?.ssr??!1,resolve:e=>i.join(i.dirname(B),e.startsWith(".")?e:`./${e}`)}),D=es(B);s.set(D,{...s.get(D),[g]:Array.from(new Set((s.get(D)?.[g]||[]).concat(x)))});let N=await eP(m,Q);if(r[D]){for(let t of r[D])O(import.meta.resolve(v(t.id)),e)&&(t.css=N.code);f||Object.values(r).flat().filter(e=>!e.css).length||await n(s).finally(()=>{f=!0})}return h.set(g,N),N.code}},transform:{order:"post",async handler(e,t,r){if(!/\.css(?:$|\?)/.test(t))return null;let n=k(t),s=h.get(n);if(!s)return null;let{modules:a,code:l,exports:u}=s,c=ef(Object.assign({},a,Object.fromEntries(u.map(e=>[e.name,e.value]))),{namedExports:!0,preferConst:!0}),f=o?.css.devSourcemap?new eQ(l).generateMap({hires:!0}):void 0;return o?.command!=="serve"||r?.ssr?{code:c,map:f,moduleSideEffects:!1}:{code:[`import { updateStyle as __vite__updateStyle, removeStyle as __vite__removeStyle } from ${JSON.stringify(i.posix.join(o.base,"/@vite/client"))}`,`const __vite__id = ${JSON.stringify(t)}`,`const __vite__css = ${JSON.stringify(l)}`,"__vite__updateStyle(__vite__id, __vite__css)",c,"if (import.meta.hot) {",["import.meta.hot.accept()","import.meta.hot.prune(() => __vite__removeStyle(__vite__id))"].map(e=>` ${e}`).join("\n"),"}"].join("\n"),map:f}}}},{name:"next-font:build",apply:"build",renderChunk:{order:"post",async handler(t,r){let n=(await Promise.all(r.moduleIds.map(async e=>this.resolve(e).then(e=>e?.id)))).filter(Boolean);if(n.length){let t=n.map(e=>Object.assign({},h.get(k(e))??{},{id:e})).filter(e=>null!=e&&"code"in e&&"string"==typeof e.code).map(e=>e.code).join();if(t){var o;let n=(o=r.name,es(i.format({...i.parse(o),base:void 0,ext:".css"}))),s=!r.isEntry||r.facadeModuleId&&e(r.facadeModuleId)?n:i.basename(n),a=this.emitFile({type:"asset",name:s,source:t});r.viteMetadata.importedCss.add(this.getFileName(a))}}return null}}}]]})({nextFontManifest:o,fontImports:n,onFinished:a});return[{name:"next-font:scan",configureServer(e){t.push(e)}},(({fontImports:e,onFontImportsChanged:t})=>{let r=null,n={"@next/font/google":"next-font/google","@next/font/local":"next-font/local","next/font/google":"next-font/google","next/font/local":"next-font/local"},o=["next-font/google","next-font/local"];return[{name:"next-font:transform",async configResolved(e){r=e},async transform(s,a){if(!/\.(?:j|t)sx?$|\.mjs$/.test(a))return null;let l=async()=>this.parse(s,{jsx:!0}),{data:h,error:u}=await x(l());if(u&&this.error(u),!h)return;let{changed:c,state:f}=(({ast:e,fontLoaders:t,id:r,remapImports:i})=>{let n=new Proxy({removeableModuleItems:[],fontFunctionsInAllowedScope:[],fontFunctions:{},fontImports:[],fontExports:[]},{set:(e,t,r)=>(e[t]=r,!0),get:(e,t)=>e[t]});if(new eX({state:n,fontLoaders:t,remapImports:i}).visit(e),n.removeableModuleItems.length>0){new e4({state:n,id:r,remapImports:i}).visit(e),new eY({state:n}).visit(e);let t=e=>n.removeableModuleItems.includes(e.start),o=e.body.findIndex(t);return eW(e,{enter(r){e!=r&&t(r)&&this.remove()}}),e.body.splice(o,0,...n.fontImports),e.body.push(...n.fontExports),{changed:!0,state:n}}return{changed:!1,state:n}})({ast:h,fontLoaders:o,id:i.relative(r.root,a),remapImports:n});if(!c)return;let d=f.fontImports.map(e=>e.source.value),p=e[a];p&&d.some(e=>!p.some(t=>t.id===e))&&t(a,d,p.map(e=>e.id)),e[a]=d.map(e=>({id:e}));let g=await e2(),A=new eQ("");for(let e of h.body)A.append(g.generate(e)),A.append("\n");return{code:A.toString()}}}]})({fontImports:n,onFontImportsChanged:async(e,i,n)=>{l();let o=n.filter(e=>!i.includes(e));for(let e of t){for(let t of o){let i=r(import.meta.resolve(v(t)))+b(t);h(k(i));let n=e.moduleGraph.getModuleById(i);n&&(e.moduleGraph.onFileDelete(i),e.ws.send({type:"prune",paths:[i]}),e.ws.send({type:"update",updates:[{type:"css-update",path:i,acceptedPath:i,timestamp:Date.now()},{type:"css-update",path:t,acceptedPath:t,timestamp:Date.now()}]}),e.reloadModule(n),e.ws.send({type:"full-reload",path:i}))}s()}}}),u,(({nextFontManifest:e})=>{let t=null;return[{name:"next-font:manifest",configResolved(e){t=e},transform:{order:"post",async handler(r,i){let{data:n,error:o}=await x(S(i));if(null==o&&null!=n&&n===import.meta.resolve("next-font/manifest"))return[`function encodeURIPath(file) {
6
+ return file
7
+ .split('/')
8
+ .map((p) => encodeURIComponent(p))
9
+ .join('/')
10
+ }`,"const injectedFontPreloadTags = new Set();",`const __NEXT_FONT_MANIFEST__ = ${JSON.stringify(e,null,2)};`,ef({manifest:void 0,getPreloadableFonts:void 0,getFontMetadata:void 0},{preferConst:!0,namedExports:!0}).replace("export const manifest = undefined;","export const manifest = Object.freeze(__NEXT_FONT_MANIFEST__);").replace("export const getPreloadableFonts = undefined;",`export const getPreloadableFonts = (filePath) => {
11
+ if (!manifest || !filePath) return null;
12
+ const fontFiles = new Set();
13
+ let foundFontUsage = false;
14
+ const preloadedFontFiles = manifest[filePath];
15
+ if (preloadedFontFiles) {
16
+ foundFontUsage = true;
17
+ for (let fontFile of preloadedFontFiles) {
18
+ fontFile = \`/${t.build.assetsDir}/_next/\${fontFile}\`;
19
+ fontFiles.add(fontFile);
20
+ injectedFontPreloadTags.add(fontFile);
21
+ }
22
+ }
23
+ if (fontFiles.size) {
24
+ return [...fontFiles].sort();
25
+ } else if (foundFontUsage && injectedFontPreloadTags.size === 0) {
26
+ return [];
27
+ } else {
28
+ return null;
29
+ }
30
+ }`).replace("export const getFontMetadata = undefined;",`export const getFontMetadata = (filePath) => {
31
+ const metadata = {
32
+ preload: [],
33
+ preconnect: []
34
+ };
35
+ const preloadedFontFiles = filePath
36
+ ? getPreloadableFonts(filePath)
37
+ : null;
38
+ if (preloadedFontFiles) {
39
+ if (preloadedFontFiles.length) {
40
+ for (let i = 0; i < preloadedFontFiles.length; i++) {
41
+ const fontFilename = preloadedFontFiles[i];
42
+ const ext = /.(woff|woff2|eot|ttf|otf)$/.exec(fontFilename)[1];
43
+ const type = \`font/\${ext}\`;
44
+ const href = encodeURIPath(fontFilename);
45
+
46
+ metadata.preload.push({
47
+ href,
48
+ type,
49
+ crossOrigin: undefined,
50
+ nonce: undefined
51
+ });
52
+ }
53
+ } else {
54
+ try {
55
+ let url = new URL('/' + '${t.build.assetsDir}');
56
+ metadata.preconnect.push({
57
+ href: url.origin,
58
+ crossOrigin: undefined,
59
+ nonce: undefined
60
+ });
61
+ } catch (error) {
62
+ // assetPrefix must not be a fully qualified domain name. We assume
63
+ // we should preconnect to same origin instead
64
+ metadata.preconnect.push({
65
+ href: '/',
66
+ crossOrigin: '',
67
+ nonce: null
68
+ });
69
+ }
70
+ }
71
+ }
72
+
73
+ return metadata;
74
+ }`),`if (import.meta.hot) import.meta.hot.accept(${JSON.stringify(i)}, () => {
75
+ manifest = __NEXT_FONT_MANIFEST__;
76
+ })`].join("\n")}}}]})({nextFontManifest:o})]};export{ei as c,en as g,e6 as n,eR as r};
package/dist/index.js CHANGED
@@ -1,3 +1 @@
1
- import 'node:url';
2
- export { n as default } from './index-CyE6nKxy.js';
3
- //# sourceMappingURL=index.js.map
1
+ export{n as default}from"./index-CwSLpYSN.js";import"node:url";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@next-font/plugin-vite",
3
3
  "description": "Vite plugin for next/font (@next/font)",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "license": "BSD-2-Clause",
6
6
  "type": "module",
7
7
  "files": [
@@ -16,8 +16,8 @@
16
16
  }
17
17
  },
18
18
  "scripts": {
19
- "build": "bunchee --external=vite,postcss,next-font -m --dts --sourcemap=false",
20
- "dev": "bunchee --external=vite,postcss,next-font -w --dts --sourcemap"
19
+ "build": "bunchee --external=vite,postcss,next-font --clean --minify --dts --sourcemap=false",
20
+ "dev": "bunchee --external=vite,postcss,next-font --watch --dts --sourcemap"
21
21
  },
22
22
  "dependencies": {
23
23
  "postcss": "^8.5.6"