"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4814],{86297:e=>{function t(e){!function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],s=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function o(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};e.hooks.add("after-tokenize",function(t){t.language in p&&function t(n){for(var i=0,p=n.length;i<p;i++){var l=n[i];if("string"!=typeof l){var u=l.content;if(!Array.isArray(u)){"string"!=typeof u&&t([u]);continue}if("template-string"===l.type){var c=u[1];if(3===u.length&&"string"!=typeof c&&"embedded-code"===c.type){var g=function e(t){return"string"==typeof t?t:Array.isArray(t)?t.map(e).join(""):e(t.content)}(c),f=c.alias,y=Array.isArray(f)?f[0]:f,v=e.languages[y];if(!v)continue;u[1]=function(t,n,i){var p=e.tokenize(t,{interpolation:{pattern:RegExp(s),lookbehind:!0}}),l=0,u={},c=o(p.map(function(e){if("string"==typeof e)return e;for(var n,r,a=e.content;-1!==t.indexOf((n=l++,r="___"+i.toUpperCase()+"_"+n+"___")););return u[r]=a,r}).join(""),n,i),g=Object.keys(u);return l=0,!function t(n){for(var s=0;s<n.length;s++){if(l>=g.length)return;var i=n[s];if("string"==typeof i||"string"==typeof i.content){var p=g[l],c="string"==typeof i?i:i.content,f=c.indexOf(p);if(-1!==f){++l;var y=c.substring(0,f),v=function(t){var n={};n["interpolation-punctuation"]=a;var s=e.tokenize(t,n);if(3===s.length){var i=[1,1];i.push.apply(i,o(s[1],e.languages.javascript,"javascript")),s.splice.apply(s,i)}return new e.Token("interpolation",s,r.alias,t)}(u[p]),d=c.substring(f+p.length),k=[];if(y&&k.push(y),k.push(v),d){var h=[d];t(h),k.push.apply(k,h)}"string"==typeof i?(n.splice.apply(n,[s,1].concat(k)),s+=k.length-1):i.content=k}}else{var m=i.content;Array.isArray(m)?t(m):t([m])}}}(c),new e.Token(i,c,"language-"+i,t)}(g,v,y)}}else t(u)}}}(t.tokens)})}(e)}e.exports=t,t.displayName="jsTemplates",t.aliases=[]}}]);